/* 
    Arterra Exquisite - Main Stylesheet
    Consolidated from index.html, products.html, and category.html
*/

:root {
    --primary-dark: #013d27;
    --accent-color: #862c03;
    --bg-light: #fff4e6;
    --text-primary: #013d27;
    --icon-color: #9e3d28;
    --bs-body-bg: #fff4e6;
    --bs-body-color: #013d27;
    --nav-bg: rgba(255, 255, 255, 0.95);
    --card-bg: #ffffff;
    --border-color: rgba(134, 44, 3, 0.08);
}

[data-bs-theme="dark"] {
    --primary-dark: #f8fafc;
    --accent-color: #ff9d6e;
    --bg-light: #0f172a;
    --text-primary: #f8fafc;
    --icon-color: #f8fafc;
    --bs-body-bg: #0f172a;
    --bs-body-color: #f8fafc;
    --nav-bg: rgba(15, 23, 42, 0.95);
    --card-bg: #1e293b;
    --border-color: rgba(255, 255, 255, 0.1);
    --text-secondary: #e5e7eb;
}

/* Pagination Stylings */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem !important;
    padding-bottom: 2rem;
}

.page-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.page-btn:hover:not(:disabled) {
    background: #f8f9fa;
    border-color: #862c03;
    color: #862c03;
}

.page-btn.active {
    background: #862c03;
    border-color: #862c03;
    color: #fff;
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #eee;
}

/* --- COMMON STYLES --- */
body {
    font-family: 'Outfit', system-ui, -apple-system, sans-serif;
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "Dream Avenue", serif;
}


.section-title {
    font-size: clamp(1.5rem, 5vw, 2rem);
    font-weight: 800;
    margin: 24px 0 16px;
    text-align: center;
    font-family: "Dream Avenue", serif;
    color: var(--primary-dark);
    letter-spacing: 1px;
}

.whatsapp-banner {
    background: var(--accent-color);
    color: #fff;
    text-align: center;
    padding: 10px 15px;
    font-weight: 600;
    font-size: clamp(0.75rem, 3vw, 0.95rem);
    line-height: 1.4;
    word-break: break-word;
    font-family: "Times New Roman", Times, serif;
}

img {
    object-fit: cover;
}

@font-face {
    font-family: "Cavas";
    src: url("../font/Cavas\ Demo.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
}


/* Navbar & Sidebar */
.navbar {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--nav-bg) !important;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.04);
    position: sticky;
    top: 0;
    z-index: 1030;
    min-height: 70px;
    display: flex;
    align-items: center;
}

.category-section-title {
    max-width: 100%;
    word-wrap: break-word;
}


.navbar .container {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    gap: 10px;
    position: relative;
    /* Added for absolute positioning of brand */
}

.navbar-brand {
    position: relative;
    margin: 0 !important;
    padding: 0;
    transition: transform 0.3s ease;
    z-index: 1;
}

.navbar-brand:hover {
    transform: scale(1.02);
}

.navbar-brand img {
    height: 50px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.06));
}

.nav-icons-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    z-index: 2;
}

.hamburger-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 2;
}

[data-bs-theme="dark"] .navbar {
    background: var(--nav-bg) !important;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

[data-bs-theme="dark"] .navbar-brand img {
    background: #ffffff;
    padding: 6px 12px;
    border-radius: 12px;
    filter: none;
}

[data-bs-theme="dark"] .nav-icon {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

[data-bs-theme="dark"] .nav-icon:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-color);
}

[data-bs-theme="dark"] .hamburger {
    background: rgba(255, 255, 255, 0.05);
}

[data-bs-theme="dark"] .hamburger-line {
    background: var(--text-primary);
}

[data-bs-theme="dark"] .whatsapp-banner {
    background: #1e293b;
    border-bottom: 1px solid var(--border-color);
}

[data-bs-theme="dark"] .sticky-filter-wrapper {
    background: rgba(15, 23, 42, 0.8) !important;
    border-bottom: 1px solid var(--border-color);
}

[data-bs-theme="dark"] .bg-white {
    background-color: var(--bs-body-bg) !important;
}

[data-bs-theme="dark"] .bg-light {
    background-color: #1e293b !important;
}

[data-bs-theme="dark"] .page-header {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
}

[data-bs-theme="dark"] .page-title,
[data-bs-theme="dark"] .category-section-title {
    color: #f8fafc !important;
}

[data-bs-theme="dark"] .search-input {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.1);
    color: #f8fafc;
}

[data-bs-theme="dark"] .search-input:focus {
    background: #2d3748;
    border-color: var(--accent-color);
}

[data-bs-theme="dark"] .filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: #e5e7eb;
}

[data-bs-theme="dark"] .filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

[data-bs-theme="dark"] .filter-btn.active {
    background: var(--accent-color) !important;
    color: #fff !important;
}

[data-bs-theme="dark"] .product-list-title h2 {
    color: #f8fafc;
}

[data-bs-theme="dark"] .sort-box select {
    background-color: #1e293b;
    color: #f8fafc;
    border-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .sort-box select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 0.25rem rgba(255, 157, 110, 0.25);
}

[data-bs-theme="dark"] .product-card,
[data-bs-theme="dark"] .fresh-card,
[data-bs-theme="dark"] .category-card {
    background: var(--card-bg);
}

[data-bs-theme="dark"] .product-name,
[data-bs-theme="dark"] .product-price,
[data-bs-theme="dark"] .cat-main,
[data-bs-theme="dark"] .p-name {
    color: var(--text-primary);
}

[data-bs-theme="dark"] .product-cat,
[data-bs-theme="dark"] .p-meta,
[data-bs-theme="dark"] .text-muted {
    color: var(--text-secondary) !important;
}

[data-bs-theme="dark"] .product-list-title h2,
[data-bs-theme="dark"] .section-title,
[data-bs-theme="dark"] .category-section-title {
    color: var(--text-primary);
}

[data-bs-theme="dark"] footer {
    background: #0d1117 !important;
    border-top: 1px solid var(--border-color);
}

[data-bs-theme="dark"] footer .text-muted {
    color: #94a3b8 !important;
}

[data-bs-theme="dark"] .category-pill-overlay,
[data-bs-theme="dark"] .product-info-overlay {
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .add-to-cart-btn {
    background: #334155;
    color: #ff9d6e;
}

[data-bs-theme="dark"] .add-to-cart-btn:hover {
    background: #ff9d6e;
    color: #0f172a;
}

/* Sidebar Dark Mode Fixes */
[data-bs-theme="dark"] .sidebar {
    background-color: #0f172a;
    border-right: 1px solid var(--border-color);
}

[data-bs-theme="dark"] .sidebar-header h5,
[data-bs-theme="dark"] .sidebar a,
[data-bs-theme="dark"] .sidebar-nested-group>a {
    color: #f8fafc !important;
}

[data-bs-theme="dark"] .sidebar a:hover,
[data-bs-theme="dark"] .sidebar-nested-group>a:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--accent-color) !important;
}

[data-bs-theme="dark"] .sidebar-submenu {
    background-color: #1e293b !important;
    border-left: 1px solid var(--border-color);
}

[data-bs-theme="dark"] .nested-items {
    background: rgba(255, 255, 255, 0.02) !important;
}

[data-bs-theme="dark"] .nested-items a {
    color: #cbd5e1 !important;
}

[data-bs-theme="dark"] .nested-items a:hover {
    color: var(--accent-color) !important;
    background: transparent;
}

[data-bs-theme="dark"] .sidebar hr {
    background-color: rgba(255, 255, 255, 0.1);
    opacity: 1;
}

[data-bs-theme="dark"] .sidebar-close {
    color: #f8fafc;
}

@media (max-width: 768px) {

    [data-bs-theme="dark"] .sidebar-submenu,
    [data-bs-theme="dark"] .nested-items {
        background: rgba(255, 255, 255, 0.03) !important;
    }
}

/* Sidebar detail refinements */
[data-bs-theme="dark"] .sidebar-header {
    color: #f8fafc;
}

[data-bs-theme="dark"] .sidebar a.active,
[data-bs-theme="dark"] .sidebar a.menu-open {
    background-color: rgba(255, 255, 255, 0.08);
    border-left-color: var(--accent-color);
}

[data-bs-theme="dark"] .sidebar i.transition-icon {
    color: rgba(255, 255, 255, 0.6);
}

.nav-link {
    font-weight: 500;
    color: var(--bs-body-color);
    transition: color 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--bs-primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 80%;
}

.sidebar {
    height: 100vh;
    width: 280px;
    position: fixed;
    top: 0;
    left: -280px;
    background-color: var(--bs-body-bg);
    padding-top: 20px;
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 1050;
}

.sidebar.active {
    left: 0;
}

.sidebar-header {
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar a {
    padding: 15px 25px;
    text-decoration: none;
    font-size: 1.1rem;
    color: var(--bs-body-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: 0.3s;
    border-left: 4px solid transparent;
}

.sidebar a:hover {
    background-color: var(--bs-tertiary-bg);
    border-left-color: var(--bs-primary);
    color: var(--bs-primary);
}

.hamburger {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    gap: 5px;
    padding: 10px;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, rgba(134, 44, 3, 0.06), rgba(134, 44, 3, 0.06));
}

.hamburger:hover {
    background: linear-gradient(135deg, rgba(134, 44, 3, 0.12), rgba(134, 44, 3, 0.12));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(134, 44, 3, 0.1);
}

.hamburger-line {
    width: 22px;
    height: 2.5px;
    background: var(--accent-color);
    border-radius: 4px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hamburger:hover .hamburger-line {
    background: linear-gradient(90deg, #9e3d28, #862c03);
}

.hamburger:hover .hamburger-line:nth-child(1) {
    transform: translateY(-1px);
}

.hamburger:hover .hamburger-line:nth-child(3) {
    transform: translateY(1px);
}

.nav-icon {
    font-size: 1.3rem;
    color: #9e3d28;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(134, 44, 3, 0.04);
    position: relative;
    flex-shrink: 0;
    text-decoration: none;
    line-height: 0;
}

.nav-icon i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

button.nav-icon {
    border: none;
    padding: 0;
    cursor: pointer;
}

.nav-icon:hover {
    background: rgba(134, 44, 3, 0.1);
    color: #9e3d28;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(134, 44, 3, 0.15);
}

.cart-badge {
    min-width: 18px;
    height: 18px;
    padding: 0 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem !important;
    font-weight: 700 !important;
    top: 2px !important;
    left: 85% !important;
    right: auto !important;
    border: 1.5px solid var(--bs-body-bg) !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transform: translateX(-50%) !important;
}

@media (max-width: 768px) {
    .navbar .container {
        padding-left: 10px;
        padding-right: 10px;
    }

    .navbar-brand img {
        height: 40px;
    }

    .hamburger,
    .nav-icon {
        width: 36px;
        height: 36px;
    }

    .nav-icon {
        font-size: 1rem;
    }

    #navUserName {
        font-size: 0.75rem !important;
        max-width: 70px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* Category Filter Alignment */
    .filter-container .d-flex {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
    }

    .search-box {
        margin-bottom: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .sort-box {
        width: 100% !important;
        min-width: 100% !important;
    }

    .sort-box select {
        width: 100%;
        height: 45px;
    }

    .search-input {
        padding: 12px 12px 12px 45px !important;
        font-size: 0.95rem;
    }
}

/* Desktop Navbar Adjustments */
@media (min-width: 769px) {
    .navbar-brand {
        position: absolute !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .hamburger-wrapper {
        gap: 15px !important;
    }

    #navUserName {
        font-size: 1.1rem !important;
    }
}

/* Animations */
.zoom img {
    transition: transform .35s ease;
}

.zoom:hover img {
    transform: scale(1.05);
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Footer */
footer {
    background: var(--bs-tertiary-bg);
    padding: 40px 0;
}

footer a {
    text-decoration: none;
    color: inherit;
}

/* Dark mode adjustments */
[data-bs-theme="dark"] .sidebar {
    background-color: var(--card-bg);
}

[data-bs-theme="dark"] .bg-white {
    background-color: var(--card-bg) !important;
}

[data-bs-theme="dark"] footer {
    background: #1a1a1a;
}

/* --- INDEX PAGE SPECIFIC --- */
.hero-section {
    position: relative;
    text-align: center;
}

.hero-section .carousel-item img {
    height: 500px;
    object-fit: cover;
    width: 100%;
}

.product-list-title {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 18px;
}

.product-list-title h2 {
    letter-spacing: 0.5px;
    font-family: "Dream Avenue", serif;
    font-weight: 800;
    font-size: clamp(1.25rem, 4vw, 2rem);
    margin: 0;
    color: var(--primary-dark);
}

.product-list-title a {
    position: absolute;
    right: 0;
    font-size: 1.5rem;
    color: var(--accent-color) !important;
    /* Force rust color for arrows */
    transition: transform 0.3s;
}

.product-list-title a:hover {
    transform: translateX(5px);
}

.product-card-img-only {
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 1/1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s;
    background: var(--card-bg);
}

.product-card-img-only:hover {
    transform: translateY(-5px);
}

.product-card-img-only img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- CATEGORY CARDS (USED IN INDEX & CATEGORY) --- */
.category-card {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    display: block;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.category-card:hover {
    transform: translateY(-5px);
}

.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-card span {
    position: absolute;
    left: 50%;
    bottom: 15px;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.85);
    color: #000;
    padding: 8px 20px;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.category-pill-overlay {
    position: absolute;
    left: 50%;
    bottom: 15px;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 8px 16px;
    border-radius: 50px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    min-width: auto;
    width: 90%;
    transition: all 0.3s ease;
}

.category-card:hover .category-pill-overlay {
    bottom: 20px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.cat-main {
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.2;
}

.cat-sub {
    font-size: 0.75rem;
    color: #fff;
    font-weight: 500;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    margin-top: 3px;
    display: block;
}

/* Home Page Category specific sizing */
#categoriesContainer .category-card {
    aspect-ratio: 1/1;
    width: 100%;
    max-width: 400px;
    height: auto;
    margin: 0 auto 20px;
}

/* Custom Carousel Controls */
.custom-carousel-control {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(134, 44, 3, 0.2);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.8;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.custom-carousel-control:hover {
    opacity: 1;
    background: #fff;
    border-color: #862c03;
    box-shadow: 0 6px 20px rgba(134, 44, 3, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.carousel-control-prev.custom-carousel-control {
    left: 5px;
}

.carousel-control-next.custom-carousel-control {
    right: 5px;
}

@media (min-width: 768px) {
    .carousel-control-prev.custom-carousel-control {
        left: -20px;
    }

    .carousel-control-next.custom-carousel-control {
        right: -20px;
    }
}

@media (min-width: 1200px) {
    .carousel-control-prev.custom-carousel-control {
        left: -60px;
    }

    .carousel-control-next.custom-carousel-control {
        right: -60px;
    }
}


/* Category Page specific sizing - Removed to match index.html design */

.fresh-card {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    display: block;
    width: 100%;
    aspect-ratio: 1/1;
    max-width: 320px;
    margin: 0 auto 15px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s;
}

.fresh-card:hover {
    transform: translateY(-5px);
}

.fresh-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fresh-card .product-info-overlay {
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 8px;
    background: var(--nav-bg);
    padding: 8px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(4px);
}

.fresh-card:hover .product-info-overlay {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.fresh-card .p-meta {
    display: block;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    margin-bottom: 4px;
}

.fresh-card .p-name {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

/* Reverting tags */
.fresh-card .p-tag,
.product-card .p-tag {
    display: none;
}



/* --- PRODUCTS PAGE SPECIFIC --- */
/* --- PRODUCTS PAGE SPECIFIC --- */
.page-header {
    background: linear-gradient(180deg, #fff4e6 0%, rgba(255, 255, 255, 0) 100%);
    padding: 80px 0 60px;
    text-align: center;
}

.page-title {
    font-family: "Dream Avenue", serif;
    font-weight: 800;
    font-size: clamp(2rem, 8vw, 3.5rem);
    color: #013d27;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.search-box {
    max-width: 600px;
    margin: 0 auto 2.5rem;
    position: relative;
    z-index: 10;
}

.search-input {
    border-radius: 20px;
    padding: 1.25rem 1.5rem 1.25rem 3.5rem;
    border: 1px solid rgba(134, 44, 3, 0.15);
    background: #fff;
    box-shadow: 0 10px 40px rgba(134, 44, 3, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1.1rem;
}

.search-input:focus {
    border-color: #862c03;
    box-shadow: 0 15px 50px rgba(134, 44, 3, 0.15);
    background: #fff;
    transform: translateY(-2px);
    outline: none;
}

.search-icon {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9e3d28;
    font-size: 1.4rem;
    opacity: 0.7;
}

/* Category Filters */
.sticky-filter-wrapper {
    position: sticky;
    top: 72px;
    /* Adjust based on navbar height */
    z-index: 1000;
    background: rgba(255, 244, 230, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(134, 44, 3, 0.05);
    transition: all 0.3s ease;
}

.categories-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 15px 0;
    /* Fade mask for mobile scroll */
    mask-image: linear-gradient(to right, transparent, black 25px, black calc(100% - 25px), transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 25px, black calc(100% - 25px), transparent);
}

.categories-wrapper::-webkit-scrollbar {
    display: none;
}

.category-filters {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 0 40px;
    min-width: max-content;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(134, 44, 3, 0.1);
    padding: 10px 24px;
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #013d27;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    white-space: nowrap;
}

.filter-btn:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(134, 44, 3, 0.1);
}

.filter-btn.active {
    background: #862c03 !important;
    color: #fff !important;
    border-color: #862c03 !important;
    box-shadow: 0 8px 18px rgba(134, 44, 3, 0.25);
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .sticky-filter-wrapper {
        top: 60px;
        /* Thinner navbar on mobile */
        margin-left: -15px;
        margin-right: -15px;
    }

    .category-filters {
        justify-content: flex-start;
        padding: 0 30px;
    }

    .filter-btn {
        padding: 8px 20px;
        font-size: 0.85rem;
    }

    .page-header {
        padding: 60px 0 40px;
    }
}

/* Detailed Product Card */
.product-card {
    border: none;
    background: transparent;
    transition: transform 0.3s ease;
}

.product-card:hover {
    transform: translateY(-8px);
}

.product-img-container {
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 1/1;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 15px;
    position: relative;
}

/* Category Page Tags */
.product-card .p-tag {
    position: absolute;
    top: 10px;
    z-index: 5;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

.product-card .p-tag-left {
    left: 10px;
    background: rgba(134, 44, 3, 0.85);
    color: #fff;
}

.product-card .p-tag-right {
    right: 10px;
    background: rgba(255, 255, 255, 0.85);
    color: #862c03;
    border: 1px solid rgba(134, 44, 3, 0.1);
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-img {
    transform: scale(1.08);
}

.product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255, 255, 255, 0.9);
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 6;
}

.product-details {
    padding: 5px;
}

.product-cat {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #862c03;
    margin-bottom: 2px;
    display: block;
}

.product-name {
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 6px;
    color: #013d27;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-weight: 800;
    font-size: 1.15rem;
    color: #000;
}

/* States */
#loading {
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.empty-state {
    padding: 100px 0;
    text-align: center;
    color: #888;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.category-section-title {
    font-family: "Dream Avenue", serif;
    font-size: 1.8rem;
    color: #013d27;
    position: relative;
    padding-bottom: 10px;
    margin-top: 2rem;
    display: inline-block;
    margin-bottom: 1.5rem;
}

.category-section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 3px;
    background: #862c03;
    border-radius: 2px;
}

/* --- TOAST NOTIFICATION --- */
.arterra-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #212529;
    color: #fff;
    padding: 12px 24px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    pointer-events: none;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.arterra-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.arterra-toast i {
    color: #9e3d28;
    font-size: 1.2rem;
}

[data-bs-theme="dark"] .arterra-toast {
    background: #fff;
    color: #000;
}

[data-bs-theme="dark"] .arterra-toast i {
    color: #2e7d32;
}

/* Add to Cart Button (Global) */
.add-to-cart-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    bottom: auto;
    width: 38px;
    height: 38px;
    background: var(--card-bg);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
    color: #862c03;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 5;
    opacity: 1;
}

.add-to-cart-btn:hover {
    background: #862c03;
    color: #fff;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(134, 44, 3, 0.2);
}

.add-to-cart-btn i {
    font-size: 1.2rem;
}

.add-to-cart-btn.added {
    background: #013d27;
    color: #fff;
}

/* Sidebar Nested Menu - Flyout Style */
.sidebar-item-group {
    position: static;
    /* Allows submenu to position relative to the sidebar container */
}

.transition-icon {
    transition: transform 0.3s ease;
}

.menu-open .transition-icon {
    transform: rotate(-90deg);
}

/* Points to right when open */

/* Level 1 Submenu (Right Panel) */
.sidebar-submenu {
    display: none;
    /* Toggled via JS */
    position: absolute;
    top: 0;
    left: 280px;
    /* Sidebar Width */
    width: 260px;
    height: 100vh;
    background: var(--bs-body-bg);
    /* Use main bg color */
    border-left: 1px solid rgba(134, 44, 3, 0.1);
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.05);
    overflow-y: auto;
    z-index: 1060;
    padding-top: 20px;
}

/* Level 2 Nested Items (Accordion inside the right panel) */
.nested-items {
    display: none;
    background: rgba(134, 44, 3, 0.04);
    /* Keeps accordion style inside the panel */
}

/* Links inside the Flyout */
.sidebar-nested-group>a {
    padding: 12px 20px;
    font-weight: 600;
    color: #013d27;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    text-decoration: none;
}

.sidebar-nested-group>a:hover {
    background: rgba(134, 44, 3, 0.05);
    color: #862c03;
}

.nested-items a {
    display: block;
    padding: 8px 20px 8px 30px;
    font-size: 0.9rem;
    color: #666;
    text-decoration: none;
    transition: 0.2s;
}

.nested-items a:hover {
    color: #862c03;
    padding-left: 35px;
}

/* Responsive Sidebar Adjustment */
@media (max-width: 768px) {

    /* Revert Flyout to Accordion on Mobile */
    .sidebar-submenu,
    .nested-items {
        position: relative;
        left: 0;
        top: 0;
        width: 100%;
        height: auto;
        box-shadow: none;
        border-left: none;
        background: rgba(0, 0, 0, 0.02);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease-out;
        display: block !important;
        padding-top: 0;
    }

    .sidebar-submenu.active,
    .nested-items.active {
        max-height: 2000px;
        transition: max-height 0.6s ease-in;
    }

    /* Icon rotation for accordion style */
    .menu-open .transition-icon {
        transform: rotate(180deg);
    }

    .hero-section .carousel-item img {
        height: auto;
    }

    .container {
        padding-left: 20px;
        padding-right: 20px;
    }

    .section-title {
        margin: 24px 0 12px;
    }

    .row {
        margin-left: -10px;
        margin-right: -10px;
    }

    .col,
    [class*="col-"] {
        padding-left: 10px;
        padding-right: 10px;
    }

    /* Product Detail Responsive */
    .gallery-col {
        flex-direction: column-reverse;
    }

    .thumb-strip {
        flex-direction: row;
        width: 100%;
        overflow-x: auto;
        padding-bottom: 5px;
    }

    .thumb-box {
        flex-shrink: 0;
    }

    .main-img-box {
        height: auto;
        aspect-ratio: 1/1;
    }

    .info-col {
        padding-left: 0;
        margin-top: 20px;
    }

    /* Cart & Checkout Responsive */
    .cart-item {
        padding: 1rem;
        flex-direction: column;
        text-align: center;
    }

    .cart-item-img {
        width: 100%;
        height: 200px;
        max-width: 250px;
        margin: 0 auto;
    }

    .qty-controls {
        margin: 10px auto;
    }

    .summary-card,
    .form-section,
    .summary-section {
        padding: 1.5rem;
    }

    /* Auth Card Responsive */
    .auth-card {
        padding: 2rem 1.5rem;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 1.5rem;
    }

    .page-title {
        font-size: 1.75rem;
    }

    .hero-section .carousel-item img {
        height: auto;
    }

    /* Force 2 columns on even smaller screens for product listings if needed */
    .row-cols-2>* {
        flex: 0 0 50%;
        max-width: 50%;
    }
}