/* ========================================= */
/* --- Product Detail Page Styles (MODERN, PREMIUM CONTAINER - V3) --- */
/* ========================================= */

/* Color Palette Variables (Adjusted for a sleeker dark theme) */
:root {
    --bg-dark-primary: #0d0d0d; /* Deepest background, for body */
    --bg-dark-secondary: #1a1a1a; /* Main container background */
    --bg-dark-tertiary: #252525; /* Inner panel background (image/info) */
    --text-light: #f0f0f0; /* Off-white for primary text */
    --text-muted: #a0a0a0; /* Soft gray for secondary text */
    --accent-main: #00e676; /* Vibrant, modern green */
    --accent-hover: #00c853; /* Darker green for hover */
    --border-subtle: #333333; /* Very subtle borders */
    --shadow-soft: rgba(0, 0, 0, 0.5); /* Prominent shadow for the main block */
    --glow-effect: rgba(0, 230, 118, 0.3); /* Glow matching accent */
    --error-color: #ef5350;
    --success-color: #69f0ae;
    --rating-color: #ffd740;
}

/* Base Styles */
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark-primary);
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    color: var(--text-light);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Main Layout Container (Updated for Premium Look and Size) */
.detail-container {
    display: flex;
    flex-wrap: wrap; /* Allows stacking on smaller screens */
    /* Increased Size & Premium Look */
    max-width: 1400px; /* Make it wider, but centered */
    margin: 30px auto; /* Center it with top/bottom margin */
    background-color: var(--bg-dark-secondary); /* A distinct dark background for the main block */
    border-radius: 12px; /* Smoother rounded corners */
    box-shadow: 0 15px 45px var(--shadow-soft); /* More pronounced, soft shadow */
    overflow: hidden; /* Ensures inner elements respect border-radius */
    border: 1px solid var(--border-subtle); /* A very subtle outer border */
    padding: 40px; /* Padding inside the main container to create a frame around content */
    gap: 40px; /* Space between the image and info panels */
    min-height: 700px; /* Ensure a good minimum height for the whole block */
    align-items: stretch; /* Ensures flex items (image/info) stretch to equal height */
}

/* Product Image Section (Left Panel) */
.detail-image {
    flex: 1; /* Allows it to grow to take available space */
    min-width: 400px; /* Minimum width before stacking on smaller screens */
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Center main image vertically */
    align-items: center; /* Center main image horizontally */
    background-color: var(--bg-dark-tertiary); /* Slightly lighter background for the image pane */
    border-radius: 8px; /* Inner rounding */
    padding: 30px; /* Padding inside the image pane */
    box-sizing: border-box;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.4); /* Inner shadow for depth */
    border: 1px solid var(--border-subtle); /* Subtle border for definition */
}

.detail-image #mainImage {
    max-width: 100%;
    max-height: 500px; /* Limit height for aesthetic consistency within its pane */
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 10px 30px var(--shadow-soft); /* Stronger shadow for the main image */
    transition: transform 0.3s ease-out;
}

.detail-image #mainImage:hover {
    transform: scale(1.01);
}

.detail-image .thumbnail-wrapper {
    display: flex;
    justify-content: center;
    gap: 12px; /* Adjusted gap */
    margin-top: 25px; /* Adjusted margin */
    padding: 0 10px; /* Adjusted padding */
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-main) var(--border-subtle);
}

.detail-image .thumbnail-wrapper::-webkit-scrollbar {
    height: 6px;
}
.detail-image .thumbnail-wrapper::-webkit-scrollbar-track {
    background: var(--bg-dark-tertiary); /* Consistent with pane background */
    border-radius: 10px;
}
.detail-image .thumbnail-wrapper::-webkit-scrollbar-thumb {
    background: var(--accent-main);
    border-radius: 10px;
}

.detail-image .thumbnail {
    width: 75px; /* Adjusted size */
    height: 75px;
    object-fit: cover;
    border-radius: 5px; /* Adjusted rounding */
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.detail-image .thumbnail:hover {
    border-color: var(--accent-main);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--glow-effect);
}

.detail-image .thumbnail.active-thumb {
    border-color: var(--accent-main);
    box-shadow: 0 0 10px var(--glow-effect);
    transform: scale(1.04);
}


/* Product Info Section (Right Panel) */
.detail-info {
    flex: 1; /* Allows it to grow to take available space, ensuring equal height with detail-image */
    min-width: 400px; /* Minimum width before stacking */
    background-color: var(--bg-dark-tertiary); /* Consistent background with image pane */
    padding: 30px; /* Generous padding */
    box-sizing: border-box;
    overflow-y: auto; /* Allow scrolling if content exceeds height */
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Align content to top */
    border-radius: 8px; /* Consistent rounding */
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-subtle);
}

.product-breadcrumb {
    font-size: 0.8em;
    color: var(--text-muted);
    margin-bottom: 8px; /* Adjusted margin */
    text-transform: uppercase;
    letter-spacing: 1.8px; /* More spaced out for modern feel */
    font-weight: 500;
}

.product-rating {
    font-size: 1.1em; /* Adjusted size */
    color: var(--rating-color);
    margin-bottom: 12px; /* Adjusted margin */
}

.detail-info h2 {
    font-size: 2.5em; /* Impactful heading */
    color: var(--text-light);
    margin-bottom: 20px; /* Adjusted margin */
    font-weight: 700;
    line-height: 1.15; /* Adjusted line height */
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.05); /* Subtle light glow */
}

.stock-status {
    font-size: 0.9em; /* Adjusted size */
    font-weight: bold;
    color: var(--success-color);
    margin-bottom: 20px; /* Adjusted margin */
    text-transform: uppercase;
    background-color: rgba(0, 230, 118, 0.1);
    padding: 5px 10px; /* Adjusted padding */
    border-radius: 4px;
    display: inline-block;
    border: 1px solid rgba(0, 230, 118, 0.3);
    letter-spacing: 0.6px; /* Adjusted letter spacing */
}

.price-tag {
    font-size: 3em; /* Dominant price */
    color: var(--accent-main);
    font-weight: bold;
    margin-bottom: 10px;
    display: flex;
    align-items: baseline;
    gap: 12px; /* Adjusted gap */
    text-shadow: 0 0 15px var(--glow-effect); /* Stronger glow for price */
}

.original-price {
    font-size: 0.5em; /* Smaller relative to new price size */
    color: var(--text-muted) !important;
    text-decoration: line-through;
    margin-left: 5px;
}

.discount-percent {
    font-size: 0.55em; /* Adjusted size */
    color: var(--success-color);
    font-weight: bold;
    background-color: rgba(0, 230, 118, 0.1); /* Adjusted transparency */
    padding: 2px 6px; /* Adjusted padding */
    border-radius: 3px;
    border: 1px solid rgba(0, 230, 118, 0.2); /* Adjusted transparency */
}

.save-amount {
    font-size: 0.85em; /* Adjusted size */
    color: var(--text-muted);
    margin-bottom: 25px; /* Adjusted margin */
    font-weight: 400;
}

/* Options / Selectors - Clean & Minimalist */
.available-types,
.select-size,
.quantity-selector,
.color-options {
    margin-bottom: 20px; /* Adjusted margin */
    padding: 15px 0; /* Added vertical padding for spacing within pane */
    background-color: transparent; /* No explicit background */
    border-radius: 0;
    border: none; /* No explicit border */
    box-shadow: none;
}

.available-types h3,
.select-size h3,
.quantity-selector h3,
.color-options h3 {
    font-size: 1em; /* Adjusted size */
    color: var(--text-light);
    margin-bottom: 12px; /* Adjusted margin */
    text-transform: uppercase;
    letter-spacing: 1.2px; /* Adjusted letter spacing */
    font-weight: 600;
    border-bottom: 1px dashed var(--border-subtle);
    padding-bottom: 8px; /* Adjusted padding */
}

.type-button,
.size-button {
    background-color: transparent;
    color: var(--text-light);
    border: 1px solid var(--border-subtle);
    padding: 9px 18px; /* Adjusted padding */
    margin: 4px; /* Adjusted margin */
    border-radius: 20px; /* Slightly less rounded */
    cursor: pointer;
    font-size: 0.8em; /* Adjusted size */
    transition: all 0.2s ease-in-out;
    outline: none;
}

.type-button:hover,
.size-button:hover {
    background-color: var(--accent-main);
    color: var(--bg-dark-primary);
    border-color: var(--accent-main);
    box-shadow: 0 3px 10px var(--glow-effect); /* Adjusted shadow */
    transform: translateY(-2px);
}

.type-button.selected,
.size-button.selected {
    background-color: var(--accent-main);
    color: var(--bg-dark-primary);
    border-color: var(--accent-main);
    box-shadow: 0 0 12px var(--glow-effect);
    transform: scale(1.02); /* Adjusted scale */
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 8px; /* Adjusted gap */
    margin-top: 10px; /* Adjusted margin */
}

.quantity-btn {
    background-color: var(--accent-main);
    color: var(--bg-dark-primary);
    border: none;
    width: 34px; /* Adjusted size */
    height: 34px;
    border-radius: 50%;
    font-size: 1.3em; /* Adjusted size */
    cursor: pointer;
    transition: background-color 0.2s ease-in-out, transform 0.1s ease-in-out, box-shadow 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    outline: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2); /* Adjusted shadow */
}

.quantity-btn:hover {
    background-color: var(--accent-hover);
    transform: scale(1.06); /* Adjusted scale */
    box-shadow: 0 4px 10px var(--glow-effect); /* Adjusted shadow */
}

.quantity-value {
    font-size: 1.2em; /* Adjusted size */
    font-weight: bold;
    color: var(--text-light);
    padding: 0 8px; /* Adjusted padding */
    min-width: 35px; /* Adjusted min-width */
    text-align: center;
}

.color-options .color-dot {
    display: inline-block;
    width: 26px; /* Adjusted size */
    height: 26px;
    border-radius: 50%;
    border: 2px solid var(--bg-dark-tertiary); /* Border contrasting with panel background */
    box-shadow: 0 0 0 1px var(--border-subtle), inset 0 0 3px rgba(0,0,0,0.4); /* Adjusted shadow */
    cursor: pointer;
    margin: 0 7px 4px 0; /* Adjusted margin */
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.color-options .color-dot:hover {
    transform: scale(1.08); /* Adjusted scale */
    box-shadow: 0 0 0 3px var(--accent-main), inset 0 0 5px var(--glow-effect); /* Adjusted shadow */
}


.shipping-info {
    font-size: 0.8em; /* Adjusted size */
    color: var(--text-muted);
    text-align: center;
    margin-top: 20px; /* Adjusted margin */
    font-style: italic;
    border-top: 1px dashed var(--border-subtle);
    padding-top: 15px;
}

/* ========================================= */
/* Product Details and Reviews Tab Section */
/* ========================================= */

.tabs {
    display: flex;
    justify-content: flex-start;
    border-bottom: 2px solid var(--border-subtle);
    margin-top: 40px;
    gap: 15px;
}

.tab-button {
    background-color: transparent;
    color: var(--text-muted);
    border: none;
    padding: 10px 15px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s;
    border-bottom: 2px solid transparent;
}

.tab-button:hover {
    color: var(--accent-main);
}

.tab-button.active {
    color: var(--accent-main);
    border-bottom-color: var(--accent-main);
    transform: translateY(2px);
}

.tab-content {
    margin-top: 20px;
    padding: 20px;
    background-color: var(--bg-dark-tertiary);
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.4);
    min-height: 200px;
}

.tab-content h3 {
    font-size: 1.5em;
    color: var(--text-light);
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 10px;
}

.review-item {
    padding: 15px 0;
    border-bottom: 1px dashed var(--border-subtle);
}

.review-item:last-child {
    border-bottom: none;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.review-author {
    font-weight: bold;
    color: var(--text-light);
}

.review-rating {
    color: var(--rating-color);
}

.review-text {
    color: var(--text-muted);
    font-style: italic;
}
/* similar products */
.similar-products-container {
    max-width: 1400px; /* Match the max-width of your main container */
    margin: 60px auto; /* Center it with ample vertical spacing */
    padding: 0 20px;   /* Add some horizontal padding */
}

.similar-products-container h2 {
    font-size: 2.2em;
    color: var(--text-light);
    text-align: center;
    margin-bottom: 40px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border-bottom: 2px solid var(--border-subtle);
    padding-bottom: 15px;
}

/* The grid that holds all the product cards */
.similar-products-grid {
    display: grid;
    margin-top: 30px;
    /* Creates a responsive grid that fits as many columns as possible with a min width of 260px */
    grid-template-columns: repeat(4, 1fr);
    gap: 30px; /* Consistent gap for spacing between cards */
}

/* Styles for each individual product card link */
.product-card {
    display: block;
   
    
    border-radius: 8px; /* Consistent rounding */
    overflow: hidden; /* Ensures the image respects the border-radius */
    text-decoration: none;
    color: inherit;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4); /* Softer shadow than main block */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-6px); /* A nice lift effect on hover */
    box-shadow: 0 12px 35px var(--shadow-soft), 0 0 15px var(--glow-effect); /* Enhanced shadow + accent glow */
}

/* The image inside the card */
.product-card-image {
    width: 60%;
    margin-left: 40px;
    height: 250px; /* Fixed height for a uniform grid appearance */
    object-fit: cover; /* Ensures the image fills the space without distortion */
    display: block; /* Removes any extra space below the image */
    border-bottom: 1px solid var(--border-subtle);
}

/* The container for text content below the image */
.product-card-info {
    padding: 20px;
}

/* The product title in the card */
.product-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-light);
   margin-left: 60px;
    /* The following lines will truncate long titles with an ellipsis (...) */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* The product price in the card */
.product-card-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent-main); /* Use the main accent color for the price */
   margin-left: 60px;
    text-shadow: 0 0 10px var(--glow-effect); /* Subtle glow effect */
}


/* --- Responsiveness for Smaller Screens --- */
@media (max-width: 1024px) {
    .similar-products-container h2 {
        font-size: 1.8em;
    }
    .similar-products-grid {
        gap: 20px;
        /* Adjust column size for tablets */
        grid-template-columns: repeat(2, 1fr);
    }
    .product-card-image {
        height: 250px;
    }
}

@media (max-width: 600px) {
    .similar-products-container {
        margin: 40px auto;
        padding: 0 10px;
    }
    .similar-products-grid {
        /* On very small screens, you might prefer 1 or 2 columns */
       grid-template-columns: 1fr;
    }
     .product-card-image {
        height: 480px; /* Taller image for single-column layout */
    }
}



/* end of similar products */
/* Media Queries for Responsiveness (from the second part) */
@media (max-width: 1200px) {
    .detail-container {
        flex-direction: column; /* Stack image and info vertically */
        padding: 30px; /* Adjusted padding */
        gap: 30px; /* Adjusted gap */
        min-height: auto; /* Allow height to be determined by content when stacked */
    }

    .detail-image,
    .detail-info {
        min-width: unset; /* Remove min-width when stacking */
        width: 100%; /* Take full width when stacked */
        max-width: 100%;
        flex: auto; /* Allow height to be determined by content */
        padding: 25px; /* Adjusted padding */
    }

    .detail-image #mainImage {
        max-height: 400px; /* Adjust max height for stacked layout */
    }

    .detail-info h2 {
        font-size: 2.2em;
    }

    .price-tag {
        font-size: 2.5em;
    }
}

@media (max-width: 768px) {
    body {
        padding: 20px 10px;
    }
    .detail-container {
        border-radius: 8px;
        margin: 20px auto; /* Adjusted margin */
        padding: 25px; /* Adjusted padding */
    }
    .detail-image,
    .detail-info {
        padding: 20px;
    }
    .detail-image #mainImage {
        max-height: 300px;
    }
    .detail-info h2 {
        font-size: 1.8em;
    }
    .price-tag {
        font-size: 2em;
    }
}

@media (max-width: 480px) {
    body {
        padding: 15px 5px;
    }
    .detail-container {
        padding: 15px; /* Adjusted padding */
        gap: 15px; /* Adjusted gap */
        margin: 15px auto; /* Adjusted margin */
    }
    .detail-image,
    .detail-info {
        padding: 15px;
    }
    .detail-image #mainImage {
        max-height: 250px;
    }
    .detail-image .thumbnail {
        width: 55px;
        height: 55px;
    }
    .detail-info h2 {
        font-size: 1.5em;
        margin-bottom: 15px;
    }
    .price-tag {
        font-size: 1.6em;
        gap: 8px;
    }
    .type-button,
    .size-button {
        padding: 7px 12px;
        font-size: 0.75em;
    }
    .quantity-btn {
        width: 30px;
        height: 30px;
        font-size: 1em;
    }
    .color-options .color-dot {
        width: 22px;
        height: 22px;
    }
}
