/* ========================================
   SQUAD.LV - SHOP MENU VERTICAL CSS
   CONSOLIDATED - All duplicates merged
   ======================================== */

/* ========================================
   LAYOUT WRAPPER
   ======================================== */
.spa-products-layout-wrapper {
    display: flex;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1rem;
    min-height: 100vh;
    background: #f8f9fa;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.spa-products-sidebar-container {
    flex: 0 0 250px;
    position: static;
    top: 2rem;
    height: fit-content;
}

.spa-products-main-content {
    flex: 1;
    background: #ffffff;
    border-radius: 6px;
    padding: 0.5rem 0.8rem 4rem 0.8rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

/* ========================================
   MENU WIDGET
   ======================================== */
.spa-shop-menu-widget {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    margin-bottom: 1rem;
}

.spa-menu-header-section {
    line-height: 1.8;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.4rem 0.5em;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color 0.15s ease;
    user-select: none;
}

.spa-menu-header-section:hover {
    background: #f1f5f9;
}

.spa-menu-header-section h3 {
    color: #374151;
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.spa-main-menu-arrow {
    color: #ff0000;
    font-size: 0.8rem;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.spa-shop-menu-widget.spa-main-collapsed .spa-main-menu-arrow {
    transform: rotate(-90deg);
}

.spa-menu-content-wrapper {
    background: #ffffff;
    overflow: hidden;
    transition: max-height 0.1s cubic-bezier(0.1, 0, 0.1, 1), 
                opacity 0.1s cubic-bezier(0.1, 0, 0.1, 1);
}

/* SINGLE definition - merged from lines 71-73 and 448-450 */
.spa-menu-category-item {
    border-bottom: 1px solid #f3f4f6;
    isolation: isolate;
}

.spa-category-title-text {
    font-weight: 500;
    font-size: 0.9rem;
    color: #374151;
}

.spa-category-arrow-icon {
    font-size: 0.7rem;
    color: #9ca3af;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.spa-category-content-area {
    transition: max-height 0.32s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.spa-subcategory-link {
    display: block;
    padding: 0.6rem 1.25rem 0.4rem 2.2rem;
    text-decoration: none;
    font-size: 0.85rem;
    background: #fee0e0 !important;
    transition: background-color 0.1s ease, color 0.1s ease;
    border-left: 3px solid red;
    font-weight: 600;
    color: #691c1c !important;
}

.spa-subcategory-link:hover {
    background: #ffffff;
    color: #374151;
}

.spa-subcategory-link.active {
    background: #fee0e0 !important;
    color: #691c1c !important;
    font-weight: 600;
    border-left: 3px solid red;
    position: relative;
    z-index: 1 !important;
    overflow: hidden;
}

.spa-l2-header-control {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: background-color 0.1s ease;
    user-select: none;
    position: relative;
    z-index: 100;
}

.spa-l2-header-control:hover {
    background: #f9fafb;
}

/* ========================================
   PRODUCTS GRID
   ======================================== */
.spa-products-grid-layout {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

.spa-product-card-widget {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    cursor: pointer;
}

.spa-product-card-widget:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.spa-product-image-area {
    height: 150px;
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spa-product-info-section {
    padding: 1rem;
}

.spa-product-info-section h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 0.5rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
    max-height: 2.4em;
}

.spa-product-description {
    color: #6b7280;
    font-size: 0.8rem;
    margin: 0;
    line-height: 1.3;
}

.spa-add-to-cart-btn {
    padding: 0.5rem 1rem;
    background: #374151;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.875rem;
    transition: background-color 0.15s ease;
}

/* ========================================
   LOADING STATES
   ======================================== */
.products-loading,
.spinner,
.loading-spinner {
    display: none;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================
   PRODUCTS HEADER
   ======================================== */
.products-header {
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
}

.back-button {
    background: #f3f4f6;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    margin-bottom: 1rem;
    font-weight: 500;
}

.back-button:hover {
    background: #e5e7eb;
}

.products-count {
    color: #6b7280;
    font-size: 0.875rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

/* ========================================
   PRODUCT CARDS
   ======================================== */
.product-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.product-image {
    position: relative;
    height: 250px;
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-image-placeholder {
    font-size: 4rem;
    color: #d1d5db;
}

/* SINGLE .sale-badge - merged from 339-349 and 714-725 */
.sale-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ef4444;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 10;
}

/* SINGLE .featured-badge - merged from 471-481 and 702-712 */
.featured-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #fbbf24;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: 600;
    z-index: 10;
}

.product-details {
    padding: 0.85rem;
    height: calc(100% - 250px);
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
    color: #1f2937;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
    max-height: 2.4em;
    word-break: break-word;
}

.product-subtitle {
    display: none;
}

.product-sku {
    font-size: 0.7rem;
    color: #9ca3af;
    margin: 0 0 0.5rem 0;
}

.product-pricing {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.product-price-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.original-price {
    text-decoration: line-through;
    color: #9ca3af;
    font-size: 0.875rem;
}

.current-price {
    color: #059669;
    font-size: 1.25rem;
}

.product-stock {
    font-size: 0.75rem;
    font-weight: 500;
}

.stock-in,
.in-stock {
    color: #059669;
}

.stock-out,
.out-of-stock {
    color: #ef4444;
}

.add-to-cart-btn {
    display: none;
}

.no-products, 
.error-message {
    text-align: center;
    padding: 3rem;
    color: #6b7280;
}

.no-products h2, 
.error-message h2 {
    color: #374151;
    margin-bottom: 1rem;
}

.error-message {
    color: #ef4444;
}

/* ========================================
   PRODUCT DETAIL PAGE
   ======================================== */
.product-detail-page {
    padding: 0.3rem;
}

.product-detail-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.product-detail-top-section {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 2rem;
    align-items: start;
}

.product-detail-left {
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.product-detail-images {
    position: static;
    background: white;
    border-radius: 8px;
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: none;
}

.main-image {
    position: relative;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* SINGLE .image-thumbnails - merged from 483-487 and 745-752 */
.image-thumbnails {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.5rem 0;
    position: relative;
    z-index: 1;
}

/* SINGLE .thumb - merged from 489-495, 754-763, 933-935 */
.thumb {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border: 2px solid #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.1s ease;
}

.thumb:hover {
    border-color: #93c5fd !important;
    transform: scale(1.04);
    border-width: 1px !important; 
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.thumb.active {
    box-shadow: 0 0 0 2px #3b82f6, 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* SINGLE .thumb img - merged from 498-502 and 766-770 */
.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-detail-info {
    padding: 1.5rem;
    position: relative;
    z-index: 2;
}

.product-detail-right {
    width: 300px;
    flex-shrink: 0;
    position: static;
    top: 1rem;
    height: fit-content;
}

.product-detail-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: #1f2937;
}

.product-short-title {
    font-size: 1.1rem;
    color: #6b7280;
    margin: 0 0 1rem 0;
}

.product-detail-sku {
    font-size: 0.875rem;
    color: #9ca3af;
    margin-bottom: 1rem;
}

.product-detail-pricing {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    font-size: 1.5rem;
    position: relative;
    z-index: 3;
}

.regular-price {
    color: #059669;
    font-weight: 700;
}

.sale-price {
    color: #ef4444;
    font-weight: 700;
}

.discount-badge {
    background: #fef2f2;
    color: #ef4444;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.product-detail-stock {
    padding: 1rem;
    border-radius: 6px;
    margin: 1rem 0;
    position: relative;
    z-index: 3;
}

.product-detail-stock.in-stock {
    background: #f0fdf4;
    color: #059669;
}

.product-detail-stock.out-of-stock {
    background: #fef2f2;
    color: #ef4444;
}

.stock-status {
    font-weight: 600;
}

.stock-qty {
    font-size: 0.875rem;
    opacity: 0.8;
}

.product-detail-description {
    margin: 2rem 0;
    position: relative;
    z-index: 3;
}

.product-detail-description h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: #374151;
}

.product-detail-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin: 2rem 0;
    position: relative;
    z-index: 3;
}

.quantity-selector {
    display: flex;
    align-items: center;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    overflow: hidden;
}

.quantity-selector button {
    background: #f3f4f6;
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 1.25rem;
}

.quantity-selector button:hover {
    background: #e5e7eb;
}

.quantity-selector input {
    border: none;
    text-align: center;
    width: 60px;
    padding: 0.5rem;
}

.add-to-cart-primary {
    flex: 1;
    padding: 1rem 2rem;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
}

.add-to-cart-primary:hover:not(:disabled) {
    background: #2563eb;
}

.add-to-cart-primary:disabled {
    background: #d1d5db;
    cursor: not-allowed;
}

.product-additional-info {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.product-additional-info div {
    margin-bottom: 0.5rem;
}

/* ========================================
   COMPATIBLE ITEMS
   ======================================== */
.compatible-items-section {
    background: #f9fafb;
    border-radius: 8px;
    padding: 0.5rem;
    width: 100%;
}

.compatible-items-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
}

.compatible-item-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 0.1rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    gap: 0.65rem;
    align-items: center;
}

.compatible-item-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.compatible-item-image {
    width: 60px;
    height: 60px;
    background: #f3f4f6;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.compatible-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.compatible-item-image .no-image {
    font-size: 1.5rem;
    color: #9ca3af;
}

.compatible-item-info {
    flex: 1;
    min-width: 0;
}

.compatible-item-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: #1f2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.25rem;
    max-width: 210px;
}

.compatible-item-sku {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-bottom: 0.25rem;
}

.compatible-item-price {
    font-weight: 600;
    color: #059669;
    font-size: 0.9rem;
}

.loading-compat {
    padding: 1rem;
    text-align: center;
    color: #6b7280;
}

.no-compatible {
    color: #9ca3af;
    font-style: italic;
}

/* ========================================
   GALLERY CONTROLS
   ======================================== */
.gallery-scroll-btn:hover {
    background: white !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2) !important;
}

.gallery-scroll-btn:active {
    opacity: 0.8 !important;
}

.gallery-scroll-btn[style*="opacity: 0.3"] {
    pointer-events: none;
}

#mainProductImage {
    transition: opacity 0.15s ease-in-out;
}

.spa-products-breadcrumb-nav {
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Gallery scrollbar */
.image-thumbnails-wrapper::-webkit-scrollbar {
    height: 8px;
}

.image-thumbnails-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.image-thumbnails-wrapper::-webkit-scrollbar-thumb {
    background: #3b82f6;
    border-radius: 4px;
}

.image-thumbnails-wrapper::-webkit-scrollbar-thumb:hover {
    background: #2563eb;
}

/* ========================================
   VIDEO GALLERY
   ======================================== */
#video-gallery-container {
    margin-top: 1.5rem;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 1px solid #dee2e6;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

#video-gallery-container h3 {
    font-size: 16px;
    font-weight: 600;
    color: #212529;
    margin: 0 0 15px 0;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

#video-gallery-container h3::before {
    font-size: 24px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.main-video-player-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto 15px;
    aspect-ratio: 16/9;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    cursor: pointer;
    transition: all 0.3s ease;
}

.main-video-player-container:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.2);
}

.main-video-player-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.video-gallery-container {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
}

.video-thumbnails-wrapper {
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px 35px;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: #cf4646 #ff000012;
}

.video-thumbnails-wrapper::-webkit-scrollbar {
    height: 6px;
}

.video-thumbnails-wrapper::-webkit-scrollbar-track {
    background: linear-gradient(90deg, #cf4646, #cf4646);
    border-radius: 10px;
    margin: 0 20px;
}

.video-thumbnails-wrapper::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #cf4646, #cf4646);
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.3);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.video-thumbnails-wrapper::-webkit-scrollbar-thumb:hover {
    background: #ff000012;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.video-thumbnails {
    display: flex;
    gap: 10px;
    min-width: fit-content;
}

.video-thumb {
    position: relative;
    flex-shrink: 0;
    width: 120px;
    height: 90px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #000;
}

.video-thumb:hover {
    border-color: #ff0000;
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 4px 12px rgba(255,0,0,0.3);
    z-index: 10;
}

.video-thumb.active {
    border-color: #ff0000;
    box-shadow: 0 0 0 2px rgba(255,0,0,0.5);
    transform: scale(1.01);
}

.video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.video-thumb:hover img {
    transform: scale(1.0);
}

.video-thumb > div:last-child {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: rgba(255,0,0,0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(255,0,0,0.4);
}

.video-thumb > div:last-child::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(255,0,0,0.3);
    animation: video-pulse 2s infinite;
}

@keyframes video-pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
    100% { transform: scale(1.4); opacity: 0; }
}

.video-thumb:hover > div:last-child {
    transform: translate(-50%, -50%) scale(1.15);
    background: #ff0000;
    box-shadow: 0 6px 16px rgba(255,0,0,0.5);
}

.video-thumb > div:last-child > div {
    width: 0;
    height: 0;
    border-left: 12px solid white;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    margin-left: 3px;
    z-index: 1;
    position: relative;
}

.video-scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 70px;
    background: linear-gradient(135deg, rgba(255,255,255,0.95), rgba(248,249,250,0.95));
    border: 2px solid rgba(255,0,0,0.2);
    border-radius: 8px;
    color: #ff0000;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 20;
    backdrop-filter: blur(10px);
}

.video-scroll-left {
    left: 2px;
}

.video-scroll-right {
    right: 2px;
}

.video-scroll-btn:hover {
    background: linear-gradient(135deg, #ff0000, #cc0000);
    color: white;
    border-color: #ff0000;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 12px rgba(255,0,0,0.3);
}

.video-scroll-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.video-scroll-btn img {
    filter: brightness(0) sepia(98%) saturate(7495%) hue-rotate(359deg) brightness(102%) contrast(118%);
    transition: filter 0.3s ease;
}

.video-scroll-btn:hover img {
    filter: brightness(0);
}

.video-counter {
    text-align: center;
    font-size: 13px;
    color: #6c757d;
    margin-top: 10px;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 15px;
    display: inline-block;
}

.video-counter span {
    color: #ff0000;
    font-weight: 600;
}

/* ========================================
   PRODUCT FILES
   ======================================== */
.product-files-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 30px;
    margin-top: 10px;
}

.product-file-item {
    position: relative;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 10px 8px 8px 8px;
    text-align: center;
    min-height: 110px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.product-file-item:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
    transform: translateY(-2px);
    background: white;
}

.file-icon-wrapper {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    margin-bottom: 3px;
}

.file-type-icon {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.file-info {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.file-name {
    font-weight: 600;
    color: #374151;
    font-size: 12px;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-word;
}

.file-meta {
    display: flex;
    flex-direction: column;
    gap: 1px;
    font-size: 12px;
    color: #6b7280;
}

.file-size,
.file-downloads {
    font-size: 12px;
}

.product-file-item:hover .download-button {
    opacity: 1;
}

.download-button:hover {
    background: rgba(37, 99, 235, 1);
    transform: scale(1.1);
}

/* ========================================
   RESPONSIVE - SINGLE CONSOLIDATED
   ======================================== */
@media (max-width: 968px) {
    .product-detail-top-section {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .spa-products-layout-wrapper {
        flex-direction: column;
        gap: 1rem;
        padding: 0rem;


    }
    
    .spa-products-sidebar-container {
        flex: none;
        position: static;
    }
    
    /* FIXED: Single definition - 2 columns on tablet */
    .spa-products-grid-layout {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .product-detail-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    #video-gallery-container {
        padding: 10px;
    }
    
    .main-video-player-container {
        max-width: 100%;
    }
    
    .video-thumb {
        width: 100px;
        height: 75px;
    }
    
    .video-scroll-btn {
        width: 25px;
        height: 60px;
        font-size: 16px;
    }
    
    .product-files-list {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 8px;
    }
    
    .product-file-item {
        min-height: 100px;
        padding: 8px 6px 6px 6px;
    }
    
    .file-icon-wrapper,
    .file-type-icon {
        width: 32px;
        height: 32px;
    }
    
    .download-button {
        opacity: 1;
    }
}

@media (max-width: 480px) {
    /* 1 column on mobile */
    .spa-products-grid-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}







/* =====================================================
   FLICKER FIX - Reserve space for images BEFORE load
   ===================================================== */

/* Main product image container - already 500px in template */
.main-image {
    min-height: 500px !important;
}

/* Video gallery - reserve full height */
#video-gallery-container {
    min-height: 450px;
}

/* Video thumbnail container */
.main-video-thumbnail-container,
.main-video-thumbnail-container img {
    min-height: 300px;
}

/* Image thumbnails row */
.image-thumbnails,
.image-gallery-container {
    min-height: 96px;
}

/* Video thumbnails */
.video-thumb {
    min-width: 120px;
    min-height: 90px;
}

/* Compatibility items */
.compatible-item-image {
    min-width: 60px;
    min-height: 60px;
}

/* File icons */
.file-type-icon,
.file-icon-wrapper {
    min-width: 50px;
    min-height: 50px;
}

/* Gallery arrows */
.gallery-scroll-btn img,
.video-scroll-btn img {
    width: 10px !important;
    height: 10px !important;
}




@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}