/* ================================== */
/* === General Variables and Utility === */
/* ================================== */

:root {
    --white: #ffffff;
    --black: #000000;
    /*--gray-dark: #333333;*/
    /*--gray-light: #f4f4f4;*/
    --transition: all 0.3s ease;
    --unique-container-padding: 15px; /* Define the standard padding */
}

/* Base style for the containing section */
.unique-section-padding {
    padding: 60px 0;
}

/* ================================== */
/* === CONTAINER FIX: Allow Scrolling Content to Break Out === */
/* ================================== */

.unique-container {
    max-width: 1200px;
    margin: 0 auto;
    
    /* Container handles padding for header/title elements only */
    padding-left: var(--unique-container-padding);
    padding-right: var(--unique-container-padding);
    
    /* Crucial to ensure container does not hide overflow */
    overflow: visible; 
}

/* ================================== */
/* === Section Header Styling (Inside .unique-container) === */
/* ================================== */

.unique-section-header-center {
    position: relative;
    max-width: 100%;
    margin-bottom: 30px;
    padding: 0; 
    text-align: center;
}

/* Section Title (H2/H3) */
.unique-section-title {
    font-size: 2em;
    font-weight: 700;
    color: var(--black);
    margin: 0;
    display: inline-block; 
}

/* Position the View More button to the extreme right on desktop */
.unique-btn-view-more {
    position: absolute;
    right: var(--unique-container-padding); 
    top: 50%;
    transform: translateY(-50%);
    
    text-decoration: none;
    color: var(--black);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 5px 10px;
    border: 1px solid transparent;
    transition: var(--transition);
}

.unique-btn-view-more:hover {
    color: var(--gray-dark); 
    border-color: var(--gray-dark);
}


/* ================================== */
/* === Product Grid (VISIBLE SCROLLBAR) === */
/* ================================== */

.unique-product-grid {
    display: flex; 
    flex-wrap: nowrap; 
    
    /* RETAIN: Forces the scrollbar to appear */
    overflow-x: scroll; 
    overflow-y: hidden;
    
    gap: 30px; /* Desktop gap */
    
    /* Padding retained for scrollbar space */
    padding-bottom: 15px; 

    /* FIX: Use negative margins to pull the grid out past the .unique-container padding */
    margin-left: calc(-1 * var(--unique-container-padding)); 
    margin-right: calc(-1 * var(--unique-container-padding));

    /* ADD PADDING BACK TO THE CONTENT for alignment with the header */
    padding-left: var(--unique-container-padding);
    padding-right: var(--unique-container-padding);
    
    width: auto; 
    box-sizing: border-box;

    /* NOTE: We only keep -webkit-overflow-scrolling for smooth touch scrolling on iOS */
    -webkit-overflow-scrolling: touch; 
    
    /* REMOVED: scrollbar-width, -ms-overflow-style, and ::-webkit-scrollbar display: none */
}

/* --- Product Card (INCREASED SIZE) --- */
.unique-product-card {
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    position: relative; 
    background-color: var(--white);
    
    flex: 0 0 320px; 
    max-width: 320px;
}

/* Link overlay */
.unique-product-card a.unique-product-link-overlay {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* --- Product Image Container (Aspect Ratio) --- */
.unique-product-image {
    position: relative;
    overflow: hidden;
    /*background: var(--gray-light);*/
    margin-bottom: 15px;
    padding-top: 133.33%; 
    height: 0;
    object-fit: contain;
}

/* --- Image Hover Effect: Swap Images & Zoom --- */
.unique-product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain; 
    display: block;
    transition: opacity 0.4s ease-in-out, transform 0.4s ease-in-out; 
}

/* Hover image is initially transparent/stacked */
.unique-product-image .unique-hover-image {
    opacity: 0; 
}

/* Hover Effect */
.unique-product-card:hover .unique-product-image .unique-main-image {
    opacity: 0;
}

.unique-product-card:hover .unique-product-image .unique-hover-image {
    opacity: 1; 
    transform: scale(1.05); 
}

/* --- Quick View Overlay --- */
.unique-quick-view {
    position: absolute;
    bottom: -50px; 
    left: 0;
    width: 100%;
    background: rgba(0,0,0,0.8);
    color: var(--white);
    text-align: center;
    padding: 10px;
    transition: bottom 0.3s ease;
    cursor: pointer;
    font-size: 0.8rem;
    text-transform: uppercase;
    z-index: 10;
}

.unique-product-card:hover .unique-quick-view { 
    bottom: 0; 
}

/* --- Product Info --- */
.unique-product-info{
    text-align: center;
    padding: 0 5px;
}

.unique-product-info h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.unique-product-info h4 a {
    text-decoration: none;
    color: inherit;
}

.unique-product-info h4 a:hover {
    text-decoration: underline;
}


.unique-product-info .unique-price {
    display: block;
    color: var(--gray-dark);
    margin-bottom: 10px; 
}

/* --- Add to Cart Button (Hidden as requested) --- */
.unique-btn-add {
    display: none;
}

/* ================================== */
/* === Scrollbar Styling (Black & White Theme) === */
/* ================================== */

/* 1. STYLES FOR CHROME, SAFARI, EDGE (Webkit Browsers) */

/* The entire scrollbar background track */
.unique-product-grid::-webkit-scrollbar {
    height: 8px; /* Height of the horizontal scrollbar */
}

/* The track (the area the thumb moves along) */
.unique-product-grid::-webkit-scrollbar-track {
    background: var(--white); /* White background track */
    border-radius: 10px;
    border: 1px solid var(--gray-light); /* Light grey border for definition */
}

/* The thumb (the draggable bar) */
.unique-product-grid::-webkit-scrollbar-thumb {
    background-color: var(--black); /* Solid Black thumb */
    border-radius: 10px;
    border: 1px solid var(--black); /* Full black look */
}

/* Hover state for the thumb (optional, for better feedback) */
.unique-product-grid::-webkit-scrollbar-thumb:hover {
    background-color: var(--gray-dark); /* Dark gray on hover */
}


/* 2. STYLES FOR FIREFOX */

/* Firefox uses a single property for styling */
.unique-product-grid {
    /* Set the color scheme for the scrollbar: thumb and track */
    scrollbar-color: var(--black) var(--white); 
    /* Set scrollbar width to thin (optional, default is auto) */
    scrollbar-width: thin; 
}
/* ================================== */
/* === Responsive Styles (Using Increased Fixed Widths) === */
/* ================================== */

/* Tablet View and Below (max-width: 1024px) */
@media (max-width: 1024px) {
    
    /* Section Header: Align everything to the left for mobile/tablet */
    .unique-section-header-center {
        text-align: left;
    }
    
    /* Title aligns left */
    .unique-section-title {
        display: block; 
        text-align: left;
    }

    /* Move button below title and align right for mobile/tablet */
    .unique-btn-view-more {
        position: static; 
        transform: none;
        margin-top: 10px;
        text-align: right;
        padding-right: 0;
        width: 100%; 
        display: block; 
        right: auto; 
    }

    /* Adjust gap for smaller screens */
    .unique-product-grid { 
        gap: 20px; 
    }

    /* Tablet Card Width: Adjusted for larger size */
    .unique-product-card {
        flex: 0 0 280px; 
        max-width: 280px; 
    }
}


/* Medium Mobile View (max-width: 768px) */
@media (max-width: 768px) {
    .unique-product-card {
        flex: 0 0 240px; 
        max-width: 240px; 
    }
}

/* Small Mobile View (max-width: 480px) */
@media (max-width: 480px) {
    .unique-product-card {
        flex: 0 0 200px; 
        max-width: 200px;
    }
}