﻿/* ===============================
   FRESHMART - PHASE 1 UI/UX
================================ */

/* ---------- ACCESSIBILITY ---------- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 10000;
    padding: 10px 16px;
    background: var(--green-primary);
    color: #fff;
    border-radius: 0 0 8px 0;
    text-decoration: none;
    font-weight: 600;
}

.skip-link:focus {
    left: 0;
    color: #fff;
}

/* ---------- CHECKOUT FIELDSETS ---------- */
.checkout-fieldset {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    margin-bottom: 20px;
    background: var(--bg-secondary);
}

.checkout-fieldset legend {
    padding: 0 8px;
    font-weight: 700;
    font-size: 18px;
    color: var(--text-primary);
}

/* ---------- RESET ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Arial, sans-serif;
}

:root {
    --bg-primary: #f7fff8;
    --bg-secondary: #ffffff;
    --bg-tertiary: #eaffef;
    --text-primary: #222222;
    --text-secondary: #555555;
    --green-primary: #159447;
    --green-dark: #126d38;
    --green-light: #eaffef;
    --border-color: #e0e0e0;
    --shadow-sm: 0 2px 10px rgba(0,0,0,0.08);
    --shadow-md: 0 5px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 35px rgba(0,0,0,0.12);
    --radius-sm: 8px;
    --radius-md: 15px;
    --transition: 0.3s ease;
}

/* ---------- DARK MODE ---------- */
body.dark-mode {
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #1c2333;
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --green-primary: #2ea043;
    --green-dark: #3fb950;
    --green-light: #1c2333;
    --border-color: #30363d;
    --shadow-sm: 0 2px 10px rgba(0,0,0,0.3);
    --shadow-md: 0 5px 20px rgba(0,0,0,0.3);
    --shadow-lg: 0 10px 35px rgba(0,0,0,0.4);
}

body.dark-mode header { background: var(--bg-secondary); box-shadow: 0 2px 10px rgba(0,0,0,0.3); }
body.dark-mode .logo { color: var(--green-dark); }
body.dark-mode .secondary-btn { background: var(--bg-tertiary); color: var(--green-dark); border-color: var(--border-color); }
body.dark-mode .search-box input { background: var(--bg-tertiary); color: var(--text-primary); border-color: var(--border-color); }
body.dark-mode .cart-btn { background: var(--green-primary); }
body.dark-mode #cartCount { background: var(--bg-secondary); color: var(--green-primary); }
body.dark-mode .hero { background: linear-gradient(120deg, #112240, #0d1117); }
body.dark-mode .hero h1 { color: var(--green-dark); }
body.dark-mode .hero p { color: var(--text-secondary); }
body.dark-mode .categories h2, body.dark-mode .products-section h2 { color: var(--text-primary); }
body.dark-mode .category { background: var(--bg-secondary); box-shadow: var(--shadow-md); }
body.dark-mode .category h3 { color: var(--text-primary); }
body.dark-mode .product { background: var(--bg-secondary); box-shadow: var(--shadow-md); }
body.dark-mode .product h3 { color: var(--text-primary); }
body.dark-mode .product-badge { background: var(--bg-tertiary); color: var(--green-dark); }
body.dark-mode .features { background: var(--bg-tertiary); }
body.dark-mode .features h3 { color: var(--text-primary); }
body.dark-mode .features p { color: var(--text-secondary); }
body.dark-mode footer { background: #0d2818; }
body.dark-mode .cart-modal { background: rgba(0,0,0,0.8); }
body.dark-mode .cart-content { background: var(--bg-secondary); }
body.dark-mode .cart-item { border-bottom-color: var(--border-color); }
body.dark-mode .close-btn { color: var(--text-primary); }
body.dark-mode .cart-empty h3, body.dark-mode .cart-empty p { color: var(--text-primary); }
body.dark-mode .cart-empty p { color: var(--text-secondary); }
body.dark-mode .checkout-page { background: var(--bg-primary); }
body.dark-mode .checkout-form, body.dark-mode .order-summary { background: var(--bg-secondary); box-shadow: var(--shadow-md); }
body.dark-mode .checkout-form h2, body.dark-mode .order-summary h2 { color: var(--green-dark); }
body.dark-mode .checkout-form label { color: var(--text-primary); }
body.dark-mode .checkout-form input, body.dark-mode .checkout-form textarea { background: var(--bg-tertiary); color: var(--text-primary); border-color: var(--border-color); }
body.dark-mode .payment-option { background: var(--bg-tertiary); color: var(--text-primary); }
body.dark-mode .summary-row span, body.dark-mode .summary-row strong { color: var(--text-primary); }
body.dark-mode .total strong { color: var(--green-dark); }
body.dark-mode .checkout-product { border-bottom-color: var(--border-color); }
body.dark-mode .checkout-product span, body.dark-mode .checkout-product strong { color: var(--text-primary); }
body.dark-mode .success-box { background: var(--bg-secondary); }
body.dark-mode .success-box h2, body.dark-mode .success-box p { color: var(--text-primary); }
body.dark-mode .auth-page { background: linear-gradient(135deg, #0d1117, #112240); }
body.dark-mode .auth-box { background: var(--bg-secondary); }
body.dark-mode .auth-logo { color: var(--green-dark); }
body.dark-mode .auth-box h1 { color: var(--green-dark); }
body.dark-mode .auth-box label { color: var(--text-primary); }
body.dark-mode .auth-box input { background: var(--bg-tertiary); color: var(--text-primary); border-color: var(--border-color); }
body.dark-mode .auth-bottom { color: var(--text-secondary); }
body.dark-mode .orders-page { background: var(--bg-primary); }
body.dark-mode .orders-page h1 { color: var(--green-dark); }
body.dark-mode .order-card { background: var(--bg-secondary); box-shadow: var(--shadow-md); }
body.dark-mode .order-id { color: var(--green-dark); }
body.dark-mode .order-status { background: var(--bg-tertiary); color: var(--green-dark); }
body.dark-mode .order-product { border-bottom-color: var(--border-color); }
body.dark-mode .order-product span, body.dark-mode .order-product strong { color: var(--text-primary); }
body.dark-mode .order-total { color: var(--green-dark); }
body.dark-mode .empty-orders { background: var(--bg-secondary); box-shadow: var(--shadow-md); }
body.dark-mode .empty-orders h2, body.dark-mode .empty-orders p { color: var(--text-primary); }
body.dark-mode .empty-orders p { color: var(--text-secondary); }
body.dark-mode .detail-hero { box-shadow: none; }
body.dark-mode .detail-info h1 { color: var(--text-primary); }
body.dark-mode .detail-desc, body.dark-mode .detail-origin { color: var(--text-secondary); }
body.dark-mode .detail-section { background: var(--bg-tertiary); }
body.dark-mode .detail-section h3 { color: var(--text-primary); }
body.dark-mode .detail-section p { color: var(--text-secondary); }
body.dark-mode .detail-related h2 { color: var(--text-primary); }
body.dark-mode .detail-not-found h2 { color: var(--text-primary); }
body.dark-mode .detail-not-found a { color: var(--green-dark); }
body.dark-mode .detail-qty span { background: var(--bg-tertiary); color: var(--text-primary); }
body.dark-mode .cat-filter-btn { background: var(--bg-secondary); color: var(--text-primary); border-color: var(--border-color); }
body.dark-mode .cat-filter-btn.cat-filter-active { background: var(--green-primary); color: white; border-color: var(--green-primary); }
body.dark-mode .skeleton-card { background: var(--bg-secondary); }
body.dark-mode .skeleton-img { background: var(--border-color); }
body.dark-mode .skeleton-text { background: var(--border-color); }

/* ---------- HEADER ---------- */
header {
    min-height: 75px;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    align-content: center;
    flex-wrap: wrap;
    gap: 12px 24px;
    padding: 12px 6%;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background var(--transition);
}

.logo {
    font-size: 25px;
    font-weight: bold;
    color: var(--green-primary);
    cursor: pointer;
    white-space: nowrap;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-area {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.auth-name-btn {
    max-width: 180px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.secondary-btn {
    background: var(--bg-primary);
    color: var(--green-primary);
    border: 1px solid #ccefd7;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: bold;
    transition: all var(--transition);
}

.secondary-btn:hover {
    background: var(--green-primary);
    color: white;
}

.dark-mode-toggle {
    background: none;
    border: 2px solid var(--border-color);
    font-size: 20px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    line-height: 1;
}

.dark-mode-toggle:hover {
    border-color: var(--green-primary);
    transform: scale(1.1);
}

.lang-toggle-btn {
    background: none;
    border: 2px solid var(--border-color);
    font-size: 13px;
    font-weight: 700;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    line-height: 1;
    color: var(--green-dark, #159447);
}

.lang-toggle-btn:hover {
    border-color: var(--green-primary);
    transform: scale(1.05);
}

.search-box {
    display: flex;
    width: auto;
    flex: 1 1 0%;
    min-width: 200px;
    max-width: 460px;
}

.search-box input {
    width: 100%;
    padding: 13px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    outline: none;
    transition: all var(--transition);
}

.search-box input:focus {
    border-color: var(--green-primary);
    box-shadow: 0 0 0 3px rgba(21, 148, 71, 0.15);
}

.search-box button {
    border: none;
    padding: 0 18px;
    background: var(--green-primary);
    color: white;
    cursor: pointer;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    transition: background var(--transition);
}

.search-box button:hover {
    background: var(--green-dark);
}

.search-box button.voice-btn {
    background: var(--bg-primary);
    color: var(--green-primary);
    border: none;
    border-left: 1px solid var(--border-color);
    border-radius: 0;
    padding: 0 12px;
    min-width: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.search-box button.voice-btn:hover {
    background: rgba(21, 148, 71, 0.08);
    color: var(--green-dark);
}
.search-box button.voice-btn:focus-visible {
    outline: 2px solid var(--green-primary);
    outline-offset: -2px;
}
.search-box button.voice-btn:active {
    transform: scale(0.95);
}
.search-box button.voice-btn.listening {
    background: var(--green-primary);
    color: #fff;
    animation: voice-pulse 1.2s ease-in-out infinite;
}
.search-box button.voice-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    display: block;
}
@keyframes voice-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(21, 148, 71, 0.45); }
    50% { box-shadow: 0 0 0 7px rgba(21, 148, 71, 0); }
}
body.dark-mode .search-box button.voice-btn {
    background: var(--bg-tertiary);
    color: var(--green-primary);
    border-left-color: var(--border-color);
}
body.dark-mode .search-box button.voice-btn.listening {
    background: var(--green-primary);
    color: #fff;
}

/* ---------- SEARCH SUGGESTIONS ---------- */
.search-box { position: relative; }

.search-suggest {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 1200;
    display: none;
    flex-direction: column;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
    overflow: hidden;
    max-height: 320px;
    overflow-y: auto;
    padding: 4px;
    gap: 2px;
}
body.dark-mode .search-suggest { background: var(--bg-tertiary); border-color: var(--border-color); }
.search-suggest.open { display: flex; }

.suggest-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    text-align: left;
    background: transparent;
    border: none;
    border-radius: calc(var(--radius-sm) - 3px);
    color: var(--text-primary);
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
}
.suggest-row:hover, .suggest-row.active {
    background: rgba(21, 148, 71, 0.08);
}
.suggest-ico { font-size: 18px; line-height: 1; flex: 0 0 auto; }
.sico-cat { font-size: 15px; }
.sico-ai { font-size: 16px; }
.suggest-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.suggest-sub { font-size: 12px; color: var(--text-secondary); }
.suggest-meta { margin-left: auto; font-size: 12px; color: var(--text-secondary); white-space: nowrap; }
.clear-ai-btn {
    background: transparent;
    border: 1px solid var(--green-primary);
    color: var(--green-primary);
    border-radius: var(--radius-sm);
    padding: 2px 8px;
    cursor: pointer;
    font-size: 12px;
    margin-left: 6px;
}
.clear-ai-btn:hover { background: var(--green-primary); color: #fff; }
.no-result-text { text-align: center; color: var(--text-secondary); padding: 24px 0; }

.cart-btn {
    background: var(--green-primary);
    color: white;
    border: none;
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: bold;
    transition: all var(--transition);
}

.cart-btn:hover {
    background: var(--green-dark);
    transform: translateY(-2px);
}

#cartCount {
    background: white;
    color: var(--green-primary);
    padding: 3px 7px;
    border-radius: 20px;
    margin-left: 5px;
    font-size: 13px;
}

/* ---------- HEADER NAVIGATION ---------- */
.site-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: border-color var(--transition);
}

.hamburger span {
    display: block;
    height: 2px;
    border-radius: 2px;
    background: var(--text-primary);
    transition: all var(--transition);
}

.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.center-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex: 1 1 0%;
    min-width: 240px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    background: none;
    border: none;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition);
}

.nav-link:hover {
    color: var(--green-primary);
    background: rgba(21, 148, 71, 0.08);
}

header .secondary-btn,
header .cart-btn,
header .dark-mode-toggle {
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

/* ---------- HERO ---------- */
.hero {
    min-height: 430px;
    display: flex;
    align-items: center;
    padding: 50px 8%;
    background: linear-gradient(120deg, #dfffe8, #f7fff8);
    transition: background var(--transition);
}

.hero-content {
    max-width: 650px;
}

.hero h1 {
    font-size: 52px;
    color: var(--green-dark);
    margin-bottom: 20px;
    line-height: 1.15;
}

.hero p {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.hero button {
    padding: 15px 30px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--green-primary);
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all var(--transition);
}

.hero button:hover {
    background: var(--green-dark);
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(21, 148, 71, 0.3);
}

/* ---------- CATEGORIES ---------- */
.categories {
    padding: 60px 8%;
    text-align: center;
}

.categories h2 {
    font-size: 32px;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.category-container {
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
}

.category {
    width: 180px;
    padding: 25px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: all var(--transition);
}

.category:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.category div {
    margin-bottom: 10px;
}

.category div img {
    width: 100%;
    height: 105px;
    object-fit: cover;
    border-radius: 12px;
}

.category h3 {
    color: var(--text-primary);
}

/* ---------- CATEGORY FILTER BUTTONS ---------- */
.cat-filter-bar {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.cat-filter-btn {
    padding: 10px 22px;
    border: 2px solid var(--border-color);
    border-radius: 30px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition);
}

.cat-filter-btn:hover {
    border-color: var(--green-primary);
    color: var(--green-primary);
}

.cat-filter-btn.cat-filter-active {
    background: var(--green-primary);
    color: white;
    border-color: var(--green-primary);
}

/* ---------- CATALOG FILTER / SORT / LOAD MORE ---------- */
.filter-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 20px;
    box-shadow: var(--shadow-sm);
}

.price-filter {
    display: flex;
    align-items: center;
    gap: 10px;
}

.price-filter-label { color: var(--text-secondary); font-size: 14px; font-weight: 600; }
.price-range-label { color: var(--green-primary); font-size: 14px; white-space: nowrap; }

.range-wrap {
    position: relative;
    width: 220px;
    height: 24px;
}

.price-range-input {
    position: absolute;
    left: 0;
    right: 0;
    top: 8px;
    width: 100%;
    height: 6px;
    margin: 0;
    -webkit-appearance: none;
    appearance: none;
    background: var(--border-color);
    border-radius: 4px;
    pointer-events: none;
    outline: none;
}

.price-range-input::-webkit-slider-runnable-track {
    height: 6px;
    background: transparent;
    border-radius: 4px;
}

.price-range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--green-primary);
    border: 2px solid #fff;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    pointer-events: auto;
    margin-top: -5px;
}

.price-range-input::-moz-range-track {
    height: 6px;
    background: transparent;
    border-radius: 4px;
}

.price-range-input::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--green-primary);
    border: 2px solid #fff;
    cursor: pointer;
    pointer-events: auto;
}

.sort-wrap { display: flex; align-items: center; gap: 8px; }
.sort-wrap label { color: var(--text-secondary); font-size: 14px; font-weight: 600; }

#sortSelect {
    padding: 9px 12px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    transition: border-color var(--transition);
}
#sortSelect:focus { border-color: var(--green-primary); }

.clear-filters-btn {
    padding: 9px 16px;
    border: 2px solid var(--border-color);
    border-radius: 30px;
    background: var(--bg-primary);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: all var(--transition);
}
.clear-filters-btn:hover { border-color: var(--green-primary); color: var(--green-primary); }

.results-info {
    text-align: center;
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 20px;
}

.no-results {
    text-align: center;
    color: var(--text-secondary);
    padding: 40px 20px;
}
.no-results h3 { color: var(--text-primary); margin: 10px 0 6px; }

.load-more-wrap { text-align: center; margin-top: 30px; }

.load-more-btn {
    padding: 12px 34px;
    border: none;
    border-radius: 30px;
    background: var(--green-primary);
    color: white;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: all var(--transition);
    display: none;
}
.load-more-btn:hover { background: var(--green-dark); transform: translateY(-2px); box-shadow: var(--shadow-md); }

body.dark-mode .filter-row { background: var(--bg-secondary); border-color: var(--border-color); }
body.dark-mode .price-range-input { background: var(--border-color); }
body.dark-mode #sortSelect { background: var(--bg-tertiary); color: var(--text-primary); border-color: var(--border-color); }
body.dark-mode .clear-filters-btn { background: var(--bg-tertiary); color: var(--text-secondary); border-color: var(--border-color); }

/* ---------- PRODUCTS SECTION ---------- */
.products-section {
    padding: 60px 8%;
    text-align: center;
}

.products-section h2 {
    font-size: 32px;
    color: var(--text-primary);
    margin-bottom: 35px;
}

.product-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.product {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    transition: all var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.product:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.product-image {
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 15px;
    text-align: center;
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.product-photo {
    max-width: 100%;
    max-height: 160px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    display: block;
}

.product h3 {
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 16px;
}

.product-price {
    color: var(--green-primary);
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
}

.product-badge {
    display: inline-block;
    background: var(--green-light);
    color: var(--green-dark);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    margin-bottom: 12px;
}

.product-badge.trend-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    background: #e74c3c;
    color: #fff;
    font-size: 10px;
    letter-spacing: 0.03em;
    margin-bottom: 0;
}

.product-add-btn {
    width: 100%;
    padding: 12px;
    border: none;
    background: var(--green-primary);
    color: white;
    border-radius: 7px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    transition: all var(--transition);
}

.product-add-btn:hover {
    background: var(--green-dark);
    transform: translateY(-1px);
}

/* ---------- FEATURES ---------- */
.features {
    display: flex;
    justify-content: center;
    gap: 80px;
    text-align: center;
    padding: 60px 8%;
    background: var(--bg-tertiary);
    transition: background var(--transition);
}

.features div {
    max-width: 220px;
    font-size: 35px;
}

.features h3 {
    font-size: 20px;
    margin: 10px 0;
    color: var(--text-primary);
}

.features p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ---------- FOOTER ---------- */
footer {
    text-align: center;
    padding: 40px;
    background: var(--green-dark);
    color: white;
}

footer h2 { color: white; }
footer p { color: rgba(255,255,255,0.85); }

/* ---------- TOAST NOTIFICATION ---------- */
.fm-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--green-primary);
    color: white;
    padding: 14px 24px;
    border-radius: var(--radius-sm);
    font-weight: bold;
    font-size: 14px;
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.25);
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
}

.fm-toast-show {
    transform: translateY(0);
    opacity: 1;
}

.fm-toast-icon {
    font-size: 18px;
    font-weight: bold;
}

/* ---------- CART MODAL ---------- */
.cart-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 500;
}

.cart-modal-open {
    display: block;
}

.cart-content {
    background: var(--bg-secondary);
    width: 420px;
    max-width: 90%;
    min-height: 300px;
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    padding: 30px;
    overflow-y: auto;
    transition: background var(--transition);
}

.close-btn {
    float: right;
    border: none;
    background: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--text-primary);
    transition: transform 0.2s;
}

.close-btn:hover {
    transform: rotate(90deg);
}

.cart-empty {
    text-align: center;
    padding: 40px;
}

.cart-empty-icon {
    font-size: 60px;
    margin-bottom: 10px;
}

.cart-empty h3 {
    color: var(--text-primary);
    margin-bottom: 5px;
}

.cart-empty p {
    color: var(--text-secondary);
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
    gap: 10px;
}

.cart-item-info {
    flex: 1;
}

.cart-item-info strong {
    color: var(--text-primary);
}

.cart-item-price {
    color: var(--green-primary);
    font-size: 13px;
    font-weight: bold;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cart-item-actions button {
    border: none;
    background: var(--bg-primary);
    color: var(--text-primary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.cart-item-actions button:hover {
    background: var(--green-primary);
    color: white;
}

.cart-item-qty {
    min-width: 28px;
    text-align: center;
    color: var(--text-primary);
    font-size: 15px;
}

.cart-item-remove {
    color: #e74c3c !important;
    font-size: 14px !important;
}

.cart-item-remove:hover {
    background: #e74c3c !important;
    color: white !important;
}

#cartTotal {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 2px solid var(--border-color);
    color: var(--text-primary);
    font-size: 20px;
}

.checkout-btn {
    width: 100%;
    padding: 14px;
    margin-top: 20px;
    background: var(--green-primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: bold;
    font-size: 15px;
    transition: all var(--transition);
}

.checkout-btn:hover {
    background: var(--green-dark);
}

/* ---------- CHECKOUT PAGE ---------- */
.checkout-page {
    padding: 50px 8%;
    background: var(--bg-primary);
    min-height: 80vh;
    transition: background var(--transition);
}

.checkout-container {
    max-width: 1100px;
    margin: auto;
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 30px;
}

.checkout-form,
.order-summary {
    background: var(--bg-secondary);
    padding: 30px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    transition: background var(--transition);
}

.checkout-form h2,
.order-summary h2 {
    margin-bottom: 25px;
    color: var(--green-dark);
}

.checkout-form label {
    display: block;
    margin-top: 15px;
    margin-bottom: 7px;
    font-weight: bold;
    color: var(--text-primary);
}

.checkout-form input,
.checkout-form textarea {
    width: 100%;
    padding: 13px;
    border: 1px solid var(--border-color);
    border-radius: 7px;
    outline: none;
    font-size: 15px;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: all var(--transition);
}

.checkout-form input:focus,
.checkout-form textarea:focus {
    border-color: var(--green-primary);
    box-shadow: 0 0 0 3px rgba(21, 148, 71, 0.15);
}

.checkout-form textarea {
    height: 100px;
    resize: vertical;
}

.payment-option {
    padding: 15px;
    background: var(--green-light);
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    color: var(--text-primary);
    font-weight: bold;
}

.place-order-btn {
    width: 100%;
    padding: 15px;
    border: none;
    background: var(--green-primary);
    color: white;
    border-radius: var(--radius-sm);
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all var(--transition);
}

.place-order-btn:hover {
    background: var(--green-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(21, 148, 71, 0.3);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin: 15px 0;
}

.summary-row span { color: var(--text-secondary); }
.summary-row strong { color: var(--text-primary); }

.total {
    font-size: 22px;
}

.total strong {
    color: var(--green-dark) !important;
}

.free-delivery {
    color: var(--green-primary) !important;
    font-weight: bold;
}

.checkout-product {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.checkout-product span { color: var(--text-primary); }
.checkout-product strong { color: var(--green-primary); }

/* ---------- SUCCESS MESSAGE ---------- */
.success-message {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 1000;
}

.success-box {
    background: var(--bg-secondary);
    width: 400px;
    max-width: 90%;
    text-align: center;
    padding: 40px;
    border-radius: var(--radius-md);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.success-icon {
    font-size: 60px;
    margin-bottom: 15px;
}

.success-box h2 {
    color: var(--text-primary);
}

.success-box p {
    color: var(--text-secondary);
    margin-top: 8px;
}

.success-box button {
    margin-top: 20px;
    padding: 12px 25px;
    border: none;
    background: var(--green-primary);
    color: white;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: bold;
    transition: all var(--transition);
}

.success-box button:hover {
    background: var(--green-dark);
}

/* ---------- LOGIN / SIGNUP ---------- */
.auth-page {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #dfffe8, #f7fff8);
    padding: 30px;
    transition: background var(--transition);
}

.auth-box {
    width: 420px;
    max-width: 100%;
    background: var(--bg-secondary);
    padding: 40px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    transition: background var(--transition);
}

.auth-logo {
    text-align: center;
    color: var(--green-primary);
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 20px;
}

.auth-box h1 {
    text-align: center;
    color: var(--green-dark);
    margin-bottom: 8px;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 25px;
}

.auth-box label {
    display: block;
    margin-top: 15px;
    margin-bottom: 7px;
    font-weight: bold;
    color: var(--text-primary);
}

.auth-box input {
    width: 100%;
    padding: 13px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    outline: none;
    font-size: 15px;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: all var(--transition);
}

.auth-box input:focus {
    border-color: var(--green-primary);
    box-shadow: 0 0 0 3px rgba(21, 148, 71, 0.15);
}

.auth-btn {
    width: 100%;
    padding: 14px;
    margin-top: 25px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--green-primary);
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all var(--transition);
}

.auth-btn:hover {
    background: var(--green-dark);
    transform: translateY(-2px);
}

.auth-bottom {
    text-align: center;
    margin-top: 22px;
    color: var(--text-secondary);
}

.auth-bottom a {
    color: var(--green-primary);
    font-weight: bold;
    text-decoration: none;
}

.auth-bottom a:hover {
    text-decoration: underline;
}

/* ---------- FORGOT PASSWORD / OTP (auth flows) ---------- */
.auth-forgot-link {
    display: block;
    text-align: right;
    margin-top: 10px;
    font-size: 13px;
    color: var(--green-primary);
    font-weight: bold;
    text-decoration: none;
}

.auth-forgot-link:hover {
    text-decoration: underline;
}

.otp-input {
    text-align: center;
    letter-spacing: 6px;
    font-size: 20px;
    font-weight: bold;
    text-transform: uppercase;
}

.otp-resend-btn {
    margin-top: 12px;
    background: var(--bg-tertiary);
    color: var(--green-dark);
    border: 1px solid var(--border-color);
}

.otp-resend-btn:hover {
    background: var(--border-color);
    transform: none;
}

.otp-resend-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.form-message {
    margin-top: 18px;
    padding: 11px 13px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}

.form-message-success {
    background: #e6f7ec;
    color: #0f6e33;
    border: 1px solid #a9dfbf;
}

.form-message-error {
    background: #fdecea;
    color: #c0392b;
    border: 1px solid #f5b7b1;
}

body.dark-mode .form-message-success {
    background: rgba(39, 174, 96, 0.15);
    color: #7ee2a8;
    border-color: rgba(39, 174, 96, 0.4);
}

body.dark-mode .form-message-error {
    background: rgba(231, 76, 60, 0.15);
    color: #f1948a;
    border-color: rgba(231, 76, 60, 0.4);
}

/* ---------- OTP LOGIN ---------- */
.otp-label {
    display: block;
    margin-top: 18px;
    font-size: 13px;
    font-weight: bold;
    color: var(--text-secondary);
}

.otp-box {
    display: flex;
    gap: 8px;
}

.otp-box input {
    flex: 1;
}

.otp-send {
    padding: 10px 14px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--green-primary);
    color: white;
    font-weight: bold;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition);
}

.otp-send:hover {
    background: var(--green-dark);
}

.coupon-message {
    font-size: 13px;
    margin-top: 8px;
    min-height: 18px;
}

/* ---------- AUTH DIVIDER ---------- */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 22px 0 0;
    color: var(--text-secondary);
    font-size: 13px;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.auth-divider span {
    padding: 0 12px;
}

.google-btn {
    margin-top: 12px;
    background: #4285F4;
}

.google-btn:hover {
    background: #357ae8;
}

/* ---------- MY ORDERS ---------- */
.orders-page {
    min-height: 80vh;
    padding: 50px 8%;
    background: var(--bg-primary);
    transition: background var(--transition);
}

.orders-page > h1 {
    text-align: center;
    margin-bottom: 35px;
    color: var(--green-dark);
}

.order-card {
    max-width: 900px;
    margin: 0 auto 25px;
    padding: 25px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    transition: background var(--transition);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.order-id {
    color: var(--green-primary);
    font-weight: bold;
    margin-bottom: 4px;
}

.order-status {
    background: var(--green-light);
    color: var(--green-dark);
    padding: 8px 14px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 13px;
}

.order-card h3 {
    color: var(--text-primary);
    margin-top: 20px;
}

.order-product {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.order-product span { color: var(--text-primary); }
.order-product strong { color: var(--green-primary); }

.order-total {
    text-align: right;
    font-size: 22px;
    font-weight: bold;
    color: var(--green-dark);
    margin-top: 15px;
}

.empty-orders {
    max-width: 500px;
    margin: 50px auto;
    padding: 40px;
    text-align: center;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.empty-orders-icon {
    font-size: 60px;
    margin-bottom: 15px;
}

.empty-orders h2 {
    color: var(--text-primary);
}

.empty-orders p {
    color: var(--text-secondary);
    margin-top: 8px;
}

.empty-orders button {
    margin-top: 20px;
    padding: 12px 25px;
    border: none;
    background: var(--green-primary);
    color: white;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: bold;
    transition: all var(--transition);
}

.empty-orders button:hover {
    background: var(--green-dark);
}

/* ---------- PRODUCT DETAIL PAGE ---------- */
.detail-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 8%;
}

.detail-hero {
    width: 100%;
    height: 400px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    box-shadow: var(--shadow-md);
}

.detail-hero .product-photo {
    max-height: 340px;
    max-width: 90%;
}

.detail-emoji {
    font-size: 60px;
    width: 84px;
    height: 84px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.92);
    border-radius: 50%;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    animation: detailFloat 3s ease-in-out infinite;
}

@keyframes detailFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.detail-info {
    padding: 10px 0;
}

.detail-info h1 {
    font-size: 36px;
    color: var(--text-primary);
    margin: 12px 0;
}

.detail-price {
    font-size: 28px;
    color: var(--green-primary);
    font-weight: bold;
    margin-bottom: 20px;
}

.detail-desc {
    font-size: 17px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.detail-origin {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 25px;
    padding: 8px 14px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    display: inline-block;
}

.detail-section {
    background: var(--bg-primary);
    padding: 20px 25px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    transition: background var(--transition);
}

.detail-section h3 {
    font-size: 17px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.detail-section p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.detail-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.detail-qty {
    display: flex;
    align-items: center;
    gap: 0;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.detail-qty button {
    width: 48px;
    height: 48px;
    border: none;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.detail-qty button:hover {
    background: var(--green-primary);
    color: white;
}

.detail-qty span {
    width: 50px;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    color: var(--text-primary);
    background: var(--bg-secondary);
    height: 48px;
    line-height: 48px;
}

.detail-add-btn {
    flex: 1;
    padding: 15px 30px;
    border: none;
    background: var(--green-primary);
    color: white;
    border-radius: var(--radius-sm);
    font-size: 17px;
    font-weight: bold;
    cursor: pointer;
    transition: all var(--transition);
}

.detail-add-btn:hover {
    background: var(--green-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(21, 148, 71, 0.3);
}

.detail-related {
    margin-top: 60px;
}

.detail-related h2 {
    font-size: 28px;
    color: var(--text-primary);
    margin-bottom: 25px;
    text-align: center;
}

.detail-not-found {
    text-align: center;
    padding: 100px 20px;
}

.detail-not-found h2 {
    color: var(--text-primary);
    margin-bottom: 15px;
}

.detail-not-found a {
    color: var(--green-primary);
    font-weight: bold;
    text-decoration: none;
}

.detail-not-found a:hover {
    text-decoration: underline;
}

/* ---------- SKELETON LOADING ---------- */
@keyframes shimmer {
    0% { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}

.skeleton-card {
    pointer-events: none;
}

.skeleton-img {
    height: 140px;
    border-radius: 12px;
    background: linear-gradient(90deg, #eee 25%, #e0e0e0 50%, #eee 75%);
    background-size: 800px 100%;
    animation: shimmer 1.5s infinite linear;
    margin-bottom: 15px;
}

.skeleton-text {
    height: 16px;
    border-radius: 8px;
    background: linear-gradient(90deg, #eee 25%, #e0e0e0 50%, #eee 75%);
    background-size: 800px 100%;
    animation: shimmer 1.5s infinite linear;
    margin-bottom: 10px;
}

.skeleton-text-long { width: 80%; }
.skeleton-text-short { width: 50%; }
.skeleton-text-btn { width: 100%; height: 40px; border-radius: 7px; margin-top: 5px; }

body.dark-mode .skeleton-img,
body.dark-mode .skeleton-text {
    background: linear-gradient(90deg, #21262d 25%, #30363d 50%, #21262d 75%);
    background-size: 800px 100%;
}

/* ===============================
   PHASE 2 - USER EXPERIENCE
================================ */

/* ---------- QUANTITY SELECTOR ON CARDS ---------- */
.qty-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    border: 2px solid var(--green-primary);
    border-radius: 8px;
    overflow: hidden;
    width: 100%;
    height: 42px;
    background: var(--bg-secondary);
}

.qty-btn {
    width: 35%;
    height: 100%;
    border: none;
    background: transparent;
    color: var(--green-primary);
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.qty-btn:hover {
    background: var(--green-primary);
    color: white;
}

.qty-value {
    width: 30%;
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    color: var(--text-primary);
    line-height: 42px;
}

/* ---------- WISHLIST HEART ---------- */
.wishlist-heart {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    color: #999;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: all 0.25s;
    line-height: 1;
}

.wishlist-heart:hover {
    transform: scale(1.2);
    color: #e74c3c;
}

.wishlist-heart.wishlist-active {
    color: #e74c3c;
    background: #ffe9e9;
}

.product:hover .wishlist-heart {
    opacity: 1;
}

/* ---------- PRODUCT CARD ACTIONS MENU ---------- */
.card-menu-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.92);
    color: #556;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    z-index: 9;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: all 0.25s;
}

.card-menu-btn:hover {
    background: #fff;
    color: #333;
}

.card-actions-menu {
    display: none;
    position: fixed;
    z-index: 1200;
    min-width: 168px;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.18);
    padding: 6px;
}

.card-actions-menu.open {
    display: block;
    animation: cardMenuFade 0.15s ease;
}

@keyframes cardMenuFade {
    from { opacity: 0; transform: translateY(-2px); }
    to   { opacity: 1; transform: none; }
}

.card-action-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #333;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s;
}

.card-action-item:hover {
    background: #f2f7f4;
}

.card-action-icon {
    flex-shrink: 0;
    font-size: 15px;
    width: 22px;
    text-align: center;
}

.card-action-label {
    flex: 1;
    min-width: 0;
}

body.dark-mode .card-menu-btn {
    background: rgba(30,40,35,0.92);
    color: #aab;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

body.dark-mode .card-menu-btn:hover {
    background: #2a3a30;
    color: #dde;
}

body.dark-mode .card-actions-menu {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

body.dark-mode .card-action-item {
    color: var(--text-primary);
}

body.dark-mode .card-action-item:hover {
    background: var(--bg-tertiary);
}

/* ---------- MOBILE BOTTOM NAVIGATION ---------- */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 450;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.08);
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.mobile-bottom-nav .bottom-nav-btn {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 10px 2px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.2s;
}

.mobile-bottom-nav .bottom-nav-btn.active {
    color: var(--green-primary);
}

.mobile-bottom-nav .bottom-nav-icon {
    font-size: 20px;
    line-height: 1;
}

.mobile-bottom-nav .bottom-nav-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

body.dark-mode .mobile-bottom-nav {
    background: var(--bg-secondary);
    border-top-color: var(--border-color);
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.4);
}

.wishlist-btn-header {
    position: relative;
}

.wishlist-btn-header #wishlistCount {
    background: #e74c3c;
    color: white;
    padding: 2px 7px;
    border-radius: 20px;
    font-size: 12px;
    margin-left: 5px;
}

.detail-wishlist {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    font-size: 26px;
    background: rgba(255,255,255,0.9);
}

/* ---------- RATING STARS ---------- */
.stars {
    color: #f5a623;
    font-size: 15px;
    letter-spacing: 2px;
    display: inline-block;
}

.star-off {
    color: #ddd;
}

.star-half {
    color: #f5a623;
}

.rating-count {
    color: var(--text-secondary);
    font-size: 12px;
    margin-left: 6px;
}

.detail-rating {
    margin-bottom: 8px;
}

.detail-rating .stars {
    font-size: 20px;
}

/* ---------- WISHLIST MODAL ITEMS ---------- */
.wishlist-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
    align-items: center;
}

.wishlist-item .product-image {
    width: 90px;
    min-height: 90px;
    height: 90px;
    padding: 10px;
    margin-bottom: 0;
    flex-shrink: 0;
    cursor: pointer;
}

.wishlist-emoji {
    font-size: 45px;
}

.wishlist-item-info {
    flex: 1;
    min-width: 0;
}

.wishlist-item-info h4 {
    color: var(--text-primary);
    font-size: 15px;
    margin-bottom: 4px;
}

.wishlist-item-info .product-price {
    margin-bottom: 4px;
    font-size: 15px;
}

.wishlist-item-info .stars {
    display: block;
    margin-bottom: 4px;
}

.wishlist-item-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.wishlist-item-actions .product-add-btn {
    width: auto;
    padding: 8px 14px;
    font-size: 13px;
    flex: 1;
}

.wishlist-remove-btn {
    padding: 8px 14px;
    border: 1px solid #e74c3c;
    background: transparent;
    color: #e74c3c;
    border-radius: 7px;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    transition: all 0.2s;
}

.wishlist-remove-btn:hover {
    background: #e74c3c;
    color: white;
}

/* ---------- RECENTLY VIEWED ---------- */
.recent-product {
    cursor: pointer;
}

.recent-img {
    min-height: 120px;
    padding: 15px;
}

.recent-emoji {
    font-size: 55px;
}

.recent-empty {
    color: var(--text-secondary);
    text-align: center;
    padding: 30px;
    grid-column: 1 / -1;
}

/* ---------- REVIEWS ---------- */
.reviews-section h3 {
    margin-bottom: 15px;
}

.reviews-none {
    color: var(--text-secondary);
    font-size: 14px;
}

.review-item {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 12px;
    background: var(--bg-secondary);
}

.review-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.review-user {
    font-weight: bold;
    color: var(--text-primary);
    font-size: 14px;
}

.review-date {
    color: var(--text-secondary);
    font-size: 12px;
    margin-left: auto;
}

.review-comment {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
}

.review-form {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.review-form h4 {
    color: var(--text-primary);
    margin-bottom: 10px;
}

.review-star-input {
    direction: rtl;
    display: flex;
    justify-content: flex-start;
    gap: 2px;
    margin-bottom: 12px;
}

.review-star-input input {
    display: none;
}

.review-star-input label {
    font-size: 30px;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s;
}

.review-star-input label:hover,
.review-star-input label:hover ~ label,
.review-star-input input:checked ~ label {
    color: #f5a623;
}

.review-input,
.review-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 10px;
    background: var(--bg-primary);
    color: var(--text-primary);
    outline: none;
    font-family: inherit;
}

.review-input:focus,
.review-textarea:focus {
    border-color: var(--green-primary);
    box-shadow: 0 0 0 3px rgba(21, 148, 71, 0.15);
}

.review-textarea {
    height: 80px;
    resize: vertical;
}

.review-submit {
    padding: 12px 25px;
    border: none;
    background: var(--green-primary);
    color: white;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.25s;
}

.review-submit:hover {
    background: var(--green-dark);
    transform: translateY(-2px);
}

.coupon-message {
    font-size: 13px;
    font-weight: bold;
    margin-bottom: 8px;
}

body.dark-mode .wishlist-heart {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

body.dark-mode .wishlist-heart.wishlist-active {
    color: #e74c3c;
    background: #3a1518;
}

body.dark-mode .wishlist-item { border-bottom-color: var(--border-color); }
body.dark-mode .wishlist-item-info h4 { color: var(--text-primary); }
body.dark-mode .review-item { background: var(--bg-tertiary); border-color: var(--border-color); }
body.dark-mode .review-user { color: var(--text-primary); }
body.dark-mode .review-comment { color: var(--text-secondary); }
body.dark-mode .review-form h4 { color: var(--text-primary); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
    .product-container { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hero h1 { font-size: 40px; }
    header { gap: 10px; }
    .search-box { width: 35%; }
    .detail-hero { height: 300px; }
    .detail-emoji { font-size: 46px; width: 70px; height: 70px; }
    .features { gap: 40px; }
}

@media (max-width: 700px) {
    .checkout-container { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    header {
        height: auto;
        padding: 12px 15px;
        gap: 10px;
    }
    .site-nav { width: 100%; justify-content: space-between; }
    .search-box { width: 100%; min-width: 0; }
    .header-actions { width: 100%; justify-content: flex-end; gap: 8px; }
    .hero { min-height: 350px; }
    .hero h1 { font-size: 34px; }
    .product-container { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .features { flex-direction: column; align-items: center; gap: 30px; }
    .detail-hero { height: 250px; }
    .detail-emoji { font-size: 40px; width: 62px; height: 62px; }
    .detail-info h1 { font-size: 28px; }
    .detail-price { font-size: 22px; }
    .detail-actions { flex-direction: column; }
    .detail-add-btn { width: 100%; }
    .order-header { flex-direction: column; align-items: flex-start; }
    .orders-page { padding: 30px 15px; }
    .auth-page { padding: 15px; }
    .auth-box { padding: 25px; }
    .cat-filter-bar { gap: 8px; }
    .cat-filter-btn { padding: 8px 16px; font-size: 13px; }
    .filter-row { flex-direction: column; gap: 14px; padding: 14px; }
    .range-wrap { width: 180px; }
    .sort-wrap { width: 100%; justify-content: center; }
    #sortSelect { width: 100%; }
}

@media (max-width: 1100px) {
    header { column-gap: 14px; }
    .hamburger { display: inline-flex; }
    .nav-links { display: none; }
    .nav-links.open {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        padding: 8px 6% 14px;
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border-color);
        box-shadow: var(--shadow-md);
        z-index: 99;
    }
    .nav-links.open .nav-link {
        padding: 13px 10px;
        text-align: left;
        width: 100%;
        border-radius: var(--radius-sm);
    }
    .center-group { order: 3; width: 100%; }
    .search-box { width: 100%; max-width: none; min-width: 0; }
    .header-actions { margin-left: auto; }
}

/* ===============================
   MOBILE (<=768px) - responsive fixes
   =============================== */
@media (max-width: 768px) {

    html, body { overflow-x: hidden; }

    /* ---- hide header buttons that duplicate the bottom navigation ---- */
    .hide-on-mobile-nav {
        display: none !important;
    }

    /* ---- mobile bottom navigation ---- */
    .mobile-bottom-nav {
        display: flex;
    }
    body.has-bottom-nav {
        padding-bottom: calc(58px + env(safe-area-inset-bottom, 0px));
    }
    body.has-bottom-nav .fm-toast {
        left: 16px;
        right: 16px;
        bottom: calc(76px + env(safe-area-inset-bottom, 0px));
        text-align: center;
        justify-content: center;
    }

    /* ---- consistent mobile header stacking: logo+hamburger / search / actions ---- */
    header {
        min-height: 0;
        padding: 10px 14px;
        gap: 8px 10px;
    }
    .site-nav {
        order: 1;
        width: 100%;
        justify-content: space-between;
        min-width: 0;
    }
    .center-group {
        order: 2;
        width: 100%;
        min-width: 0;
    }
    .header-actions {
        order: 3;
        width: 100%;
        margin-left: 0;
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
    }
    .auth-area { justify-content: center; }
    .auth-name-btn { max-width: 120px; }

    header .secondary-btn,
    header .cart-btn,
    header .dark-mode-toggle {
        height: 42px;
        padding: 0 12px;
        font-size: 13px;
        border-radius: var(--radius-sm);
    }
    .cart-btn { padding: 0 14px; }

    /* ---- search fits the mobile viewport ---- */
    .search-box input {
        min-width: 0;
        padding: 12px 12px;
    }
    .search-box button {
        padding: 0 14px;
        white-space: nowrap;
    }

    /* ---- hero ---- */
    .hero {
        min-height: 300px;
        padding: 32px 20px;
    }
    .hero h1 { font-size: 30px; }
    .hero p { font-size: 16px; }

    /* ---- section spacing consistency ---- */
    .categories, .products-section {
        padding: 30px 14px;
    }
    .categories h2, .products-section h2 {
        font-size: 24px;
        margin-bottom: 18px;
    }
    .category-container {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        justify-content: center;
    }
    .category {
        width: auto;
        padding: 16px;
    }
    .category div img { height: 90px; }
    .features {
        flex-direction: column;
        gap: 24px;
        padding: 30px 14px;
    }
    .features div { max-width: 320px; }
    footer { padding: 28px 16px; }

    /* ---- banner fits mobile ---- */
    .banner-slider { padding: 0 12px; margin: 12px auto; }
    .banner-slide { padding: 18px 14px; }
    .banner-text h2 { font-size: 22px; }
    .banner-text p { font-size: 14px; }
    .banner-visual { width: 110px; height: 96px; margin-left: 10px; }

    /* ---- PRODUCT GRID: exactly 2 cards per row ---- */
    .product-container {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
    .product {
        min-width: 0;
        padding: 12px;
    }
    .product-image {
        min-height: 100px;
        padding: 12px;
        margin-bottom: 10px;
    }
    .product-photo { max-height: 100px; }
    .product h3 { font-size: 14px; }
    .product-price { font-size: 15px; margin-bottom: 6px; }
    .qty-chips { gap: 4px; margin: 6px 0; }
    .qty-chip { padding: 4px 8px; font-size: 11px; }
    .card-btn-row { flex-wrap: wrap; gap: 6px; }
    .card-btn-row .product-add-btn,
    .card-btn-row .buy-now-btn {
        flex: 1 1 auto;
        min-width: 0;
        padding: 10px 6px;
        font-size: 13px;
        white-space: nowrap;
    }
    .wishlist-heart { top: 8px; right: 8px; width: 34px; height: 34px; font-size: 17px; }
    .product-share { top: 8px; right: 46px; width: 30px; height: 30px; font-size: 11px; }

    /* ---- filter rows ---- */
    .filter-row {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 14px;
    }
    .range-wrap { width: 100%; }
    .sort-wrap { justify-content: flex-start; }
    #sortSelect { width: 100%; }
}

/* ===============================
   ADMIN PANEL
   =============================== */

.admin-page {
    min-height: 80vh;
    padding: 40px 8%;
}

.admin-header h1 {
    font-size: 28px;
    color: var(--green-dark);
    margin-bottom: 8px;
}

.admin-header p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.admin-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 24px;
}

.admin-tab {
    padding: 12px 24px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 15px;
    font-weight: bold;
    color: var(--text-secondary);
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all var(--transition);
}

.admin-tab.active {
    color: var(--green-primary);
    border-bottom-color: var(--green-primary);
}

.admin-tabs-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-tabs-actions button {
    height: 40px;
    padding: 0 16px;
    font-size: 13px;
    font-weight: bold;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.admin-tabs-actions .dark-mode-toggle {
    padding: 0;
    width: 40px;
    font-size: 18px;
    border: 2px solid var(--border-color);
    background: none;
}

.admin-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.admin-section-head h2 {
    color: var(--green-dark);
}

.add-product-btn {
    padding: 10px 18px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--green-primary);
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all var(--transition);
}

.add-product-btn:hover {
    background: var(--green-dark);
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 18px;
}

.stat-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 16px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.stat-box strong {
    display: block;
    font-size: 26px;
    color: var(--green-primary);
}

.stat-box span {
    font-size: 13px;
    color: var(--text-secondary);
}

.stat-box.low strong {
    color: #e74c3c;
}

.admin-search {
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
}

/* Orders list */
.admin-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.admin-order-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 18px;
    box-shadow: var(--shadow-sm);
}

.admin-order-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.admin-order-date {
    color: var(--text-secondary);
    font-size: 13px;
    margin-left: 10px;
}

.order-status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.admin-order-customer {
    font-weight: bold;
    margin-bottom: 4px;
}

.admin-order-address {
    font-weight: normal;
    color: var(--text-secondary);
    font-size: 13px;
}

.admin-order-items {
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    margin: 12px 0;
}

.admin-order-item {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 14px;
}

.admin-order-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-order-total strong {
    color: var(--green-primary);
}

.status-select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    cursor: pointer;
    font-weight: bold;
}

/* Products grid */
.admin-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.admin-product-card {
    display: flex;
    gap: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 14px;
    box-shadow: var(--shadow-sm);
    align-items: center;
}

.admin-product-card.inactive {
    opacity: 0.6;
}

.price-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 6px 0;
}

.price-edit-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 6px 0;
    padding: 6px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
}

.price-edit-row .stock-input {
    width: 100px;
}

.admin-order-email {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.order-item-thumb {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 6px;
    vertical-align: middle;
    margin-right: 8px;
}

.order-item-emoji {
    font-size: 22px;
    margin-right: 8px;
    vertical-align: middle;
}

.admin-customer-row .row-btn {
    margin-top: 4px;
}

.admin-product-emoji {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    position: relative;
    flex-shrink: 0;
}

.inactive-tag {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 9px;
    padding: 2px 5px;
    border-radius: 4px;
}

.admin-product-info {
    flex: 1;
    min-width: 0;
}

.admin-product-name {
    font-weight: bold;
    font-size: 14px;
}

.admin-product-meta {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 2px 0 6px;
}

.stock-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stock-label {
    font-size: 12px;
    font-weight: bold;
    color: var(--green-primary);
}

.stock-label.low {
    color: #e74c3c;
}

.stock-input {
    width: 70px;
    padding: 5px 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 13px;
    background: var(--bg-tertiary);
}

.admin-product-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}

.row-btn {
    border: none;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 5px 8px;
    font-size: 14px;
    transition: all var(--transition);
}

.row-btn.edit:hover { background: #f39c12; }
.row-btn.remove:hover { background: #e74c3c; }
.row-btn.restore:hover { background: #27ae60; }

/* Admin product image/photo */
.admin-product-photo {
    position: relative;
    flex-shrink: 0;
}

.admin-product-img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.admin-product-photo .admin-product-emoji {
    margin-top: 6px;
    width: 64px;
    height: 44px;
    font-size: 24px;
}

.admin-img-preview-wrap {
    margin-top: 6px;
}

.admin-img-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.admin-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
}

.admin-choose-img {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--card-bg);
    color: var(--text-color);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .2s ease, color .2s ease;
}

.admin-choose-img:hover {
    border-color: var(--link-color);
    color: var(--link-color);
}

.admin-img-hint {
    font-size: 12px;
    color: var(--muted-color);
}

.admin-img-preview {
    max-width: 120px;
    max-height: 90px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.admin-img-missing {
    font-size: 12px;
    color: #e74c3c;
}

/* Admin customers */
.admin-customer-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.admin-customer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
}

.admin-customer-main {
    font-size: 14px;
    color: var(--text-secondary);
    min-width: 0;
}

.admin-customer-main strong {
    color: var(--text-primary);
    font-size: 15px;
}

.role-badge {
    display: inline-block;
    margin-left: 8px;
    font-size: 11px;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.role-badge.admin {
    background: #159447;
    color: #fff;
}

.admin-customer-date {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    flex-shrink: 0;
}

.admin-customer-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.admin-customer-contact {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 3px;
}

.admin-customer-contact .email {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.admin-customer-orders {
    margin-top: 3px;
    color: var(--text-primary);
}

.admin-customer-action {
    margin-top: 8px;
}

.admin-customer-action .row-btn,
.admin-order-actions .row-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.admin-customer-action .row-btn svg,
.admin-order-actions .row-btn svg {
    flex-shrink: 0;
}

.admin-cust-sep {
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.55;
    margin: 0 8px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .admin-customer-row {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .admin-customer-date {
        margin-top: 2px;
    }
}

/* Admin reviews */
.admin-review-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin-bottom: 10px;
}

.admin-review-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.admin-review-head strong {
    font-size: 14px;
}

.admin-review-user {
    font-size: 12px;
    color: var(--text-secondary);
    margin-left: 6px;
}

.admin-review-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.admin-review-rating {
    color: #f39c12;
}

.admin-review-comment {
    margin: 8px 0 4px;
    font-size: 13px;
    color: var(--text-secondary);
}

.admin-review-date {
    font-size: 11px;
    color: var(--text-secondary);
}

/* Order detail modal */
.admin-modal-wide {
    max-width: 640px;
    width: 92%;
}

.order-detail-block {
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.order-detail-block:last-child {
    border-bottom: none;
}

.order-detail-block h4 {
    margin: 0 0 6px;
    font-size: 14px;
    color: var(--green-primary);
}

.order-detail-block p {
    margin: 2px 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.order-detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.order-detail-table th,
.order-detail-table td {
    text-align: left;
    padding: 6px 8px;
    border-bottom: 1px solid var(--border-color);
}

.order-detail-total {
    font-weight: bold;
    color: var(--text-primary) !important;
    font-size: 16px !important;
}

/* Modal */
.admin-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.admin-modal-box {
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    padding: 24px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.admin-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.admin-modal-head h3 {
    color: var(--green-dark);
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-secondary);
}

.modal-close:hover {
    color: #e74c3c;
}

.admin-modal-box label {
    display: block;
    font-size: 13px;
    font-weight: bold;
    margin: 12px 0 5px;
    color: var(--text-primary);
}

.admin-modal-box input,
.admin-modal-box select,
.admin-modal-box textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 14px;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.modal-actions button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: bold;
    transition: all var(--transition);
}

.modal-cancel {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.modal-save {
    background: var(--green-primary);
    color: white;
}

.modal-save:hover {
    background: var(--green-dark);
}

/* responsive */
@media (max-width: 768px) {
    .admin-stats { grid-template-columns: repeat(2, 1fr); }
    .admin-products-grid { grid-template-columns: 1fr; }
    .admin-order-foot { flex-direction: column; align-items: flex-start; gap: 10px; }
    .admin-tabs { flex-direction: column; }
    .admin-tabs-actions {
        width: 100%;
        margin-left: 0;
        padding: 12px 0 16px;
        border-top: 1px solid var(--border-color);
    }
    .filter-row { gap: 14px; padding: 12px; }
}

/* ===============================
   ONLINE PAYMENT + QR MODAL
   =============================== */

.online-methods {
    margin-top: 14px;
    padding: 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
}

.method-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}

.method-row label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    cursor: pointer;
    font-size: 13px;
    transition: all var(--transition);
}

.method-row label:hover {
    border-color: var(--green-primary);
}

.method-row input[type="radio"] {
    accent-color: var(--green-primary);
}

.online-note {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 6px 0 0;
}

.payment-flag {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: #fff8e1;
    color: #8a6d00;
    font-size: 13px;
}

/* QR Modal */
.qr-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 15px;
}

.qr-modal-box {
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    padding: 26px;
    width: 100%;
    max-width: 380px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.qr-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-secondary);
}

.qr-close:hover {
    color: #e74c3c;
}

.qr-modal-box h3 {
    color: var(--green-dark);
    margin-bottom: 10px;
    font-size: 18px;
}

.qr-amount {
    font-size: 14px;
    color: var(--text-primary);
    margin: 6px 0;
}

.qr-amount strong {
    color: var(--green-primary);
}

.qr-instruction {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 4px 0 12px;
}

.qr-code-wrap {
    background: white;
    border-radius: var(--radius-sm);
    padding: 12px;
    display: inline-block;
    border: 1px dashed var(--border-color);
    margin-bottom: 6px;
}

.qr-code-wrap img {
    display: block;
    width: 220px;
    height: auto;
    border-radius: 8px;
}

.paid-btn {
    display: block;
    width: 100%;
    padding: 13px;
    margin-top: 16px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--green-primary);
    color: white;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: all var(--transition);
}

/* Dynamic UPI deep-link CTA (amount auto-filled in UPI apps) */
.qr-pay-btn {
    display: block;
    width: 100%;
    padding: 14px;
    margin-top: 12px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--green-primary);
    color: white;
    font-size: 15px;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition);
}

.qr-pay-btn:hover {
    background: var(--green-dark);
    transform: translateY(-2px);
}

.paid-btn:hover {
    background: var(--green-dark);
    transform: translateY(-2px);
}

.pay-cancel-btn {
    display: block;
    width: 100%;
    padding: 11px;
    margin-top: 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
}

.pay-cancel-btn:hover {
    border-color: #e74c3c;
    color: #e74c3c;
}

/* Success receipt line */
#successReceipt {
    font-size: 14px;
    color: var(--green-primary);
    font-weight: bold;
    margin: 6px 0;
}

/* ===============================
   QUANTITY CHIPS + BUY NOW (on cards)
================================ */

.qty-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0;
}

.qty-chip {
    padding: 5px 10px;
    border: 1.5px solid var(--green-primary);
    background: transparent;
    color: var(--green-primary);
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.qty-chip:hover {
    background: var(--green-light);
}

.qty-chip.active {
    background: var(--green-primary);
    color: white;
}

.card-btn-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.card-btn-row .product-add-btn {
    flex: 1;
}

.buy-now-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: var(--green-dark);
    color: white;
    border-radius: 7px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    transition: all var(--transition);
    white-space: nowrap;
}

.buy-now-btn:hover {
    background: #0e5329;
    transform: translateY(-1px);
}

.card-controls .qty-selector {
    flex: 1;
    margin: 0;
}

/* ---------- PINCODE LOCATION HINT ---------- */
.pincode-hint {
    margin: 4px 0 12px;
    font-size: 13px;
}

.pincode-hint-loading {
    color: var(--text-secondary);
}

.pincode-hint-ok {
    color: var(--green-primary);
    font-weight: bold;
}

.pincode-hint-error {
    color: #e74c3c;
    font-weight: bold;
}

/* ---------- MIN ORDER NOTE ---------- */
.min-order-note {
    margin-top: 12px;
    padding: 10px;
    background: #fff4e5;
    border: 1px solid #f0ad4e;
    border-radius: 8px;
    color: #b2791b;
    font-size: 13px;
    line-height: 1.5;
    text-align: center;
}

body.dark-mode .min-order-note {
    background: #241d10;
    border-color: #a06a15;
    color: #e8b15a;
}

/* ---------- DETAIL PAGE BUTTONS ---------- */
.detail-btn-row {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.detail-btn-row .detail-add-btn {
    flex: 1;
}

.detail-btn-row .buy-now-btn {
    flex: 1;
    font-size: 15px;
}

.whatsapp-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #25D366;
    color: #fff;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    font-size: 13px;
    padding: 6px 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.whatsapp-share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}

.product-share {
    position: absolute;
    top: 12px;
    right: 56px;
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 50%;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.product .product-share + .product-image {
    margin-top: 0;
}

.detail-share {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 3;
    font-size: 14px;
    padding: 8px 16px;
}

.detail-info {
    position: relative;
}

/* ---------- OFFER BANNER SLIDER ---------- */
.banner-slider {
    position: relative;
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 16px;
    overflow: hidden;
    border-radius: 18px;
}

.banner-track {
    display: flex;
    transition: transform 0.5s ease;
}

.banner-slide {
    min-width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 32px 40px;
    color: #fff;
    border-radius: 18px;
    box-sizing: border-box;
}

.banner-text {
    flex: 1;
}

.banner-tag {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    letter-spacing: 1px;
    font-weight: bold;
    margin-bottom: 10px;
}

.banner-text h2 {
    font-size: 30px;
    margin: 0 0 6px;
}

.banner-text p {
    font-size: 16px;
    margin: 0 0 16px;
    opacity: 0.95;
}

.banner-text button {
    background: #fff;
    color: #159447;
    border: none;
    padding: 10px 24px;
    border-radius: 30px;
    font-weight: bold;
    cursor: pointer;
    font-size: 14px;
    transition: transform 0.3s ease;
}

.banner-text button:hover {
    transform: scale(1.05);
}

.banner-visual {
    margin-left: 24px;
    width: 190px;
    height: 145px;
}

.banner-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
}

.banner-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}

.banner-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: #ccc;
    cursor: pointer;
    padding: 0;
    transition: background 0.3s ease, transform 0.3s ease;
}

.banner-dot.active {
    background: var(--green-primary);
    transform: scale(1.3);
}

body.dark-mode .banner-dot {
    background: #3a3f47;
}

body.dark-mode .banner-dot.active {
    background: var(--green-primary);
}

.coupon-message {
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: bold;
    text-align: center;
}

@media (max-width: 600px) {
    .banner-slide {
        padding: 20px 20px;
    }
    .banner-text h2 {
        font-size: 22px;
    }
    .banner-visual {
        width: 120px;
        height: 100px;
        margin-left: 12px;
    }
}

/* ---- Admin dashboard overview + filter rows (order tab) ---- */
.admin-stat { background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: var(--radius-sm); padding: 14px 12px; text-align: center; box-shadow: var(--shadow-sm); }
.admin-stat strong { display: block; font-size: 22px; color: var(--green-primary); }
.admin-stat span { font-size: 12px; color: var(--text-secondary); }
.admin-stat.stat-warn { border-color: #e74c3c; }
.admin-stat.stat-warn strong { color: #e74c3c; }
.admin-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.admin-filters .admin-search { flex: 1 1 220px; margin-bottom: 0; }
.admin-filters .status-select { flex: 0 0 auto; }

.pay-badge { display: inline-block; padding: 3px 10px; border-radius: 20px; color: #fff; font-size: 12px; font-weight: 600; margin: 6px 0 0; }
.admin-order-track { font-size: 11px; color: var(--text-secondary); }
.order-timeline { list-style: none; margin: 12px 0 0; padding: 0; }
.order-timeline li { padding: 4px 0 4px 14px; border-left: 2px solid var(--green-primary); color: var(--text-secondary); font-size: 13px; }
.order-timeline li strong { color: var(--text-color); }
.row-btn.verify { background: #27ae60; }
.row-btn.verify:hover { background: #1e8449; }
.row-btn.reject { background: #e74c3c; }
.row-btn.reject:hover { background: #c0392b; margin-left: 6px; margin-right: 6px; }

/* ---- QR modal UPI reference input ---- */
.qr-txn { width: 100%; max-width: 320px; margin: 10px auto; text-align: left; }
.qr-txn label { display: block; font-size: 12px; color: var(--text-secondary); margin-bottom: 5px; }
.qr-txn input { width: 100%; padding: 10px 12px; border: 1px solid var(--border-color); border-radius: var(--radius-sm); font-size: 14px; }

/* ---- Customer order history page ---- */
.order-pay-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 6px 0 2px; }
.order-pay-row .pay-badge { margin: 0; }
.order-eta { margin: 6px 0; padding: 8px 12px; background: rgba(39, 174, 96, 0.1); border-left: 3px solid #27ae60; border-radius: var(--radius-sm); color: var(--text-primary); }
.pay-badge.pay-paid { background: #27ae60; }
.pay-badge.pay-pending { background: #f39c12; }
.pay-badge.pay-failed { background: #e74c3c; }
.pay-badge.pay-cancelled { background: #7f8c8d; }
.pay-badge.pay-refunded { background: #8e44ad; }
.admin-badge { display: inline-block; padding: 3px 10px; border-radius: 20px; color: #fff; font-size: 12px; font-weight: 600; vertical-align: middle; }
.admin-badge.badge-ok { background: #27ae60; }
.admin-badge.badge-pending { background: #f39c12; }
.admin-badge.badge-reject { background: #e74c3c; }
.admin-return-refund { margin-top: 6px; font-size: 12px; color: var(--text-secondary); }
.admin-variants-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }
.admin-variant-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px; border: 1px solid var(--border-color); border-radius: var(--radius-sm); background: var(--bg-secondary); }
.admin-variant-row input { flex: 1 1 90px; min-width: 70px; padding: 8px 10px; border: 1px solid var(--border-color); border-radius: var(--radius-sm); font-size: 14px; }
.admin-variant-row .pfv-active { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-secondary); white-space: nowrap; }
.admin-variant-row .pfv-active input { width: auto; min-width: 0; }
.admin-variant-row .row-btn { flex: 0 0 auto; }
.return-order-btn { margin-top: 20px; margin-right: 8px; padding: 10px 18px; border: none; border-radius: var(--radius-sm); background: #e67e22; color: #fff; cursor: pointer; font-weight: 600; }
.return-order-btn:hover { background: #ca6f1e; }
.order-return-status { margin-top: 10px; font-size: 13px; color: var(--text-secondary); }
.return-item-choice { padding: 6px 4px; border-bottom: 1px dashed var(--border-color); font-size: 14px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.return-item-choice label { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pay-ref { font-size: 12px; color: var(--text-secondary); }
.cancel-order-btn { margin-top: 20px; margin-right: 8px; padding: 10px 18px; border: none; border-radius: var(--radius-sm); background: #e74c3c; color: #fff; cursor: pointer; font-weight: 600; }
.cancel-order-btn:hover { background: #c0392b; }
.order-pay-row ~ h3, .detail-section { margin-top: 14px; }

/* ---- Track order box (orders page) ---- */
.track-box { background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 18px; margin-bottom: 24px; }
.track-row { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.track-row input { flex: 1 1 240px; padding: 12px 14px; border: 1px solid var(--border-color); border-radius: var(--radius-sm); font-size: 14px; }
.track-row .place-order-btn { padding: 12px 22px; }

/* ---- Help Center (customer WhatsApp support) ---- */
.help-center { max-width: 640px; margin: 0 auto; padding: 28px 16px; text-align: center; }
.help-center-card { background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 34px 24px; box-shadow: var(--shadow-md); }
.help-center-card .help-icon { font-size: 46px; line-height: 1; }
.help-center-card h1 { margin: 12px 0 8px; color: var(--green-dark); }
.help-center-card p { color: var(--text-secondary); font-size: 15px; margin: 6px 0; }
.wa-btn { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; padding: 14px 26px; background: #25D366; color: #fff; font-weight: 700; font-size: 15px; border-radius: 999px; text-decoration: none; cursor: pointer; }
.wa-btn:hover { background: #1ebe5b; }
.help-order-note { margin-top: 12px; font-size: 13px; color: var(--text-secondary); }
.help-order-btn { margin-top: 20px; margin-right: 8px; padding: 10px 18px; border: none; border-radius: var(--radius-sm); background: #25D366; color: #fff; cursor: pointer; font-weight: 600; }
.help-order-btn:hover { background: #1ebe5b; }

/* ---- Delivery policy / stock states ---- */
.free-delivery-note { margin-top: 12px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--green-light); color: var(--green-dark); font-size: 13px; font-weight: bold; text-align: center; }
.checkout-stock-warning { margin-top: 6px; padding: 8px 12px; border-radius: 6px; background: rgba(231, 76, 60, 0.12); color: #e74c3c; font-size: 12px; font-weight: bold; }
.cart-stock-info { margin-top: 4px; font-size: 11px; font-weight: 600; }
.cart-stock-info.low { color: #e67e22; }
.cart-stock-info.out { color: #e74c3c; }
.cart-item-actions button[disabled] { opacity: 0.45; cursor: not-allowed; }
.place-order-btn:disabled, .btn-disabled { opacity: 0.55; cursor: not-allowed; }

.stock-badge { display: inline-block; padding: 4px 12px; border-radius: 20px; font-size: 11px; font-weight: bold; margin: 0 0 8px; }
.stock-badge.out { background: #e74c3c; color: #fff; }
.out-of-stock-label { display: inline-block; padding: 12px; width: 100%; text-align: center; background: rgba(231, 76, 60, 0.12); color: #e74c3c; border-radius: 7px; font-size: 13px; font-weight: bold; }
.qty-btn.qty-plus-muted { opacity: 0.45; cursor: not-allowed; }
.qty-btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.buy-now-btn:disabled, .detail-add-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.detail-stock-unavailable { text-align: center; }
.detail-stock-unavailable p { color: var(--text-secondary); font-size: 14px; margin: 8px 0 16px; }
.detail-stock-unavailable .detail-add-btn, .detail-stock-unavailable .buy-now-btn { width: 100%; margin: 6px 0; }

/* ---- Order status tracker (customer) ---- */
.order-tracker { margin: 14px 0 18px; padding: 14px 12px; background: var(--bg-tertiary); border: 1px solid var(--border-color); border-radius: var(--radius-sm); }
.tracker-steps { display: flex; align-items: flex-start; justify-content: space-between; position: relative; }
.tracker-steps::before { content: ""; position: absolute; top: 17px; left: 10%; right: 10%; height: 3px; background: var(--border-color); border-radius: 3px; z-index: 0; }
.tracker-steps .track-step { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; flex: 1; text-align: center; min-width: 0; }
.track-step .track-dot { width: 34px; height: 34px; border-radius: 50%; background: var(--bg-secondary); border: 3px solid var(--border-color); display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: bold; color: var(--text-secondary); transition: all var(--transition); }
.track-step .track-label { margin-top: 6px; font-size: 11px; font-weight: 600; color: var(--text-secondary); line-height: 1.2; }
.track-step.upcoming .track-dot { background: var(--bg-secondary); }
.track-step.current .track-dot { border-color: var(--green-primary); background: var(--green-primary); color: #fff; box-shadow: 0 0 0 4px var(--green-light); }
.track-step.current .track-label { color: var(--green-dark); }
.track-step.done .track-dot { border-color: var(--green-primary); background: var(--green-primary); color: #fff; }
.track-step.done .track-label { color: var(--green-primary); }
.tracker-current { margin-top: 10px; font-size: 13px; text-align: center; color: var(--text-secondary); }
.tracker-current strong { color: var(--green-dark); }
.order-tracker.cancelled { background: rgba(231, 76, 60, 0.08); }
.tracker-cancelled { text-align: center; color: #e74c3c; font-size: 14px; }
.tracker-timeline h4 { margin: 0 0 10px; color: var(--text-primary); font-size: 14px; }
.tracker-timeline ul { list-style: none; margin: 0; padding: 0; }
.tracker-timeline li { display: flex; align-items: flex-start; gap: 10px; padding: 6px 0; }
.tracker-timeline li .tl-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green-primary); margin-top: 5px; flex: 0 0 auto; }
.tracker-timeline li div { display: flex; flex-direction: column; }
.tracker-timeline li strong { color: var(--text-primary); font-size: 13px; }
.tracker-timeline li small { color: var(--text-secondary); font-size: 12px; }

@media (max-width: 600px) {
    .track-step .track-dot { width: 28px; height: 28px; font-size: 13px; border-width: 2px; }
    .track-step .track-label { font-size: 10px; }
    .tracker-steps::before { top: 14px; }
}

/* ---- Admin Settings tab ---- */
.settings-card { max-width: 720px; background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 24px; box-shadow: var(--shadow-sm); }
.settings-head h3 { margin: 0 0 6px; color: var(--text-primary); }
.settings-head p { margin: 0 0 18px; color: var(--text-secondary); font-size: 13px; }
.settings-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 14px; }
.settings-row label { flex: 1 1 240px; font-size: 14px; font-weight: 600; color: var(--text-primary); }
.settings-row .stock-input { flex: 0 0 160px; max-width: 160px; }
.settings-hint { font-size: 12px; color: var(--text-secondary); margin: 4px 0 16px; }
.settings-save { padding: 10px 22px; font-size: 14px; }
.settings-status.ok { color: var(--green-dark); font-weight: bold; font-size: 13px; margin-top: 14px; }

/* ---- Admin product stock tags ---- */
.admin-product-name { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stock-tag { display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: 10px; font-weight: 700; text-transform: uppercase; }
.stock-tag.low { background: rgba(243, 156, 18, 0.15); color: #e67e22; }
.stock-tag.out { background: #e74c3c; color: #fff; }

/* ===============================
   COUPONS (checkout) + MIN ORDER
   =============================== */
.coupon-box { display: flex; gap: 8px; margin: 14px 0 4px; }
.coupon-box input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--border-color); border-radius: var(--radius-sm); background: var(--bg-primary); color: var(--text-primary); text-transform: uppercase; }
.coupon-box button { padding: 10px 16px; border: none; border-radius: var(--radius-sm); background: var(--green-primary); color: #fff; font-weight: 700; cursor: pointer; }
.coupon-box button:hover { background: var(--green-dark); }
#removeCouponBtn { background: var(--bg-secondary); color: var(--text-secondary); border: 1px solid var(--border-color); }
.coupon-status { font-size: 12px; margin: 2px 0 10px; }
.discount-row strong { color: var(--green-primary) !important; }
.settings-hint.warn { color: #e74c3c; font-weight: 600; }

/* ===============================
   ADMIN DASHBOARD (sales analytics)
   =============================== */
.admin-dash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.dash-blocks { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-top: 18px; }
.dash-block { background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 16px; box-shadow: var(--shadow-sm); }
.dash-block h4 { margin: 0 0 10px; font-size: 14px; color: var(--text-primary); }
.dash-block.dash-today { grid-column: 1 / -1; }
.dash-today-nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.dash-num { background: var(--bg-primary); border: 1px solid var(--border-color); border-radius: var(--radius-sm); padding: 12px; text-align: center; }
.dash-num strong { display: block; font-size: 20px; color: var(--green-primary); }
.dash-num span { font-size: 11px; color: var(--text-secondary); }
.dash-list { display: flex; flex-direction: column; gap: 8px; max-height: 300px; overflow-y: auto; }
.dash-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 10px; background: var(--bg-primary); border: 1px solid var(--border-color); border-radius: var(--radius-sm); font-size: 13px; }
.dash-item strong { color: var(--text-primary); white-space: nowrap; }
.dash-empty { font-size: 13px; color: var(--text-secondary); text-align: center; padding: 8px; }
.dash-range-block { margin-top: 18px; background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 16px; box-shadow: var(--shadow-sm); }
.dash-range-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.dash-range-head h4 { margin: 0; font-size: 14px; color: var(--text-primary); }
.dash-note { font-size: 11px; color: var(--text-secondary); }
.dash-range-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-bottom: 12px; }
.dash-range-controls label { font-size: 13px; color: var(--text-secondary); display: flex; flex-direction: column; gap: 4px; }
.dash-range-controls input { padding: 8px 10px; border: 1px solid var(--border-color); border-radius: var(--radius-sm); background: var(--bg-primary); color: var(--text-primary); }
.dash-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.dash-table th, .dash-table td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--border-color); }
.dash-table th { color: var(--text-secondary); font-size: 12px; text-transform: uppercase; }
.dash-table td { color: var(--text-primary); }

/* ===============================
   ADMIN COUPONS
   =============================== */
.admin-coupon { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 16px; background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: var(--radius-md); margin-bottom: 10px; box-shadow: var(--shadow-sm); }
.admin-coupon.coupon-inactive { opacity: 0.55; }
.admin-coupon-main { flex: 1 1 260px; min-width: 0; }
.admin-coupon-code { font-family: monospace; font-weight: 700; font-size: 17px; color: var(--green-primary); letter-spacing: 1px; }
.admin-coupon-meta { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }
.admin-coupon-badges { display: flex; gap: 6px; }
.coupon-active-badge { background: rgba(39, 174, 96, 0.15); color: #27ae60; padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 700; }
.coupon-expired-badge { background: #e74c3c; color: #fff; padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 700; }
.admin-coupon-actions { display: flex; gap: 8px; }

@media (max-width: 600px) {
    .coupon-box { flex-direction: column; }
    .admin-dash-grid { grid-template-columns: repeat(2, 1fr); }
    .dash-table { font-size: 12px; }
    .admin-coupon { flex-direction: column; align-items: flex-start; }
    .dash-range-controls { flex-direction: column; align-items: stretch; }
}
/* ===============================
   PROFESSIONAL DESIGN SYSTEM 2.0
   Refined typography, depth, motion
   and polish layered on top of the
   existing component styles.
=============================== */

/* ---------- DESIGN TOKENS (light) ---------- */
:root {
    --bg-page: #f6faf7;
    --surface: #ffffff;
    --surface-soft: #eef6f0;
    --accent: #0e7a3d;
    --accent-strong: #0a5e2f;
    --accent-soft: rgba(14, 122, 61, 0.09);
    --ink: #1a1d1a;
    --ink-soft: #5b6360;
    --line: #e3e9e4;
    --brand-gradient: linear-gradient(135deg, #0e7a3d 0%, #25a055 55%, #5fd07e 120%);
    --shadow-xs: 0 1px 2px rgba(20, 32, 24, 0.06);
    --shadow-sm: 0 2px 6px rgba(20, 32, 24, 0.06), 0 1px 2px rgba(20, 32, 24, 0.04);
    --shadow-md: 0 10px 24px -8px rgba(20, 32, 24, 0.14), 0 2px 6px rgba(20, 32, 24, 0.05);
    --shadow-lg: 0 24px 48px -16px rgba(20, 32, 24, 0.22), 0 4px 12px rgba(20, 32, 24, 0.06);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --font-body: 'Segoe UI Variable', 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
    --font-display: 'Segoe UI Variable', 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
}

body.dark-mode {
    --bg-page: #0b100d;
    --surface: #131a15;
    --surface-soft: #1a241c;
    --accent: #34c76b;
    --accent-strong: #5fd380;
    --accent-soft: rgba(52, 199, 107, 0.14);
    --ink: #e8efe9;
    --ink-soft: #93a49a;
    --line: #27342b;
    --brand-gradient: linear-gradient(135deg, #14532d 0%, #1e7c42 55%, #2fa75b 120%);
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.35), 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 10px 24px -8px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 24px 48px -16px rgba(0, 0, 0, 0.6), 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* ---------- BASE / GLOBAL ---------- */
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    background: var(--bg-page);
    color: var(--ink);
    letter-spacing: 0.1px;
}

::selection {
    background: var(--accent);
    color: #fff;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-page);
}
::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--ink-soft) 45%, transparent);
    border-radius: 8px;
    border: 2px solid var(--bg-page);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--ink-soft);
}

:focus {
    outline: none;
}
:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
    border-radius: 6px;
}

button {
    font-family: inherit;
}
button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none !important;
}

img {
    -webkit-user-drag: none;
    user-select: none;
}

/* ---------- BUTTONS ---------- */
.secondary-btn,
.cart-btn,
.dark-mode-toggle,
.nav-link,
.cat-filter-btn,
.clear-filters-btn,
.load-more-btn,
.product-add-btn,
.checkout-btn,
.place-order-btn,
.auth-btn,
.detail-add-btn,
.buy-now-btn,
.qty-btn,
.qr-pay-btn,
.paid-btn,
.pay-cancel-btn,
.row-btn,
.modal-save,
.modal-cancel,
.otp-resend-btn,
.review-submit,
.wa-btn,
.help-order-btn,
.cancel-order-btn,
.voice-btn,
.settings-save {
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease,
        box-shadow 0.2s ease, transform 0.15s ease, opacity 0.2s ease;
}

.secondary-btn:active,
.cart-btn:active,
.load-more-btn:active,
.product-add-btn:active,
.checkout-btn:active,
.place-order-btn:active,
.auth-btn:active,
.detail-add-btn:active,
.buy-now-btn:active,
.paid-btn:active,
.qr-pay-btn:active,
.review-submit:active,
.wa-btn:active {
    transform: translateY(0) scale(0.98);
}

.cart-btn:hover {
    box-shadow: 0 8px 18px -6px var(--accent);
}

/* ---------- HEADER ---------- */
header {
    background: color-mix(in srgb, var(--bg-secondary) 88%, transparent);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    box-shadow: 0 1px 0 var(--line), 0 8px 24px -16px rgba(20, 32, 24, 0.25);
}

.logo {
    font-family: var(--font-display);
    letter-spacing: -0.3px;
}

.nav-link {
    border-radius: 999px;
    padding: 9px 16px;
}
.nav-link:hover {
    background: var(--accent-soft);
}

/* ---------- HERO ---------- */
.hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(600px 320px at 85% 20%, rgba(47, 167, 91, 0.14), transparent 60%),
        radial-gradient(520px 300px at 8% 85%, rgba(95, 208, 126, 0.14), transparent 60%),
        linear-gradient(120deg, color-mix(in srgb, var(--green-light) 92%, #fff) 0%, var(--bg-primary) 70%);
}
body.dark-mode .hero {
    background:
        radial-gradient(600px 320px at 85% 20%, rgba(47, 167, 91, 0.16), transparent 60%),
        radial-gradient(520px 300px at 8% 85%, rgba(95, 208, 126, 0.12), transparent 60%),
        linear-gradient(120deg, #0f1c13 0%, var(--bg-primary) 70%);
}

.hero h1 {
    font-family: var(--font-display);
    letter-spacing: -0.6px;
}

.hero button {
    border-radius: 999px;
    background: var(--brand-gradient);
    box-shadow: 0 12px 24px -10px var(--accent);
    padding: 15px 34px;
}

/* ---------- SECTION HEADINGS ---------- */
.categories h2,
.products-section h2,
.detail-related h2 {
    position: relative;
    display: inline-block;
    font-family: var(--font-display);
    letter-spacing: -0.3px;
}
.categories h2::after,
.products-section h2::after {
    content: "";
    display: block;
    width: 56px;
    height: 4px;
    margin: 10px auto 0;
    border-radius: 999px;
    background: var(--brand-gradient);
}
.detail-related h2::after {
    content: "";
    display: block;
    width: 56px;
    height: 4px;
    margin: 10px auto 0;
    border-radius: 999px;
    background: var(--brand-gradient);
}

/* ---------- CATEGORY TILES ---------- */
.category {
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}
.category:hover {
    border-color: color-mix(in srgb, var(--accent) 40%, transparent);
    box-shadow: var(--shadow-md);
}

/* ---------- FILTER CHIPS ---------- */
.cat-filter-btn,
.clear-filters-btn {
    box-shadow: var(--shadow-xs);
}
.cat-filter-btn:hover,
.clear-filters-btn:hover {
    box-shadow: var(--shadow-sm);
}
.filter-row {
    box-shadow: var(--shadow-sm);
    border-color: var(--line);
}

/* ---------- PRODUCT CARDS ---------- */
.product {
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius-md);
}
.product:hover {
    border-color: color-mix(in srgb, var(--accent) 35%, transparent);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.product-image {
    background: color-mix(in srgb, var(--accent-soft) 45%, var(--bg-primary));
}

.product h3 {
    font-weight: 650;
    letter-spacing: -0.1px;
}

.product-price {
    font-size: 19px;
    color: var(--accent);
}

.product-add-btn {
    border-radius: 999px;
}
.product-add-btn:hover {
    box-shadow: 0 8px 16px -8px var(--accent);
}

/* ---------- FEATURES ---------- */
.features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
    padding: 60px 8% 70px;
    background: linear-gradient(180deg, transparent, var(--accent-soft));
}
.features div {
    flex: 0 1 220px;
    background: var(--bg-secondary);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 28px 22px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.features div:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

/* ---------- FOOTER ---------- */
footer {
    background: #0b3d22;
    padding: 52px 8% 44px;
    letter-spacing: 0.2px;
}
body.dark-mode footer {
    background: #07130c;
}
footer h2 {
    letter-spacing: -0.2px;
}

/* ---------- TOAST ---------- */
.fm-toast {
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    border-left: 4px solid rgba(255, 255, 255, 0.45);
    padding: 15px 22px;
    font-weight: 600;
}

/* ---------- CART DRAWER ---------- */
.cart-content {
    box-shadow: -20px 0 50px -20px rgba(20, 32, 24, 0.4);
}
.cart-content h2 {
    margin-bottom: 8px;
}
.cart-item {
    border-radius: 10px;
    padding: 12px 10px;
    margin: 0 -10px;
    transition: background 0.2s ease;
}
.cart-item:hover {
    background: var(--accent-soft);
}
.cart-item-actions button {
    border: 1px solid var(--line);
    background: var(--bg-primary);
}
.cart-item-actions button:hover {
    background: var(--accent);
    border-color: var(--accent);
}
.checkout-btn {
    border-radius: 999px;
}
.checkout-btn:hover {
    box-shadow: 0 10px 20px -8px var(--accent);
}

/* ---------- CHECKOUT ---------- */
.checkout-form,
.order-summary {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}
.checkout-form h2,
.order-summary h2 {
    letter-spacing: -0.3px;
}
.checkout-fieldset legend.sr-only {
    position: static;
    clip: auto;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
}
.payment-option {
    border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
    background: var(--accent-soft);
    border-radius: var(--radius-sm);
}
.place-order-btn {
    border-radius: 999px;
    background: var(--brand-gradient);
}
.place-order-btn:hover {
    box-shadow: 0 14px 26px -10px var(--accent);
}
.order-summary {
    position: sticky;
    top: 96px;
    align-self: start;
}

/* ---------- SUCCESS MESSAGE ---------- */
.success-message {
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}
.success-box {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-height: 90vh;
    overflow-y: auto;
}
.success-icon {
    width: 84px;
    height: 84px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    border-radius: 50%;
    background: var(--accent-soft);
    border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
}

/* ---------- AUTH ---------- */
.auth-page {
    background:
        radial-gradient(600px 360px at 15% 10%, rgba(47, 167, 91, 0.15), transparent 60%),
        radial-gradient(600px 360px at 90% 90%, rgba(95, 208, 126, 0.14), transparent 60%),
        linear-gradient(135deg, var(--bg-primary), var(--green-light));
}
body.dark-mode .auth-page {
    background:
        radial-gradient(600px 360px at 15% 10%, rgba(47, 167, 91, 0.14), transparent 60%),
        radial-gradient(600px 360px at 90% 90%, rgba(95, 208, 126, 0.1), transparent 60%),
        linear-gradient(135deg, #0e1510, #101b13);
}
.auth-box {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}
.auth-btn {
    border-radius: 999px;
    background: var(--brand-gradient);
}
.auth-btn:hover {
    box-shadow: 0 12px 24px -10px var(--accent);
}

/* ---------- MODALS (admin + qr) ---------- */
.admin-modal,
.qr-modal {
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}
.admin-modal-box {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}
.qr-modal-box {
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}
.paid-btn,
.modal-save {
    border-radius: 999px;
    background: var(--brand-gradient);
}
.paid-btn:hover {
    box-shadow: 0 10px 20px -8px var(--accent);
    background: var(--accent-strong);
}

/* ---------- ADMIN ---------- */
.admin-order-card,
.admin-product-card,
.admin-customer-row,
.admin-review-card,
.admin-coupon,
.empty-orders,
.order-card {
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.admin-order-card:hover,
.admin-product-card:hover,
.admin-customer-row:hover,
.admin-review-card:hover,
.order-card:hover {
    box-shadow: var(--shadow-md);
}
.stat-box,
.admin-stat {
    background: var(--bg-secondary);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}
.row-btn {
    border-radius: 8px;
}
.order-status-badge,
.pay-badge,
.stock-tag,
.coupon-active-badge,
.coupon-expired-badge,
.role-badge {
    letter-spacing: 0.3px;
}

/* ---------- DISABLED / LOADING STATES ---------- */
.skeleton-img,
.skeleton-text,
.skeleton-text-long,
.skeleton-text-short,
.skeleton-text-btn {
    animation: skeleton-pulse 1.4s ease-in-out infinite;
}
@keyframes skeleton-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

/* ---------- RESPONSIVE POLISH ---------- */
@media (max-width: 768px) {
    header {
        padding: 10px 4%;
    }
    .hero {
        padding: 40px 6%;
        min-height: auto;
    }
    .hero h1 {
        font-size: 34px;
    }
    .categories,
    .products-section {
        padding: 44px 5%;
    }
    .features {
        padding: 44px 5% 54px;
    }
    .footer {
        padding: 40px 5%;
    }
    .order-summary {
        position: static;
    }
.checkout-container {
        grid-template-columns: 1fr;
    }
}

/* ===============================
   FRESHMART - DELIVERY PARTNER PANEL
================================ */

[data-page="delivery"] header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 5%;
    background: var(--bg-secondary);
    box-shadow: var(--shadow-sm);
}

[data-page="delivery"] main {
    max-width: 860px;
    margin: 0 auto;
    padding: 28px 5% 40px;
}

[data-page="delivery"] footer {
    text-align: center;
    padding: 24px;
    color: var(--text-secondary);
    font-size: 14px;
}

.delivery-header {
    text-align: center;
}

.delivery-header h1 {
    font-size: 28px;
    color: var(--text-primary);
    margin-bottom: 14px;
}

.availability-toggle {
    display: flex;
    justify-content: center;
    margin: 6px 0 12px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--border-color);
    transition: var(--transition);
    border-radius: 28px;
}

.slider:before {
    content: "";
    position: absolute;
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background: #ffffff;
    transition: var(--transition);
    border-radius: 50%;
}

.switch input:checked + .slider {
    background: var(--green-primary);
}

.switch input:checked + .slider:before {
    transform: translateX(24px);
}

.switch input:disabled + .slider {
    cursor: not-allowed;
    opacity: 0.6;
}

.earnings-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.earning-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 22px;
    min-width: 130px;
    box-shadow: var(--shadow-sm);
    color: var(--text-secondary);
    font-size: 14px;
}

.earning-card .amount {
    font-size: 20px;
    font-weight: 700;
    color: var(--green-primary);
    margin-top: 4px;
}

.assignments h2 {
    font-size: 20px;
    color: var(--text-primary);
    margin-bottom: 14px;
    text-align: center;
}

.empty-state {
    text-align: center;
    color: var(--text-secondary);
    padding: 30px 0;
    font-size: 15px;
    display: none;
}

.assignments-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.delivery-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.delivery-card.delivered {
    opacity: 0.75;
}

.delivery-proof {
    margin-bottom: 12px;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.delivery-proof img {
    display: block;
    width: 100%;
    max-height: 220px;
    object-fit: cover;
}

.delivery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.delivery-time {
    font-size: 13px;
    color: var(--text-secondary);
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.delivery-details {
    display: grid;
    gap: 6px;
    margin-bottom: 10px;
}

.detail-row {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.detail-row strong {
    color: var(--text-primary);
    margin-right: 6px;
}

.detail-row a {
    color: var(--green-primary);
}

.delivery-items {
    font-size: 14px;
    color: var(--text-secondary);
    padding: 10px 0;
    border-top: 1px dashed var(--border-color);
    border-bottom: 1px dashed var(--border-color);
    margin-bottom: 12px;
}

.delivery-items strong {
    color: var(--text-primary);
}

.delivery-amount {
    font-size: 18px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.delivery-amount strong {
    color: var(--green-primary);
}

.delivery-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.action-btn {
    padding: 9px 18px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    color: #ffffff;
}

.action-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.action-btn.accept {
    background: var(--green-primary);
}

.action-btn.accept:hover:not(:disabled) {
    background: var(--green-dark);
}

.action-btn.reject {
    background: #dc3545;
}

.action-btn.reject:hover:not(:disabled) {
    background: #b02a37;
}

.action-btn.pickup {
    background: #0d6efd;
}

.action-btn.pickup:hover:not(:disabled) {
    background: #0a58ca;
}

.action-btn.start {
    background: #fd7e14;
}

.action-btn.start:hover:not(:disabled) {
    background: #e86f0c;
}

.action-btn.proof {
    background: #6f42c1;
}

.action-btn.proof:hover:not(:disabled) {
    background: #5b33a3;
}

.action-btn.deliver {
    background: var(--green-primary);
}

.action-btn.deliver:hover:not(:disabled) {
    background: var(--green-dark);
}

body.dark-mode [data-page="delivery"] .delivery-proof img {
    filter: brightness(0.9);
}

/* ---------- TOAST (delivery page) ---------- */
[data-page="delivery"] .toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-primary);
    color: var(--bg-secondary);
    padding: 12px 22px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    z-index: 9999;
    box-shadow: var(--shadow-lg);
}

@media (max-width: 768px) {
    [data-page="delivery"] .delivery-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    .delivery-card {
        padding: 14px;
    }
    .delivery-actions {
        flex-direction: column;
    }
    .action-btn {
        width: 100%;
    }
}

/* ===============================
   R14 - Notifications inbox / bell
   =============================== */

.fm-notif-badge {
    position: relative;
    top: -8px;
    left: 2px;
    background: #e74c3c;
    color: #fff;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    padding: 3px 5px;
    min-width: 16px;
    text-align: center;
}

.fm-notif-card {
    border-left: 4px solid #159447;
    transition: opacity 0.2s ease;
}

.fm-notif-card.fm-notif-read {
    border-left-color: #bbb;
    opacity: 0.7;
}

/* Location / map modal (OpenStreetMap embed, key-free) */
.map-modal-overlay {
    position: fixed; inset: 0; z-index: 10000;
    background: rgba(0, 0, 0, 0.55);
    display: flex; align-items: center; justify-content: center;
    padding: 16px; overflow-y: auto;
}
.map-modal-box {
    background: var(--bg, #fff); color: var(--text-color, #111);
    width: min(680px, 100%); border-radius: 12px; overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    animation: slideIn 0.25s ease;
    max-height: 92vh; overflow-y: auto;
}
.map-modal-head {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 16px; border-bottom: 1px solid rgba(127, 127, 127, 0.25);
}
.map-modal-close {
    background: transparent; border: 0; font-size: 16px; cursor: pointer;
    color: inherit; padding: 4px 8px;
}
.map-modal-frame {
    padding: 12px 16px 16px;
}
.map-modal-frame iframe {
    width: 100%; height: min(380px, 55vh); border: 0; border-radius: 8px; background: #eee;
    display: block;
}
.map-open-link {
    display: inline-block; margin-top: 10px; color: #159447;
    font-weight: 600; text-decoration: none;
}
.map-open-link:hover { text-decoration: underline; }

/* Location mini-preview + interactive map picker (Leaflet, self-hosted) */
.loc-map-preview { margin-top: 8px; }
.loc-preview-frame {
    width: 100%; height: 170px; border: 1.5px solid rgba(127, 127, 127, 0.3);
    border-radius: 10px; background: #eee; display: block;
}
.loc-preview-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.loc-preview-note { font-size: 12px; color: var(--text-secondary, #666); }

.map-picker-overlay {
    position: fixed; inset: 0; z-index: 10001;
    background: rgba(0, 0, 0, 0.6);
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
}
.map-picker-box {
    background: var(--bg, #fff); color: var(--text-color, #111);
    width: min(760px, 100%); border-radius: 12px; overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    animation: slideIn 0.25s ease;
    display: flex; flex-direction: column; max-height: 92vh;
}
.map-picker-head {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 16px; border-bottom: 1px solid rgba(127, 127, 127, 0.25);
}
.map-picker-body { padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; min-height: 0; }
.map-picker-search { display: flex; gap: 8px; }
.map-picker-search input {
    flex: 1; border: 1.5px solid rgba(127, 127, 127, 0.4); border-radius: 8px;
    padding: 9px 12px; font-size: 14px; color: inherit; background: var(--bg, #fff);
}
.map-picker-search-btn {
    background: #159447; color: #fff; border: 0; border-radius: 8px;
    padding: 0 16px; cursor: pointer; font-size: 13px; font-weight: 600;
}
.map-picker-search-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.map-picker-map {
    height: 340px; border-radius: 10px; overflow: hidden; background: #e8eef3;
    border: 1.5px solid rgba(127, 127, 127, 0.3);
}
.map-picker-map .leaflet-container { width: 100%; height: 100%; }
.map-picker-acc-circle {
    fill: rgba(21, 148, 71, 0.15);
    fill-opacity: 0.15;
    stroke: rgba(21, 148, 71, 0.55);
    stroke-width: 1.5;
    stroke-dasharray: 3 2;
}
.map-picker-addr {
    background: rgba(21, 148, 71, 0.08); border: 1px solid rgba(21, 148, 71, 0.3);
    border-radius: 8px; padding: 8px 12px;
}
.map-picker-addr-label { font-size: 11px; font-weight: 700; color: #159447; text-transform: uppercase; letter-spacing: 0.4px; }
.map-picker-addr-text { font-size: 13px; color: var(--text-color, #111); margin-top: 2px; }
.map-picker-foot { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.map-picker-loc-btn { background: #ecf7f1; color: #159447; border: 1px solid #159447; }
.map-picker-cancel-btn { background: transparent; border: 1px solid rgba(127, 127, 127, 0.4); color: inherit; }
.map-picker-confirm-btn { background: #159447; color: #fff; border: 0; }
.map-picker-loc-btn, .map-picker-cancel-btn, .map-picker-confirm-btn {
    padding: 9px 14px; border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 600;
}
.map-picker-confirm-btn:disabled, .map-picker-loc-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* Checkout location row */
.loc-row {
    display: flex; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap;
}
.loc-captured {
    font-size: 12px; color: var(--text-secondary, #666);
    background: rgba(21, 148, 71, 0.12); padding: 4px 8px; border-radius: 6px;
    display: none;
}
.loc-err { font-size: 12px; color: #e74c3c; margin-top: 4px; display: none; }
.loc-action-btn {
    margin-top: 6px; background: #159447; color: #fff; border: 0;
    padding: 8px 12px; border-radius: 8px; cursor: pointer; font-size: 13px;
}
.loc-action-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.loc-secondary-btn {
    background: transparent; color: #159447; border: 1px solid #159447;
    padding: 7px 12px; border-radius: 8px; cursor: pointer; font-size: 13px;
}
.loc-secondary-btn:hover { background: rgba(21, 148, 71, 0.08); }

/* Saved address picker */
.saved-addr-list { display: grid; gap: 8px; margin: 10px 0; }
.saved-addr-item {
    border: 1.5px solid rgba(127, 127, 127, 0.3); border-radius: 10px;
    padding: 10px 12px; cursor: pointer; transition: border-color 0.15s ease;
}
.saved-addr-item.selected { border-color: #159447; background: rgba(21, 148, 71, 0.08); }
.saved-addr-item .addr-tag { font-weight: 700; color: #159447; }
.saved-addr-item .addr-text { font-size: 13px; margin-top: 2px; color: var(--text-secondary, #666); }

/* Delivery partner live-location toggle */
.loc-share-bar { margin-top: 10px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.loc-share-pill {
    font-size: 12px; padding: 4px 10px; border-radius: 999px;
    background: rgba(21, 148, 71, 0.14); color: #159447; display: none;
}
.loc-share-pill.live { display: inline-block; }
.loc-note { font-size: 12px; color: var(--text-secondary, #666); }
.loc-warning { margin-top: 8px; padding: 10px 12px; background: #fff3cd; border: 1px solid #ffc107; border-radius: 8px; color: #856404; font-size: 13px; font-weight: 600; }

/* ===============================
   DELIVERY OPERATIONS (Phases 1-6)
   ================================ */

/* ---------- PARTNER APPLICATION / STATUS BAR ---------- */
.ops-status-bar {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    padding: 12px 14px; border-radius: var(--radius-sm, 8px);
    font-size: 14px; font-weight: 600; line-height: 1.45;
    background: var(--surface-soft, #eef6f0);
    border: 1px solid var(--border-color, #e0e0e0);
    color: var(--text-primary, #222);
}
.ops-status-bar a { color: var(--green-primary, #159447); font-weight: 700; }
.ops-status-dot {
    flex: 0 0 auto; width: 10px; height: 10px;
    border-radius: 50%; background: var(--text-secondary, #555);
}
.ops-status-approved { background: rgba(21, 148, 71, 0.12); border-color: rgba(21, 148, 71, 0.4); }
.ops-status-approved .ops-status-dot { background: #159447; }
.ops-status-pending { background: rgba(255, 193, 7, 0.14); border-color: rgba(255, 193, 7, 0.45); }
.ops-status-pending .ops-status-dot { background: #ffc107; }
.ops-status-none { background: var(--surface-soft, #eef6f0); }
.ops-status-rejected { background: rgba(231, 76, 60, 0.12); border-color: rgba(231, 76, 60, 0.4); }
.ops-status-rejected .ops-status-dot { background: #e74c3c; }

.profile-form-grid {
    display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin-top: 12px;
}
.profile-form-actions { margin-top: 14px; }
.auth-hint { color: var(--text-secondary, #555); }
.auth-hint a { color: var(--green-primary, #159447); font-weight: 700; }

/* ---------- SECTION SHELLS ---------- */
.ops-section {
    background: var(--surface, #fff);
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: var(--radius-md, 15px);
    box-shadow: var(--shadow-sm);
    padding: 18px; margin-bottom: 18px;
}
.ops-section-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; flex-wrap: wrap; margin-bottom: 4px;
}
.ops-section-head h2, .ops-section-head h3 { margin: 0; }
.ops-section-sub { font-size: 13px; color: var(--text-secondary, #555); margin: 0 0 12px; }
.ops-head-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ops-hint { font-size: 12px; color: var(--text-secondary, #555); margin: 6px 0 0; }
.ops-empty {
    text-align: center; padding: 22px 12px; color: var(--text-secondary, #555);
    font-size: 14px; font-weight: 600;
}
.ops-warn {
    margin-top: 10px; padding: 10px 12px; border-radius: var(--radius-sm, 8px);
    background: rgba(255, 193, 7, 0.14);
    border: 1px solid rgba(255, 193, 7, 0.45);
    color: #856404; font-size: 13px; font-weight: 600;
}
body.dark-mode .ops-warn { color: #ffd76a; }
.ops-date { font-size: 12px; color: var(--text-secondary, #555); white-space: nowrap; }
.ops-run { margin-top: 14px; border-top: 1px dashed var(--border-color, #e0e0e0); padding-top: 12px; }
.ops-run-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.ops-run-head strong { font-size: 15px; }
.ops-run-meta { font-size: 13px; color: var(--text-secondary, #555); margin-top: 4px; }
.ops-run-amount { font-weight: 800; color: var(--green-primary, #159447); }
.ops-run-cash {
    margin-top: 8px; padding: 8px 10px; border-radius: var(--radius-sm, 8px);
    background: rgba(231, 76, 60, 0.1); color: #c0392b; font-size: 13px; font-weight: 600;
}
body.dark-mode .ops-run-cash { color: #ff8a80; }
.ops-run-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

/* ---------- CHIPS / FLAGS ---------- */
.ops-chip {
    display: inline-block; padding: 3px 10px; border-radius: 999px;
    font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.02em;
    background: var(--surface-soft, #eef6f0); color: var(--text-secondary, #555);
    border: 1px solid var(--border-color, #e0e0e0);
}
.chip-ok { background: rgba(21, 148, 71, 0.14); color: #0e7a3d; border-color: rgba(21, 148, 71, 0.35); }
.chip-warn { background: rgba(255, 193, 7, 0.16); color: #856404; border-color: rgba(255, 193, 7, 0.45); }
.chip-off { background: rgba(127, 127, 127, 0.14); color: var(--text-secondary, #555); }
.chip-bad { background: rgba(231, 76, 60, 0.14); color: #c0392b; border-color: rgba(231, 76, 60, 0.4); }
.chip-active { background: rgba(21, 148, 71, 0.14); color: #0e7a3d; border-color: rgba(21, 148, 71, 0.35); }
.chip-offer { background: rgba(14, 122, 61, 0.12); color: #0e7a3d; border-color: rgba(14, 122, 61, 0.3); }
body.dark-mode .chip-ok, body.dark-mode .chip-active, body.dark-mode .chip-offer { color: #6ee49b; }
body.dark-mode .chip-warn { color: #ffd76a; }
body.dark-mode .chip-bad { color: #ff8a80; }
.ops-flag-ok { color: #0e7a3d; font-weight: 700; font-size: 12px; }
.ops-flag-bad { color: #c0392b; font-weight: 700; font-size: 12px; }
.ops-flag-missing { color: #c0392b; font-weight: 700; font-size: 12px; }
body.dark-mode .ops-flag-ok { color: #6ee49b; }
body.dark-mode .ops-flag-bad, body.dark-mode .ops-flag-missing { color: #ff8a80; }

/* ---------- BUTTONS ---------- */
.ops-btn {
    border: 0; border-radius: var(--radius-sm, 8px);
    padding: 9px 14px; font-size: 13px; font-weight: 700;
    cursor: pointer; background: var(--surface-soft, #eef6f0);
    color: var(--text-primary, #222); border: 1px solid var(--border-color, #e0e0e0);
    transition: filter var(--transition, 0.3s ease);
}
.ops-btn:hover:not(:disabled) { filter: brightness(0.96); }
.ops-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.ops-btn-accept { background: #159447; color: #fff; border-color: #159447; }
.ops-btn-decline { background: #e74c3c; color: #fff; border-color: #e74c3c; }
.ops-btn-ghost { background: transparent; color: var(--green-primary, #159447); border-color: var(--green-primary, #159447); }
.ops-btn-otp { background: #1a73e8; color: #fff; border-color: #1a73e8; }
.ops-btn-cash { background: #b9770e; color: #fff; border-color: #b9770e; }
.ops-btn-sign { background: #6f42c1; color: #fff; border-color: #6f42c1; }

/* ---------- OFFERS ---------- */
.ops-offer-list { display: grid; gap: 12px; margin-top: 12px; }
.ops-offer {
    border: 2px solid var(--border-color, #e0e0e0);
    border-radius: var(--radius-md, 15px);
    padding: 14px; background: var(--surface, #fff);
    transition: border-color var(--transition, 0.3s ease), box-shadow var(--transition, 0.3s ease);
}
.ops-offer.claimed { opacity: 0.72; }
.ops-offer.urgent { border-color: #e74c3c; box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.14); }
.ops-offer-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.ops-offer-amount { font-size: 18px; font-weight: 800; }
.ops-offer-timer { font-size: 13px; font-weight: 700; color: var(--text-secondary, #555); }
.ops-offer-urgent .ops-offer-timer { color: #e74c3c; }
.ops-offer-meta { font-size: 13px; color: var(--text-secondary, #555); margin-top: 6px; }
.ops-offer-meta-row { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; }
.ops-offer-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

/* ---------- TABLES ---------- */
.ops-table-wrap { overflow-x: auto; margin-top: 12px; -webkit-overflow-scrolling: touch; }
.ops-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 720px; }
.ops-table th, .ops-table td {
    text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border-color, #e0e0e0);
    vertical-align: top;
}
.ops-table th { font-size: 11px; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-secondary, #555); }
.ops-table small { color: var(--text-secondary, #555); }
.ops-table a { color: var(--green-primary, #159447); font-weight: 700; }

/* ---------- APPLICANTS ---------- */
.ops-applicant-list { display: grid; gap: 10px; margin-top: 12px; }
.ops-applicant {
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: var(--radius-sm, 8px); padding: 12px;
    display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    background: var(--surface-soft, #eef6f0);
}
.ops-applicant-info { font-size: 13px; line-height: 1.5; }
.ops-applicant-info strong { font-size: 14px; }
.ops-applicant-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- SETTINGS ---------- */
.ops-settings {
    display: grid; gap: 12px; margin-top: 12px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.ops-field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; }
.ops-field input[type="number"], .ops-field input[type="text"], .ops-field select {
    padding: 9px 10px; border-radius: var(--radius-sm, 8px);
    border: 1px solid var(--border-color, #e0e0e0);
    background: var(--bg-secondary, #fff); color: var(--text-primary, #222);
    font-size: 14px; font-weight: 500;
}
.ops-switch { display: flex; align-items: center; gap: 8px; font-weight: 700; cursor: pointer; }
.ops-switch input { width: 18px; height: 18px; accent-color: #159447; }

/* ---------- SIGNATURE PAD ---------- */
.ops-signature-canvas {
    width: 100%; height: 190px; display: block; touch-action: none;
    background: #fff; border: 2px dashed var(--border-color, #e0e0e0);
    border-radius: var(--radius-sm, 8px); cursor: crosshair;
}

/* ---------- MODAL ---------- */
.ops-modal {
    position: fixed; inset: 0; z-index: 10000;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0, 0, 0, 0.6); padding: 18px;
}
.ops-modal[hidden] { display: none; }
.ops-modal-card {
    background: var(--bg-secondary, #fff); color: var(--text-primary, #222);
    border-radius: var(--radius-lg, 24px); padding: 20px;
    width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto;
    box-shadow: var(--shadow-lg);
}
.ops-modal-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.ops-modal-card input[type="text"], .ops-modal-card input[type="tel"], .ops-modal-card input[type="number"] {
    width: 100%; padding: 11px 12px; margin-top: 6px;
    border-radius: var(--radius-sm, 8px); border: 1px solid var(--border-color, #e0e0e0);
    background: var(--bg-primary, #fff); color: var(--text-primary, #222); font-size: 15px;
}
.ops-modal-card label { font-size: 13px; font-weight: 700; }
.ops-modal-code {
    font-size: 30px; font-weight: 800; letter-spacing: 0.28em; text-align: center;
    margin: 14px 0; color: var(--green-primary, #159447);
}

/* ---------- ORDER CARD PARTNER ACTIONS ---------- */
.order-partner-line { margin: 6px 0; }
.order-partner-btn {
    display: inline-block; margin-left: 8px; padding: 4px 10px;
    border-radius: 999px; font-size: 12px; font-weight: 700; text-decoration: none;
    background: rgba(21, 148, 71, 0.12); color: #0e7a3d;
    border: 1px solid rgba(21, 148, 71, 0.35);
}
.order-partner-btn:hover { background: rgba(21, 148, 71, 0.2); }
body.dark-mode .order-partner-btn { color: #6ee49b; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 640px) {
    .ops-section { padding: 14px; border-radius: var(--radius-sm, 8px); }
    .ops-offer-amount { font-size: 16px; }
    .ops-applicant { flex-direction: column; }
    .ops-section-head { align-items: flex-start; }
}

/* ===== Phase 1 growth features: reviews w/ photos, verified badge, Notify Me, PWA ===== */
.review-verified {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 20px;
    background: #e8f7ee;
    color: #159447;
    font-size: 11px;
    font-weight: 600;
    vertical-align: middle;
}
.review-photos {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}
.review-photos img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 10px;
    cursor: zoom-in;
    border: 1px solid var(--border-color, #eee);
}
.review-photo-picker {
    margin: 8px 0 4px;
}
.review-photo-label {
    display: inline-block;
    cursor: pointer;
    font-size: 13px;
    color: var(--green-primary, #159447);
    background: #f0faf3;
    border: 1px dashed #159447;
    border-radius: var(--radius-sm, 8px);
    padding: 8px 12px;
}
.review-photo-previews {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}
.review-photo-thumb {
    position: relative;
}
.review-photo-thumb img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border-color, #eee);
}
.review-photo-thumb button {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 18px;
    height: 18px;
    border: none;
    border-radius: 50%;
    background: #e74c3c;
    color: #fff;
    font-size: 10px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}
.pwa-install-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 1200;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid var(--border-color, #eee);
    border-radius: 14px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.16);
    padding: 10px 12px;
    animation: fmSlideUp 0.3s ease;
    max-width: 420px;
    margin: 0 auto;
}
@keyframes fmSlideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.pwa-install-icon {
    font-size: 24px;
}
.pwa-install-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}
.pwa-install-text strong {
    font-size: 14px;
}
.pwa-install-text span {
    font-size: 12px;
    color: #666;
}
.pwa-install-accept {
    background: var(--green-primary, #159447);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm, 8px);
    padding: 8px 14px;
    font-weight: 600;
    cursor: pointer;
    font-size: 13px;
}
.pwa-install-close {
    border: none;
    background: transparent;
    color: #999;
    font-size: 15px;
    cursor: pointer;
    padding: 4px;
}

/* ===== Notifications inbox (notifications.html) ===== */
.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #fff;
    border: 1px solid var(--border-color, #eee);
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 10px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.notification-item.is-read { opacity: .72; }
.notification-icon { font-size: 22px; line-height: 1; }
.notification-item-body { flex: 1; min-width: 0; }
.notification-title { font-size: 14px; font-weight: 700; color: #111827; }
.notification-message { font-size: 13px; color: #4b5563; margin-top: 3px; line-height: 1.5; }
.notification-time { font-size: 11px; color: #9ca3af; margin-top: 6px; }
.notification-open {
    flex: 0 0 auto;
    border: none;
    background: #159447;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 9px;
    cursor: pointer;
}
.notification-open:hover { background: #117a38; }

/* ---------- TRUST / LEGAL PAGE HELPERS ---------- */
footer a {
    color: #58a6ff;
    text-decoration: underline;
}
footer .trust-line,
.auth-trust {
    margin: 8px 0;
    font-size: 13px;
    opacity: 0.85;
}
.auth-trust {
    margin-top: 16px;
    padding: 10px 12px;
    border: 1px solid rgba(21, 148, 71, 0.35);
    background: rgba(21, 148, 71, 0.08);
    border-radius: 10px;
}
.auth-bottom-sm {
    margin-top: 14px;
    font-size: 13px;
    text-align: center;
}
.auth-bottom-sm a {
    margin: 0 4px;
}
.legal-box h1 {
    margin-top: 6px;
    font-size: 26px;
}
.legal-box h2 {
    margin-top: 22px;
    font-size: 16px;
}
.legal-box p {
    margin: 8px 0;
    font-size: 14px;
    line-height: 1.6;
}
.legal-updated {
    font-size: 13px;
    opacity: 0.7;
}
