body { 
    font-family: sans-serif; 
    padding: 1rem; 
    background: #f8f9fa; 
}
h1 { 
    font-size: 1.8rem;
    margin-bottom: 20px;
}
table { 
    width: 100%; 
    border-collapse: collapse; 
    margin-top: 1rem; 
}
th, td { 
    border: 1px solid #ccc; 
    padding: 0.5rem; 
}
th { 
    background: #eee; 
}
#cardContainer td{
    border-top: none;
    border-bottom: 1px dashed #ccc;
}
#cardContainer td.first{
    border-top: 1px solid #ccc;
}
#cardContainer td.last{
    border-bottom: 1px solid #ccc;
}
.main-row:nth-of-type(even) { 
    background-color: #f2f2f2; 
}
button { 
    padding: 0.2rem; 
    margin:0.1rem; 
    cursor: pointer; 
    border: none; 
    background: #65a0e0; 
    color: white; 
    border-radius: 4px;
    min-width: 29px; 
}
button:hover { 
    background: #0056b3; 
}
#tagline{
    font-size: 1rem;
    font-style: italic;
}
.selected{ 
    background-color: #035fc4; 
}
.img-container { 
    padding: 0.5rem; 
    background: #fff; 
}
.img-container img { 
    max-width: 100%; 
    border: 1px solid #ccc;
    margin-top: 0.5rem; 
}
.right{ 
    text-align: right !important;
}
.hidetr{
    display:none;
    background:#fff;
}
.showtr{
    display:table-row;
}
.nestedparts{
    background-color: #f2f6fa;
}
.drawing-box { 
    background: #fff; 
    margin: 1rem 0; 
    border: 1px solid #ccc; 
    border-radius: 6px; 
    padding: 1rem; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); 
}
.drawing-box img { 
    max-width: 100%; 
    height: auto; 
    border: 1px solid #ddd; 
    margin-top: 1rem; 
}
.drawing-description{
    display: inline-block;
    margin: 10px 0;
    font-style: italic;
    font-size: x-large;
}
.drawing-description-modal{
    display: inline-block;
    margin: 0px 0px 20px 0px;
    font-style: italic;
    font-size: 1.2rem;
    background-color: #f2f6fa;
    padding: 5px;
    border: 1px solid #eee;
}
.parts-table { 
    width: 100%; 
    border-collapse: collapse; 
    margin-top: 1rem; 
}
.parts-table th, .parts-table td { 
    border: 1px solid #ccc; 
    padding: 0.5rem; text-align: left; 
}
.parts-table th { 
    background: #eee; 
}
button.drv { 
    margin-top: 0.5rem; 
    cursor: pointer; 
    background: #007bff; 
    color: white; 
    border: none; 
    padding: 0.4rem 0.8rem; 
    border-radius: 4px; 
    float: none;
    display: block;
}
button.drv:hover { 
    background: #0056b3; 
}
.mainnav { 
    text-decoration:none;
    color:#0056b3;
    text-transform: uppercase;
    font-size: smaller;
    font-weight: bold;
}
.mainnav:hover { 
    color: #000;
}
.current{
    background-color: #d1f4d5;
}
.obsolete {
    background-color: #d9534f;
    color: white;
    font-size: 0.8rem;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    text-transform: uppercase;
}
.obsolete-btn {
    background-color: #f79491 !important;
}
button.obsolete-btn:hover { 
    background: #931e19 !important; 
}
.obsolete-btn.selected{
    background-color: #bd4d49 !important;
}
#lang_select{
    float: right;
}
#filters{
    margin-bottom: 10px;
    margin-top: 10px;
    font-size: 1.8rem;
}
#filters input, #filters button, #filters select{
    font-size: 1.1rem;
}
.clrcol{
    border: #fff;
}
.editme{
    color: #0066cc;
    text-decoration: none;
    cursor: pointer;
}
.modal{
    position: fixed;
    top: 50px;
    width: 500px;
    background-color: white;
    padding: 20px;
    line-height: 40px;
    box-shadow: rgba(99, 99, 99, 0.5) 0px 5px 10px 0px;
}
.modal h2{
    margin-top: 0;
}
.modal textarea{
    width: 100%;
    font-size: 14px;
    color: blue;
    font-family: inherit;
}
.modal button{
    padding: 10px;
    float: right;
}
.modal button:disabled{
    background-color: #d0d0d0;
}
.close{
    float: right;
    margin-top: -22px;
    margin-right: -10px;
    font-size: 24px;
    cursor: pointer;
}
.pasleft{
    float: left;
    margin-right: 20px;
}
#modalPrice, 
#modalStock,
#modalOutPrice,
#addModalOutPrice, 
#addModalPrice, 
#addModalStock, 
#addModalCode{
    padding: 5px;
    text-align: right;
    width: 120px;
}
.refresh_btn{
    float: right;
    margin: 0 5px;
    border: 1px #b6b6bf solid;
    padding: 0px 3px 1px 3px;
    font-size: 14px;
    text-decoration: none;
    background-color: #65a0e0;
    color: white;
    border-radius: 4px;
}
#propagationList{
    margin-top: 0;
    font-size: 10px;
    color: #444;
    line-height: 14px;
    background-color: beige;
    padding: 3px;
}
.lightGreen{
    background-color: chartreuse !important;
}
#addPartBtn{
    float: none;
    font-size: 1rem;
}
#scrollToTopBtn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 10;
    display: none;
    background-color: #333;
    color: #fff;
    border: none;
    padding: 15px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 18px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}
#scrollToTopBtn:hover {
    opacity: 1.0;
}
.sortby{
    cursor: pointer;
}
.sortby:hover{
    text-decoration: underline;
}
.sortby.pointout::after {
    content: ' ▼';
    font-size: 0.8em;
    color: #538dcc;
}
.clr{
    float: none;
    clear: both;
    margin-bottom: 20px;
}
.thumb-wrapper {
    display: inline-block;
    position: relative;
    margin: 5px;
}
.thumb-wrapper img.thumbnail {
    max-width: 100px;
    border: 1px solid #ccc;
    display: block;
}
.thumb-delete {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #f33;
    color: white;
    font-weight: bold;
    padding: 3px;
    cursor: pointer;
    border-radius: 3px;
    line-height: 10px;
}
#upImages{
    float: left;
    background-color: #ababab;
}
#upImages:hover{
    background-color:rgb(129, 129, 129);
}
.img-btn {
    padding: 0.2rem;
    margin: 0.1rem;
    cursor: pointer;
    border: none;
    background: #70c090;
    color: white;
    border-radius: 4px;
    min-width: 29px;
}
.img-btn:hover {
    background-color: #398f5c;
}
#lightbox-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    cursor: zoom-out;
    gap: 20px;
}

.lightbox-img {
    max-width: 90vw;
    max-height: 90vh;
    box-shadow: 0 0 30px rgba(255,255,255,0.3);
    border-radius: 4px;
    border: 2px solid #fff;
}

.lightbox-arrow {
    font-size: 3em;
    color: #fff;
    user-select: none;
    cursor: pointer;
    padding: 10px;
    z-index: 10000;
}

.left-arrow {
    position: absolute;
    left: 30px;
    bottom: 30px;
}

.right-arrow {
    position: absolute;
    right: 30px;
    bottom: 30px;
}

#loadscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.loadscreen-img {
    max-width: 90vw;
    max-height: 90vh;
}
.modal select {
    padding: 5px;
}
/* DRAWING MODAL*/
#drawingModal {
    position: fixed; 
    top: 0; 
    left: 0; 
    right: 0; 
    bottom: 0;
    background-color: rgba(0,0,0,0.6);
    display: flex; 
    justify-content: center; 
    z-index: 99;
}
#drawingModal .modal-content {
    background: white;
    overflow-y: auto;
    padding: 20px;
    border-radius: 8px;
    position: relative;
}
#drawingModal .close {
    position: absolute;
    right: 10px;
    top: 5px;
    font-size: 24px;
    cursor: pointer;
    margin-top: 0px;
    margin-right: 0px;
}
/* MOBILE CARD */
.separator td {
    border-left: none;
    border-right: none;
}
.titular{
    background-color: #e6e6e6;
}
#parts-table table td {
    padding: 6px 4px;
    font-size: 14px;
}
.part-card {
    background: #f2f6fa;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    padding: 12px 14px;
    margin: 10px 0;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: background-color 0.3s ease;
}
.part-card.current {
    background-color: #d1f4d5;
    border-color: #57c463;
    box-shadow: 0 0 6px rgba(87, 196, 99, 0.4);
}
.part-card strong {
    display: inline-block;
    min-width: 120px;
    font-weight: 600;
    color: #444;
}
.part-card .right {
    text-align: right;
}

/* MEDIA */
@media (max-width: 768px) {
    #addPartBtn{
        display: none;
    }
    #parts-table {
        display: none;
    }
    #cardContainer {
        display: block;
    }
}
@media (min-width: 769px) {
    #addPartBtn{
        display: block;
    }
    #parts-table {
        display: block;
    }
    #cardContainer {
        display: none;
    }
}
