/* ==========================================================
   SV Fresh Mart - Modern Fresh Grocery CSS System
   Mobile-First, Lightweight, Clean, High-Contrast UI
   ========================================================== */

:root {
    --primary: #15803d;         /* Fresh Forest Green */
    --primary-hover: #166534;
    --primary-light: #dcfce7;
    --secondary: #ea580c;       /* Carrot Orange / Fresh Accent */
    --secondary-hover: #c2410c;
    --accent: #facc15;          /* Sun Yellow */
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --text-light: #9ca3af;
    --bg-page: #f9fafb;
    --bg-surface: #ffffff;
    --border-color: #e5e7eb;
    --border-focus: #22c55e;
    --badge-discount: #dc2626;
    --badge-stock: #16a34a;
    --badge-out: #991b1b;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --header-height: 70px;
}

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

html, body {
    overflow-x: hidden;
    max-width: 100%;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-page);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    padding-bottom: 70px; /* Space for mobile bottom bar */
}

@media (min-width: 768px) {
    body {
        padding-bottom: 0;
    }
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Header & Navigation */
.site-header {
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.top-announcement {
    background: linear-gradient(90deg, #166534, #15803d);
    color: #ffffff;
    font-size: 0.8rem;
    padding: 0.35rem 1rem;
    text-align: center;
    font-weight: 500;
}

.header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    height: var(--header-height);
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--primary);
    white-space: nowrap;
}

.brand-icon {
    background-color: var(--primary-light);
    color: var(--primary);
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.header-search {
    flex: 1;
    max-width: 520px;
    position: relative;
    display: none;
}

@media (min-width: 768px) {
    .header-search {
        display: block;
    }
}

.search-form {
    display: flex;
    width: 100%;
}

.search-input {
    width: 100%;
    padding: 0.65rem 1rem 0.65rem 2.5rem;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 0.925rem;
    background-color: #f3f4f6;
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    background-color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(21, 128, 61, 0.15);
}

.search-icon-btn {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
}

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

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.85rem;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 600;
    transition: background-color 0.15s ease;
}

.action-btn:hover {
    background-color: #f3f4f6;
}

.cart-btn {
    background-color: var(--primary-light);
    color: var(--primary);
    position: relative;
}

.cart-btn:hover {
    background-color: #bbf7d0;
}

.cart-count {
    background-color: var(--secondary);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.1rem 0.45rem;
    border-radius: var(--radius-full);
    min-width: 18px;
    text-align: center;
}

/* Mobile search bar visible under header on mobile */
.mobile-search-bar {
    padding: 0.5rem 1rem;
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
}

@media (min-width: 768px) {
    .mobile-search-bar {
        display: none;
    }
}

/* Category Quick Bar */
.category-nav {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.category-nav::-webkit-scrollbar {
    display: none;
}

.category-nav-list {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    list-style: none;
    max-width: 1200px;
    margin: 0 auto;
}

.cat-chip {
    padding: 0.35rem 0.9rem;
    border-radius: var(--radius-full);
    background-color: #f3f4f6;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    display: inline-block;
    transition: all 0.2s ease;
}

.cat-chip:hover, .cat-chip.active {
    background-color: var(--primary);
    color: #ffffff;
}

/* Hero Section */
.hero-banner {
    background: linear-gradient(135deg, #14532d 0%, #15803d 50%, #22c55e 100%);
    color: #ffffff;
    border-radius: var(--radius-lg);
    padding: 2.25rem 1.5rem;
    margin: 1.25rem 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

@media (min-width: 768px) {
    .hero-banner {
        padding: 3rem 2.5rem;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.hero-tag {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.hero-title {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.2;
    margin-top: 0.5rem;
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
}

.hero-desc {
    font-size: 0.95rem;
    color: #dcfce7;
    max-width: 500px;
    margin-top: 0.5rem;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.hero-badge-item {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
}

/* Section Header */
.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 2rem 0 1rem;
}

.section-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.view-all-link {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--primary);
}

.view-all-link:hover {
    text-decoration: underline;
}

/* Product Cards Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

@media (min-width: 640px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
}

@media (min-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.25rem;
    }
}

.product-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
}

.product-image-wrap {
    position: relative;
    padding-top: 75%;
    background-color: #f8fafc;
    overflow: hidden;
}

.product-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.placeholder-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    color: #64748b;
    font-size: 2.5rem;
}

.badge-tag {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background-color: var(--badge-discount);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
}

.product-info {
    padding: 0.85rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-category {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
}

.product-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0.25rem 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price-row {
    margin-top: auto;
    padding-top: 0.5rem;
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
}

.current-price {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary);
}

.mrp-price {
    font-size: 0.8rem;
    color: var(--text-light);
    text-decoration: line-through;
}

.variation-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.btn-view-product {
    margin-top: 0.75rem;
    display: block;
    width: 100%;
    text-align: center;
    background-color: var(--primary-light);
    color: var(--primary);
    font-weight: 700;
    font-size: 0.85rem;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    transition: all 0.15s ease;
}

.btn-view-product:hover {
    background-color: var(--primary);
    color: #ffffff;
}

/* Trust / Feature Highlights */
.features-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1rem;
    margin: 2.5rem 0;
}

@media (min-width: 640px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.feature-box {
    background-color: var(--bg-surface);
    padding: 1.25rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.feature-icon {
    font-size: 1.75rem;
    background-color: var(--primary-light);
    color: var(--primary);
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
}

.feature-desc {
    font-size: 0.825rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Footer */
.site-footer {
    background-color: #111827;
    color: #9ca3af;
    padding: 3rem 0 1.5rem;
    margin-top: 3rem;
    font-size: 0.875rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1.5fr;
    }
}

.footer-col h4 {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 0.5rem;
}

.footer-col a:hover {
    color: #ffffff;
}

.footer-bottom {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #1f2937;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
    text-align: center;
    font-size: 0.8rem;
}

@media (min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
    }
}

/* Mobile Bottom Navigation Bar */
.mobile-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 100;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

@media (min-width: 768px) {
    .mobile-bottom-bar {
        display: none;
    }
}

.bottom-bar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 600;
    gap: 0.2rem;
    flex: 1;
    height: 100%;
    position: relative;
}

.bottom-bar-item.active, .bottom-bar-item:hover {
    color: var(--primary);
}

.bottom-bar-icon {
    font-size: 1.25rem;
    line-height: 1;
}

.bottom-bar-badge {
    position: absolute;
    top: 6px;
    right: calc(50% - 18px);
    background-color: var(--secondary);
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.1rem 0.35rem;
    border-radius: var(--radius-full);
}

/* Flash Messages */
.alert-container {
    margin-top: 1rem;
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.alert-success {
    background-color: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-warning {
    background-color: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* ==========================================================
   Mobile High-Contrast Theme & Dark Mode Reset (Section 6)
   ========================================================== */
:root {
    color-scheme: light;
}

input, select, textarea, button {
    font-family: inherit;
    color: var(--text-main);
    background-color: #ffffff;
}

@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: light;
    }
    body {
        background-color: var(--bg-page) !important;
        color: var(--text-main) !important;
    }
    input, select, textarea {
        color: #111827 !important;
        background-color: #ffffff !important;
    }
}

.cart-layout, .checkout-layout {
    color: #111827 !important;
}

.cart-items-section, .cart-summary-section, .checkout-card, .checkout-summary-column > div {
    background-color: #ffffff !important;
    color: #111827 !important;
}

.cart-item-row {
    background-color: #ffffff !important;
    color: #111827 !important;
}

.cart-item-details h4, .cart-item-details a, .cart-item-details strong {
    color: #111827 !important;
}

/* Quantity Stepper High-Contrast */
.qty-stepper {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid #d1d5db !important;
    border-radius: var(--radius-sm);
    background-color: #ffffff !important;
    overflow: hidden;
}

.qty-stepper .qty-btn {
    background-color: #f3f4f6 !important;
    color: #111827 !important;
    border: none;
    width: 32px;
    height: 100%;
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.qty-stepper .qty-btn:hover {
    background-color: #e5e7eb !important;
}

.qty-stepper input {
    background-color: #ffffff !important;
    color: #111827 !important;
    border: none !important;
    border-left: 1px solid #e5e7eb !important;
    border-right: 1px solid #e5e7eb !important;
    text-align: center;
    font-weight: 800;
    font-size: 0.95rem;
    width: 40px;
    height: 100%;
    outline: none;
}

/* Checkout Address Selection Cards */
.address-radio-card {
    background-color: #ffffff !important;
    color: #111827 !important;
    border: 1.5px solid #d1d5db !important;
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.address-radio-card.selected, .address-radio-card:has(input:checked) {
    border-color: #15803d !important;
    background-color: #f0fdf4 !important;
    box-shadow: 0 0 0 1px #15803d;
}

.address-radio-input {
    width: 18px;
    height: 18px;
    accent-color: #15803d;
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.address-radio-card strong, .address-radio-card p, .address-radio-card span {
    color: #111827 !important;
}

/* High-Contrast Action Buttons */
.action-btn-large {
    background-color: #15803d !important;
    color: #ffffff !important;
    font-weight: 700;
    font-size: 1rem;
    padding: 0.85rem 1.5rem;
    min-height: 44px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.15s ease, opacity 0.15s ease;
}

@media (max-width: 640px) {
    .action-btn-large {
        width: 100%;
        min-height: 48px;
        font-size: 0.95rem;
        padding: 0.85rem 1rem;
    }
}

.action-btn-large:hover {
    background-color: #166534 !important;
}

.action-btn-large:disabled {
    background-color: #9ca3af !important;
    color: #f3f4f6 !important;
    cursor: not-allowed;
    box-shadow: none;
}

/* ==========================================================
   Product Card Inline Variations & Quick Buy (Section 7, 8, 9)
   ========================================================== */
.card-variations-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0.65rem 0;
}

.card-var-chip {
    background-color: #f3f4f6;
    color: #1f2937;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 0.3rem 0.55rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    line-height: 1.2;
    -webkit-tap-highlight-color: transparent;
}

.card-var-chip:hover {
    background-color: #e5e7eb;
    border-color: #9ca3af;
}

.card-var-chip.active {
    background-color: #dcfce7 !important;
    color: #166534 !important;
    border-color: #16a34a !important;
    font-weight: 700;
}

.card-action-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.65rem;
}

.card-qty-stepper {
    display: inline-flex;
    align-items: center;
    border: 1.5px solid #d1d5db;
    border-radius: 6px;
    background-color: #ffffff;
    height: 36px;
    overflow: hidden;
    flex-shrink: 0;
}

.card-qty-btn {
    background-color: #f3f4f6;
    color: #111827;
    border: none;
    width: 28px;
    height: 100%;
    font-size: 1.05rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.card-qty-btn:hover {
    background-color: #e5e7eb;
}

.card-qty-val {
    width: 28px;
    height: 100%;
    text-align: center;
    font-weight: 800;
    font-size: 0.9rem;
    color: #111827;
    background-color: #ffffff;
    border: none;
    outline: none;
    pointer-events: none;
}

.btn-card-add-to-cart {
    flex: 1;
    min-height: 36px;
    background-color: #15803d;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.85rem;
    border: none;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    -webkit-tap-highlight-color: transparent;
    padding: 0 0.5rem;
    white-space: nowrap;
}

.btn-card-add-to-cart:hover {
    background-color: #166534;
}

.btn-card-add-to-cart:disabled {
    background-color: #9ca3af;
    color: #ffffff;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-card-add-to-cart.added-success {
    background-color: #16a34a !important;
}

/* Floating Toast Notification */
.sv-toast-container {
    position: fixed;
    bottom: 75px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
    max-width: 90vw;
}

@media (min-width: 768px) {
    .sv-toast-container {
        bottom: 25px;
        right: 25px;
        left: auto;
        transform: none;
        max-width: 380px;
    }
}

.sv-toast {
    background: #111827;
    color: #ffffff;
    padding: 0.75rem 1.15rem;
    border-radius: 8px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    animation: toastSlideUp 0.25s ease-out;
    border-left: 4px solid #22c55e;
}

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

/* ==========================================================
   Customer Account & Dashboard Styles
   ========================================================== */
.account-grid {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.account-sidebar {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    height: fit-content;
}

.user-profile-badge {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.user-avatar {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background: var(--primary-light);
    color: var(--primary);
    font-size: 1.25rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-meta {
    overflow: hidden;
}

.user-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-mobile {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0.15rem 0 0 0;
    word-break: break-all;
}

.account-nav {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.acc-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    text-decoration: none;
    transition: all 0.15s ease;
}

.acc-link:hover {
    background: #f3f4f6;
    color: var(--primary);
}

.acc-link.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 700;
}

.acc-link.logout {
    color: #dc2626;
    margin-top: 0.5rem;
    border-top: 1px solid var(--border-color);
    padding-top: 0.85rem;
}

.acc-link.logout:hover {
    background: #fef2f2;
}

.acc-badge {
    margin-left: auto;
    background: #e5e7eb;
    color: var(--text-main);
    font-size: 0.75rem;
    padding: 0.1rem 0.45rem;
    border-radius: var(--radius-full);
    font-weight: 700;
}

/* Mobile: Horizontal scrollable chips for account navigation */
@media (max-width: 767px) {
    .account-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.25rem !important;
    }
    .account-sidebar {
        padding: 0.85rem 1rem !important;
    }
    .account-nav {
        display: flex !important;
        flex-direction: row !important;
        overflow-x: auto !important;
        gap: 0.5rem !important;
        padding-bottom: 0.35rem !important;
        white-space: nowrap !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important;
    }
    .account-nav::-webkit-scrollbar {
        display: none !important;
    }
    .acc-link {
        flex-shrink: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 0.5rem !important;
        padding: 0.5rem 0.85rem !important;
        font-size: 0.85rem !important;
        font-weight: 600 !important;
        border: 1px solid var(--border-color) !important;
        border-radius: 9999px !important;
        background: #f9fafb !important;
        text-decoration: none !important;
    }
    .acc-link.active {
        background: var(--primary-light) !important;
        color: var(--primary) !important;
        border-color: var(--primary) !important;
        font-weight: 700 !important;
    }
    .acc-link.logout {
        border: 1px solid #fee2e2 !important;
        background: #fef2f2 !important;
        color: #dc2626 !important;
        margin-top: 0 !important;
        border-top: 1px solid #fee2e2 !important;
        padding-top: 0.5rem !important;
    }
}

/* Desktop & Tablet: Clean 2-column sidebar layout */
@media (min-width: 768px) {
    .account-grid {
        display: grid !important;
        grid-template-columns: 280px 1fr !important;
        gap: 2rem !important;
        align-items: start !important;
    }
    .account-sidebar {
        position: sticky !important;
        top: 90px !important;
        padding: 1.5rem !important;
    }
    .account-nav {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.35rem !important;
    }
    .acc-link {
        display: flex !important;
        align-items: center !important;
        gap: 0.75rem !important;
        padding: 0.65rem 0.85rem !important;
        border-radius: var(--radius-sm) !important;
        font-size: 0.9rem !important;
        font-weight: 600 !important;
        color: var(--text-main) !important;
        text-decoration: none !important;
        transition: all 0.15s ease !important;
        border: none !important;
        background: transparent !important;
    }
    .acc-link:hover {
        background: #f3f4f6 !important;
        color: var(--primary) !important;
    }
    .acc-link.active {
        background: var(--primary-light) !important;
        color: var(--primary) !important;
        font-weight: 700 !important;
    }
    .acc-link.logout {
        color: #dc2626 !important;
        margin-top: 0.5rem !important;
        border-top: 1px solid var(--border-color) !important;
        padding-top: 0.85rem !important;
        border-radius: 0 !important;
    }
    .acc-link.logout:hover {
        background: #fef2f2 !important;
    }
}

/* Responsive Address and Profile Form Grids */
.form-row-2col {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
@media (min-width: 600px) {
    .form-row-2col {
        grid-template-columns: repeat(2, 1fr);
    }
}
.form-row-split {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
@media (min-width: 600px) {
    .form-row-split {
        grid-template-columns: 1fr 2fr;
    }
}

.account-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.dash-welcome {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.dash-welcome h1 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0 0 0.25rem 0;
}

.dash-welcome p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

.stats-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 640px) {
    .stats-row {
        grid-template-columns: repeat(3, 1fr);
    }
}

.stat-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    position: relative;
}

.stat-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.stat-val {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary);
}

.stat-lbl {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.stat-link {
    display: block;
    margin-top: 0.75rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.dash-section {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.dash-section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.dash-section-head h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
}

.address-preview-card {
    background: var(--bg-page);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
}

/* ==========================================================
   Mobile Cart & Checkout Sticky Actions & Responsive Layout
   ========================================================== */
.mobile-cart-sticky-bar, .mobile-checkout-sticky-bar {
    display: none;
}

@media (max-width: 859px) {
    .mobile-cart-sticky-bar {
        display: flex !important;
        position: fixed !important;
        bottom: 60px !important;
        left: 0 !important;
        right: 0 !important;
        background: #ffffff !important;
        border-top: 1.5px solid var(--border-color) !important;
        padding: 0.65rem 1rem !important;
        justify-content: space-between !important;
        align-items: center !important;
        z-index: 99 !important;
        box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08) !important;
    }
    .mobile-checkout-sticky-bar {
        display: flex !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        background: #ffffff !important;
        border-top: 1.5px solid var(--border-color) !important;
        padding: 0.75rem 1rem !important;
        justify-content: space-between !important;
        align-items: center !important;
        z-index: 1000 !important;
        box-shadow: 0 -4px 14px rgba(0, 0, 0, 0.1) !important;
    }
}


