/* --- Product Detail Page Styles --- */

/* Base styles needed if products.css isn't loaded or doesn't have them */
:root {
    /* Copy variables from products.css if not loaded */
    --primary-bg: #0a0a0a;
    --secondary-bg: #1a1a1a;
    --card-bg: #151515;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --accent-1: #007bff; /* Changed to blue */
    --accent-2: #dc3545; /* Changed to red */
    --border-color: #333333;
    --gradient-primary: linear-gradient(135deg, var(--accent-1) 0%, var(--accent-2) 100%);
     --gradient-secondary: linear-gradient(135deg, #6c757d 0%, #343a40 100%); /* Example */
    --font-primary: 'Inter', sans-serif;
    --font-secondary: 'Orbitron', sans-serif;
     --admin-text-secondary: #6c757d; /* For consistency */
     --danger: #dc3545;
     --gradient-success: linear-gradient(135deg, #28a745 0%, #218838 100%); /* Example success gradient */

}
body { background-color: var(--primary-bg); color: var(--text-primary); font-family: var(--font-primary); }
.container { max-width: 1400px; margin: 0 auto; padding: 0 1rem; } /* Adjusted padding */
.card { background-color: var(--card-bg); border: 1px solid var(--border-color); border-radius: 0.5rem; padding: 1.5rem; }
.button { display: inline-block; padding: 0.75rem 1.25rem; font-size: 1rem; font-weight: 500; text-align: center; border-radius: 0.3rem; cursor: pointer; border: 1px solid transparent; transition: all 0.2s ease-in-out; text-decoration: none; white-space: nowrap; }
.button i { margin-right: 0.4rem; }
.button-primary { background: var(--gradient-primary); border: none; color: #fff; /* White text on gradient */}
.button-primary:hover { filter: brightness(1.1); box-shadow: 0 4px 10px rgba(0,0,0,0.3); }
.button-secondary { background-color: var(--secondary-bg); border: 1px solid var(--border-color); color: var(--text-primary); }
.button-secondary:hover { background-color: #2a2a2a; border-color: var(--text-secondary); }


/* --- Main Detail Section --- */
.product-detail-main {
    padding: 3rem 0;
    margin-top: 10%;
}

/* --- RESTORED: 3-Column Grid Layout (Gallery + Desc + Purchase) --- */
.product-detail-grid-3-col {
    display: grid;
    grid-template-columns: 1fr 1.5fr 1fr; /* Left (Gallery), Middle (Desc), Right (Purchase) */
    gap: 2rem;
    align-items: flex-start;
    margin-bottom: 3rem; /* Add margin below the 3-col grid */
}
/* --- End 3-Col Grid --- */

/* --- Left Column: Gallery --- */
.product-gallery-column .main-image {
    background: #ffffff; border-radius: 12px; overflow: hidden;
    margin-bottom: 1rem; border: 1px solid var(--border-color);
    position: relative; cursor:zoom-in;
}
.product-gallery-column .main-image img {
    width: 100%; height: auto; aspect-ratio: 1 / 1;
    object-fit: contain; display: block; transition: opacity 0.3s ease;
}
.product-gallery-column .thumbnail-images {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 0.75rem;
}
.product-gallery-column .thumb {
    border: 2px solid var(--border-color); border-radius: 6px; overflow: hidden;
    cursor: pointer; transition: border-color 0.3s ease, transform 0.2s ease;
    aspect-ratio: 1 / 1; background-color: #fdfdfd;
}
.product-gallery-column .thumb:hover { transform: scale(1.05); }
.product-gallery-column .thumb.active,
.product-gallery-column .thumb:focus { border-color: var(--accent-1); box-shadow: 0 0 8px rgba(0, 123, 255, 0.5); }
.product-gallery-column .thumb img { width: 100%; height: 100%; display: block; object-fit: cover; }

/* --- Middle Column: Description (Used in 3-col grid AND tab) --- */
.product-description-column .detail-product-name {
    font-family: var(--font-secondary); font-size: 2.2rem;
    margin-bottom: 0.8rem; line-height: 1.2; color: var(--text-primary);
}
.product-description-column .detail-product-price {
    margin-bottom: 1.5rem; font-size: 1.8rem; font-weight: 700;
    color: var(--accent-1); display: flex; align-items: baseline; gap: 0.8rem;
}
.original-price-detail { font-size: 1.1rem; color: var(--text-secondary); text-decoration: line-through; font-weight: 400; }
.product-description-column .detail-product-description {
    margin-bottom: 2rem; font-size: 0.95rem; line-height: 1.7;
    color: var(--text-secondary);
}
.detail-product-features h3 {
    font-family: var(--font-secondary); font-size: 1.1rem; margin-bottom: 0.8rem;
    border-bottom: 1px solid var(--border-color); padding-bottom: 0.5rem;
}
.detail-product-features ul { list-style: none; padding-left: 0; margin: 0; }
.detail-product-features li {
    margin-bottom: 0.6rem; padding-left: 1.2rem; position: relative;
    color: var(--text-secondary);
}
.detail-product-features li::before {
    content: '\f005'; font-family: 'Font Awesome 6 Free'; font-weight: 900;
    color: var(--accent-1); position: absolute; left: 0; top: 1px; font-size: 0.8em;
}

/* --- Right Column: Purchase Box --- */
.product-purchase-column {
    position: sticky; top: 100px; z-index: 10;
}
.product-purchase-column h3 { font-family: var(--font-secondary); font-size: 1.2rem; margin-bottom: 1rem; border-bottom: 1px solid var(--border-color); padding-bottom: 0.5rem; }
.bulk-details { margin-bottom: 1.5rem; }
.bulk-details .detail-item { display: flex; justify-content: space-between; font-size: 0.9rem; padding: 0.75rem 0; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.bulk-details .detail-item:last-child { border-bottom: none; }
.bulk-details .detail-item span:first-child { color: var(--text-secondary); }
.bulk-details .detail-item span:last-child { font-weight: 600; color: var(--text-primary); }
.purchase-btn { width: 100%; padding: 0.8rem; font-size: 1rem; font-family: var(--font-secondary); }
.product-purchase-column .button-secondary { background: var(--secondary-bg); border-color: var(--border-color); }
.product-purchase-column .button-secondary:hover { background-color: #2a2a2a; border-color: var(--text-secondary); }
.user-details-form-whatsapp { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border-color); display: flex; flex-direction: column; gap: 0.8rem; }
.whatsapp-form-title { font-family: var(--font-secondary); font-size: 1rem; color: var(--text-primary); margin-bottom: 0.2rem; text-align: center; }
.form-group-detail { display: flex; flex-direction: column; gap: 0.3rem; }
.form-group-detail label { font-size: 0.8rem; font-weight: 500; color: var(--text-secondary); }
.form-group-detail input { background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border-color); color: var(--text-primary); padding: 0.6rem 0.8rem; border-radius: 6px; font-size: 0.9rem; font-family: var(--font-primary); transition: border-color 0.2s ease, box-shadow 0.2s ease; }
.form-group-detail input:focus { outline: none; border-color: var(--accent-1); box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25); }
.form-group-detail input[style*="border-color: var(--danger)"] { box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.25); }
.button-whatsapp { background: #25D366; border-color: #25D366; color: #fff; margin-top: 1rem; text-align: center; }
.button-whatsapp:hover { background: #1EAE50; border-color: #1EAE50; color: #fff; box-shadow: 0 4px 10px rgba(0,0,0,0.3); transform: translateY(-2px); }
.button-whatsapp i { margin-right: 0.5rem; font-size: 1.1rem; }

/* --- Specifications Table Styles (Used in Tab) --- */
.product-specifications-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}
.specifications-section-title {
    font-family: var(--font-secondary);
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-primary);
}
.specifications-table {
    width: 100%;
    /* max-width: 800px; */
    margin: 0 auto;
    border-collapse: collapse;
    border: 1px solid var(--border-color);
    font-size: 0.95rem;
}
.specifications-table th,
.specifications-table td {
    padding: 0.8rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    vertical-align: top;
}
.specifications-table th {
    font-weight: 600;
    color: var(--text-secondary);
    width: 30%;
}
.specifications-table td {
    color: var(--text-primary);
    line-height: 1.6;
}
.specifications-table tr:last-child th,
.specifications-table tr:last-child td {
    border-bottom: none;
}
.specifications-table tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.03);
}


/* --- Banner Section Styles (Column Layout) --- */
.product-banner-section {
    margin-top: 3rem; padding: 3rem 0; background: var(--primary-bg); overflow: hidden;
}
.banner-section-title { font-family: var(--font-secondary); font-size: 1.8rem; text-align: center; margin-bottom: 2rem; color: var(--text-primary); background: var(--gradient-secondary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.banner-column-container { display: flex; flex-direction: column; gap: 1.5rem; align-items: center; }
.banner-image-item { width: 100%; max-width: 1200px; background-color: #000; border-radius: 8px; overflow: hidden; box-shadow: 0 5px 15px rgba(0,0,0,0.3); }
.banner-image-item img { display: block; width: 100%; height: auto; object-fit: cover; }

/* --- Image Zoom Styles --- */
#image-zoom-result {
    position: absolute; border: 2px solid var(--accent-1);
    width: 600px; height: 400px; /* Adjust size as needed */
    background-repeat: no-repeat; display: none; z-index: 100;
    pointer-events: none; background-color: var(--card-bg);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    /* border-radius: 50%; */
    top:50%; left:25%;

}

/* --- Tabs Section Styles --- */
/* (Injected by injectTabsCSS() in JS, or can be placed here) */
.product-tabs-section {
    margin-top: 3rem;
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
}
.tabs-nav {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 2rem;
}
.tab-btn {
    font-family: var(--font-secondary);
    font-size: 1.1rem;
    font-weight: 600;
    padding: 0.8rem 1.5rem;
    cursor: pointer;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    position: relative;
    top: 2px; /* Sits on top of the border */
    border-bottom: 2px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}
.tab-btn:hover {
    color: var(--text-primary);
}
.tab-btn.active {
    color: var(--accent-1);
    border-bottom-color: var(--accent-1);
}
.tab-content {
    display: none
    animation: fadeIn 0.5s ease;
}
.tab-content.active {
    display: block;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
/*.tabs-content-container{*/
/*    overflow: visible;*/
/*}*/

/* Tweak for tab content */
.tab-content .product-description-column .detail-product-name,
.tab-content .product-description-column .detail-product-price {
    display: none; /* Hide name/price inside tab */
}
.tab-content .product-description-column .detail-product-description {
    font-size: 0.9rem; 
}
.tab-content .product-specifications-section {
    margin-top: 0; padding-top: 0; border-top: none;
}
.tab-content .specifications-section-title {
    text-align: left; margin-bottom: 1.5rem; font-size: 1.5rem;
    background: none; -webkit-background-clip: unset; -webkit-text-fill-color: unset;
    background-clip: unset; color: var(--text-primary);
}

.collapsible-content.description {
    max-height: 250px;
    overflow: hidden;
}

.collapsible-content.description.expanded {
    max-height: fit-content;
    overflow: visible;
}



.collapsible-content.features {
    height: 120px;              /* collapsed height */
    overflow: hidden;
    transition: height 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: height;
}

/* Optional smoother easing */
.collapsible-content.features.expanded {
    overflow: hidden;
}

.read-more-btn {
    display: inline-block;
    margin-top: 12px;
    background: none;
    border: none;
    color: var(--accent-1);
    font-weight: 600;
    font-size: 0.9rem;
    transition: opacity 0.2s ease;
}




/* --- NEW: Simple WhatsApp Chat Link Style --- */
.whatsapp-chat-link {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.5rem; /* Space before features */
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    font-family: var(--font-primary);
    font-weight: 600;
    border-radius: 6px;
    /* Using WhatsApp colors */
    background: #25D366;
    border-color: #25D366;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
}
.whatsapp-chat-link:hover {
    background: #1EAE50;
    border-color: #1EAE50;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    text-decoration: none;
}
.whatsapp-chat-link i {
    font-size: 1.1rem;
}
/* --- End WhatsApp Link Style --- */

/* --- NEW: Stock Status Styles --- */
.bulk-details .detail-item span.stock-in {
    color: var(--success, #28a745); /* Use success color */
    font-weight: 700;
}
.bulk-details .detail-item span.stock-out {
    color: var(--danger, #dc3545); /* Use danger color */
    font-weight: 700;
}
/* --- End Stock Status --- */

/* --- Responsive adjustments --- */
@media (max-width: 1200px) {
    .product-detail-grid-3-col {
        grid-template-columns: 1fr 1.5fr; /* 2 columns */
        gap: 1.5rem;
        margin-bottom: 2rem;
    }
    .product-purchase-column {
        grid-column: 1 / -1; /* Full width on the next row */
        margin-top: 2rem;
        position: static; /* Unstick */
    }
    #image-zoom-result { display: none !important; }
    .product-gallery-column .main-image { cursor: pointer; }
}

@media (max-width: 768px) {
    .product-detail-grid-3-col {
        grid-template-columns: 1fr; /* 1 column */
    }
    .product-gallery-column .main-image { aspect-ratio: 16 / 10; }
     .product-purchase-column { padding: 1rem; }
     /* Adjust 3-col description for mobile */
     .product-detail-grid-3-col .product-description-column .detail-product-name { font-size: 1.8rem; }
     .product-detail-grid-3-col .product-description-column .detail-product-price { font-size: 1.5rem; }
     
     /* Tab styles */
     .tab-btn { font-size: 1rem; padding: 0.7rem 1rem; }
     /* Spec table responsive */
     .specifications-table th,
     .specifications-table td { padding: 0.6rem 0.8rem; font-size: 0.9rem; }
     .specifications-table th { width: 35%; }
}

@media (max-width: 480px) {
     /* Adjust 3-col description for mobile */
    .product-detail-grid-3-col .product-description-column .detail-product-name { font-size: 1.5rem; }
    .product-detail-grid-3-col .product-description-column .detail-product-price { font-size: 1.3rem; }
     
     /* Tab styles */
     .tab-btn { font-size: 0.9rem; padding: 0.6rem 0.8rem; }
    
    .product-gallery-column .thumbnail-images { grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); gap: 0.5rem; }
    .purchase-btn { font-size: 0.9rem; }

     /* Spec table responsive */
     .specifications-table th,
     .specifications-table td {
         display: block; width: 100%; border-bottom: none;
         padding: 0.4rem 0;
     }
      .specifications-table th { font-weight: 700; color: var(--text-primary); margin-bottom: 0.2rem; }
       .specifications-table td {
           padding-left: 0.5rem; border-bottom: 1px solid var(--border-color);
           padding-bottom: 0.6rem; margin-bottom: 0.6rem;
       }
       .specifications-table tr:last-child td { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
       .specifications-table tr:nth-child(even) { background-color: transparent; }
}


/* --- Image Upload Info Text (Admin Consistency - Keep if needed elsewhere) --- */
.image-upload-info { font-size: 0.8rem; color: var(--admin-text-secondary); margin-top: -0.5rem; margin-bottom: 1rem; }
/* Error Message Style */
.error-message { color: var(--danger); font-weight: bold; text-align: center; padding: 2rem; }

/* --- NEW: Bulk Pricing Styles --- */
.bulk-pricing-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    margin-bottom: 5%;
}
.bulk-pricing-title {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin: 0 0 0.8rem 0;
    text-align: center;
}
.bulk-pricing-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.bulk-pricing-item {
    font-size: 0.9rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem 0.8rem;
    border-radius: 4px;
    border-left: 3px solid var(--accent-1);
}
.bulk-pricing-item span {
    font-weight: 700;
    filter: blur(5px);
    /* color: var(--accent-1); */
}
/* --- End New Styles --- */
