/* =============================================
   Store Banner
   ============================================= */

.store-banner-slider-section {
    padding: 20px;
    background-color: var(--secondary-color);
}


/* Use the existing hero-slider styles, just tweak aspect ratio */

#store-banner-slider {
    max-width: 1280px;
    margin: 0 auto;
    aspect-ratio: 16 / 7;
    /* A bit taller */
}


/* =============================================
   Store Layout
   ============================================= */

.store-layout-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 30px 20px;
    overflow-x: hidden;
    /* Prevent any horizontal scroll */
}


/* === MODIFIED === */

.store-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    /* Sidebar | Main Content */
    gap: 30px;
    /* 'align-items: start;' was removed to allow columns to stretch */
}


/* =============================================
   Store Sidebar - UPDATED
   ============================================= */


/* === MODIFIED === */

.store-sidebar {
    width: 260px;
    position: sticky;
    /* Corrected top position to match 120px header */
    top: 120px;
    /* 'height' was removed to allow grid stretching */
    padding-right: 5px;
    display: flex;
    flex-direction: column;
}


/* UPDATED store-categories */

.store-categories {
    flex-grow: 1;
    /* This makes the nav fill all available vertical space */
    overflow-y: auto;
    /* Make ONLY this element scrollable */
    padding-right: 10px;
    /* Space for scrollbar */
}

.store-categories a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-light);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.store-categories a i {
    font-size: 16px;
    width: 20px;
    text-align: center;
    color: var(--text-light);
    transition: color 0.3s ease;
}

.store-categories a:hover {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

.store-categories a.active {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    font-weight: 600;
}

.store-categories a.active i {
    color: var(--primary-color);
}


/* =============================================
   Mobile-Only Category Scroller
   ============================================= */

.mobile-categories {
    display: none;
    /* Hidden on desktop */
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 15px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

.mobile-categories::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Opera */
}

.mobile-categories a {
    display: inline-block;
    padding: 8px 15px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-light);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    margin-right: 10px;
    transition: all 0.3s ease;
}

.mobile-categories a.active,
.mobile-categories a:hover {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}


/* =============================================
   Store Content
   ============================================= */


/* === MODIFIED === */

.store-content {
    overflow-x: hidden;
    /* NEW: Force content to not overflow */
    /* This calculation fills the viewport height */
    min-height: calc(100vh - 150px);
    /* 100vh (full) - 120px (header) - 30px (bottom padding) */
}

.store-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.store-header-left {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    /* Allow filters to wrap on small screens */
}

.store-header h2 {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
}

.filter-button {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-button:hover {
    background: var(--secondary-color);
    color: var(--primary-color);
}

.filter-tag {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--secondary-color);
    color: var(--primary-color);
    font-size: 13px;
    font-weight: 500;
    padding: 6px 10px;
    border-radius: 6px;
}

.filter-tag i {
    cursor: pointer;
}

.store-header-right span {
    font-size: 14px;
    color: var(--text-light);
    flex-shrink: 0;
    /* Prevent from wrapping */
    padding-left: 10px;
}


/* =============================================
   Product Grid (Re-uses .product-card from styles.css)
   ============================================= */

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}


/* =============================================
   Pagination
   ============================================= */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 40px;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.pagination a:hover {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

.pagination a.active {
    background-color: var(--primary-color);
    color: var(--white);
    font-weight: 600;
}

.pagination span.page-dots {
    color: var(--text-light);
}

.pagination a.disabled {
    color: var(--text-light);
    opacity: 0.6;
    pointer-events: none;
}


/* =============================================
   Store Text Content
   ============================================= */

.store-text-content {
    border-top: 1px solid var(--border-color);
    padding-top: 30px;
}

.store-text-content h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 10px;
}

.store-text-content p {
    font-size: 15px;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 20px;
}


/* =============================================
   Store Page Responsive
   ============================================= */

@media (max-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    /* Hide desktop sidebar */
    .store-sidebar {
        display: none;
    }
    /* Show mobile category scroller */
    .mobile-categories {
        display: block;
    }
    /* Make layout 1-column */
    .store-layout {
        grid-template-columns: 1fr;
    }
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        /* UPDATED from 2 */
    }
    /* Reduce padding for store sections */
    .store-layout-container {
        padding: 20px 15px;
        /* Match main stylesheet */
    }
    .store-banner-slider-section {
        padding: 15px 15px 0 15px;
        /* Match main stylesheet */
    }
}

@media (max-width: 600px) {
    #store-banner-slider {
        aspect-ratio: 16 / 10;
        /* Taller on mobile */
        border-radius: 0;
        /* Full width */
    }
    /* Match banner padding to new container padding */
    .store-banner-slider-section {
        padding: 0 0 15px 0;
        /* No side padding, banner is full-width */
    }
    .store-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .store-header h2 {
        font-size: 24px;
        /* Smaller title on mobile */
    }
    .store-header-left {
        width: 100%;
        justify-content: space-between;
    }
    .store-header-right {
        width: 100%;
        text-align: left;
        padding-left: 0;
    }
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        /* ADDED this line */
        gap: 15px;
        /* Tighter gap on mobile */
    }
    .pagination a,
    .pagination span {
        width: 36px;
        /* Smaller pagination buttons */
        height: 36px;
        font-size: 14px;
    }
}