:root {
    --primary: #28757d;
    --secondary: #c06d30;
    --bg: #0d1718;
    --panel: #122426;
    --panel-soft: #183033;
    --text: #f1f5f4;
    --muted: #97a8a7;
    --line: rgba(255,255,255,0.08);
    --shadow: 0 16px 38px rgba(0,0,0,0.24);
    --success: #2e9b67;
    --danger: #c24d4d;
}
body[data-theme="light"] {
    --bg: #f4f8f8;
    --panel: #ffffff;
    --panel-soft: #eef6f7;
    --text: #162a2c;
    --muted: #5d7578;
    --line: rgba(19,45,47,0.12);
    --shadow: 0 12px 26px rgba(12,38,40,0.12);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    background: var(--bg);
    color: var(--text);
    transition: background .2s ease, color .2s ease;
    overflow-x: hidden;
}
h1, h2, h3 {
    font-family: Calibri, 'Segoe UI', Arial, sans-serif;
}
a { color: inherit; text-decoration: none; }
img { width: 100%; display: block; border-radius: 18px; }
.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.section-gap { padding: 34px 0; }
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(13,23,24,0.92);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(10px);
}
body[data-theme="light"] .site-header { background: rgba(244,248,248,0.95); }
.campaign-timer-wrap {
    border-bottom: 1px solid var(--line);
}
.campaign-timer-card {
    margin-top: 10px;
    margin-bottom: 10px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}
.campaign-timer-card strong {
    display: block;
    font-size: 14px;
}
.campaign-timer-card span {
    color: var(--muted);
    font-size: 12px;
}
.campaign-timer-right {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.campaign-discount {
    color: var(--secondary) !important;
    font-weight: 700;
    font-size: 13px !important;
}
.campaign-countdown {
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text) !important;
    font-weight: 700;
    font-size: 12px !important;
    padding: 5px 8px;
    min-width: 88px;
    text-align: center;
}
.wa-float {
    position: fixed;
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #25D366;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 10px 24px rgba(0,0,0,0.3);
    z-index: 120;
}
.nav-shell { position: relative; display: flex; flex-wrap: nowrap; align-items: center; justify-content: space-between; min-height: 82px; gap: 14px; }
.nav-shell > * { margin: 0; }
.brand { font-size: 24px; font-weight: 800; letter-spacing: .02em; color: var(--text); white-space: nowrap; }
.brand { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}
.brand-text {
    display: inline-block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}
.brand-logo {
    width: 250px;
    height: 100px;
    object-fit: contain;
    object-position: center;
    display: block;
    flex-shrink: 0;
}
.brand span { color: var(--primary); }
.nav-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    flex-shrink: 0;
}
.theme-btn {
    border: 1px solid var(--line);
    background: var(--panel-soft);
    color: var(--text);
    border-radius: 12px;
    padding: 10px 12px;
    cursor: pointer;
}
.icon-btn {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel-soft);
    color: var(--text);
    cursor: pointer;
    font-size: 16px;
}
.back-btn {
    color: var(--text);
}
.nav-balance {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel-soft);
    color: var(--secondary);
    font-weight: 700;
}
.mobile-toggle {
    display: inline-flex;
}
.profile-menu-wrap {
    position: relative;
}
.notification-wrap .icon-btn { position: relative; }
.notif-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    background: var(--secondary);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}
.notification-dropdown {
    min-width: 290px;
    max-width: 340px;
    max-height: 340px;
    overflow: auto;
}
.notif-item {
    display: grid;
    gap: 2px;
    white-space: normal;
}
.notif-item strong {
    font-size: 13px;
    line-height: 1.3;
}
.notif-item small {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}
.notif-empty {
    color: var(--muted);
    font-size: 13px;
    padding: 8px 10px;
}
.notif-all-link {
    margin-top: 4px;
    border-top: 1px solid var(--line);
    padding-top: 10px !important;
    color: var(--primary) !important;
    font-weight: 600;
    font-size: 12px;
}
.profile-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 190px;
    max-width: min(320px, calc(100vw - 24px));
    display: none;
    flex-direction: column;
    gap: 2px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel);
    box-shadow: var(--shadow);
    padding: 8px;
    z-index: 90;
}
.profile-menu-wrap.open .profile-dropdown { display: flex; }
.profile-dropdown a,
.profile-dropdown .link-btn {
    width: 100%;
    text-align: left;
    padding: 9px 10px;
    border-radius: 10px;
    color: var(--text);
}
.profile-dropdown a:hover,
.profile-dropdown .link-btn:hover {
    background: var(--panel-soft);
}
.nav-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    display: none;
    min-width: 220px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel);
    box-shadow: var(--shadow);
    z-index: 85;
}
.nav-menu.open { display: grid; gap: 4px; }
.nav-menu form { margin: 0; display: inline-flex; align-items: center; }
.nav-menu a, .link-btn {
    display: block;
    width: 100%;
    text-align: left;
    padding: 9px 10px;
    border-radius: 10px;
    color: var(--muted);
    font-weight: 700;
    background: none;
    border: 0;
    cursor: pointer;
}
.nav-menu a:hover, .link-btn:hover { color: var(--text); background: var(--panel-soft); }
.inline-form { display: inline-flex; }
.search-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.search-wrap.open { z-index: 96; }
.nav-search {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: min(360px, calc(100vw - 28px));
    display: none;
    align-items: center;
    gap: 0;
    margin: 0;
}
.search-wrap.open .nav-search { display: flex; }
.nav-search input {
    height: 44px;
    border-radius: 12px;
    margin: 0;
    line-height: 1.2;
    width: 100%;
    min-width: 0;
}
.live-search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow);
    z-index: 80;
    display: none;
    max-height: 360px;
    overflow: auto;
}
.live-search-results.open { display: block; }
.live-search-item {
    display: grid;
    grid-template-columns: 52px 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
}
.live-search-item:last-child { border-bottom: 0; }
.live-search-item img {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 10px;
}
.live-search-item strong {
    font-size: 14px;
    line-height: 1.25;
}
.live-search-item span {
    color: var(--secondary);
    font-weight: 700;
    font-size: 14px;
}

.btn {
    display: inline-flex; align-items: center; justify-content: center;
    border: 0; border-radius: 14px; padding: 11px 16px;
    background: var(--primary); color: #fff; font-weight: 700; cursor: pointer;
    box-shadow: var(--shadow);
    font-size: 14px;
}
.btn:hover { transform: translateY(-1px); }
.btn-secondary {
    background: var(--secondary);
    color: #fff;
}
.btn-outline {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--text);
    box-shadow: none;
}
.btn-sm { padding: 10px 14px; border-radius: 12px; font-size: 14px; }
.btn-flat {
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 14px; padding: 12px 18px; font-weight: 700;
    border: 1px solid transparent;
}
.btn-flat-primary { background: var(--primary); color: #fff; }
.btn-flat-secondary { background: var(--secondary); color: #fff; }
.btn-flat.wide { width: 100%; }
.home-shop-shell {
    display: grid;
    gap: 24px;
}
.home-topbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    padding: 16px 20px;
}
.home-quick-links {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}
.home-quick-links a {
    color: var(--muted);
    font-weight: 700;
}
.home-quick-links a:hover { color: var(--text); }
.home-hero {
    min-height: 420px;
    border-radius: 26px;
    overflow: hidden;
    background-image: linear-gradient(90deg, rgba(8,17,21,0.72) 0%, rgba(8,17,21,0.34) 68%), var(--hero-image);
    background-size: cover;
    background-position: center;
    border: 1px solid var(--line);
    display: flex;
    align-items: flex-end;
}
.home-hero-content {
    padding: 34px;
    max-width: 620px;
    color: #f4f8f8;
}
.home-hero-content h1 {
    margin: 10px 0;
    font-size: clamp(36px, 5vw, 58px);
}
.home-hero-content p {
    margin: 0 0 18px;
    color: #dbe8e6;
    font-size: 20px;
}
body[data-theme="light"] .home-hero {
    background-image: linear-gradient(95deg, rgba(244,251,251,0.88) 0%, rgba(233,243,244,0.68) 60%, rgba(233,243,244,0.44) 100%), var(--hero-image);
}
body[data-theme="light"] .home-hero-content { color: #173337; }
body[data-theme="light"] .home-hero-content h1 { color: #143338; }
body[data-theme="light"] .home-hero-content p { color: #2b4f54; }
body[data-theme="light"] .home-hero .eyebrow { color: #28757d; }
body[data-theme="light"] .store-sidebar .sidebar-card {
    background: #ffffff;
    border-color: rgba(24,63,66,0.14);
}
body[data-theme="light"] .store-links a,
body[data-theme="light"] .store-categories a {
    background: #eef4f5;
    border-color: rgba(24,63,66,0.14);
    color: #3f5e62;
}
.home-block { display: grid; gap: 14px; }
.home-carousel {
    display: grid;
    gap: 14px;
}
.home-carousel-strip {
    margin-bottom: 12px;
    padding: 18px 20px;
    border-radius: 28px;
    background:
        radial-gradient(circle at top left, rgba(40,117,125,0.18), transparent 34%),
        radial-gradient(circle at top right, rgba(192,109,48,0.12), transparent 28%),
        linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 18px 44px rgba(0,0,0,0.18);
}
.home-carousel-wrap {
    position: relative;
    padding: 0 28px;
}
.home-carousel-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - (4 * 18px)) / 5);
    gap: 18px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 10px 0 8px;
    scrollbar-width: none;
}
.home-carousel-track { -ms-overflow-style: none; }
.home-carousel-track::-webkit-scrollbar {
    display: none;
}
.carousel-card {
    scroll-snap-align: start;
    border-radius: 24px;
}
.carousel-card-link {
    display: grid;
    align-content: start;
    min-width: 0;
    min-height: 100%;
    color: var(--text);
    background:
        linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0)),
        var(--panel);
    box-shadow: 0 16px 34px rgba(0,0,0,0.18);
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.carousel-card-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 24px 42px rgba(0,0,0,0.24);
    border-color: rgba(40,117,125,0.35);
}
.carousel-card-link:focus-visible {
    outline: 2px solid rgba(40,117,125,0.7);
    outline-offset: 2px;
}
.carousel-card .home-product-image {
    padding: 10px 10px 0;
    aspect-ratio: 1 / 1.08;
}
.carousel-card .home-product-image img {
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
}
.carousel-card .home-product-meta {
    padding: 14px 12px 16px;
    gap: 8px;
}
.carousel-card .home-product-meta h3 {
    font-size: 14px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text);
}
.carousel-card .price-current {
    font-size: 15px;
    color: var(--secondary);
}
.carousel-card .price-current.discounted {
    font-size: 17px;
    color: var(--secondary);
}
.carousel-card .price-old {
    font-size: 13px;
}
.home-carousel-strip .section-head {
    margin-bottom: 12px;
}
.home-carousel-strip h2 {
    font-size: clamp(18px, 2vw, 24px);
    margin: 0;
    color: var(--text);
}
.carousel-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border-radius: 999px;
    z-index: 5;
    background: rgba(18, 36, 38, 0.8);
    border-color: rgba(255,255,255,0.1);
    color: var(--text);
    backdrop-filter: blur(10px);
}
.carousel-nav-prev { left: -2px; }
.carousel-nav-next { right: -2px; }
.carousel-nav-btn i { font-size: 15px; color: currentColor; }
.carousel-card .product-category-badges span {
    color: var(--text);
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.08);
}
body[data-theme="light"] .home-carousel-strip {
    background:
        radial-gradient(circle at top left, rgba(40,117,125,0.12), transparent 32%),
        radial-gradient(circle at top right, rgba(192,109,48,0.08), transparent 26%),
        linear-gradient(180deg, rgba(255,255,255,0.98), rgba(240,246,247,0.94));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.75), 0 18px 38px rgba(18,49,53,0.08);
}
body[data-theme="light"] .carousel-card-link {
    color: #111;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.98), rgba(244,248,248,0.96)),
        #fff;
    box-shadow: 0 14px 30px rgba(20,44,47,0.08);
}
body[data-theme="light"] .carousel-card .home-product-meta h3,
body[data-theme="light"] .home-carousel-strip h2,
body[data-theme="light"] .carousel-nav-btn,
body[data-theme="light"] .carousel-card .product-category-badges span {
    color: #111;
}
body[data-theme="light"] .carousel-nav-btn {
    background: rgba(255,255,255,0.92);
    border-color: rgba(22,42,44,0.1);
}
body[data-theme="light"] .carousel-card .product-category-badges span {
    background: rgba(24,63,66,0.06);
    border-color: rgba(24,63,66,0.1);
}
.home-card-grid {
    display: grid;
    gap: 16px;
}
.home-card-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.home-product-card {
    background: linear-gradient(180deg, rgba(40, 45, 54, 0.92), rgba(29, 34, 42, 0.96));
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 14px 30px rgba(0,0,0,0.22);
    display: grid;
    align-content: start;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.home-product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 38px rgba(0,0,0,0.28);
    border-color: rgba(255,255,255,0.14);
}
.home-product-image {
    position: relative;
    aspect-ratio: 1 / 0.86;
    display: block;
    padding: 10px;
}
.home-product-image img {
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}
.product-image-badge {
    position: absolute;
    top: 18px;
    left: 18px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid rgba(214, 150, 91, 0.85);
    background: rgba(46, 34, 27, 0.92);
    color: #f0c48f;
    font-size: 11px;
    line-height: 1;
    font-weight: 600;
}
.home-product-meta {
    padding: 0 12px 12px;
    display: grid;
    gap: 6px;
}
.home-product-meta h3 {
    margin: 0;
    font-size: 18px;
    line-height: 1.25;
    color: var(--text);
    font-weight: 500;
}
.price-pair {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
}
.price-current {
    color: var(--secondary);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.2;
}
.price-current.discounted {
    color: var(--secondary);
    font-size: 17px;
}
.price-old {
    color: var(--muted);
    text-decoration: line-through;
    font-size: 13px;
}
.home-detail-btn {
    width: 100%;
    margin-top: 8px;
    background: var(--primary);
    color: #f5f7f9;
    border: 0;
    border-radius: 12px;
    box-shadow: none;
    font-weight: 500;
}
body[data-theme="light"] .home-detail-btn,
body[data-theme="dark"] .home-detail-btn {
    background: var(--primary);
    color: #fff;
}
body[data-theme="light"] .home-product-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(242,245,248,0.98));
    border-color: rgba(32,40,52,0.1);
    box-shadow: 0 12px 24px rgba(14,24,33,0.09);
}
body[data-theme="light"] .home-product-card {
    color: #111;
}
body[data-theme="light"] .home-product-meta h3 {
    color: #111;
}
.store-frame {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    align-items: start;
}
.store-main {
    min-width: 0;
    grid-column: 1;
}
.detail-page-stack { display: grid; gap: 24px; }
.store-sidebar {
    position: sticky;
    top: 108px;
    display: grid;
    gap: 10px;
    grid-column: 2;
}
.store-sidebar h3 {
    margin: 0;
}
.store-links,
.store-categories {
    display: grid;
    gap: 8px;
}
.store-links a,
.store-categories a {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 12px;
    color: var(--muted);
    font-weight: 700;
    background: var(--panel-soft);
}
.store-links a:hover,
.store-categories a:hover,
.store-categories a.active {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
}

.hero-grid, .detail-grid, .catalog-layout, .panel-layout { display: grid; gap: 24px; }
.hero-grid { grid-template-columns: 1fr; }
.sidebar-card, .hero-card, .product-card, .card-panel, .auth-card, .stat-card, .campaign-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 26px;
    box-shadow: var(--shadow);
}
.sidebar-card, .card-panel, .auth-card, .hero-card, .stat-card, .campaign-card { padding: 24px; }
.hero-card { min-height: 320px; display: flex; flex-direction: column; justify-content: center; }
.hero-card h1 { font-size: clamp(34px, 5vw, 58px); margin: 12px 0; max-width: 11ch; }
.hero-card p { max-width: 56ch; color: var(--muted); font-size: 18px; }
.eyebrow { text-transform: uppercase; letter-spacing: .16em; color: var(--primary); font-size: 12px; font-weight: 800; }
.hero-actions, .section-head, .price-row, .actions-cell, .gap-12 { display: flex; gap: 12px; }
.section-head { justify-content: space-between; align-items: center; margin-bottom: 18px; }
.section-head.compact { margin-bottom: 12px; }
.section-head h1, .section-head h2, .card-panel h1, .card-panel h2 { margin: 0; }
.link-arrow { color: var(--secondary); font-weight: 700; }
.pagination-wrap { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.pagination-link {
    min-width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--panel-soft);
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}
.pagination-link.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.pagination-link.disabled { opacity: .45; pointer-events: none; cursor: default; }

.hero-actions-stack { display: grid; gap: 14px; padding-top: 0; }
.hero-action-card, .hero-auth-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 16px;
}
.hero-auth-card { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hero-categories-wrap { padding-top: 0; }
.hero-categories-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.hero-category-item {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 14px 16px;
    background: var(--panel-soft);
    color: var(--text);
    font-weight: 700;
}

.product-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; }
.product-card { overflow: hidden; }
.product-image-wrap { aspect-ratio: 1 / 0.94; display: block; background: var(--panel-soft); }
.product-image-wrap img { height: 100%; object-fit: cover; border-radius: 0; }
.product-meta { padding: 18px; }
.product-meta h3 { margin: 8px 0 10px; font-size: 18px; }
.product-meta p, .muted, .site-footer p { color: var(--muted); }
.price-row { justify-content: space-between; align-items: center; }
.price-row > strong:not(.price-current), .price-block > strong:not(.price-current) { font-size: 22px; }
.price-row small, .price-block small { color: var(--muted); text-decoration: line-through; }
.price-block .price-current { font-size: 24px; }
.price-block .price-current.discounted { font-size: 28px; }
.review-summary-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px 0 18px;
}
.stars {
    color: #ffbe4d;
    letter-spacing: 1px;
}
.stars i { margin-right: 2px; }
.review-section { display: grid; gap: 16px; }
.review-list { display: grid; gap: 12px; }
.review-item {
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 14px;
}
.review-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.review-user-with-level,
.user-title-with-level {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.level-badge {
    --level-color: #94a3b8;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid var(--level-color);
    background: rgba(0, 0, 0, 0.14);
    color: var(--level-color);
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    cursor: help;
}
.level-badge i {
    font-size: 12px;
}
.level-badge::after {
    content: attr(data-level-note);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 9px);
    transform: translateX(-50%);
    min-width: 220px;
    max-width: 320px;
    width: max-content;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--text);
    box-shadow: var(--shadow);
    font-size: 12px;
    line-height: 1.35;
    opacity: 0;
    pointer-events: none;
    transition: opacity .16s ease;
    z-index: 20;
    white-space: normal;
}
.level-badge:hover::after,
.level-badge:focus::after {
    opacity: 1;
}
.customer-filter-form {
    margin-bottom: 12px;
    gap: 10px;
    align-items: center;
}
.customer-filter-form label {
    color: var(--muted);
    font-weight: 700;
    font-size: 13px;
}
[data-customers-list].is-loading {
    opacity: .55;
    pointer-events: none;
    transition: opacity .15s ease;
}
[data-cash-section].is-loading {
    opacity: .6;
    pointer-events: none;
    transition: opacity .15s ease;
}

.site-footer { margin-top: 50px; padding: 34px 0; border-top: 1px solid var(--line); background: var(--panel); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px; }
.footer-grid a, .footer-grid p { display: block; margin: 8px 0; color: var(--muted); }

.auth-page { min-height: 100vh; display: grid; place-items: center; }
.auth-shell { width: min(560px, calc(100% - 32px)); margin: 24px auto; }
.auth-brand {
    justify-content: center;
    margin-bottom: 14px;
}
.auth-brand-logo {
    width: 250px;
    height: 100px;
}
.site-logo-preview-wrap {
    margin-top: 10px;
}
.site-logo-preview {
    width: 88px;
    height: 88px;
    object-fit: contain;
    object-position: center;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--panel-soft);
    padding: 8px;
}
.auth-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-weight: 700;
    margin-bottom: 10px;
}
.auth-back-link:hover { color: var(--text); }
.auth-card { margin-top: 18px; }
.auth-modern { padding: 0; overflow: hidden; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); }
.auth-tab {
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 28px;
    font-weight: 700;
    padding: 18px 12px;
    cursor: pointer;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.auth-tab.active { color: var(--primary); border-bottom: 3px solid var(--primary); }
.auth-pane { display: none; padding: 24px; }
.auth-pane.active { display: block; }
.auth-form { max-width: 620px; margin: 0 auto; }
.auth-row { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-weight: 600; }
.remember { display: flex; gap: 8px; align-items: center; }
.forgot { color: var(--secondary); }
.forgot-btn {
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    cursor: pointer;
}
.phone-input-group {
    display: grid;
    grid-template-columns: 124px 1fr;
    gap: 10px;
    align-items: stretch;
}
.phone-prefix {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel-soft);
    color: var(--text);
    padding: 12px 10px;
    font-weight: 700;
    white-space: nowrap;
}
.phone-flag { font-size: 18px; line-height: 1; }
.phone-code { letter-spacing: 0.01em; }
.auth-home-link-wrap { text-align: center; margin-top: 16px; }
.auth-home-link { color: var(--primary); font-weight: 700; }
.password-field {
    position: relative;
    display: flex;
    align-items: center;
}
.password-field input { padding-right: 44px; }
.password-toggle {
    position: absolute;
    right: 10px;
    width: 30px;
    height: 30px;
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.stack-form, .order-form { display: grid; gap: 12px; }
.stack-form { gap: 14px; }
.stack-form label,
.form-grid label {
    display: block;
    color: var(--text);
    font-weight: 600;
    margin-bottom: 4px;
}
.stack-form .form-field,
.form-grid .form-field {
    display: grid;
    gap: 8px;
}
.check-inline {
    display: inline-flex !important;
    align-items: center;
    gap: 10px !important;
    font-weight: 700 !important;
}
.check-inline span { line-height: 1.2; }
input, select, textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--panel-soft);
    color: var(--text);
    outline: none;
}
textarea { resize: vertical; }
input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0;
    accent-color: var(--primary);
}
.alert { padding: 14px 16px; border-radius: 16px; border: 1px solid transparent; }
.alert.success { background: rgba(46,155,103,0.15); border-color: rgba(46,155,103,0.3); }
.alert.error { background: rgba(194,77,77,0.15); border-color: rgba(194,77,77,0.3); }

.catalog-layout, .detail-grid { grid-template-columns: 280px 1fr; }
.store-main.detail-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.detail-content { align-self: start; }
.detail-image { background: var(--panel-soft); border-radius: 30px; padding: 20px; }
.gallery-main { position: relative; cursor: zoom-in; }
.gallery-main img { width: 100%; border-radius: 18px; object-fit: cover; aspect-ratio: 1 / 1; }
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 4;
}
.gallery-nav.prev { left: 8px; }
.gallery-nav.next { right: 8px; }
.thumb-grid { margin-top: 16px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.thumb-grid img {
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 12px;
    border: 2px solid transparent;
    cursor: pointer;
}
.thumb-grid img.active { border-color: var(--primary); }
.product-video-card { margin-top: 16px; padding: 14px; background: var(--panel-soft); border: 1px solid var(--line); border-radius: 16px; }
.product-video-card h3 { margin-bottom: 10px; font-size: 16px; }
.product-video-frame { position: relative; padding-top: 56.25%; border-radius: 14px; overflow: hidden; }
.product-video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.gallery-lightbox { position: relative; width: min(900px, 92vw); padding: 12px; }
.gallery-lightbox img { width: 100%; max-height: 80vh; object-fit: contain; border-radius: 12px; }
.gallery-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
}
.price-block { display: grid; gap: 6px; margin: 18px 0; }
.panel-layout { grid-template-columns: 300px 1fr; align-items: start; }
.panel-sections, .admin-shell, .admin-grid { display: grid; gap: 24px; min-width: 0; }
.notice-list, .campaign-grid { display: grid; gap: 14px; }
.notice-item {
    display: flex; justify-content: space-between; gap: 12px; align-items: start;
    padding: 16px; border-radius: 18px; background: var(--panel-soft);
}
.notice-item.read { opacity: .72; }
.table-wrap { overflow-x: auto; max-width: 100%; min-width: 0; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 11px 9px; border-bottom: 1px solid var(--line); text-align: left; color: var(--text); word-break: break-word; font-size: 13px; }
.responsive-table { min-width: 920px; }
.orders-table th,
.orders-table td {
    white-space: nowrap;
    word-break: normal;
}
.status { display: inline-flex; align-items: center; padding: 6px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.status.pending { background: rgba(192,109,48,0.2); color: #e9b68a; }
.status.approved { background: rgba(46,155,103,0.16); color: #93dfb5; }
.status.cancelled { background: rgba(194,77,77,0.16); color: #f4a2a2; }
.status.income,
.status.cash_in,
.status.profit { background: rgba(46,155,103,0.16); color: #93dfb5; }
.status.expense,
.status.cash_out { background: rgba(194,77,77,0.16); color: #f4a2a2; }

.popup-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.65); display: none; align-items: center; justify-content: center; padding: 20px; z-index: 70;
}
.popup-overlay.active { display: flex; }
.popup-card { width: min(520px, 100%); padding: 28px; border-radius: 24px; background: var(--panel); border: 1px solid var(--line); }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.stats-grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.stat-card strong { display: block; margin-top: 8px; font-size: 22px; }
.customer-dashboard { max-width: 980px; }
.customer-dashboard .section-head h1 { font-size: 24px; }
.customer-dashboard .section-head .muted { font-size: 13px; }
.customer-stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.customer-stats-grid .stat-card { padding: 12px; border-radius: 12px; }
.customer-stats-grid .stat-card span { font-size: 11px; }
.customer-stats-grid .stat-card strong { font-size: 16px; margin-top: 4px; line-height: 1.2; }
.customer-campaigns-panel { padding: 14px; border-radius: 14px; }
.customer-campaign-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.compact-campaign-card { padding: 10px; border-radius: 12px; }
.compact-campaign-card strong { font-size: 13px; line-height: 1.3; }
.compact-campaign-card p { margin: 6px 0; font-size: 12px; line-height: 1.35; }
.compact-campaign-card span { display: block; font-size: 11px; margin-top: 4px; color: var(--text-muted); }
.campaign-countdown-inline { color: var(--secondary); font-weight: 700; }
.referral-hero { padding: 16px; border-radius: 14px; }
.referral-hero h1 { font-size: 22px; margin: 0; }
.referral-hero p { margin: 8px 0 0; font-size: 13px; line-height: 1.4; }
.referral-link-row {
    margin-top: 12px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
}
.referral-link-input {
    width: 100%;
    min-width: 0;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--panel-soft);
    color: var(--text);
    font-size: 13px;
}
.referral-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}
.referral-share-btn.copied {
    background: var(--secondary);
    border-color: var(--secondary);
    color: #fff;
}
.referral-stats-grid .stat-card {
    padding: 12px;
    border-radius: 12px;
}
.referral-stats-grid .stat-card span { font-size: 11px; }
.referral-stats-grid .stat-card strong { font-size: 17px; margin-top: 6px; }
.admin-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.admin-layout { display: grid; grid-template-columns: 280px 1fr; gap: 24px; align-items: start; }
.admin-sidebar { position: sticky; top: 108px; }
.admin-content { min-width: 0; }
.admin-sidebar h2 { margin: 10px 0 14px; }
.admin-nav { display: grid; gap: 8px; }
.admin-nav-link {
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--secondary);
    font-weight: 700;
}
.admin-nav-link:hover { color: var(--secondary); }
body[data-theme="light"] .admin-nav-link { color: var(--secondary); }
body[data-theme="light"] .admin-nav-link:hover { color: var(--secondary); }
.admin-nav-link.active { color: #fff; border-color: var(--primary); background: var(--primary); }
.admin-sidebar-toggle {
    display: none;
    margin-bottom: 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--panel-soft);
    color: var(--text);
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}
.cash-stats { margin-top: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.narrow-section { max-width: 760px; }
.sticky { position: sticky; top: 110px; }
.card-panel, .sidebar-card, .store-main, .panel-layout, .admin-layout, .admin-content { min-width: 0; }
.contact-page { display: grid; gap: 16px; }
.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 18px;
}
.contact-info p {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
}
.contact-map iframe {
    width: 100%;
    min-height: 320px;
    border: 0;
    border-radius: 16px;
}
.map-placeholder {
    min-height: 320px;
    display: grid;
    place-items: center;
    text-align: center;
    border: 1px dashed var(--line);
    border-radius: 16px;
    color: var(--muted);
    background: var(--panel-soft);
    padding: 16px;
}

.admin-layout .card-panel { border-radius: 14px; padding: 12px; }
.admin-layout h1 { font-size: 19px; line-height: 1.2; }
.admin-layout h2 { font-size: 16px; line-height: 1.25; margin-bottom: 8px; }
.admin-layout h3 { font-size: 14px; line-height: 1.3; margin-bottom: 6px; }
.admin-layout .eyebrow { font-size: 11px; letter-spacing: 0.12em; }
.admin-layout .stat-card strong { font-size: 18px; }
.admin-layout .stat-card span { font-size: 11px; }
.admin-layout .btn { padding: 7px 10px; font-size: 12px; border-radius: 8px; }
.admin-layout .btn-sm { padding: 6px 8px; font-size: 11px; border-radius: 7px; }
.admin-layout input,
.admin-layout select,
.admin-layout textarea { padding: 7px 9px; border-radius: 8px; font-size: 12px; }
.admin-layout th,
.admin-layout td { padding: 7px 6px; font-size: 11px; }
.admin-layout .admin-nav-link { font-size: 12px; padding: 7px 8px; border-radius: 10px; }

/* Ümumi baxış + Kassa kartlarını ayrıca kompaktlaşdır */
.admin-layout .stats-grid {
    gap: 10px;
}
.admin-layout .stats-grid .stat-card {
    padding: 10px 12px;
    border-radius: 12px;
}
.admin-layout .stats-grid .stat-card strong {
    margin-top: 5px;
}
.admin-layout .card-panel .section-head.compact {
    margin-bottom: 8px;
}
.admin-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 10px;
    margin-bottom: 12px;
}
.admin-tab {
    border: 1px solid var(--line);
    background: var(--panel-soft);
    color: var(--muted);
    border-radius: 9px;
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}
.admin-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.admin-pane { display: none; }
.admin-pane.active { display: block; }
.inner-card { margin: 0; }
.active-force { display: block; }
.admin-layout .stack-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.admin-layout .stack-form .check-inline,
.admin-layout .stack-form .btn,
.admin-layout .stack-form .full {
    grid-column: 1 / -1;
}

@media (max-width: 1360px) {
    .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 1024px) {
    .hero-grid, .catalog-layout, .detail-grid, .panel-layout, .footer-grid, .admin-grid, .admin-layout { grid-template-columns: 1fr; }
    .store-frame { grid-template-columns: 1fr; }
    .store-sidebar {
        position: static;
        grid-column: 1;
    }
    .store-main { grid-column: 1; }
    .store-main { order: 1; }
    .store-sidebar { order: 2; }
    .store-main.detail-grid { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-content .stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .customer-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .customer-campaign-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-content .admin-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sticky { position: static; }
    .admin-sidebar {
        display: none;
        position: fixed;
        top: 76px;
        left: 12px;
        right: 12px;
        max-height: calc(100vh - 90px);
        overflow: auto;
        z-index: 90;
    }
    .admin-sidebar.open { display: block; }
    .admin-sidebar-toggle { display: inline-flex; align-items: center; }
    .hero-categories-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .auth-tab { font-size: 24px; }
    .home-card-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-layout h1 { font-size: 24px; }
    .admin-layout h2 { font-size: 20px; }
    .admin-layout h3 { font-size: 17px; }
}
@media (max-width: 720px) {
    .brand-logo {
        width: min(170px, 90vw);
        height: 52px;
    }
    .auth-brand-logo {
        width: 190px;
        height: 58px;
    }
    .nav-shell {
        flex-wrap: wrap;
        padding: 14px 0;
        justify-content: center;
        row-gap: 12px;
    }
    .nav-shell > * { min-width: 0; }
    .nav-shell > .brand-link {
        order: 1;
        width: 100%;
        justify-content: center;
    }
    .nav-actions {
        order: 2;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        margin-left: 0;
    }
    .search-wrap { margin-left: 0; }
    .nav-search {
        width: min(300px, calc(100vw - 24px));
        right: 0;
    }
    .nav-menu { min-width: 190px; }
    .notification-dropdown {
        right: 0;
        min-width: min(250px, calc(100vw - 24px));
    }
    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .form-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .customer-dashboard { padding-inline: 8px; }
    .customer-dashboard .section-head { margin-bottom: 10px; }
    .customer-dashboard .section-head h1 { font-size: 20px; }
    .customer-dashboard .section-head .muted { font-size: 12px; }
    .customer-dashboard .btn.btn-sm { font-size: 12px; padding: 7px 9px; border-radius: 8px; }
    .customer-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .customer-stats-grid .stat-card { padding: 10px; }
    .customer-stats-grid .stat-card strong { font-size: 14px; }
    .customer-stats-grid .stat-card span { font-size: 10px; }
    .referral-link-row { grid-template-columns: 1fr; }
    .referral-share-btn { width: 100%; justify-content: center; }
    .referral-stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .referral-stats-grid .stat-card strong { font-size: 14px; }
    .customer-campaigns-panel { padding: 10px; border-radius: 12px; }
    .customer-campaign-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .compact-campaign-card { padding: 9px; }
    .compact-campaign-card strong { font-size: 12px; }
    .compact-campaign-card p,
    .compact-campaign-card span { font-size: 10px; }
    .admin-content .admin-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .featured-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hero-categories-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hero-auth-card { grid-template-columns: 1fr; }
    .hero-card h1 { max-width: none; }
    .footer-grid { gap: 10px; }
    .brand { font-size: 22px; }
    .panel-layout { gap: 16px; }
    .sidebar-card, .card-panel { padding: 16px; border-radius: 18px; }
    th, td { padding: 10px 8px; font-size: 14px; }
    .admin-layout .table-wrap { overflow-x: auto; }
    .admin-layout .responsive-table { min-width: 980px; }
    .admin-layout .responsive-table th,
    .admin-layout .responsive-table td {
        white-space: nowrap;
        word-break: normal;
    }
    .actions-cell, .section-head, .notice-item { flex-direction: column; }
    .admin-layout .actions-cell { flex-direction: row; align-items: center; flex-wrap: nowrap; }
    .actions-cell form { width: 100%; }
    .admin-layout .actions-cell form { width: auto; }
    .actions-cell .btn { width: 100%; }
    .admin-layout .actions-cell .btn {
        width: 36px;
        min-width: 36px;
        height: 36px;
        padding: 0;
        border-radius: 9px;
    }
    .admin-layout .actions-cell .btn i { font-size: 14px; }
    .auth-shell { width: min(460px, calc(100% - 24px)); }
    .auth-tab { font-size: 20px; padding: 14px 6px; }
    .auth-pane { padding: 16px; }
    .phone-input-group { grid-template-columns: 108px 1fr; }
    .home-topbar {
        flex-direction: column;
        align-items: flex-start;
        padding: 14px;
    }
    .home-quick-links { justify-content: space-between; gap: 10px; }
    .home-hero { min-height: 340px; }
    .home-hero-content { padding: 20px; }
    .home-hero-content p { font-size: 16px; }
    .home-card-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .home-product-image { padding: 9px; aspect-ratio: 1 / 0.88; }
    .product-image-badge { top: 16px; left: 16px; font-size: 10px; padding: 4px 8px; }
    .home-product-meta { padding: 0 10px 10px; gap: 7px; }
    .home-product-meta h3 { font-size: 16px; }
    .home-detail-btn { padding: 10px 12px; font-size: 13px; }
    .home-carousel-strip { padding: 14px 14px 16px; border-radius: 22px; }
    .home-carousel-track { grid-auto-columns: calc((100% - (3 * 12px)) / 4); gap: 12px; }
    .home-carousel-strip h2 {
        font-size: 15px;
    }
    .carousel-nav-btn {
        width: 34px;
        height: 34px;
    }
    .carousel-nav-btn i { font-size: 12px; }
    .home-carousel-wrap { padding: 0 22px; }
    .carousel-nav-prev { left: 0; }
    .carousel-nav-next { right: 0; }
}
@media (max-width: 520px) {
    .home-carousel-track { grid-auto-columns: calc((100% - (2 * 10px)) / 3); gap: 10px; }
    .carousel-card .home-product-image { padding: 8px 8px 0; }
    .carousel-card .home-product-meta { padding: 10px 10px 12px; gap: 6px; }
    .carousel-card .home-product-meta h3 { font-size: 12px; }
    .carousel-card .product-category-badges { display: none; }
    .carousel-card .price-current { font-size: 13px; }
    .carousel-card .price-current.discounted { font-size: 14px; }
    .carousel-card .price-old,
    .carousel-card .product-category-badges span { font-size: 10px; }
    .home-product-card { border-radius: 16px; }
    .home-product-image { padding: 8px; aspect-ratio: 1 / 0.9; }
    .home-product-image img { border-radius: 12px; }
    .product-image-badge { top: 14px; left: 14px; font-size: 10px; padding: 4px 7px; }
    .home-product-meta { padding: 0 9px 9px; gap: 6px; }
    .home-product-meta h3 { font-size: 14px; }
    .price-current { font-size: 15px; }
    .price-old { font-size: 12px; }
    .home-detail-btn { padding: 9px 10px; font-size: 12px; border-radius: 10px; }
    .admin-tabs { gap: 6px; }
    .admin-tab { padding: 7px 10px; font-size: 13px; }
    .admin-layout h1 { font-size: 22px; }
    .admin-layout h2 { font-size: 18px; }
    .admin-layout h3 { font-size: 16px; }
    .admin-layout .stat-card strong { font-size: 18px; }
    .admin-layout .stat-card span { font-size: 11px; }
    .admin-layout .stack-form { grid-template-columns: 1fr; }
    .level-badge::after {
        left: 0;
        transform: none;
        min-width: 180px;
        max-width: min(280px, calc(100vw - 40px));
    }
    .wa-float {
        right: max(14px, env(safe-area-inset-right));
        bottom: max(14px, env(safe-area-inset-bottom));
        width: 64px;
        height: 64px;
        font-size: 32px;
    }
}

/* `.form-grid .form-field { display: grid }` brauzerin standart
   `[hidden] { display: none }` qaydasını üstələyir, ona görə `hidden`
   atributu formada işləmir. Burada açıq şəkildə bərpa olunur. */
.form-grid .form-field[hidden],
.stack-form .form-field[hidden] {
    display: none;
}

/* Kampaniya formasındakı məhsul seçimi */
.campaign-product-list {
    max-height: 260px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 6px;
    margin-top: 8px;
    display: grid;
    gap: 2px;
}

.campaign-product-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 9px;
    border-radius: 8px;
    cursor: pointer;
    line-height: 1.25;
}

.campaign-product-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.campaign-product-item span:first-of-type {
    flex: 1;
}

.campaign-product-item[hidden] {
    display: none;
}

.campaign-bulk-bar {
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
}

/* ===== Tətbiqdə aç zolağı (yalnız Android) ===== */
.app-open-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--panel-soft);
    border-bottom: 1px solid var(--line);
}
.app-open-bar[hidden] { display: none; }
.app-open-bar__logo {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    object-fit: cover;
    flex: 0 0 auto;
}
.app-open-bar__text {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
    min-width: 0;
    flex: 1 1 auto;
}
.app-open-bar__text strong {
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.app-open-bar__text span {
    font-size: 11px;
    color: var(--muted);
}
.app-open-bar__cta {
    flex: 0 0 auto;
    border: 0;
    cursor: pointer;
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 12px;
    color: #fff;
    background: var(--primary);
}
.app-open-bar__close {
    flex: 0 0 auto;
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    padding: 6px;
    font-size: 14px;
}

/* ===== Məhsul kartı üzərindəki kampaniya nişanı və geri sayım ===== */
.product-campaign-badge {
    position: absolute;
    bottom: 18px;
    right: 18px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 9px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--secondary), #a5541f);
    box-shadow: 0 6px 14px rgba(0,0,0,0.28);
    color: #fff;
    font-size: 11px;
    line-height: 1;
    font-weight: 700;
    white-space: nowrap;
    max-width: calc(100% - 36px);
}
.product-campaign-rate {
    font-weight: 800;
    letter-spacing: 0.2px;
}
.product-campaign-countdown {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    opacity: 0.95;
    overflow: hidden;
    text-overflow: ellipsis;
}
.product-campaign-badge .product-campaign-rate + .product-campaign-countdown {
    padding-left: 6px;
    border-left: 1px solid rgba(255,255,255,0.35);
}

/* ===== Məhsul kartlarının sadələşdirilmiş, mövzuya uyğun görünüşü ===== */
.home-product-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.14);
}
.home-product-card:hover {
    transform: translateY(-3px);
    border-color: rgba(40,117,125,0.45);
    box-shadow: 0 14px 30px rgba(0,0,0,0.20);
}
.home-product-image {
    aspect-ratio: 1 / 1;
    padding: 8px;
}
.home-product-image img {
    width: 100%;
    border-radius: 12px;
    background: var(--panel-soft);
}
.home-product-meta {
    padding: 2px 12px 14px;
    gap: 8px;
}
.home-product-meta h3 {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.7em;
}
.price-current,
.price-current.discounted {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.2px;
}
.price-old { font-size: 12px; }
.home-detail-btn {
    margin-top: 2px;
    padding: 9px 12px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
}

/* Seçilmiş məhsullar digər bölmələrdən kiçik kartlarla göstərilir. */
.home-card-grid-compact {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}
.home-card-grid-compact .home-product-card { border-radius: 14px; }
.home-card-grid-compact .home-product-image { padding: 6px; }
.home-card-grid-compact .home-product-image img { border-radius: 10px; }
.home-card-grid-compact .home-product-meta { padding: 2px 9px 11px; gap: 5px; }
.home-card-grid-compact .home-product-meta h3 { font-size: 12px; min-height: 2.7em; }
.home-card-grid-compact .price-current,
.home-card-grid-compact .price-current.discounted { font-size: 14px; }
.home-card-grid-compact .price-old { font-size: 11px; }
.home-card-grid-compact .home-detail-btn { padding: 7px 8px; font-size: 11px; }
.home-card-grid-compact .product-image-badge,
.home-card-grid-compact .product-campaign-badge { font-size: 10px; padding: 4px 7px; }
.home-card-grid-compact .product-image-badge { top: 10px; left: 10px; }
.home-card-grid-compact .product-campaign-badge { bottom: 10px; right: 10px; }

@media (max-width: 1100px) {
    .home-card-grid-compact { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .home-card-grid-compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .product-campaign-badge { font-size: 10px; padding: 4px 7px; bottom: 12px; right: 12px; }
}

/* Dar kartlarda nişan sığmadığı üçün yalnız geri sayım göstərilir —
   endirim faizi onsuz da üstündən xətt çəkilmiş köhnə qiymətdən görünür. */
.home-card-grid-compact .product-campaign-rate { display: none; }
.home-card-grid-compact .product-campaign-badge .product-campaign-countdown {
    padding-left: 0;
    border-left: 0;
}
@media (max-width: 760px) {
    .home-card-grid-compact .product-image-badge { display: none; }
}

.home-card-grid-compact .product-campaign-badge {
    max-width: calc(100% - 20px);
    padding: 3px 6px;
    bottom: 8px;
    right: 8px;
}
.home-card-grid-compact .home-detail-btn {
    white-space: nowrap;
    padding: 7px 4px;
    font-size: 10.5px;
}

/* ===== Mobil başlıq: iki sətir əvəzinə tək, yığcam sətir ===== */
@media (max-width: 720px) {
    .nav-shell {
        flex-wrap: nowrap;
        justify-content: space-between;
        padding: 8px 0;
        min-height: 0;
        row-gap: 0;
        gap: 8px;
    }
    .nav-shell > .brand-link {
        order: 0;
        width: auto;
        justify-content: flex-start;
        /* Şəkil sıxılıb yox olmasın deyə daralmır. */
        flex: 0 0 auto;
        overflow: visible;
    }
    .brand-logo {
        width: min(132px, 46vw);
        height: 40px;
    }
    .nav-actions {
        order: 0;
        gap: 4px;
        width: auto;
        flex: 1 1 auto;
        flex-wrap: nowrap;
        justify-content: flex-end;
        margin-left: auto;
    }
    .nav-actions .icon-btn,
    .nav-actions .theme-btn {
        padding: 8px 10px;
        border-radius: 10px;
    }
    .nav-balance { font-size: 12px; }
}

/* Bitmiş kampaniyalar siyahının sonunda, solğun göstərilir. */
.campaign-card-expired { opacity: 0.55; }
.campaign-state {
    align-self: flex-start;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--panel-soft);
    border: 1px solid var(--line);
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
}

/* ===== Kassa: tarix aralığı seçimi ===== */
.cash-range-form {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
}
.cash-range-form label {
    display: grid;
    gap: 4px;
    margin: 0;
}
.cash-range-form label span {
    font-size: 11px;
    color: var(--muted);
    font-weight: 600;
}
.cash-range-form input[type="date"] {
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--panel-soft);
    color: var(--text);
    font-family: inherit;
    font-size: 13px;
    color-scheme: dark;
}
body[data-theme="light"] .cash-range-form input[type="date"] { color-scheme: light; }
.cash-range-form .btn { padding: 9px 16px; border-radius: 10px; font-size: 13px; }
.cash-range-form .btn.ghost {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--muted);
}
.cash-range-note {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
}
@media (max-width: 720px) {
    .cash-range-form { width: 100%; }
    .cash-range-form label { flex: 1 1 140px; }
}
