/**
 * Mechano Product Shortcodes Styles
 * Styles for product detail shortcodes on single product pages
 * 
 * Note: Styles are loaded with priority 999 to ensure they override
 * Elementor, WooCommerce, and theme styles without using !important
 */

/* Article Numbers */
body .mechano-article-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: center;
    font-style: italic;
    padding-left: 10px;
}

body .mechano-article-numbers > div {
    display: flex;
    align-items: center;
    margin-bottom: 0;
}

body .mechano-article-numbers .label {
    font-weight: 600;
    color: #333;
    margin-right: 10px;
}

body .mechano-article-numbers .value {
    color: #666;
}

/* Specifications Table */
body .mechano-specifications h3 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
    border-bottom: 2px solid #2271b1;
    padding-bottom: 10px;
}

body .mechano-specs-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

body .mechano-specs-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
}

body .mechano-specs-table tbody tr:last-child {
    border-bottom: none;
}

body .mechano-specs-table tbody tr:hover {
    background-color: #f8f8f8;
}

body .mechano-specs-table th {
    text-align: left;
    padding: 12px 20px;
    font-weight: 600;
    color: #333;
    background: transparent;
    width: 40%;
}

body .mechano-specs-table td {
    padding: 12px 20px;
    color: #666;
    vertical-align: middle;
}

/* OEM Numbers */
/* .mechano-oem-numbers {
    margin: 30px 0;
} */

body .mechano-oem-numbers h3 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
    border-bottom: 2px solid #2271b1;
    padding-bottom: 10px;
}

body .mechano-oem-list {
    list-style: none;
    padding: 0;
    margin: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

body .mechano-oem-list li {
    padding: 12px 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
}

/* Add border between columns */
body .mechano-oem-list li:nth-child(odd) {
    border-right: 1px solid #e0e0e0;
}

/* Remove bottom border from last row */
/* If last item is even (left column), remove bottom border from both items in last row */
body .mechano-oem-list li:nth-last-child(1):nth-child(even),
body .mechano-oem-list li:nth-last-child(2):nth-child(odd) {
    border-bottom: none;
}

/* If last item is odd (right column), remove bottom border only from last item */
body .mechano-oem-list li:nth-last-child(1):nth-child(odd) {
    border-bottom: none;
}

/* Remove right border from last item */
body .mechano-oem-list li:last-child {
    border-right: none;
}

body .mechano-oem-list li:hover {
    background-color: #f8f8f8;
}

body .mechano-oem-list .oem-brand {
    font-weight: 600;
    color: #2271b1;
    min-width: 80px;
    margin-right: 15px;
    flex-shrink: 0;
}

body .mechano-oem-list .oem-number {
    color: #666;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    word-break: break-word;
}

/* Responsive: single column on small screens */
@media (max-width: 768px) {
    .mechano-oem-list {
        grid-template-columns: 1fr;
    }
    
    .mechano-oem-list li:nth-child(odd) {
        border-right: none;
    }
    
    .mechano-oem-list li:last-child {
        border-bottom: none;
    }
}

/* Compatible Cars */
/* .mechano-compatible-cars {
    margin: 30px 0;
} */

body .mechano-compatible-cars h3 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
    border-bottom: 2px solid #2271b1;
    padding-bottom: 10px;
}

/* Price and Cart */
body .mechano-price-cart {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

body .mechano-price-cart-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

body .mechano-price-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

body .mechano-price {
    font-size: 28px;
    font-weight: 700;
    color: #2271b1;
    line-height: 1.2;
}

body .mechano-price-note {
    font-size: 13px;
    color: #666;
    font-style: italic;
}

body .mechano-stock-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-start; /* Left alignment */
}

body .mechano-stock-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

body .mechano-stock-status {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}

body .mechano-stock-status.in-stock {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

body .mechano-stock-status.out-of-stock {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

body .mechano-stock-quantity {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: #f5f5f5;
    color: #666;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid #e0e0e0;
    white-space: nowrap;
}

body .mechano-stock-quantity::before {
    content: '📦';
    margin-right: 6px;
    font-size: 14px;
}

body .mechano-delivery-info {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: #e3f2fd;
    color: #1976d2;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid #90caf9;
    white-space: nowrap;
    gap: 8px;
}

body .mechano-delivery-info::before {
    content: '🚚';
    font-size: 16px;
    line-height: 1;
}

body .mechano-delivery-wrapper {
    display: flex;
    align-items: flex-start; /* Left alignment */
    flex-wrap: wrap;
}

body .mechano-cart-section {
    margin-top: 10px;
}

/* Override WooCommerce form.cart margin */
body .mechano-cart-section form.cart,
body .mechano-price-cart .mechano-cart-section form.cart,
body .mechano-price-cart form.cart {
    margin-bottom: 0 !important;
}

/* Quantity selector with +/- buttons */
body .mechano-cart-section .quantity,
body .mechano-price-cart .quantity,
body .woocommerce .mechano-cart-section .quantity {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    margin-bottom: 20px !important;
    visibility: visible !important;
}

/* Force hidden inputs to be visible */
body .mechano-cart-section .quantity input[type="hidden"].qty,
body .mechano-price-cart .quantity input[type="hidden"].qty,
body .woocommerce .mechano-cart-section .quantity input[type="hidden"].qty {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    width: auto !important;
    height: auto !important;
}

body .mechano-cart-section .quantity .qty,
body .mechano-price-cart .quantity .qty,
body .woocommerce .mechano-cart-section .quantity .qty {
    flex: 0 0 80px !important; /* Fixed width instead of flex: 1 */
    text-align: center !important;
    padding: 12px 10px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    border: 1px solid #e0e0e0 !important;
    border-left: none !important;
    border-right: none !important;
    border-radius: 0 !important;
    background: #fff !important;
    color: #333 !important;
    -moz-appearance: textfield !important;
    appearance: textfield !important;
    min-width: 0 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

body .mechano-cart-section .quantity .qty::-webkit-outer-spin-button,
body .mechano-cart-section .quantity .qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Minus button */
body .mechano-cart-section .quantity .minus,
body .mechano-cart-section .quantity button.minus,
body .mechano-cart-section .quantity .mechano-qty-minus,
body .mechano-price-cart .quantity .minus,
body .mechano-price-cart .quantity button.minus,
body .mechano-price-cart .quantity .mechano-qty-minus,
body .woocommerce .mechano-cart-section .quantity .minus,
body .woocommerce .mechano-cart-section .quantity button.minus,
body .woocommerce .mechano-cart-section .quantity .mechano-qty-minus {
    position: relative !important;
    flex: 1 1 0 !important; /* Equal width for both buttons */
    flex-basis: 0 !important; /* Ensure equal distribution */
    height: 100% !important;
    min-height: 48px !important;
    min-width: 0 !important; /* Allow shrinking */
    padding: 0 !important;
    border: 1px solid #e0e0e0 !important;
    border-right: none !important;
    border-radius: 8px 0 0 8px !important;
    background: #f8f8f8 !important;
    color: #333 !important;
    font-size: 20px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
    z-index: 1 !important;
    line-height: 1 !important;
}

body .mechano-cart-section .quantity .minus:hover,
body .mechano-cart-section .quantity button.minus:hover,
body .mechano-cart-section .quantity .mechano-qty-minus:hover,
body .mechano-price-cart .quantity .minus:hover,
body .mechano-price-cart .quantity button.minus:hover,
body .mechano-price-cart .quantity .mechano-qty-minus:hover,
body .woocommerce .mechano-cart-section .quantity .minus:hover,
body .woocommerce .mechano-cart-section .quantity button.minus:hover,
body .woocommerce .mechano-cart-section .quantity .mechano-qty-minus:hover {
    background: #e8e8e8 !important;
    border-color: #2271b1 !important;
    color: #2271b1 !important;
}

body .mechano-cart-section .quantity .minus:active,
body .mechano-cart-section .quantity button.minus:active,
body .mechano-cart-section .quantity .mechano-qty-minus:active {
    background: #d0d0d0;
}

/* Plus button */
body .mechano-cart-section .quantity .plus,
body .mechano-cart-section .quantity button.plus,
body .mechano-cart-section .quantity .mechano-qty-plus,
body .mechano-price-cart .quantity .plus,
body .mechano-price-cart .quantity button.plus,
body .mechano-price-cart .quantity .mechano-qty-plus,
body .woocommerce .mechano-cart-section .quantity .plus,
body .woocommerce .mechano-cart-section .quantity button.plus,
body .woocommerce .mechano-cart-section .quantity .mechano-qty-plus {
    position: relative !important;
    flex: 1 1 0 !important; /* Equal width for both buttons */
    flex-basis: 0 !important; /* Ensure equal distribution */
    height: 100% !important;
    min-height: 48px !important;
    min-width: 0 !important; /* Allow shrinking */
    padding: 0 !important;
    border: 1px solid #e0e0e0 !important;
    border-left: none !important;
    border-radius: 0 8px 8px 0 !important;
    background: #f8f8f8 !important;
    color: #333 !important;
    font-size: 20px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
    z-index: 1 !important;
    line-height: 1 !important;
}

body .mechano-cart-section .quantity .plus:hover,
body .mechano-cart-section .quantity button.plus:hover,
body .mechano-cart-section .quantity .mechano-qty-plus:hover,
body .mechano-price-cart .quantity .plus:hover,
body .mechano-price-cart .quantity button.plus:hover,
body .mechano-price-cart .quantity .mechano-qty-plus:hover,
body .woocommerce .mechano-cart-section .quantity .plus:hover,
body .woocommerce .mechano-cart-section .quantity button.plus:hover,
body .woocommerce .mechano-cart-section .quantity .mechano-qty-plus:hover {
    background: #e8e8e8 !important;
    border-color: #2271b1 !important;
    color: #2271b1 !important;
}

body .mechano-cart-section .quantity .plus:active,
body .mechano-cart-section .quantity button.plus:active,
body .mechano-cart-section .quantity .mechano-qty-plus:active {
    background: #d0d0d0;
}

/* Ensure input is between buttons */
body .mechano-cart-section .quantity .qty,
body .mechano-price-cart .quantity .qty,
body .woocommerce .mechano-cart-section .quantity .qty {
    flex: 0 0 80px !important; /* Fixed width instead of flex: 1 */
    position: relative !important;
    z-index: 0 !important;
    border-left: none !important;
    border-right: none !important;
    border-radius: 0 !important;
    padding: 12px 10px !important;
}

/* Hide duplicate stock information from WooCommerce */
body .mechano-cart-section p.stock,
body .mechano-cart-section .stock {
    display: none !important;
}

body .mechano-price-cart .mechano-cart-section .single_add_to_cart_button,
body .mechano-price-cart .mechano-cart-section button.single_add_to_cart_button,
body .mechano-price-cart .mechano-cart-section .button.single_add_to_cart_button,
body .mechano-price-cart .mechano-cart-section .button.alt.single_add_to_cart_button {
    width: 100% !important;
    padding: 14px 24px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    background: #2271b1 !important;
    background-color: #2271b1 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    box-shadow: none !important;
    margin-bottom: 0 !important;
    margin: 0 !important;
}

body .mechano-price-cart .mechano-cart-section .single_add_to_cart_button:hover,
body .mechano-price-cart .mechano-cart-section button.single_add_to_cart_button:hover,
body .mechano-price-cart .mechano-cart-section .button.single_add_to_cart_button:hover,
body .mechano-price-cart .mechano-cart-section .button.alt.single_add_to_cart_button:hover {
    background: #005a87 !important;
    background-color: #005a87 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.3) !important;
}

body .mechano-price-cart .mechano-cart-section .single_add_to_cart_button:active,
body .mechano-price-cart .mechano-cart-section button.single_add_to_cart_button:active,
body .mechano-price-cart .mechano-cart-section .button.single_add_to_cart_button:active,
body .mechano-price-cart .mechano-cart-section .button.alt.single_add_to_cart_button:active {
    transform: translateY(0) !important;
}

body .mechano-price-cart .mechano-cart-section .single_add_to_cart_button:disabled,
body .mechano-price-cart .mechano-cart-section button.single_add_to_cart_button:disabled,
body .mechano-price-cart .mechano-cart-section .button.single_add_to_cart_button:disabled,
body .mechano-price-cart .mechano-cart-section .button.alt.single_add_to_cart_button:disabled {
    background: #ccc !important;
    background-color: #ccc !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

body .mechano-cart-unavailable {
    color: #c62828;
    font-size: 14px;
    font-style: italic;
    margin: 0;
    padding: 10px;
    background: #ffebee;
    border-radius: 4px;
    text-align: center;
}

/* Responsive for Price Cart */
@media (max-width: 768px) {
    body .mechano-price-cart {
        padding: 15px;
    }
    
    body .mechano-price {
        font-size: 24px;
    }
}

/* Product Documents */
body .mechano-product-documents {
    margin: 30px 0;
}

body .mechano-product-documents h3 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
    border-bottom: 2px solid #2271b1;
    padding-bottom: 10px;
}

body .mechano-documents-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

body .mechano-document-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
}

body .mechano-document-item:hover {
    border-color: #2271b1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateX(5px);
}

body .mechano-document-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    text-decoration: none;
    color: #333;
}

body .mechano-document-link svg {
    flex-shrink: 0;
    color: #d32f2f;
}

body .mechano-document-link:hover svg {
    color: #b71c1c;
}

body .mechano-document-link .document-name {
    font-size: 15px;
    font-weight: 500;
}

body .mechano-document-link:hover .document-name {
    color: #2271b1;
}

/* Compatible Cars Hierarchy */
body .mechano-cars-hierarchy {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

body .mechano-car-manufacturer {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

body .mechano-car-manufacturer-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    background: #f5f5f5;
    cursor: pointer;
    transition: all 0.3s;
    user-select: none;
    border-bottom: 1px solid #e0e0e0;
}

body .mechano-car-manufacturer-header:hover {
    background: #eeeeee;
}

body .mechano-car-manufacturer-header.active {
    background: #e3f2fd;
    border-bottom-color: #2271b1;
}

body .mechano-car-toggle-icon {
    font-size: 12px;
    color: #2271b1;
    transition: transform 0.3s;
    flex-shrink: 0;
    width: 16px;
    display: inline-block;
}

body .mechano-car-manufacturer-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    flex: 1;
}

body .mechano-car-models {
    padding: 0;
}

body .mechano-car-model {
    border-top: 1px solid #e0e0e0;
    background: #fafafa;
}

body .mechano-car-model:first-child {
    border-top: none;
}

body .mechano-car-model-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px 12px 50px;
    cursor: pointer;
    transition: all 0.3s;
    user-select: none;
    border-bottom: 1px solid #e8e8e8;
}

body .mechano-car-model-header:hover {
    background: #f0f0f0;
}

body .mechano-car-model-header.active {
    background: #e8f4f8;
}

body .mechano-car-model-name {
    font-size: 15px;
    font-weight: 500;
    color: #555;
    flex: 1;
}

body .mechano-car-engines {
    padding: 0;
    background: #fff;
}

body .mechano-car-engine {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 20px 10px 90px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

body .mechano-car-engine:last-child {
    border-bottom: none;
}

body .mechano-car-engine-name {
    font-weight: 500;
    color: #333;
    flex: 1;
}

body .mechano-car-years {
    color: #666;
    font-size: 13px;
    padding: 4px 10px;
    background: #f5f5f5;
    border-radius: 4px;
}

/* Legacy table styles (kept for backward compatibility if needed) */
body .mechano-cars-table-wrapper {
    overflow-x: auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
}

body .mechano-cars-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

body .mechano-cars-table thead {
    background: #2271b1;
    color: #fff;
}

body .mechano-cars-table thead th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
}

body .mechano-cars-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
}

body .mechano-cars-table tbody tr:last-child {
    border-bottom: none;
}

body .mechano-cars-table tbody tr:hover {
    background-color: #f8f8f8;
}

body .mechano-cars-table tbody td {
    padding: 12px 15px;
    color: #666;
    font-size: 14px;
}

/* Product Gallery */
/* .mechano-product-gallery {
    margin: 30px 0;
} */

body .mechano-product-gallery h3 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
    border-bottom: 2px solid #2271b1;
    padding-bottom: 10px;
}

/* Main Image + Thumbnails Style */
body .mechano-gallery-main-style .mechano-gallery-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

body .mechano-gallery-main {
    position: relative;
    width: 100%;
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 4/3;
}

body .mechano-gallery-main-image {
    width: 100%;
    height: 100% !important;
    object-fit: contain;
    display: block;
    transition: opacity 0.15s ease;
}

body .mechano-gallery-main-link {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
}

body .mechano-gallery-main-link:hover .mechano-gallery-main-image {
    transform: scale(1.02);
    transition: transform 0.3s ease;
}

/* Thumbnails Row */
body .mechano-gallery-thumbnails {
    display: grid;
    gap: 10px;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    overflow-x: auto;
    padding: 5px 0;
}

body .mechano-thumbnails-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

body .mechano-thumbnails-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

body .mechano-thumbnails-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

body .mechano-thumbnails-columns-5 {
    grid-template-columns: repeat(5, 1fr);
}

body .mechano-thumbnails-columns-6 {
    grid-template-columns: repeat(6, 1fr);
}

body .mechano-gallery-thumbnail {
    position: relative;
    cursor: pointer;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f8f8;
    aspect-ratio: 1;
    transition: all 0.3s ease;
}

body .mechano-gallery-thumbnail:hover {
    border-color: #2271b1;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

body .mechano-gallery-thumbnail.active {
    border-color: #2271b1;
    border-width: 3px;
    box-shadow: 0 0 0 1px #2271b1;
}

body .mechano-gallery-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

body .mechano-gallery-grid {
    display: grid;
    gap: 15px;
    margin: 0;
}

body .mechano-gallery-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

body .mechano-gallery-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

body .mechano-gallery-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

body .mechano-gallery-columns-5 {
    grid-template-columns: repeat(5, 1fr);
}

body .mechano-gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: #f8f8f8;
    aspect-ratio: 1;
    border: 1px solid #e0e0e0;
}

body .mechano-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

body .mechano-gallery-link {
    display: block;
    position: relative;
    width: 100%;
    height: 100%;
}

body .mechano-gallery-link:hover img {
    transform: scale(1.05);
}

body .mechano-gallery-zoom-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

body .mechano-gallery-link:hover .mechano-gallery-zoom-icon {
    opacity: 1;
}

/* Lightbox Styles */
body .mechano-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 99999;
    align-items: center;
    justify-content: center;
}

body .mechano-lightbox.active {
    display: flex;
}

body .mechano-lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
}

body .mechano-lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

body .mechano-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 100000;
    background: rgba(0, 0, 0, 0.5);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background 0.3s ease;
}

body .mechano-lightbox-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

body .mechano-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.7);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    user-select: none;
    z-index: 100001;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

body .mechano-lightbox-nav:hover {
    background: rgba(0, 0, 0, 0.9);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.7);
}

body .mechano-lightbox-prev {
    left: 30px;
}

body .mechano-lightbox-next {
    right: 30px;
    left: auto;
}

body .mechano-lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 16px;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px 20px;
    border-radius: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    body .mechano-article-numbers {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    body .mechano-article-numbers > div {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }
    
    body .mechano-article-numbers .label {
        min-width: auto;
        margin-bottom: 5px;
    }
    
    .mechano-specs-table th {
        width: 50%;
    }
    
    .mechano-specs-table th,
    .mechano-specs-table td {
        padding: 10px;
        font-size: 13px;
    }
    
    .mechano-oem-list li {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .mechano-oem-list .oem-brand {
        margin-bottom: 5px;
    }
    
    .mechano-compatible-cars h3,
    .mechano-specifications h3,
    .mechano-oem-numbers h3,
    .mechano-product-gallery h3 {
        font-size: 18px;
    }
    
    .mechano-cars-table thead th,
    .mechano-cars-table tbody td {
        padding: 10px;
        font-size: 12px;
    }
    
    /* Gallery responsive */
    .mechano-gallery-columns-3,
    .mechano-gallery-columns-4,
    .mechano-gallery-columns-5 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Main + Thumbnails responsive */
    .mechano-thumbnails-columns-4,
    .mechano-thumbnails-columns-5,
    .mechano-thumbnails-columns-6 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .mechano-gallery-main {
        aspect-ratio: 1;
    }
    
    body .mechano-lightbox-close,
    body .mechano-lightbox-nav {
        width: 50px;
        height: 50px;
        font-size: 30px;
    }
    
    body .mechano-lightbox-prev {
        left: 15px;
    }
    
    body .mechano-lightbox-next {
        right: 15px;
        left: auto;
    }
}

@media (max-width: 480px) {
    .mechano-thumbnails-columns-3,
    .mechano-thumbnails-columns-4,
    .mechano-thumbnails-columns-5,
    .mechano-thumbnails-columns-6 {
        grid-template-columns: repeat(2, 1fr);
    }
}

