/* ==========================================================================
   ALNAIR CATALOGUE - PURE VANILLA CSS STYLESHEET (OFFLINE & LOCAL URL SAFE)
   ========================================================================== */

/* --- Custom Variables & Reset --- */
:root {
    /* Colors */
    --maroon: #5d0f0f;
    --maroon-dark: #430a0a;
    --maroon-light: #7b1a1a;
    --maroon-bg: #fdf2f2;
    --gold: #eab308;
    --gold-hover: #facc15;
    --cream: #fbfaf8;
    
    --white: #ffffff;
    --black: #000000;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Layouts */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-round: 9999px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--gray-100);
    color: var(--gray-900);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

button {
    font-family: inherit;
    border: none;
    background: none;
    cursor: pointer;
    outline: none;
}

input, select {
    font-family: inherit;
}

.is-hidden {
    display: none !important;
}

/* --- Brand Typography --- */
.brand-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    letter-spacing: 0.2em;
    line-height: 1;
    font-size: 1.25rem;
}

.brand-subtitle {
    font-size: 8px;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    margin-top: 4px;
    color: var(--gray-300);
    font-weight: 500;
}

/* --- Sticky Headers & Navigation --- */
.desktop-header {
    background-color: var(--maroon);
    color: var(--white);
    position: sticky;
    top: 0;
    z-index: 40;
    box-shadow: var(--shadow-md);
    display: none; /* Mobile first hidden */
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.logo-container {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    text-align: left;
}

.brand-logo-badge {
    width: 2.75rem;
    height: 2.75rem;
    flex: 0 0 2.75rem;
    display: grid;
    place-items: center;
    padding: 0.18rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 0.8rem;
    background: linear-gradient(145deg, #ffffff, #f3e9e4);
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
}

.brand-logo-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.brand-copy {
    display: block;
    min-width: 0;
}

.brand-copy .brand-title,
.brand-copy .brand-subtitle {
    margin-left: 0;
    margin-right: 0;
}

.logo-container:hover .brand-title {
    letter-spacing: 0.25em;
    color: var(--gold-hover);
}

.logo-container:hover .brand-logo-badge {
    transform: translateY(-1px) scale(1.03);
    box-shadow: 0 7px 18px rgba(0, 0, 0, 0.26);
}

.brand-title, .brand-subtitle {
    transition: var(--transition);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    color: var(--gray-300);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    position: relative;
    padding-bottom: 4px;
    transition: var(--transition);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--gold-hover);
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--white);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link.active {
    color: var(--white);
}

.header-search {
    flex: 1;
    max-width: 450px;
    margin: 0 2rem;
}

.search-input-wrapper {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.search-input-wrapper:focus-within {
    background-color: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.3);
}

.search-icon {
    width: 1rem;
    height: 1rem;
    color: var(--gray-300);
}

.search-input-wrapper input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--white);
    font-size: 0.875rem;
    width: 100%;
}

.search-input-wrapper input::placeholder {
    color: var(--gray-400);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.action-btn-icon {
    position: relative;
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.action-btn-icon:hover {
    color: var(--gold-hover);
}

.action-btn-icon i {
    width: 1.5rem;
    height: 1.5rem;
}

/* Badges */
.badge {
    position: absolute;
    top: -6px;
    right: -6px;
    font-size: 9px;
    font-weight: 700;
    width: 16px;
    height: 16px;
    border-radius: var(--radius-round);
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0);
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.25);
}

.badge-white {
    background-color: var(--white);
    color: var(--maroon);
}

.badge-yellow {
    background-color: var(--gold);
    color: var(--white);
}

.badge-red {
    background-color: #ef4444;
    color: var(--white);
}

.badge-mini {
    top: -2px;
    right: 14px;
}

.profile-trigger-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-round);
    padding: 0.25rem 0.75rem 0.25rem 0.25rem;
    color: var(--white);
    transition: var(--transition);
}

.profile-trigger-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.profile-avatar {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: var(--radius-round);
    background-color: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
}

.profile-username {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-200);
}

/* Mobile Header */
.mobile-header {
    background-color: var(--maroon);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    position: sticky;
    top: 0;
    z-index: 40;
    box-shadow: var(--shadow-sm);
}

.mobile-header .logo-container {
    gap: 0.48rem;
}

.mobile-header .brand-logo-badge {
    width: 2.3rem;
    height: 2.3rem;
    flex-basis: 2.3rem;
    border-radius: 0.65rem;
}

.mobile-header .brand-title {
    font-size: 1.05rem;
}

.mobile-header .brand-subtitle {
    font-size: 7px;
    letter-spacing: 0.3em;
}

.mobile-header-btn {
    color: var(--white);
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

#mobile-cart-btn {
    position: relative;
    width: 2rem;
    height: 2rem;
    flex: 0 0 2rem;
}

#cart-badge-mobile {
    top: -3px;
    right: -3px;
    width: auto;
    min-width: 16px;
    padding: 0 4px;
}

.mobile-header-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.mobile-header-btn i {
    width: 1.5rem;
    height: 1.5rem;
}

/* --- Layout Grids --- */
.main-layout {
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    flex: 1;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding-bottom: 6rem; /* Space for mobile nav */
}

/* --- Sidebar Filters --- */
.sidebar-filters {
    width: 100%;
    background-color: var(--white);
    border-radius: var(--radius-xl);
    padding: 1.25rem;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    display: none; /* Hide on mobile by default */
}

.sidebar-header {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--gray-800);
    margin: 1.25rem 0 1rem;
    padding-bottom: 0.5rem;
    border-b: 1px solid var(--gray-200);
    letter-spacing: 0.05em;
}

.sidebar-menu-panel {
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--gray-100);
}

.sidebar-menu-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sidebar-menu-list .mobile-nav-link {
    padding: 0.65rem 0.75rem;
}

.filter-group {
    margin-bottom: 1.5rem;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-group-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.75rem;
}

.filter-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-category-btn {
    text-align: left;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-600);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.filter-category-btn:hover {
    background-color: var(--gray-100);
    color: var(--gray-900);
}

.filter-category-btn.active-cat {
    background-color: var(--maroon-bg);
    color: var(--maroon);
    border-left: 3px solid var(--maroon);
    padding-left: calc(0.75rem - 3px);
}

/* Sliders */
.slider-labels {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.slider-min, .slider-current {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--maroon);
}

.slider-current {
    font-weight: 700;
}

.price-slider {
    width: 100%;
    height: 6px;
    background: var(--gray-200);
    border-radius: var(--radius-round);
    appearance: none;
    outline: none;
    cursor: pointer;
}

.price-slider::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: var(--radius-round);
    background-color: var(--maroon);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.price-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    background-color: var(--maroon-light);
}

/* Dropdowns */
.sort-dropdown {
    width: 100%;
    background-color: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-700);
    outline: none;
    transition: var(--transition);
}

.sort-dropdown:focus {
    border-color: var(--maroon);
}

/* --- Mobile Quick Filters --- */
.mobile-quick-filters {
    background-color: var(--white);
    border-radius: var(--radius-xl);
    padding: 0.75rem;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-search-row {
    display: flex;
    gap: 0.5rem;
}

.mobile-search-wrapper {
    flex: 1;
    background-color: var(--gray-50);
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-md);
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mobile-search-wrapper input {
    background: transparent;
    border: none;
    outline: none;
    font-size: 0.875rem;
    color: var(--gray-700);
    width: 100%;
}

.mobile-search-wrapper input::placeholder {
    color: var(--gray-400);
}

.mobile-filter-btn {
    background-color: var(--gray-50);
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-md);
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-600);
    transition: var(--transition);
}

.mobile-filter-btn:hover {
    background-color: var(--gray-100);
}

.mobile-filter-btn i {
    width: 1.25rem;
    height: 1.25rem;
}

.active-filters-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.active-filters-tags span {
    background-color: var(--maroon-bg);
    color: var(--maroon);
    font-size: 10px;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-round);
}

.active-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* --- Main Content Section --- */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

.category-tabs-wrap {
    background-color: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 0.15rem 0.75rem 0;
    overflow-x: auto;
    border-radius: var(--radius-md);
}

.category-tabs-wrap .tab-filters {
    justify-content: space-between;
    min-width: 100%;
    gap: 1rem;
}

/* Promo Banner */
.promo-banner {
    background:
        radial-gradient(circle at 12% 20%, rgba(250, 204, 21, 0.22), transparent 28%),
        linear-gradient(135deg, var(--maroon-dark) 0%, var(--maroon) 52%, var(--maroon-light) 100%);
    color: var(--white);
    border-radius: var(--radius-md);
    padding: 0.8rem 1rem;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 10px 22px -16px rgba(93, 15, 15, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.18);
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.promo-overlay-text {
    display: block;
    position: absolute;
    right: 0.55rem;
    bottom: -0.5rem;
    font-family: 'Outfit', sans-serif;
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.055);
    user-select: none;
    pointer-events: none;
}

.promo-content {
    position: relative;
    z-index: 10;
    max-width: 100%;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.promo-content i {
    width: 1rem;
    height: 1rem;
    flex: 0 0 auto;
    color: var(--gold-hover);
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.24));
}

.promo-badge {
    background-color: rgba(255, 255, 255, 0.2);
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-round);
    display: inline-block;
    margin-bottom: 0.5rem;
}

.promo-title {
    font-family: 'Outfit', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.2;
    margin-bottom: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
}

.promo-desc {
    font-size: 0.75rem;
    color: var(--gray-200);
}

/* Sections */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.section-header.border-bottom {
    border-bottom: 1px solid var(--gray-200);
    padding-bottom: 0.5rem;
}

.section-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-900);
}

.category-share-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 2.25rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid rgba(93, 15, 15, 0.2);
    border-radius: 0.65rem;
    background: var(--white);
    color: var(--maroon);
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition: var(--transition);
}

.category-share-button:hover {
    border-color: var(--maroon);
    background: var(--maroon-bg);
    transform: translateY(-1px);
}

.category-share-button i {
    width: 0.95rem;
    height: 0.95rem;
}

.category-share-button[hidden] {
    display: none;
}

.view-all-link {
    font-size: 0.75rem;
    color: var(--gray-400);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.view-all-link:hover {
    color: var(--maroon);
}

.category-view-more {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 1rem;
    padding: 0.8rem 1rem;
    border: 1px solid var(--maroon);
    border-radius: 0.65rem;
    background: color-mix(in srgb, var(--maroon) 6%, white);
    color: var(--maroon);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.category-view-more:hover {
    background: var(--maroon);
    color: white;
}

.category-view-more[hidden] {
    display: none;
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.category-card {
    background-color: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 0.8rem 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    min-width: 0;
    text-align: left;
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: rgba(93, 15, 15, 0.15);
    background-color: var(--cream);
}

.category-card.active-category-card {
    border-color: var(--maroon);
    background-color: var(--maroon-bg);
    box-shadow: 0 0 0 1px var(--maroon);
}

.category-emoji {
    font-size: 1.35rem;
    width: 2.55rem;
    height: 2.55rem;
    background-color: var(--gray-50);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    flex: 0 0 auto;
}

.category-card:hover .category-emoji,
.category-card.active-category-card .category-emoji {
    background-color: var(--white);
}

.category-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.product-supplier {
    margin-top: 0.2rem;
    color: var(--gray-500);
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1.3;
}

.cat-name {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--gray-800);
}

.cat-count {
    font-size: 9px;
    color: var(--gray-400);
    font-weight: 500;
    margin-top: 2px;
}

/* --- Product Filters & Grid --- */
.tab-filters {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
}

.tab-btn {
    padding-bottom: 0.5rem;
    color: inherit;
    position: relative;
    transition: var(--transition);
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--maroon);
    transition: var(--transition);
}

.tab-btn.active-tab {
    color: var(--maroon);
}

.tab-btn.active-tab::after {
    width: 100%;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.expanded-products-section {
    background-color: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1rem;
    box-shadow: 0 18px 34px -30px rgba(17, 24, 39, 0.38);
}

.expanded-products-section .product-grid {
    gap: 0.9rem;
}

.product-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 2.25rem;
    margin-top: 0.9rem;
}

.pagination-pages {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem;
    border-radius: var(--radius-round);
    background-color: var(--gray-50);
    border: 1px solid var(--gray-100);
}

.pagination-btn,
.pagination-page {
    width: 1.9rem;
    height: 1.9rem;
    border-radius: var(--radius-round);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-600);
    background-color: var(--white);
    border: 1px solid var(--gray-100);
    font-size: 0.72rem;
    font-weight: 800;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.pagination-btn i {
    width: 0.95rem;
    height: 0.95rem;
}

.pagination-btn:hover:not(:disabled),
.pagination-page:hover,
.pagination-page.active-page {
    background-color: var(--maroon);
    border-color: var(--maroon);
    color: var(--white);
    transform: translateY(-1px);
}

.pagination-btn:disabled {
    opacity: 0.38;
    cursor: not-allowed;
    box-shadow: none;
}

/* Product Card design */
.product-card {
    background-color: var(--white);
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-lg);
    padding: 0.75rem;
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition-bounce);
    min-width: 0;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 20px -8px rgba(93, 15, 15, 0.12);
    border-color: rgba(93, 15, 15, 0.15);
}

.wishlist-btn-quick {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.35rem;
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(4px);
    border-radius: var(--radius-round);
    box-shadow: var(--shadow-sm);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.wishlist-btn-quick:hover {
    background-color: var(--white);
    transform: scale(1.05);
}

.wishlist-btn-quick i,
.wishlist-btn-quick .heart-icon-btn {
    width: 0.875rem;
    height: 0.875rem;
    color: var(--gray-400);
    transition: var(--transition);
}

.wishlist-btn-quick i.liked,
.wishlist-btn-quick .heart-icon-btn.liked {
    color: #E53935;
    fill: #E53935;
    stroke: #E53935;
}

.wishlist-btn-quick.heart-pop,
.modal-wishlist-btn.heart-pop {
    animation: heartPop 0.34s cubic-bezier(0.2, 0.9, 0.25, 1.3);
}

@keyframes heartPop {
    0% { transform: scale(1); }
    45% { transform: scale(1.24); }
    100% { transform: scale(1); }
}

.product-img-click {
    aspect-ratio: 1 / 1;
    background-color: var(--gray-50);
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-img-click img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: var(--transition);
}

.product-card:hover .product-img-click img {
    transform: scale(1.04);
}

.product-card .cat-label {
    font-size: 8px;
    font-weight: 700;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.product-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--gray-800);
    line-height: 1.3;
    margin-bottom: 0.25rem;
    /* Multiline Clamp */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 32px;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 2px;
    color: var(--gold);
    font-size: 10px;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.product-rating i {
    width: 0.75rem;
    height: 0.75rem;
    fill: currentColor;
}

.product-rating span {
    color: var(--gray-600);
    margin-left: 2px;
}

.product-price {
    font-size: 0.875rem;
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.add-to-cart-quick-btn {
    width: 100%;
    background-color: var(--maroon);
    color: var(--white);
    font-size: 10px;
    font-weight: 600;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: var(--transition);
    min-height: 2rem;
}

.add-to-cart-quick-btn:hover {
    background-color: var(--maroon-dark);
}

.add-to-cart-quick-btn i {
    width: 0.875rem;
    height: 0.875rem;
}

/* Loading state */
.loading-state {
    grid-column: 1 / -1;
    padding: 4rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
}

.loader-spinner {
    width: 2rem;
    height: 2rem;
    animation: spin 1s linear infinite;
    margin-bottom: 0.75rem;
}

.loader-text {
    font-size: 0.875rem;
    font-weight: 500;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Empty State Styling */
.empty-state {
    grid-column: 1 / -1;
    padding: 3rem 1rem;
    text-align: center;
    color: var(--gray-400);
}

.empty-icon {
    width: 3rem;
    height: 3rem;
    margin: 0 auto 0.75rem auto;
    opacity: 0.25;
}

.empty-title {
    font-weight: 700;
    color: var(--gray-800);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.empty-desc {
    font-size: 0.75rem;
    max-width: 220px;
    margin: 0 auto;
    line-height: 1.4;
}

/* --- Mobile Bottom Nav Bar --- */
.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--white);
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-around;
    padding: 0.75rem 0.25rem;
    z-index: 40;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.04);
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: var(--gray-400);
    transition: var(--transition);
    position: relative;
    flex: 1;
}

.mobile-nav-item.active-nav {
    color: var(--maroon);
}

.mobile-nav-item i {
    width: 1.25rem;
    height: 1.25rem;
}

.mobile-nav-label {
    font-size: 9px;
    font-weight: 500;
}

.mobile-nav-item.active-nav .mobile-nav-label {
    font-weight: 700;
}

/* --- Modals Framework --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-out;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* Modal Card Structure */
.modal-card {
    background-color: var(--white);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 800px;
    max-height: 85vh;
    box-shadow: var(--shadow-xl);
    overflow-y: auto;
    position: relative;
    display: flex;
    flex-direction: column;
    transform: translateY(24px) scale(0.95);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.15), opacity 0.3s ease-out;
    opacity: 0;
}

.modal-overlay.active .modal-card {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.close-modal-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: var(--gray-100);
    color: var(--gray-600);
    padding: 0.5rem;
    border-radius: var(--radius-round);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: var(--transition);
}

.close-modal-btn:hover {
    background-color: var(--gray-200);
    color: var(--black);
}

.close-modal-btn i {
    width: 1.25rem;
    height: 1.25rem;
}

/* Image panels & details */
.modal-image-panel {
    width: 100%;
    padding: 1.5rem;
    background:
        radial-gradient(circle at 20% 20%, rgba(93, 15, 15, 0.08), transparent 30%),
        linear-gradient(180deg, var(--gray-50), var(--white));
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--gray-100);
}

.modal-image-wrapper {
    position: relative;
    width: 100%;
    max-width: 320px;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-lg);
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-in;
}

.modal-image-wrapper:focus-visible {
    outline: 3px solid rgba(93, 15, 15, 0.32);
    outline-offset: 3px;
}

.modal-zoom-hint {
    position: absolute;
    left: 0.75rem;
    bottom: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.55rem;
    background-color: rgba(255, 255, 255, 0.88);
    color: var(--gray-600);
    border-radius: var(--radius-round);
    font-size: 10px;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}

.modal-zoom-hint i {
    width: 0.75rem;
    height: 0.75rem;
}

.modal-gallery-thumbs {
    display: flex;
    gap: 0.55rem;
    justify-content: center;
    width: 100%;
}

.modal-gallery-thumb {
    width: 3rem;
    height: 3rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    background-color: var(--white);
    overflow: hidden;
    padding: 0.2rem;
    transition: var(--transition);
    cursor: zoom-in;
}

.modal-gallery-thumb:hover,
.modal-gallery-thumb.active-thumb {
    border-color: var(--maroon);
    box-shadow: 0 0 0 2px var(--maroon-bg);
}

.modal-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.modal-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: var(--transition);
}

.modal-image-wrapper img:hover {
    transform: scale(1.04);
}

/* Full-screen product image gallery */
.image-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    grid-template-columns: minmax(3.5rem, 8vw) minmax(0, 1fr) minmax(3.5rem, 8vw);
    grid-template-rows: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem;
    padding: 4.5rem 1rem 1rem;
    background: rgba(8, 8, 10, 0.96);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 180ms ease, visibility 180ms ease;
}

.image-lightbox.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.image-lightbox-stage {
    grid-column: 2;
    grid-row: 1;
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-lightbox-stage > img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 0.5rem;
    box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.45);
}

.image-lightbox-close,
.image-lightbox-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    transition: background-color 160ms ease, transform 160ms ease;
}

.image-lightbox-close:hover,
.image-lightbox-arrow:hover {
    background: rgba(255, 255, 255, 0.23);
    transform: scale(1.05);
}

.image-lightbox-close:focus-visible,
.image-lightbox-arrow:focus-visible,
.image-lightbox-thumb:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
}

.image-lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 2;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 999px;
}

.image-lightbox-close svg,
.image-lightbox-arrow svg {
    width: 1.5rem;
    height: 1.5rem;
}

.image-lightbox-arrow {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 999px;
    justify-self: center;
    z-index: 2;
}

.image-lightbox-prev {
    grid-column: 1;
    grid-row: 1;
}

.image-lightbox-next {
    grid-column: 3;
    grid-row: 1;
}

.image-lightbox-counter {
    position: absolute;
    left: 50%;
    bottom: 0.75rem;
    transform: translateX(-50%);
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    color: #fff;
    background: rgba(0, 0, 0, 0.68);
    font-size: 0.8rem;
    font-weight: 700;
    z-index: 3;
}

.image-lightbox-thumbs {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex;
    justify-content: center;
    gap: 0.55rem;
    max-width: 100%;
    padding: 0.25rem;
    overflow-x: auto;
}

.image-lightbox-thumb {
    flex: 0 0 3.5rem;
    width: 3.5rem;
    height: 3.5rem;
    padding: 0.15rem;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: 0.55rem;
    background: rgba(255, 255, 255, 0.12);
    opacity: 0.68;
}

.image-lightbox-thumb.active-thumb {
    border-color: #fff;
    opacity: 1;
}

.image-lightbox-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0.35rem;
}

@media (max-width: 600px) {
    .image-lightbox {
        grid-template-columns: 3.25rem minmax(0, 1fr) 3.25rem;
        gap: 0.35rem;
        padding: 4rem 0.4rem 0.8rem;
    }

    .image-lightbox-arrow {
        width: 2.75rem;
        height: 2.75rem;
    }

    .image-lightbox-close {
        top: 0.75rem;
        right: 0.75rem;
    }

    .image-lightbox-thumb {
        flex-basis: 3rem;
        width: 3rem;
        height: 3rem;
    }
}

.modal-details-panel {
    width: 100%;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.modal-details-content {
    flex: 1;
}

.modal-badge-cat {
    font-size: 8px;
    font-weight: 700;
    color: var(--maroon);
    background-color: var(--maroon-bg);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-round);
    display: inline-block;
    margin-bottom: 0.75rem;
}

.modal-stock-pill {
    display: inline-block;
    margin-left: 0.4rem;
    margin-bottom: 0.75rem;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-round);
    background-color: #ecfdf5;
    color: #047857;
    font-size: 8px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.modal-stock-pill.is-low {
    background-color: #fffbeb;
    color: #b45309;
}

.modal-stock-pill.is-out {
    background-color: #fef2f2;
    color: #b91c1c;
}

.modal-product-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--gray-900);
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

.modal-meta-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.modal-product-price {
    display: flex;
    align-items: baseline;
    gap: 0.55rem;
}

.modal-price-stack {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.current-price {
    font-size: 1.35rem;
    font-weight: 900;
    color: var(--gray-900);
}

.old-price {
    color: var(--gray-400);
    text-decoration: line-through;
    font-size: 0.82rem;
    font-weight: 700;
}

.modal-discount-line {
    min-height: 1rem;
    color: var(--maroon);
    font-size: 0.72rem;
    font-weight: 800;
}

.transport-estimate-card {
    border: 1px solid rgba(93, 15, 15, 0.12);
    background:
        linear-gradient(135deg, rgba(93, 15, 15, 0.06), rgba(234, 179, 8, 0.08)),
        var(--white);
    border-radius: var(--radius-lg);
    padding: 0.9rem;
    margin-bottom: 1rem;
    box-shadow: 0 12px 24px -22px rgba(93, 15, 15, 0.6);
}

.transport-estimate-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.transport-kicker {
    display: block;
    color: var(--gray-400);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.15rem;
}

.transport-estimate-head strong {
    color: var(--gray-900);
    font-size: 0.86rem;
}

.transport-rate {
    color: var(--maroon);
    background-color: var(--white);
    border: 1px solid rgba(93, 15, 15, 0.1);
    border-radius: var(--radius-round);
    padding: 0.25rem 0.5rem;
    font-size: 0.62rem;
    font-weight: 900;
    white-space: nowrap;
}

.transport-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.transport-option {
    background-color: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: var(--radius-md);
    padding: 0.75rem;
    min-width: 0;
}

.transport-option.featured {
    border-color: rgba(93, 15, 15, 0.16);
    background-color: var(--white);
}

.transport-mode {
    display: block;
    color: var(--gray-500);
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.25rem;
}

.transport-option strong {
    display: block;
    color: var(--maroon);
    font-size: 0.82rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.transport-option small {
    display: block;
    color: var(--gray-500);
    font-size: 0.66rem;
    font-weight: 700;
    margin-top: 0.28rem;
    line-height: 1.3;
}

.transport-formula {
    margin-top: 0.7rem;
    color: var(--gray-500);
    font-size: 0.68rem;
    line-height: 1.45;
}

.divider-vertical {
    width: 1px;
    height: 1rem;
    background-color: var(--gray-200);
}

.modal-rating-wrapper {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
}

.modal-rating-wrapper .star-icon {
    width: 0.875rem;
    height: 0.875rem;
    color: var(--gold);
    fill: currentColor;
}

.rating-value {
    font-weight: 700;
    color: var(--gray-800);
}

.reviews-count {
    color: var(--gray-400);
    font-weight: 500;
}

.modal-product-description {
    font-size: 0.875rem;
    color: var(--gray-600);
    line-height: 1.5;
    margin-bottom: 1.25rem;
}

/* Attribute Selectors */
.options-container {
    margin-bottom: 1.25rem;
}

.options-title {
    font-size: 10px;
    font-weight: 700;
    color: var(--gray-800);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.colors-list {
    display: flex;
    gap: 0.6rem;
}

.color-choice-dot {
    width: 26px;
    height: 26px;
    border-radius: var(--radius-round);
    cursor: pointer;
    border: 1px solid var(--gray-300);
    transition: var(--transition);
}

.color-choice-dot:hover {
    transform: scale(1.1);
}

.color-choice-dot.selected {
    transform: scale(1.1);
    box-shadow: 0 0 0 2px var(--white), 0 0 0 4px var(--maroon);
}

.sizes-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.size-choice-btn {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--gray-700);
    background-color: var(--white);
    transition: var(--transition);
}

.size-choice-btn:hover {
    border-color: var(--maroon);
    background-color: var(--maroon-bg);
}

.size-choice-btn.selected {
    border-color: var(--maroon);
    background-color: var(--maroon);
    color: var(--white);
}

/* Specs */
.specs-box {
    background-color: var(--gray-50);
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-lg);
    padding: 1rem;
    margin-bottom: 1.25rem;
}

.package-specs-box {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(253, 242, 242, 0.72)),
        var(--gray-50);
    border-color: rgba(93, 15, 15, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.package-specs-box .specs-title {
    color: var(--maroon);
}

.specs-title {
    font-size: 10px;
    font-weight: 700;
    color: var(--gray-800);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 0.65rem;
    column-gap: 0.75rem;
    font-size: 0.75rem;
}

.specs-label {
    color: var(--gray-400);
}

.specs-value {
    color: var(--gray-800);
    font-weight: 600;
    text-align: right;
}

/* Footer elements */
.modal-actions-footer {
    display: flex;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-100);
}

.qty-picker {
    display: flex;
    align-items: center;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    background-color: var(--gray-50);
    padding: 2px;
}

.qty-btn {
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius-sm);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-600);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.qty-btn:hover {
    background-color: var(--gray-200);
}

.qty-value {
    width: 2rem;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--gray-800);
}

.modal-cart-submit-btn {
    flex: 1;
    background-color: var(--maroon);
    color: var(--white);
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.modal-cart-submit-btn:hover {
    background-color: var(--maroon-dark);
    box-shadow: var(--shadow-lg);
}

.modal-cart-submit-btn i {
    width: 1.125rem;
    height: 1.125rem;
}

.modal-wishlist-btn,
.modal-share-btn {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 0 0.75rem;
    color: var(--gray-400);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-wishlist-btn:hover,
.modal-share-btn:hover {
    background-color: var(--maroon-bg);
    border-color: rgba(93, 15, 15, 0.15);
    color: var(--maroon);
}

.modal-wishlist-btn i,
.modal-share-btn i {
    width: 1.125rem;
    height: 1.125rem;
    transition: var(--transition);
}

.modal-wishlist-btn.liked i {
    color: #E53935;
    fill: #E53935;
}

.modal-wishlist-btn.liked {
    background-color: var(--maroon-bg);
    border-color: rgba(93, 15, 15, 0.15);
    color: #E53935;
}

/* Modal Mini (Profile / Logins) */
#guest-checkout-modal{z-index:200;background-color:rgba(5,18,12,.72)}.guest-checkout-card{width:min(460px,calc(100vw - 28px));padding:34px 30px 28px;text-align:center;border:2px solid rgba(255,255,255,.92);box-shadow:0 24px 70px rgba(0,0,0,.36)}.guest-checkout-icon{width:62px;height:62px;margin:0 auto 16px;border-radius:50%;display:grid;place-items:center;background:#eaf4ee;color:#173d2c}.guest-checkout-icon svg{width:29px;height:29px}.guest-checkout-card h2{margin:0 35px 9px;font-size:24px;color:#173d2c}.guest-checkout-card>p{margin:0 auto 19px;max-width:370px;color:#53645b;line-height:1.55;font-weight:550}.guest-benefits{display:grid;gap:9px;text-align:left;margin:0 0 22px;padding:16px 18px;border-radius:13px;background:#f5f8f6}.guest-benefits span{display:flex;align-items:center;gap:10px;font-weight:600;color:#33453b}.guest-benefits svg{width:18px;height:18px;color:#568269}.guest-checkout-actions{display:grid;gap:10px}.checkout-account-btn,.checkout-guest-btn{min-height:50px;border-radius:11px;font-weight:750;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:9px}.checkout-guest-btn{border:0;background:#173d2c;color:#fff;font-size:16px}.checkout-guest-btn svg,.checkout-account-btn svg{width:18px}.checkout-account-btn{border:1px solid #cbd6cf;background:#fff;color:#173d2c}.checkout-guest-btn:hover{background:#21533d}.checkout-account-btn:hover{background:#f2f6f3}.guest-checkout-card>small{display:block;margin-top:14px;color:#65746c;font-weight:600}.modal-card.mini-card {
    max-width: 400px;
    padding: 1.5rem;
}

.modal-card.mini-card.profile-panel-card {
    max-width: 520px;
    width: min(520px, 100%);
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(93, 15, 15, 0.1);
    box-shadow: 0 28px 70px rgba(17, 24, 39, 0.24);
}

.profile-panel-card .close-modal-btn {
    top: 1rem;
    right: 1rem;
    background-color: rgba(255, 255, 255, 0.85);
    color: var(--maroon);
    border: 1px solid rgba(93, 15, 15, 0.12);
    z-index: 2;
}

.profile-card-header {
    text-align: left;
    border-bottom: 1px solid rgba(93, 15, 15, 0.1);
    padding: 1.5rem;
    margin-bottom: 0;
    background:
        linear-gradient(135deg, rgba(93, 15, 15, 0.96), rgba(117, 22, 22, 0.9)),
        var(--maroon);
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--white);
}

.profile-card-avatar {
    width: 4rem;
    height: 4rem;
    border-radius: var(--radius-round);
    background-color: rgba(255, 255, 255, 0.15);
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.28);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0;
    box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.12);
    flex: 0 0 auto;
}

.profile-card-name {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--white);
    padding-right: 2.25rem;
}

.profile-card-email {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.74);
    font-weight: 500;
    margin-top: 0.25rem;
}

.profile-card-body {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    padding: 1rem;
    margin-bottom: 0;
    background:
        linear-gradient(180deg, rgba(253, 242, 242, 0.34), rgba(255, 255, 255, 1) 38%),
        var(--white);
}

.profile-row {
    min-height: 5.35rem;
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-lg);
    background-color: var(--white);
    padding: 0.85rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.55rem;
    box-shadow: 0 8px 20px rgba(17, 24, 39, 0.04);
}

.profile-row.profile-row-wide {
    grid-column: 1 / -1;
    min-height: auto;
}

.profile-row-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
}

.profile-row-icon {
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius-md);
    background-color: var(--maroon-bg);
    color: var(--maroon);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.profile-row-icon i {
    width: 1rem;
    height: 1rem;
}

.profile-row .label {
    color: var(--gray-400);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.profile-row .value {
    color: var(--gray-900);
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.25;
}

.profile-row small {
    color: var(--gray-400);
    font-size: 0.72rem;
    line-height: 1.35;
    display: block;
}

.btn-logout {
    width: calc(100% - 2rem);
    margin: 0 1rem 1rem;
    background-color: #E53935;
    color: var(--white);
    border: 1px solid #E53935;
    font-weight: 700;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    transition: var(--transition);
}

.btn-logout i {
    width: 1rem;
    height: 1rem;
}

.btn-logout:hover {
    background-color: #c62828;
    border-color: #c62828;
    color: var(--white);
}

.modal-card.mini-card.menu-action-card {
    max-width: 680px;
    width: min(680px, 100%);
    padding: 1.75rem;
}

.menu-action-header {
    text-align: center;
    border-bottom: 1px solid var(--gray-100);
    padding: 0.25rem 0 1.25rem;
    margin-bottom: 1.25rem;
}

.menu-action-icon {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: var(--radius-round);
    background-color: var(--maroon-bg);
    color: var(--maroon);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    box-shadow: inset 0 0 0 1px rgba(93, 15, 15, 0.08);
}

.menu-action-icon i,
.menu-action-icon svg {
    width: 1.35rem;
    height: 1.35rem;
}

.menu-action-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.menu-action-subtitle {
    color: var(--gray-500);
    font-size: 0.78rem;
    line-height: 1.45;
}

.menu-action-body {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    max-height: min(62vh, 620px);
    overflow-y: auto;
    padding-right: 0.15rem;
}

.menu-action-section-title {
    margin-top: 0.35rem;
    font-size: 0.72rem;
    font-weight: 900;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.menu-action-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.menu-action-summary div {
    border: 1px solid var(--gray-100);
    background:
        linear-gradient(180deg, var(--white), var(--gray-50));
    border-radius: var(--radius-md);
    padding: 0.9rem 0.75rem;
    text-align: center;
}

.menu-action-summary strong {
    display: block;
    color: var(--maroon);
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    line-height: 1;
    margin-bottom: 0.35rem;
}

.menu-action-summary span {
    color: var(--gray-500);
    font-size: 0.72rem;
    font-weight: 700;
}

.menu-action-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.95rem 1rem;
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-md);
    background-color: var(--gray-50);
}

.settings-auth-warning {
    background-color: #fffbeb;
    border-color: #fde68a;
}

.menu-action-row strong {
    display: block;
    color: var(--gray-900);
    font-size: 0.9rem;
    margin-bottom: 0.15rem;
}

.menu-action-row span,
.menu-action-row p {
    color: var(--gray-500);
    font-size: 0.78rem;
    line-height: 1.35;
}

.support-email-link {
    display: inline-block;
    color: var(--maroon);
    font-size: 0.78rem;
    font-weight: 750;
    line-height: 1.4;
    overflow-wrap: anywhere;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.support-email-link:hover {
    color: var(--maroon-dark);
}

.menu-action-value {
    color: var(--maroon);
    font-weight: 800;
    font-size: 0.78rem;
    white-space: nowrap;
}

.menu-action-btn {
    width: 100%;
    background-color: var(--maroon);
    color: var(--white);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    font-weight: 800;
    font-size: 0.82rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    margin-top: 0.25rem;
}

.menu-action-btn:hover {
    background-color: var(--maroon-dark);
}

.menu-action-btn.secondary {
    background-color: var(--gray-100);
    color: var(--gray-700);
    box-shadow: none;
}

.menu-action-btn.secondary:hover {
    background-color: var(--gray-200);
}

.account-feature-state{min-height:180px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.65rem;text-align:center;padding:1.5rem;color:var(--gray-500)}.account-feature-state>svg{width:2.3rem;height:2.3rem;color:var(--maroon)}.account-feature-state.error{color:#b42318}.account-loader{width:30px;height:30px;border:3px solid var(--gray-200);border-top-color:var(--maroon);border-radius:50%;animation:account-spin .75s linear infinite}@keyframes account-spin{to{transform:rotate(360deg)}}
.account-order-list{display:grid;gap:.7rem}.account-order-row{width:100%;display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem;border:1px solid var(--gray-100);border-radius:var(--radius-md);background:var(--gray-50);text-align:left;cursor:pointer;transition:var(--transition)}.account-order-row:hover{border-color:rgba(93,15,15,.28);background:#fff;transform:translateY(-1px);box-shadow:var(--shadow-sm)}.account-order-row>div:first-child{min-width:0}.account-order-row strong{display:block;color:var(--gray-900);margin-bottom:.25rem}.account-order-row span{display:block;color:var(--gray-500);font-size:.75rem;line-height:1.35}.account-order-meta{flex:0 0 auto;text-align:right;display:grid;justify-items:end;gap:.4rem}.account-order-meta b{font-size:.82rem;color:var(--gray-800)}.order-status{display:inline-flex!important;width:max-content;padding:.28rem .55rem;border-radius:999px;background:#fff3cd;color:#7a5700!important;font-size:.68rem!important;font-weight:850;text-transform:uppercase;letter-spacing:.03em}.status-paid,.status-shipped{background:#e8f1ff;color:#1854a0!important}.status-delivered{background:#e8f7ed;color:#176b35!important}.status-cancelled{background:#fdecec;color:#a72828!important}.status-processing{background:#fff0e3;color:#9a4b00!important}
.account-back-btn{display:inline-flex;align-items:center;gap:.45rem;color:var(--maroon);font-weight:800;font-size:.78rem;padding:.35rem 0}.account-back-btn svg{width:1rem}.account-order-head{display:flex;justify-content:space-between;gap:1rem;align-items:flex-start;padding:1rem;border:1px solid var(--gray-100);border-radius:var(--radius-md);background:linear-gradient(135deg,#fff,var(--gray-50))}.account-order-head span,.account-order-head small{color:var(--gray-500);font-size:.72rem}.account-order-head h3{margin:.2rem 0;font-family:'Outfit',sans-serif}.account-delivery-card{display:grid;gap:.28rem;padding:1rem;border-left:4px solid var(--maroon);background:var(--maroon-bg);border-radius:0 var(--radius-md) var(--radius-md) 0}.account-delivery-card span{font-size:.78rem;color:var(--gray-600)}.account-order-items{display:grid;gap:.6rem}.account-order-item{display:grid;grid-template-columns:48px minmax(0,1fr) auto;gap:.75rem;align-items:center;padding:.7rem;border:1px solid var(--gray-100);border-radius:var(--radius-md)}.account-order-item img{width:48px;height:48px;object-fit:cover;border-radius:8px;background:var(--gray-100)}.account-order-item strong{display:block;font-size:.82rem}.account-order-item span{font-size:.72rem;color:var(--gray-500)}.account-order-item b{font-size:.78rem}.account-order-totals{display:grid;gap:.45rem;padding:1rem;border-top:1px solid var(--gray-200)}.account-order-totals>span,.account-order-totals>strong{display:flex;justify-content:space-between;gap:1rem}.account-order-link{text-align:center;display:block}
.account-saved-address{display:grid;gap:.9rem;padding:1rem;border:1px solid #cfe0d5;border-radius:var(--radius-md);background:linear-gradient(135deg,#f4faf6,#fff)}.saved-address-heading{display:flex;align-items:center;gap:.7rem}.saved-address-heading>svg{width:1.3rem;color:#24704b}.saved-address-heading strong,.saved-address-heading span{display:block}.saved-address-heading span{font-size:.7rem;color:var(--gray-500)}.account-saved-address dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.7rem;margin:0}.account-saved-address dl>div{padding:.65rem;border-radius:9px;background:#fff;border:1px solid var(--gray-100)}.account-saved-address dt{font-size:.65rem;font-weight:850;color:var(--gray-500);text-transform:uppercase;letter-spacing:.04em}.account-saved-address dd{margin:.2rem 0 0;color:var(--gray-900);font-size:.8rem;font-weight:700;overflow-wrap:anywhere}.account-saved-address .saved-address-wide{grid-column:1/-1}.account-shipping-intro{display:flex;gap:.85rem;align-items:flex-start;padding:1rem;border-radius:var(--radius-md);background:var(--maroon-bg);color:var(--maroon)}.account-shipping-intro>svg{flex:0 0 auto;width:1.4rem}.account-shipping-intro strong,.account-shipping-intro span{display:block}.account-shipping-intro span{margin-top:.25rem;font-size:.75rem;line-height:1.45;color:var(--gray-600)}.account-shipping-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.8rem}.account-shipping-form label{display:grid;gap:.35rem;font-size:.72rem;font-weight:800;color:var(--gray-600)}.account-shipping-form input,.account-shipping-form select{width:100%;min-height:42px;border:1px solid var(--gray-200);border-radius:var(--radius-md);background:#fff;padding:.65rem .75rem;color:var(--gray-900);outline:none}.account-shipping-form input:focus,.account-shipping-form select:focus{border-color:var(--maroon);box-shadow:0 0 0 3px var(--maroon-bg)}.shipping-field-wide{grid-column:1/-1}.account-shipping-form .menu-action-btn{display:flex;align-items:center;justify-content:center;gap:.5rem}.account-shipping-form .menu-action-btn svg{width:1rem}.shipping-form-message{min-height:1rem;margin:0;color:var(--maroon);font-size:.75rem}

.settings-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: 0.25rem;
}

.settings-select {
    min-width: 9.5rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    background-color: var(--white);
    color: var(--gray-800);
    font-size: 0.8rem;
    font-weight: 800;
    padding: 0.55rem 0.65rem;
    outline: none;
    transition: var(--transition);
}

.settings-select:focus {
    border-color: var(--maroon);
    box-shadow: 0 0 0 3px var(--maroon-bg);
}

.settings-toggle {
    width: 2.8rem;
    height: 1.55rem;
    border-radius: var(--radius-round);
    background-color: var(--gray-300);
    padding: 0.16rem;
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.settings-toggle::after {
    content: '';
    width: 1.18rem;
    height: 1.18rem;
    border-radius: var(--radius-round);
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.settings-toggle.is-on {
    background-color: var(--maroon);
}

.settings-toggle.is-on::after {
    transform: translateX(1.22rem);
}

@media (max-width: 767px) {
    .account-order-summary{grid-template-columns:repeat(3,minmax(0,1fr))}.account-order-row{align-items:flex-start}.account-order-row,.account-order-head{flex-direction:column}.account-order-meta{width:100%;display:flex;justify-content:space-between;align-items:center}.account-saved-address dl,.account-shipping-form{grid-template-columns:1fr}.account-saved-address .saved-address-wide,.shipping-field-wide{grid-column:auto}.account-order-item{grid-template-columns:44px minmax(0,1fr)}.account-order-item img{width:44px;height:44px}.account-order-item>b{grid-column:2}
    .transport-estimate-head,
    .transport-options {
        grid-template-columns: 1fr;
    }

    .transport-estimate-head {
        display: grid;
    }

    .transport-rate {
        width: fit-content;
    }

    .menu-action-card {
        width: 100%;
        max-width: none;
        max-height: 88vh;
        padding: 1.25rem;
        border-radius: var(--radius-lg);
    }

    .menu-action-body {
        max-height: 62vh;
    }

    .menu-action-summary {
        grid-template-columns: 1fr;
    }

    .menu-action-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .settings-select {
        width: 100%;
    }

    .settings-actions {
        grid-template-columns: 1fr;
    }

    .modal-card.mini-card.profile-panel-card {
        width: 100%;
        max-width: none;
        max-height: 88vh;
        border-radius: var(--radius-lg);
    }

    .profile-card-header {
        padding: 1.25rem;
    }

    .profile-card-body {
        grid-template-columns: 1fr;
        max-height: 56vh;
        overflow-y: auto;
    }

    .profile-row.profile-row-wide {
        grid-column: auto;
    }
}

.shadow-none {
    box-shadow: none;
}

/* --- Drawers (Cart and Wishlist) --- */
.drawer-card {
    position: absolute;
    top: 0;
    bottom: 0;
    height: 100%;
    width: 100%;
    max-width: 420px;
    background-color: var(--white);
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.drawer-card.right-aligned {
    right: 0;
}

.drawer-card.left-aligned {
    left: 0;
    transform: translateX(-100%);
}

.modal-overlay.active .drawer-card {
    transform: translateX(0);
}

.drawer-header {
    padding: 1.25rem;
    border-bottom: 1px solid var(--gray-100);
    background-color: var(--maroon);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.drawer-header-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.drawer-header-title i {
    width: 1.25rem;
    height: 1.25rem;
}

.drawer-header-title h2 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.125rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.drawer-close-btn {
    color: var(--white);
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.drawer-close-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.drawer-close-btn i {
    width: 1.5rem;
    height: 1.5rem;
}

.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Empty Drawer State */
.drawer-empty-state {
    margin: auto;
    text-align: center;
    color: var(--gray-400);
    padding: 2.5rem 0;
}

.drawer-empty-state .empty-icon {
    width: 3rem;
    height: 3rem;
    margin: 0 auto 0.75rem auto;
    opacity: 0.25;
}

.drawer-empty-state .empty-text {
    font-size: 0.875rem;
    font-weight: 600;
}

.btn-drawer-action-empty {
    margin-top: 1rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--gray-600);
    transition: var(--transition);
}

.btn-drawer-action-empty:hover {
    background-color: var(--gray-50);
}

/* Drawer Footer */
.drawer-footer {
    padding: 1.25rem;
    border-top: 1px solid var(--gray-100);
    background-color: var(--gray-50);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.subtotal-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--gray-500);
}

.subtotal-amount {
    font-size: 1.25rem;
    color: var(--gray-900);
    font-weight: 800;
}

.checkout-submit-btn {
    width: 100%;
    background-color: var(--maroon);
    color: var(--white);
    font-size: 0.875rem;
    font-weight: 700;
    padding: 1rem;
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.checkout-submit-btn:hover {
    background-color: var(--maroon-dark);
}

/* Drawer product row card */
.drawer-product-row {
    display: flex;
    gap: 1rem;
    background-color: var(--gray-50);
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-lg);
    padding: 0.75rem;
    position: relative;
}

.drawer-product-row.wishlist-row {
    cursor: pointer;
}

.drawer-product-row.wishlist-row:hover {
    background-color: var(--maroon-bg);
}

.drawer-product-img {
    width: 4rem;
    height: 4rem;
    background-color: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.drawer-product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.drawer-product-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
}

.drawer-product-details h4 {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-right: 1.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.drawer-product-meta {
    display: flex;
    gap: 0.5rem;
    font-size: 9px;
    font-weight: 700;
    color: var(--gray-400);
    margin-top: 2px;
}

.drawer-product-meta-dot {
    width: 10px;
    height: 10px;
    border-radius: var(--radius-round);
    display: inline-block;
    border: 1px solid var(--gray-300);
}

.drawer-meta-flex {
    display: flex;
    align-items: center;
    gap: 3px;
}

.drawer-row-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
}

.drawer-product-price {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--maroon);
}

.drawer-qty-selector {
    display: flex;
    align-items: center;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    background-color: var(--white);
    padding: 1px;
    transform: scale(0.9);
}

.drawer-qty-btn {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--gray-500);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.drawer-qty-btn:hover {
    background-color: var(--gray-100);
}

.drawer-qty-value {
    width: 1.5rem;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--gray-800);
}

.drawer-row-delete-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    color: var(--gray-400);
    transition: var(--transition);
}

.drawer-row-delete-btn:hover {
    color: #ef4444;
}

.drawer-row-delete-btn i {
    width: 0.875rem;
    height: 0.875rem;
}

/* --- Mobile Modals & Slide Sheets --- */
.modal-overlay.flex-end {
    align-items: flex-end;
    padding: 0;
}

.mobile-sheet {
    width: 100%;
    background-color: var(--white);
    border-top-left-radius: var(--radius-xl);
    border-top-right-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-xl);
    max-height: 80vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.modal-overlay.active .mobile-sheet {
    transform: translateY(0);
}

.sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.sheet-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: var(--gray-900);
    letter-spacing: 0.05em;
}

.sheet-close-btn {
    background-color: var(--gray-100);
    color: var(--gray-500);
    padding: 0.35rem;
    border-radius: var(--radius-round);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sheet-close-btn i {
    width: 1.125rem;
    height: 1.125rem;
}

.sheet-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mobile-cat-select-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 1rem;
    background-color: var(--gray-50);
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-lg);
    transition: var(--transition);
}

.mobile-cat-select-btn:hover {
    background-color: var(--maroon-bg);
}

.mobile-cat-select-btn.is-active {
    border-color: rgba(93, 15, 15, 0.35);
    background-color: var(--maroon-bg);
    box-shadow: inset 3px 0 0 var(--maroon);
}

.mobile-category-group {
    display: grid;
    gap: 0.5rem;
}

.mobile-subcategory-list {
    display: grid;
    gap: 0.5rem;
    margin-left: 1.25rem;
    padding-left: 0.75rem;
    border-left: 2px solid var(--gray-100);
}

.mobile-subcat-select-btn {
    padding: 0.75rem 0.875rem;
    background-color: var(--white);
}

.mobile-category-empty {
    margin: 0;
    padding: 1rem;
    color: var(--gray-500);
    text-align: center;
}

.mobile-cat-btn-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.mobile-cat-btn-content .emoji {
    font-size: 1.25rem;
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius-md);
    background-color: var(--gray-50);
    color: var(--maroon);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mobile-cat-btn-content .label {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--gray-800);
}

.mobile-cat-select-btn .arrow-icon {
    width: 1rem;
    height: 1rem;
    color: var(--gray-400);
}

/* Sheets filter options */
.sheet-filter-group {
    margin-bottom: 1.5rem;
}

.sheet-filter-group.margin-bottom-large {
    margin-bottom: 2rem;
}

.sheet-filter-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.75rem;
}

.sheet-sort-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-sort-opt {
    text-align: left;
    width: 100%;
    padding: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
    background-color: var(--gray-50);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.mobile-sort-opt:hover {
    background-color: var(--gray-100);
}

.mobile-sort-opt.active-sort {
    background-color: var(--maroon-bg);
    color: var(--maroon);
    border-left: 3px solid var(--maroon);
    padding-left: calc(0.75rem - 3px);
}

.apply-filters-btn {
    width: 100%;
    background-color: var(--maroon);
    color: var(--white);
    font-weight: 700;
    padding: 1rem;
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-md);
}

/* Side Menu Drawer specific overrides */
.menu-drawer-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1rem 0;
}

.menu-drawer-nav {
    display: flex;
    flex-direction: column;
    padding: 0 0.75rem;
    gap: 0.25rem;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    color: var(--gray-700);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.mobile-nav-link:hover {
    background-color: var(--gray-100);
}

.mobile-nav-link.active-mobile-link {
    background-color: var(--maroon-bg);
    color: var(--maroon);
}

.mobile-nav-link i {
    width: 1rem;
    height: 1rem;
}

.menu-drawer-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-100);
    font-size: 11px;
    font-weight: 500;
    color: var(--gray-400);
}

.menu-drawer-footer p {
    margin-bottom: 2px;
}

/* --- Toast Messages System --- */
.toast-container {
    position: fixed;
    bottom: 5.5rem; /* above mobile nav */
    right: 1.5rem;
    z-index: 50;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}

.toast-msg {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background-color: var(--white);
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    pointer-events: auto;
    max-width: 320px;
    animation: toastSlideIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.25) forwards;
    transition: var(--transition);
}

@keyframes toastSlideIn {
    from {
        transform: translateY(1.5rem) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.toast-msg.border-l-success {
    border-left: 4px solid #10b981;
}

.toast-msg.border-l-error {
    border-left: 4px solid #ef4444;
}

.toast-msg.border-l-info {
    border-left: 4px solid #3b82f6;
}

.toast-msg i {
    width: 1rem;
    height: 1rem;
}

.toast-msg i.text-success { color: #10b981; }
.toast-msg i.text-error { color: #ef4444; }
.toast-msg i.text-info { color: #3b82f6; }

.toast-msg span {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-700);
}

/* Dynamic pulse for adding animation */
.badge-pulse {
    animation: badgePulse 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.5) forwards;
}

@keyframes badgePulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}

/* Product list item animation when rendered */
.product-grid-item {
    animation: itemFadeIn 0.35s ease-out forwards;
}

@keyframes itemFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ==========================================================================
   --- RESPONSIVE BREAKPOINTS (MEDIA QUERIES) ---
   ========================================================================== */

/* Tablet & Up (Landscape/Small Desktop sizes) */
@media (min-width: 768px) {
    
    /* Display Adjusts */
    .desktop-header {
        display: block;
    }
    
    .mobile-header {
        display: none;
    }
    
    .mobile-nav {
        display: none;
    }
    
    /* Layout grid container side-by-side */
    .main-layout {
        flex-direction: row;
        padding: 2rem 1.5rem;
        padding-bottom: 2rem; /* Restore standard bottom spacing */
    }
    
    .sidebar-filters {
        display: block; /* Show filter bar */
        width: 260px;
    }

    .main-layout.products-expanded {
        display: block;
        max-width: 1280px;
    }

    .main-layout.products-expanded .sidebar-filters,
    .main-layout.products-expanded .categories-section,
    .main-layout.products-expanded .promo-banner {
        display: none;
    }

    .main-layout.products-expanded .main-content {
        width: 100%;
    }
    
    .mobile-quick-filters {
        display: none; /* Hide mobile-specific filter row */
    }

    .category-tabs-wrap {
        background: var(--white);
        border: 1px solid var(--gray-200);
        border-radius: var(--radius-md);
        padding: 0.8rem 1.25rem 0;
        box-shadow: 0 10px 24px -20px rgba(17, 24, 39, 0.26);
    }

    .category-tabs-wrap .tab-filters {
        justify-content: flex-start;
        gap: 2rem;
        color: var(--gray-500);
        font-size: 0.86rem;
        letter-spacing: 0.04em;
    }

    .category-tabs-wrap .tab-btn {
        padding-bottom: 0.75rem;
    }

    .category-tabs-wrap .tab-btn:hover,
    .category-tabs-wrap .tab-btn.active-tab {
        color: var(--maroon);
    }

    .category-tabs-wrap .tab-btn::after {
        background-color: var(--maroon);
        bottom: 0;
    }
    
    /* Promo Banner */
    .promo-banner {
        padding: 0.85rem 1.25rem;
        min-height: 54px;
    }
    
    .promo-badge {
        font-size: 10px;
        margin-bottom: 0.75rem;
    }
    
    .promo-title {
        font-size: 0.9rem;
        margin-bottom: 0;
    }
    
    .promo-desc {
        font-size: 0.875rem;
        max-width: 75%;
    }
    
    /* Category grids */
    .category-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 1rem;
    }
    
    .category-card {
        padding: 1rem;
    }
    
    .category-emoji {
        width: 3rem;
        height: 3rem;
    }
    
    .cat-name {
        font-size: 0.875rem;
    }
    
    .cat-count {
        font-size: 10px;
    }
    
    /* Products Section Adjusts */
    .section-header {
        margin-bottom: 1.25rem;
    }
    
    .section-title {
        font-size: 1.125rem;
    }
    
    .tab-filters {
        font-size: 0.8rem;
        gap: 1.5rem;
    }
    
    .product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)); /* 3 cols on tablet */
        gap: 1rem;
    }

    .expanded-products-section {
        padding: 1.25rem;
    }
    
    .product-card {
        padding: 1rem;
    }
    
    .product-title {
        font-size: 0.8rem;
        min-height: 36px;
    }
    
    .product-price {
        font-size: 1rem;
    }
    
    .add-to-cart-quick-btn {
        font-size: 11px;
    }
    
    /* Modal Popups split layout side-by-side */
    .modal-card {
        flex-direction: row;
        overflow-y: visible;
        max-height: none;
        max-width: 920px;
    }
    
    .modal-image-panel {
        width: 48%;
        border-bottom: none;
        border-right: 1px solid var(--gray-100);
        padding: 2rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .modal-image-wrapper {
        max-width: 100%;
        width: 100%;
    }
    
    .modal-details-panel {
        width: 52%;
        padding: 2rem;
        max-height: 80vh;
        overflow-y: auto;
    }
    
    /* Toast positioning */
    .toast-container {
        bottom: 2rem;
    }

    /* Keep the guest checkout choice identical to its clear mobile card layout. */
    #guest-checkout-modal .guest-checkout-card {
        display: flex;
        flex-direction: column;
        width: min(400px, calc(100vw - 2rem));
        max-width: 400px;
        max-height: min(88vh, 620px);
        overflow-y: auto;
    }
}

/* Extra Large Screens (Desktop monitors) */
@media (min-width: 1100px) {
    .product-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr)); /* 4 cols on large desktop */
    }
}

/* Profile modal gets its own desktop layout, separate from product quick-view */
@media (min-width: 768px) {
    #profile-modal {
        align-items: flex-start;
        padding-top: 1rem;
        padding-bottom: 1rem;
        overflow-y: auto;
    }

    .modal-card.mini-card.profile-panel-card {
        display: grid;
        grid-template-columns: 230px minmax(0, 1fr);
        grid-template-rows: minmax(0, 1fr) auto;
        width: min(700px, calc(100vw - 3rem));
        max-width: 700px;
        max-height: calc(100dvh - 2rem);
        overflow: hidden;
        overflow-x: hidden;
        padding: 0;
        flex-direction: initial;
        background-color: var(--white);
    }

    .profile-panel-card .close-modal-btn {
        top: 1rem;
        right: 1rem;
        background-color: var(--white);
        color: var(--maroon);
        box-shadow: 0 8px 24px rgba(17, 24, 39, 0.12);
    }

    .profile-card-header {
        grid-column: 1;
        grid-row: 1 / 3;
        min-height: min(100%, calc(100dvh - 2rem));
        padding: 1.75rem 1.35rem;
        border-bottom: 0;
        border-right: 1px solid rgba(255, 255, 255, 0.12);
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 1rem;
        position: relative;
        overflow: hidden;
    }

    .profile-card-header::before {
        content: "";
        position: absolute;
        inset: 1.25rem;
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: var(--radius-lg);
        pointer-events: none;
    }

    .profile-card-header::after {
        content: "";
        position: absolute;
        width: 9rem;
        height: 9rem;
        right: -4.5rem;
        top: -3rem;
        border-radius: var(--radius-round);
        background-color: rgba(255, 255, 255, 0.08);
        pointer-events: none;
    }

    .profile-card-avatar,
    .profile-card-header > div:not(.profile-card-avatar) {
        position: relative;
        z-index: 1;
    }

    .profile-card-avatar {
        width: 4.25rem;
        height: 4.25rem;
        font-size: 1.65rem;
    }

    .profile-card-name {
        font-size: 1.3rem;
        line-height: 1.15;
        padding-right: 0;
        max-width: 12rem;
    }

    .profile-card-email {
        max-width: 12rem;
        line-height: 1.4;
    }

    .profile-card-body {
        grid-column: 2;
        grid-row: 1;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.8rem;
        padding: 1.25rem 3.5rem 1rem 1.25rem;
        max-height: calc(100dvh - 6.25rem);
        overflow-y: auto;
        overscroll-behavior: contain;
        background:
            linear-gradient(180deg, rgba(253, 242, 242, 0.42), rgba(255, 255, 255, 0.98) 42%),
            var(--white);
    }

    .profile-row {
        min-height: 4.65rem;
        border-radius: var(--radius-md);
        padding: 0.95rem 1rem;
        box-shadow: 0 10px 24px rgba(17, 24, 39, 0.055);
    }

    .profile-row.profile-row-wide {
        grid-column: 1 / -1;
        min-height: auto;
    }

    .profile-summary-row {
        background:
            linear-gradient(135deg, rgba(93, 15, 15, 0.06), rgba(245, 158, 11, 0.08)),
            var(--white);
        border-color: rgba(93, 15, 15, 0.12);
    }

    .profile-row .label {
        font-size: 0.68rem;
        line-height: 1.2;
    }

    .profile-row .value {
        font-size: 1rem;
        overflow-wrap: anywhere;
    }

    .profile-row small {
        font-size: 0.75rem;
        color: var(--gray-500);
    }

    .btn-logout {
        grid-column: 2;
        grid-row: 2;
        width: auto;
        margin: 0 1.25rem 1.25rem;
        justify-self: stretch;
        min-height: 2.8rem;
    }
}

@media (min-width: 768px) and (max-height: 680px) {
    .modal-card.mini-card.profile-panel-card {
        grid-template-columns: 200px minmax(0, 1fr);
        width: min(660px, calc(100vw - 2rem));
    }

    .profile-card-header {
        padding: 1.25rem;
        gap: 0.75rem;
        justify-content: flex-start;
    }

    .profile-card-avatar {
        width: 3.5rem;
        height: 3.5rem;
        font-size: 1.35rem;
    }

    .profile-card-body {
        gap: 0.55rem;
        padding: 0.85rem 3.25rem 0.75rem 0.85rem;
        max-height: calc(100dvh - 5.3rem);
        overflow-y: auto;
    }

    .profile-row {
        min-height: 4.1rem;
        padding: 0.7rem 0.8rem;
        gap: 0.35rem;
    }

    .profile-row .value {
        font-size: 0.92rem;
    }

    .profile-row small {
        font-size: 0.68rem;
    }

    .btn-logout {
        margin: 0 0.85rem 0.85rem;
        min-height: 2.55rem;
    }
}
.auth-tabs{display:flex;gap:8px;margin-bottom:14px}.auth-tab{flex:1;border:1px solid #e5e7eb;background:#fff;border-radius:9px;padding:9px}.auth-tab.active{background:#5d0f0f;color:#fff}.profile-card-body #customer-auth-form{display:grid;gap:12px}.profile-card-body #customer-auth-form>label{display:grid;gap:5px;font-weight:600}.auth-consent{display:grid;gap:8px;font-size:12px}.auth-consent label{display:flex;align-items:flex-start;gap:7px}.auth-consent input{margin-top:2px}.auth-submit{border:0;border-radius:9px;padding:11px;background:#5d0f0f;color:#fff;font-weight:700}.auth-submit:disabled{opacity:.6}.auth-message{color:#b42318;font-size:12px;min-height:18px;margin:0}
.settings-actions{position:relative;padding-left:44px}.settings-admin-lock{position:absolute;left:0;bottom:0;width:34px;height:34px;border-radius:50%;border:1px solid rgba(93,15,15,.18);background:#fff7f7;color:#5d0f0f;display:grid;place-items:center;cursor:pointer;transition:.2s}.settings-admin-lock:hover{transform:translateY(-2px);box-shadow:0 7px 16px rgba(93,15,15,.18)}
.menu-action-header{position:relative}.menu-action-header>.settings-admin-lock{left:0!important;bottom:0!important;right:auto!important;top:auto!important}.menu-action-header>.settings-admin-lock[hidden]{display:none!important}
.settings-admin-lock-mobile{display:none!important}@media(max-width:767px){.menu-action-header>.settings-admin-lock{display:none!important}.settings-actions{padding-left:0!important;display:grid!important;grid-template-columns:40px 1fr!important}.settings-admin-lock-mobile{display:grid!important;position:static!important;grid-column:1;grid-row:2;justify-self:start;align-self:end}.settings-actions>.menu-action-btn{grid-column:2}.settings-actions>.menu-action-btn.secondary{grid-column:2}}
.mobile-admin-lock{display:none}@media(max-width:767px){.settings-admin-lock-mobile,.menu-action-header>.settings-admin-lock{display:none!important}.menu-drawer-footer{position:relative;padding-right:46px}.mobile-admin-lock{display:grid;position:absolute;right:8px;bottom:8px;width:34px;height:34px;border-radius:50%;border:1px solid rgba(255,255,255,.22);background:rgba(255,255,255,.12);color:#fff;place-items:center;cursor:pointer}}
@media(max-width:430px){.category-share-button span{display:none}.category-share-button{width:2.35rem;padding:.5rem}}
.category-tabs-wrap{overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;-webkit-overflow-scrolling:touch}.category-tabs-wrap .tab-filters{display:flex;flex-wrap:nowrap;min-width:max-content;gap:1.35rem}.category-tabs-wrap .tab-btn{flex:0 0 auto;white-space:nowrap}

/* Gentle customer identity prompt: delayed and always dismissible. */
.identity-capture-overlay{z-index:12000;padding:1rem;background:rgba(25,15,17,.54);backdrop-filter:blur(7px)}
.identity-capture-card{position:relative;width:min(520px,calc(100vw - 2rem));margin:auto;padding:2rem;border:1px solid rgba(93,15,15,.12);border-radius:24px;background:linear-gradient(145deg,#fff 0%,#fff9f8 100%);box-shadow:0 28px 80px rgba(37,12,16,.3);display:grid;grid-template-columns:54px 1fr;gap:1.1rem;color:#23191a}
.identity-capture-mark{width:54px;height:54px;border-radius:18px;background:#5d0f0f;color:#fff;display:grid;place-items:center;font-family:Georgia,serif;font-size:1.65rem;box-shadow:0 10px 24px rgba(93,15,15,.24)}
.identity-capture-copy>span{display:block;margin:.15rem 0 .35rem;color:#8b2931;font-size:.72rem;font-weight:800;letter-spacing:.12em;text-transform:uppercase}
.identity-capture-copy h2{margin:0;color:#341216;font-family:Georgia,serif;font-size:clamp(1.45rem,4vw,2rem);line-height:1.12}
.identity-capture-copy p{margin:.75rem 0 0;color:#66575a;font-size:.94rem;line-height:1.55}
.identity-capture-form{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:.85rem;margin-top:.35rem}
.identity-capture-form label{display:grid;gap:.38rem;color:#4b3437;font-size:.78rem;font-weight:750}
.identity-capture-form input{width:100%;min-height:46px;padding:.75rem .85rem;border:1px solid #dacbcd;border-radius:12px;background:#fff;color:#241719;font:inherit;outline:none}
.identity-capture-form input:focus{border-color:#8b2931;box-shadow:0 0 0 3px rgba(139,41,49,.12)}
.identity-capture-error{grid-column:1/-1;min-height:1.15rem;margin:-.2rem 0;color:#b42318;font-size:.78rem}
.identity-capture-save,.identity-capture-later{min-height:45px;border-radius:12px;font-weight:800;cursor:pointer}
.identity-capture-save{border:0;background:#5d0f0f;color:#fff;box-shadow:0 8px 18px rgba(93,15,15,.2)}
.identity-capture-save:disabled{opacity:.62;cursor:wait}
.identity-capture-later{border:1px solid #d9c7ca;background:#fff;color:#5d0f0f}
.identity-capture-privacy{grid-column:1/-1;justify-self:center;color:#73585d;font-size:.76rem;text-decoration:underline;text-underline-offset:3px}
@media(max-width:560px){.identity-capture-card{padding:1.35rem;border-radius:20px;grid-template-columns:44px 1fr;gap:.85rem}.identity-capture-mark{width:44px;height:44px;border-radius:14px;font-size:1.35rem}.identity-capture-copy p{font-size:.87rem}.identity-capture-form{grid-template-columns:1fr}.identity-capture-error{grid-column:1}.identity-capture-save,.identity-capture-later{width:100%}}
.provisional-profile-notice{padding:1rem;border:1px solid #e1c67a;border-radius:12px;background:#fff9df;color:#593f11}.provisional-profile-notice strong{display:block;font-size:.95rem}.provisional-profile-notice p{margin:.45rem 0 0;font-size:.78rem;line-height:1.5}.referral-profile-form{display:grid;grid-template-columns:1fr 1fr;gap:.75rem}.referral-profile-form>label:not(.provisional-legal){display:grid;gap:.35rem;font-size:.72rem;font-weight:750;color:#53393d}.referral-profile-form input{width:100%;min-height:42px;padding:.65rem .72rem;border:1px solid #dacdd0;border-radius:9px;background:#fff}.referral-profile-form input:focus{outline:0;border-color:#8b2931;box-shadow:0 0 0 3px rgba(139,41,49,.1)}.referral-profile-form .password-hint,.referral-profile-form .provisional-legal,.referral-profile-form .auth-submit,.referral-profile-form .auth-message{grid-column:1/-1}.provisional-legal{display:flex;align-items:flex-start;gap:.5rem;font-size:.72rem;line-height:1.4}.provisional-legal input{width:auto;min-height:0;margin-top:.15rem}@media(max-width:520px){.referral-profile-form{grid-template-columns:1fr}.referral-profile-form .password-hint,.referral-profile-form .provisional-legal,.referral-profile-form .auth-submit,.referral-profile-form .auth-message{grid-column:1}}
