:root {
    --brand: #48867b;
    --brand-50: #f1f7f6;
    --brand-100: #e1efec;
    --brand-200: #c3dfd9;
    --brand-300: #94c4ba;
    --brand-500: #48867b;
    --brand-600: #397368;
    --brand-700: #2f5e56;
    --brand-800: #294d47;
    --brand-900: #203c38;
    --gold: #d6cb72;
    --gold-soft: #fbf8df;
    --ink: #16201e;
    --ink-soft: #34423f;
    --muted: #71807c;
    --bg: #f5f7f7;
    --card: #ffffff;
    --line: #e2e9e7;
    --line-strong: #cbd8d5;
    --danger: #b42318;
    --danger-soft: #fff0ee;
    --warning: #8a6114;
    --warning-soft: #fff7df;
    --success: #157347;
    --success-soft: #eaf8f0;
    --info: #245f8f;
    --info-soft: #edf7ff;
    --shadow-xs: 0 1px 2px rgba(20, 45, 40, .04);
    --shadow-sm: 0 8px 24px rgba(27, 65, 58, .07);
    --shadow-md: 0 18px 48px rgba(27, 65, 58, .11);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --container: 1320px;
}

/* Vazirmatn is packaged locally so Persian typography does not depend on a CDN. */
@font-face {
    font-family: "Vazirmatn";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/vazirmatn-400.woff2") format("woff2");
}

@font-face {
    font-family: "Vazirmatn";
    font-style: normal;
    font-weight: 700 900;
    font-display: swap;
    src: url("../fonts/vazirmatn-700.woff2") format("woff2");
}

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

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    background:
        radial-gradient(circle at 100% 0, rgba(72, 134, 123, .08), transparent 30rem),
        linear-gradient(180deg, #f9fbfa 0, var(--bg) 28rem);
    font-family: Vazirmatn, IRANSansX, "Segoe UI", Tahoma, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.menu-open { overflow: hidden; }

a { color: var(--brand-700); text-decoration: none; transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease; }
a:hover { color: var(--brand-900); }
img { display: block; max-width: 100%; }
svg { flex: 0 0 auto; }
button, input, select, textarea { font: inherit; }
button, [type="button"], [type="submit"] { -webkit-tap-highlight-color: transparent; }

:focus-visible {
    outline: 3px solid rgba(72, 134, 123, .28);
    outline-offset: 2px;
}

.container { width: min(var(--container), calc(100% - 40px)); margin-inline: auto; }
.site-shell { min-height: 100vh; display: flex; flex-direction: column; }
.main { flex: 1; padding: 32px 0 72px; }

.topbar {
    color: rgba(255, 255, 255, .9);
    background: var(--brand-900);
    font-size: 12px;
}

.topbar .container {
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.topbar-group { display: flex; align-items: center; gap: 22px; }
.topbar-item { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.topbar-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(214, 203, 114, .13); }

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .94);
    border-bottom: 1px solid rgba(203, 216, 213, .75);
    backdrop-filter: blur(16px);
}

.header-main {
    min-height: 80px;
    display: grid;
    grid-template-columns: auto minmax(260px, 620px) auto;
    align-items: center;
    gap: 28px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: var(--ink);
    white-space: nowrap;
}

.brand:hover { color: var(--ink); transform: translateY(-1px); }

.brand-logo {
    width: 49px;
    height: 49px;
    flex: 0 0 auto;
    border-radius: 17px 7px 17px 7px;
    box-shadow: 0 10px 24px rgba(32, 60, 56, .2);
}

.brand-mark {
    width: 45px;
    height: 45px;
    display: grid;
    place-items: center;
    color: #fff;
    border-radius: 15px 5px 15px 5px;
    background: linear-gradient(145deg, var(--brand-500), var(--brand-800));
    box-shadow: 0 9px 22px rgba(72, 134, 123, .27), inset 0 1px rgba(255,255,255,.25);
    font-size: 23px;
    font-weight: 900;
}

.brand-copy { display: flex; flex-direction: column; line-height: 1.3; }
.brand-copy strong { font-size: 17px; letter-spacing: -.4px; }
.brand-copy small { color: var(--muted); font-size: 10px; font-weight: 600; }

.global-search { position: relative; }
.global-search input {
    height: 48px;
    padding: 0 50px 0 18px;
    border-color: transparent;
    border-radius: 15px;
    background: #f1f5f4;
    box-shadow: inset 0 0 0 1px transparent;
}

.global-search input:focus { background: #fff; box-shadow: 0 0 0 3px rgba(72, 134, 123, .13), inset 0 0 0 1px var(--brand-500); }
.global-search button {
    position: absolute;
    inset: 5px 5px 5px auto;
    width: 39px;
    min-height: auto;
    padding: 0;
    border-radius: 11px;
    box-shadow: none;
}

.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.header-action {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    color: var(--ink-soft);
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #fff;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 700;
}

.header-action:hover { color: var(--brand-700); border-color: var(--brand-200); background: var(--brand-50); }
.header-action.primary { color: #fff; border-color: var(--brand-600); background: var(--brand-600); }
.header-action.primary:hover { background: var(--brand-700); }
.header-action.icon-only { width: 42px; padding: 0; justify-content: center; }
.header-action form, .header-actions form { display: contents; }

.nav-toggle {
    display: none;
    width: 43px;
    height: 43px;
    padding: 0;
    color: var(--ink);
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 12px;
    box-shadow: none;
}

.primary-nav { border-top: 1px solid #f1f4f3; }
.primary-nav .container { min-height: 45px; display: flex; align-items: center; gap: 6px; }
.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 11px;
    color: var(--ink-soft);
    border-radius: 9px;
    font-size: 13px;
    font-weight: 650;
}
.nav-link:hover, .nav-link.active { color: var(--brand-700); background: var(--brand-50); }
.nav-spacer { flex: 1; }
.nav-promise { color: var(--muted); font-size: 12px; display: inline-flex; align-items: center; gap: 6px; }

.mobile-drawer-backdrop { display: none; }
.mobile-drawer { display: none; }
.mobile-bottom-nav { display: none; }

h1, h2, h3, h4 { margin: 0 0 .55em; color: var(--ink); line-height: 1.45; letter-spacing: -.35px; }
h1 { font-size: clamp(24px, 3vw, 34px); }
h2 { font-size: clamp(18px, 2vw, 23px); }
h3 { font-size: 16px; }
p { margin: 0 0 1em; }
hr { height: 1px; margin: 24px 0; border: 0; background: var(--line); }
details { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
summary { padding: 11px 14px; color: var(--brand-700); background: var(--brand-50); cursor: pointer; font-weight: 750; }
details > form, details > div { padding: 15px; }

.page-title { margin-bottom: 24px; }
.page-title p { margin: 0; color: var(--muted); }
.eyebrow { color: var(--brand-600); font-size: 12px; font-weight: 800; letter-spacing: .5px; }
.muted { color: var(--muted) !important; }
.tiny { font-size: 12px; }
.ltr { direction: ltr; text-align: left; }
.spacer { flex: 1; }
.mt-1 { margin-top: 16px; }
.mb-1 { margin-bottom: 16px; }

.card {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--card);
    box-shadow: var(--shadow-xs);
}

a.card:hover { border-color: var(--brand-200); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.card-soft { background: var(--brand-50); border-color: var(--brand-100); }
.card-elevated { box-shadow: var(--shadow-md); }
.stack > * + * { margin-top: 16px; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }

.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.section-head h1, .section-head h2, .actions h2 { margin-bottom: 3px; }
.actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.btn, button {
    min-height: 43px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 17px;
    color: #fff;
    border: 1px solid var(--brand-600);
    border-radius: 12px;
    background: var(--brand-600);
    box-shadow: 0 6px 14px rgba(72, 134, 123, .14);
    cursor: pointer;
    font-weight: 750;
    transition: transform .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.btn:hover, button:hover { color: #fff; border-color: var(--brand-700); background: var(--brand-700); box-shadow: 0 9px 20px rgba(72, 134, 123, .2); transform: translateY(-1px); }
.btn:active, button:active { transform: translateY(0); }
.btn-secondary { color: var(--brand-700); border-color: var(--brand-100); background: var(--brand-50); box-shadow: none; }
.btn-secondary:hover { color: var(--brand-800); border-color: var(--brand-200); background: var(--brand-100); }
.btn-outline { color: var(--brand-700); border-color: var(--brand-300); background: transparent; box-shadow: none; }
.btn-outline:hover { color: #fff; background: var(--brand-600); }
.btn-danger { color: var(--danger); border-color: transparent; background: var(--danger-soft); box-shadow: none; }
.btn-danger:hover { color: #fff; border-color: var(--danger); background: var(--danger); }
.btn-warning { color: var(--warning); border-color: transparent; background: var(--warning-soft); box-shadow: none; }
.btn-sm { min-height: 34px; padding: 5px 11px; border-radius: 9px; font-size: 12px; }
.btn-lg { min-height: 50px; padding: 11px 22px; border-radius: 14px; }
.btn-block { width: 100%; }
.btn-icon { width: 43px; padding: 0; }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    width: max-content;
    padding: 4px 9px;
    color: var(--brand-700);
    border: 1px solid var(--brand-100);
    border-radius: 999px;
    background: var(--brand-50);
    font-size: 11px;
    font-weight: 750;
    line-height: 1.5;
}
.badge-gold { color: #6f6415; border-color: #eee6a6; background: var(--gold-soft); }
.badge-danger { color: var(--danger); border-color: #ffd3ce; background: var(--danger-soft); }
.badge-success { color: var(--success); border-color: #bfe8d0; background: var(--success-soft); }

.alert {
    position: relative;
    margin-bottom: 18px;
    padding: 14px 16px;
    border: 1px solid transparent;
    border-radius: 14px;
    font-size: 13px;
}
.alert ul { margin: 8px 0 0; padding-right: 20px; }
.alert-success { color: var(--success); border-color: #c5ead4; background: var(--success-soft); }
.alert-error { color: var(--danger); border-color: #ffd2cd; background: var(--danger-soft); }
.alert-warning { color: var(--warning); border-color: #f5df9d; background: var(--warning-soft); }
.alert-info { color: var(--info); border-color: #cbe6f8; background: var(--info-soft); }

label { display: block; margin-bottom: 6px; color: var(--ink-soft); font-size: 13px; font-weight: 750; }
input, select, textarea {
    width: 100%;
    min-height: 46px;
    padding: 10px 13px;
    color: var(--ink);
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    outline: 0;
    background: #fff;
    box-shadow: 0 1px 2px rgba(24, 58, 52, .02);
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
input::placeholder, textarea::placeholder { color: #a2aeab; }
input:hover, select:hover, textarea:hover { border-color: #adc5c0; }
input:focus, select:focus, textarea:focus { border-color: var(--brand-500); box-shadow: 0 0 0 4px rgba(72, 134, 123, .11); }
textarea { min-height: 120px; resize: vertical; }
input[type="file"] { padding: 7px; }
input[type="file"]::file-selector-button { margin-left: 10px; padding: 7px 12px; border: 0; border-radius: 8px; color: var(--brand-700); background: var(--brand-50); font-weight: 700; cursor: pointer; }
.field { margin-bottom: 17px; }
.field small { display: block; margin-top: 5px; }
.checkbox { display: flex; align-items: center; gap: 8px; }
.checkbox input { width: 18px; min-height: 18px; accent-color: var(--brand-600); }
.checkbox label { margin: 0; }
.inline-form { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; }
.inline-form > * { margin: 0; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 15px; }
table { width: 100%; min-width: 700px; border-collapse: separate; border-spacing: 0; background: #fff; }
th, td { padding: 14px 15px; text-align: right; vertical-align: middle; border-bottom: 1px solid var(--line); }
th { color: var(--muted); background: #f8faf9; font-size: 11px; font-weight: 800; white-space: nowrap; }
td { color: var(--ink-soft); font-size: 13px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .15s ease; }
tbody tr:hover { background: #fbfcfc; }
code { display: inline-block; direction: ltr; padding: 2px 7px; color: #42524e; border: 1px solid var(--line); border-radius: 7px; background: #f6f8f8; font-family: Consolas, monospace; font-size: 11px; }

.empty { padding: 44px 24px !important; color: var(--muted); text-align: center; }
.empty::before { content: ""; display: block; width: 42px; height: 42px; margin: 0 auto 12px; border: 2px dashed var(--brand-300); border-radius: 14px; background: var(--brand-50); }
.pagination { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 24px; }
nav[role="navigation"] { margin-top: 20px; }
nav[role="navigation"] > div:first-child { display: none; }
nav[role="navigation"] > div:last-child { display: flex; align-items: center; justify-content: space-between; gap: 15px; color: var(--muted); font-size: 12px; }
nav[role="navigation"] span[aria-current="page"] span { color: #fff !important; border-color: var(--brand-600) !important; background: var(--brand-600) !important; }

.panel-layout { display: grid; grid-template-columns: 252px minmax(0, 1fr); gap: 24px; align-items: start; }
.panel-content { min-width: 0; }
.sidebar {
    position: sticky;
    top: 146px;
    overflow: hidden;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}
.sidebar-profile { padding: 20px; color: #fff; background: linear-gradient(145deg, var(--brand-800), var(--brand-600)); }
.sidebar-user { display: flex; align-items: center; gap: 11px; }
.sidebar-avatar { width: 43px; height: 43px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.25); border-radius: 14px; background: rgba(255,255,255,.15); font-size: 17px; font-weight: 900; }
.sidebar-user strong, .sidebar-user small { display: block; max-width: 145px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user small { color: rgba(255,255,255,.72); font-size: 11px; }
.sidebar-nav { padding: 11px; }
.sidebar-title { padding: 9px 11px 5px; color: #97a5a2; font-size: 10px; font-weight: 800; letter-spacing: .7px; }
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 2px 0;
    padding: 9px 11px;
    color: var(--ink-soft);
    border-radius: 11px;
    font-size: 13px;
    font-weight: 650;
}
.sidebar-link .icon { color: #82938f; }
.sidebar-link:hover { color: var(--brand-700); background: var(--brand-50); }
.sidebar-link.active { color: var(--brand-800); background: var(--brand-100); font-weight: 800; }
.sidebar-link.active .icon { color: var(--brand-600); }
.sidebar-footer { padding: 11px; border-top: 1px solid var(--line); }
.sidebar-logout { width: 100%; justify-content: flex-start; color: var(--danger); border: 0; background: transparent; box-shadow: none; }
.sidebar-logout:hover { color: var(--danger); background: var(--danger-soft); box-shadow: none; }
.panel-menu-button { display: none; margin-bottom: 14px; }

.dashboard-welcome {
    position: relative;
    overflow: hidden;
    min-height: 148px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 18px;
    padding: 28px;
    color: #fff;
    border-radius: var(--radius-lg);
    background: linear-gradient(120deg, var(--brand-800), var(--brand-600));
    box-shadow: var(--shadow-sm);
}
.dashboard-welcome::after { content: ""; position: absolute; left: -30px; bottom: -70px; width: 210px; height: 210px; border: 38px solid rgba(214,203,114,.17); border-radius: 50%; }
.dashboard-welcome h1 { color: #fff; font-size: 27px; }
.dashboard-welcome p { margin: 0; color: rgba(255,255,255,.72); }
.dashboard-welcome .btn { color: var(--brand-900); border-color: #fff; background: #fff; }
.dashboard-welcome .btn:hover { color: var(--brand-900); background: var(--gold-soft); }
.dashboard-welcome .btn-outline { color: #fff; border-color: rgba(255,255,255,.35); background: transparent; }
.dashboard-welcome .btn-outline:hover { color: var(--brand-900); border-color: #fff; background: #fff; }
.welcome-icon { position: relative; z-index: 1; width: 76px; height: 76px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.22); border-radius: 24px; background: rgba(255,255,255,.12); }

.stat { position: relative; overflow: hidden; min-height: 126px; }
.stat::after { content: ""; position: absolute; left: -18px; bottom: -26px; width: 76px; height: 76px; border-radius: 50%; background: var(--brand-50); }
.stat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stat-icon { width: 38px; height: 38px; display: grid; place-items: center; color: var(--brand-700); border-radius: 12px; background: var(--brand-50); }
.stat strong { position: relative; z-index: 1; display: block; margin-top: 13px; color: var(--ink); font-size: clamp(23px, 2.6vw, 31px); line-height: 1.2; }
.stat small { position: relative; z-index: 1; color: var(--muted); }
.kpi { border-top: 0; }
.kpi::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, var(--brand-500), var(--gold)); }

.hero {
    position: relative;
    overflow: hidden;
    min-height: 330px;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr);
    align-items: center;
    gap: 40px;
    margin-bottom: 22px;
    padding: clamp(30px, 5vw, 58px);
    color: #fff;
    border-radius: var(--radius-xl);
    background:
        radial-gradient(circle at 15% 20%, rgba(214,203,114,.2), transparent 15rem),
        linear-gradient(125deg, #173d38 0%, var(--brand-700) 60%, #57978c 100%);
    box-shadow: var(--shadow-md);
}
.hero::before { content: ""; position: absolute; inset: auto -80px -170px auto; width: 400px; height: 400px; border: 55px solid rgba(255,255,255,.06); border-radius: 50%; }
.hero-content { position: relative; z-index: 2; }
.hero-kicker { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 14px; padding: 5px 10px; color: #fff; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; background: rgba(255,255,255,.1); font-size: 11px; font-weight: 800; }
.hero h1 { max-width: 650px; color: #fff; font-size: clamp(30px, 4.5vw, 52px); line-height: 1.35; }
.hero h1 span { color: var(--gold); }
.hero p { max-width: 620px; color: rgba(255,255,255,.76); font-size: 15px; }
.hero-actions { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
.hero .btn { color: var(--brand-900); border-color: #fff; background: #fff; }
.hero .btn:hover { background: var(--gold-soft); }
.hero .btn-outline { color: #fff; border-color: rgba(255,255,255,.35); background: transparent; }
.hero-visual { position: relative; z-index: 1; min-height: 240px; }
.device-card { position: absolute; display: grid; place-items: center; color: var(--brand-700); border: 1px solid rgba(255,255,255,.55); background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(232,242,239,.92)); box-shadow: 0 25px 50px rgba(10,35,30,.24); }
.device-card.phone { width: 112px; height: 205px; right: 16%; top: 2px; border-radius: 26px; transform: rotate(7deg); }
.device-card.tablet { width: 190px; height: 142px; left: 4%; bottom: 5px; border-radius: 20px; transform: rotate(-7deg); }
.device-card.watch { width: 82px; height: 100px; left: 13%; top: 0; border-radius: 24px; transform: rotate(8deg); }
.device-card::before { content: ""; width: 70%; height: 70%; border-radius: inherit; background: linear-gradient(145deg, var(--brand-100), var(--gold-soft)); }
.device-card.phone::after { content: ""; position: absolute; top: 7px; width: 34px; height: 5px; border-radius: 4px; background: #cad9d6; }
.device-logo { position: absolute; font-weight: 900; font-size: 22px; }

.benefit-strip { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 26px; padding: 9px 0; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.benefit { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 58px; padding: 8px 16px; border-left: 1px solid var(--line); }
.benefit:last-child { border-left: 0; }
.benefit .icon { color: var(--brand-600); }
.benefit strong, .benefit small { display: block; }
.benefit strong { font-size: 12px; }
.benefit small { color: var(--muted); font-size: 10px; }

.category-chips { display: flex; gap: 9px; margin-bottom: 24px; overflow-x: auto; scrollbar-width: none; }
.category-chips::-webkit-scrollbar { display: none; }
.category-chip { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; padding: 9px 14px; color: var(--ink-soft); border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 12px; font-weight: 700; }
.category-chip:hover, .category-chip.active { color: var(--brand-800); border-color: var(--brand-200); background: var(--brand-50); }
.category-chip-dot { width: 8px; height: 8px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--gold)); }

.catalog-layout { display: grid; grid-template-columns: 258px minmax(0, 1fr); gap: 22px; align-items: start; }
.filter-card { position: sticky; top: 146px; padding: 18px; }
.filter-card .field { margin-bottom: 13px; }
.filter-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.filter-title h2 { margin: 0; font-size: 17px; }
.filter-toggle { display: none; }
.catalog-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 15px; }
.catalog-toolbar h2 { margin: 0; }
.catalog-sort { display: flex; align-items: center; gap: 8px; }
.catalog-sort label { margin: 0; white-space: nowrap; }
.catalog-sort select { width: 170px; min-height: 40px; padding-block: 7px; }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

.product-card { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 12px; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.product-card:hover { transform: translateY(-4px); border-color: var(--brand-200); box-shadow: var(--shadow-sm); }
.product-image { position: relative; overflow: hidden; height: 215px; display: grid; place-items: center; margin-bottom: 14px; color: var(--brand-700); border-radius: 17px; background: linear-gradient(145deg, #f5f9f8, #e7f0ee); font-size: 50px; font-weight: 900; }
.product-image::before { content: ""; position: absolute; width: 135px; height: 135px; border: 24px solid rgba(72,134,123,.055); border-radius: 50%; }
.product-image img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.product-card:hover .product-image img { transform: scale(1.045); }
.product-fallback { position: relative; z-index: 1; width: 78px; height: 78px; display: grid; place-items: center; color: #fff; border-radius: 25px 9px 25px 9px; background: linear-gradient(145deg, var(--brand-500), var(--brand-700)); box-shadow: 0 15px 25px rgba(72,134,123,.2); font-size: 30px; }
.discount-badge { position: absolute; z-index: 3; top: 22px; right: 22px; padding: 4px 8px; color: #fff; border-radius: 8px; background: #cf3c31; font-size: 11px; font-weight: 900; }
.discount-badge.is-static { position: static; }
.stock-badge { position: absolute; z-index: 3; top: 22px; left: 22px; padding: 4px 8px; color: var(--warning); border: 1px solid #f0dfad; border-radius: 8px; background: rgba(255,247,223,.93); font-size: 10px; font-weight: 800; }
.product-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 2px 7px; color: var(--muted); font-size: 10px; }
.rating { display: inline-flex; align-items: center; gap: 3px; color: #9b7d10; font-weight: 800; direction: ltr; }
.rating .icon { fill: var(--gold); stroke: #ad981e; }
.product-card h2 { min-height: 48px; margin: 0 2px 9px; font-size: 15px; line-height: 1.65; }
.product-card h2 a { color: var(--ink); }
.product-card h2 a:hover { color: var(--brand-700); }
.seller-line { margin: 0 2px 13px; color: var(--muted); font-size: 10px; }
.price-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin: auto 2px 2px; }
.price { color: var(--brand-800); font-size: 19px; font-weight: 900; }
.price small { color: var(--muted); font-size: 10px; font-weight: 650; }
.old-price { color: #9aa6a3; text-decoration: line-through; font-size: 11px; }

.breadcrumb { display: flex; align-items: center; gap: 7px; margin-bottom: 16px; color: var(--muted); font-size: 11px; flex-wrap: wrap; }
.breadcrumb a { color: var(--muted); }
.product-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(380px, .92fr); gap: 24px; align-items: start; }
.product-gallery { position: sticky; top: 146px; }
.product-gallery-main { height: 490px; margin: 0; }
.product-thumbnails { display: flex; gap: 9px; margin-top: 11px; overflow-x: auto; }
.thumb { width: 76px; height: 76px; flex: 0 0 auto; padding: 4px; object-fit: cover; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.product-info { padding: 28px; }
.product-info h1 { margin: 12px 0 8px; font-size: 28px; }
.product-info-lead { color: var(--muted); }
.product-price-box { margin: 20px 0; padding: 17px; border: 1px solid var(--brand-100); border-radius: 16px; background: var(--brand-50); }
.product-price-box .price { font-size: 27px; }
.seller-box { display: flex; align-items: center; gap: 11px; margin-bottom: 18px; padding: 13px; border: 1px solid var(--line); border-radius: 14px; }
.seller-logo { width: 42px; height: 42px; display: grid; place-items: center; color: var(--brand-700); border-radius: 13px; background: var(--brand-50); }
.seller-box strong, .seller-box small { display: block; }
.seller-box small { color: var(--muted); }
.purchase-actions { display: flex; align-items: flex-end; gap: 9px; flex-wrap: wrap; }
.purchase-actions .field { width: 110px; margin: 0; }
.purchase-actions form { display: flex; align-items: flex-end; gap: 9px; flex-wrap: wrap; }
.guarantee-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 20px; }
.guarantee-item { padding: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 12px; text-align: center; font-size: 10px; }
.guarantee-item .icon { display: block; margin: 0 auto 5px; color: var(--brand-600); }
.product-sections { display: grid; grid-template-columns: 1.25fr .75fr; gap: 20px; margin-top: 22px; align-items: start; }
.review-item { padding: 17px 0; border-bottom: 1px solid var(--line); }
.review-item:last-child { border: 0; }

.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.cart-summary { position: sticky; top: 146px; }
.cart-product { display: flex; align-items: center; gap: 12px; min-width: 240px; }
.cart-product-image { width: 58px; height: 58px; flex: 0 0 auto; display: grid; place-items: center; overflow: hidden; color: var(--brand-700); border-radius: 13px; background: var(--brand-50); font-weight: 900; }
.cart-product-image img { width: 100%; height: 100%; object-fit: cover; }
.cart-product strong, .cart-product small { display: block; }
.cart-product small { color: var(--muted); font-size: 10px; }
.summary-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 10px 0; color: var(--muted); border-bottom: 1px solid var(--line); font-size: 12px; }
.summary-row:last-of-type { margin-bottom: 17px; color: var(--ink); border-bottom: 0; font-size: 14px; }
.summary-row strong { color: var(--ink); }
.security-note { display: flex; gap: 9px; margin-top: 14px; padding: 11px; color: var(--muted); border-radius: 11px; background: var(--brand-50); font-size: 10px; }
.payment-shell { max-width: 620px; margin: 18px auto; text-align: center; }
.payment-mark { width: 70px; height: 70px; display: grid; place-items: center; margin: 0 auto 17px; color: var(--brand-700); border: 1px solid var(--brand-100); border-radius: 22px; background: var(--brand-50); }
.payment-amount { margin: 22px 0; padding: 20px; border: 1px solid var(--line); border-radius: 17px; background: #f8faf9; }
.payment-amount .price { display: block; font-size: 31px; }

.auth-page { max-width: 1080px; margin: 14px auto; }
.auth-shell { overflow: hidden; display: grid; grid-template-columns: .9fr 1.1fr; min-height: 610px; padding: 0; box-shadow: var(--shadow-md); }
.auth-brand-panel { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 38px; color: #fff; background: linear-gradient(145deg, var(--brand-900), var(--brand-600)); }
.auth-brand-panel::after { content: ""; position: absolute; left: -110px; bottom: -130px; width: 320px; height: 320px; border: 45px solid rgba(214,203,114,.16); border-radius: 50%; }
.auth-brand-panel h2 { margin-top: 34px; color: #fff; font-size: 31px; }
.auth-brand-panel p { color: rgba(255,255,255,.72); }
.auth-brand-logo { display: flex; align-items: center; gap: 11px; font-weight: 900; }
.auth-benefits { position: relative; z-index: 1; display: grid; gap: 12px; }
.auth-benefit { display: flex; align-items: center; gap: 9px; color: rgba(255,255,255,.82); font-size: 12px; }
.auth-benefit .icon { color: var(--gold); }
.auth-form-panel { padding: clamp(28px, 5vw, 56px); background: #fff; }
.auth-form-panel h1 { margin-bottom: 5px; }
.auth-form-panel > p { color: var(--muted); }
.auth-wrap { max-width: 570px; margin: 24px auto; }
.wide-form { max-width: 980px; margin-inline: auto; }
.form-hero { margin-bottom: 18px; padding: 28px; color: #fff; border-radius: var(--radius-lg); background: linear-gradient(125deg, var(--brand-900), var(--brand-600)); box-shadow: var(--shadow-sm); }
.form-hero h1 { margin-bottom: 5px; color: #fff; }
.form-hero p { max-width: 720px; margin: 0; color: rgba(255,255,255,.72); }
.form-section { padding: 22px 0 5px; border-top: 1px solid var(--line); }
.form-section:first-child { padding-top: 0; border-top: 0; }
.form-section-title { display: flex; align-items: center; gap: 10px; margin-bottom: 17px; }
.form-section-title .stat-icon { flex: 0 0 auto; }
.form-section-title h2 { margin: 0; font-size: 18px; }
.form-section-title p { margin: 2px 0 0; color: var(--muted); font-size: 11px; }
.demo-accounts { margin-top: 22px; padding: 14px; border: 1px dashed var(--brand-200); border-radius: 14px; background: var(--brand-50); }
.demo-accounts-title { display: flex; align-items: center; gap: 7px; margin-bottom: 10px; color: var(--brand-800); font-size: 12px; font-weight: 800; }
.demo-account-list { display: grid; gap: 7px; }
.demo-account { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 9px; background: #fff; font-size: 11px; }
.demo-fill { min-height: 29px; padding: 3px 8px; border-color: var(--brand-100); border-radius: 7px; background: var(--brand-50); box-shadow: none; color: var(--brand-700); font-size: 10px; }

.order-line { margin: 13px 0; padding: 13px 16px 13px 0; border-right: 3px solid var(--brand-400, #72a69c); }
.message { padding: 14px; border: 1px solid var(--brand-100); border-radius: 14px; background: var(--brand-50); }
.message.staff { border-color: #eee5a4; background: var(--gold-soft); }
.timeline { margin-right: 9px; padding-right: 22px; border-right: 2px solid var(--line); }
.timeline > div { position: relative; margin-bottom: 17px; }
.timeline > div::before { content: ""; position: absolute; top: 7px; right: -28px; width: 10px; height: 10px; border: 2px solid #fff; border-radius: 50%; background: var(--brand-500); box-shadow: 0 0 0 2px var(--brand-200); }

.site-footer { margin-top: auto; color: #d9e6e3; background: #173d38; }
.footer-main { display: grid; grid-template-columns: 1.35fr .7fr .7fr 1fr; gap: 42px; padding: 48px 0 34px; }
.footer-brand { color: #fff; }
.footer-brand .brand-mark { background: linear-gradient(145deg, var(--gold), #b9aa42); box-shadow: none; }
.footer-brand .brand-logo { box-shadow: 0 10px 24px rgba(0,0,0,.2); }
.footer-brand p { max-width: 360px; margin-top: 16px; color: #a9c0bb; font-size: 12px; }
.footer-title { margin-bottom: 13px; color: #fff; font-size: 13px; }
.footer-links { display: grid; gap: 8px; }
.footer-links a { width: max-content; color: #aec2be; font-size: 12px; }
.footer-links a:hover { color: var(--gold); }
.trust-card { padding: 14px; border: 1px solid rgba(255,255,255,.12); border-radius: 14px; background: rgba(255,255,255,.05); }
.trust-card strong { display: flex; align-items: center; gap: 8px; color: #fff; font-size: 12px; }
.trust-card p { margin: 7px 0 0; color: #a9c0bb; font-size: 10px; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 17px 0; color: #8faaa5; border-top: 1px solid rgba(255,255,255,.09); font-size: 10px; }

@media (max-width: 1180px) {
    .header-main { grid-template-columns: auto 1fr auto; gap: 16px; }
    .header-action span { display: none; }
    .header-action { width: 42px; justify-content: center; padding: 0; }
    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-main { grid-template-columns: 1.2fr 1fr 1fr; }
    .footer-main > :last-child { grid-column: span 3; }
}

@media (max-width: 920px) {
    .container { width: min(100% - 28px, var(--container)); }
    .topbar-group:last-child { display: none; }
    .header-main { min-height: 68px; grid-template-columns: auto 1fr auto; }
    .global-search { grid-column: 1 / -1; grid-row: 2; margin-bottom: 12px; }
    .primary-nav { display: none; }
    .nav-toggle { display: inline-flex; }
    .header-actions .desktop-only { display: none; }
    .mobile-drawer-backdrop { position: fixed; inset: 0; z-index: 79; background: rgba(12,27,24,.45); backdrop-filter: blur(3px); }
    .mobile-drawer-backdrop.open { display: block; }
    .mobile-drawer { position: fixed; z-index: 80; top: 0; right: 0; bottom: 0; width: min(340px, 88vw); display: flex; flex-direction: column; padding: 18px; background: #fff; box-shadow: -20px 0 50px rgba(18,47,41,.18); transform: translateX(105%); transition: transform .25s ease; }
    .mobile-drawer.open { transform: translateX(0); }
    .mobile-drawer-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
    .mobile-drawer-nav { display: grid; gap: 5px; padding: 16px 0; }
    .mobile-drawer-nav .nav-link { padding: 11px; }
    .mobile-drawer-actions { display: grid; gap: 8px; margin-top: auto; }
    .mobile-drawer-actions .btn { width: 100%; }

    .panel-layout { grid-template-columns: 1fr; }
    .panel-menu-button { display: inline-flex; }
    .sidebar { position: fixed; z-index: 80; top: 0; right: 0; bottom: 0; width: min(300px, 86vw); border: 0; border-radius: 0; transform: translateX(105%); transition: transform .25s ease; }
    .sidebar.open { transform: translateX(0); }
    .sidebar-nav { overflow-y: auto; max-height: calc(100vh - 170px); }
    .hero { grid-template-columns: 1fr; min-height: auto; }
    .hero-visual { display: none; }
    .benefit-strip { grid-template-columns: repeat(2, 1fr); }
    .benefit:nth-child(2) { border-left: 0; }
    .benefit:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
    .catalog-layout { grid-template-columns: 1fr; }
    .filter-toggle { display: inline-flex; }
    .filter-card { position: static; display: none; }
    .filter-card.open { display: block; }
    .product-detail { grid-template-columns: 1fr; }
    .product-gallery { position: static; }
    .product-gallery-main { height: 420px; }
    .product-sections { grid-template-columns: 1fr; }
    .cart-layout { grid-template-columns: 1fr; }
    .cart-summary { position: static; }
    .auth-shell { grid-template-columns: 1fr; min-height: auto; }
    .auth-brand-panel { display: none; }
    .footer-main { grid-template-columns: repeat(2, 1fr); }
    .footer-main > :last-child { grid-column: auto; }
}

@media (max-width: 680px) {
    body { font-size: 14px; }
    .container { width: min(100% - 20px, var(--container)); }
    .topbar .container { justify-content: center; }
    .topbar-group:first-child .topbar-item:not(:first-child) { display: none; }
    .header-main { gap: 9px; }
    .brand-copy small { display: none; }
    .brand-copy strong { font-size: 15px; }
    .brand-mark, .brand-logo { width: 40px; height: 40px; border-radius: 13px 4px 13px 4px; }
    .header-actions { gap: 5px; }
    .header-action { width: 39px; min-height: 39px; }
    .main { padding: 20px 0 86px; }
    .card { padding: 17px; border-radius: 18px; }
    .grid, .grid-2, .stats { grid-template-columns: 1fr; }
    .section-head { align-items: stretch; flex-direction: column; }
    .dashboard-welcome { min-height: 170px; padding: 23px; }
    .welcome-icon { display: none; }
    .stats { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
    .stat { min-height: 112px; padding: 15px; }
    .stat strong { font-size: 23px; }
    .hero { padding: 28px 22px; border-radius: 22px; }
    .hero h1 { font-size: 29px; }
    .hero-actions .btn { width: 100%; }
    .benefit { justify-content: flex-start; padding: 8px 12px; }
    .catalog-toolbar { align-items: stretch; flex-direction: column; }
    .catalog-sort { width: 100%; }
    .catalog-sort select { width: 100%; }
    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
    .product-card { padding: 8px; border-radius: 15px; }
    .product-image { height: 165px; border-radius: 13px; }
    .product-card h2 { min-height: 43px; font-size: 12px; }
    .product-meta, .seller-line { font-size: 9px; }
    .price { font-size: 15px; }
    .discount-badge, .stock-badge { top: 14px; }
    .discount-badge { right: 14px; }
    .stock-badge { left: 14px; }
    .product-gallery-main { height: 340px; }
    .product-info { padding: 20px; }
    .product-info h1 { font-size: 23px; }
    .purchase-actions, .purchase-actions form { width: 100%; }
    .purchase-actions form .btn, .purchase-actions > .btn { flex: 1; }
    .guarantee-list { grid-template-columns: 1fr; }
    .guarantee-item { display: flex; align-items: center; gap: 8px; text-align: right; }
    .guarantee-item .icon { margin: 0; }
    .auth-form-panel { padding: 24px 19px; }
    .auth-page { margin: 0 auto; }
    .footer-main { grid-template-columns: 1fr; gap: 28px; padding-top: 36px; }
    .footer-main > :last-child { grid-column: auto; }
    .footer-bottom { align-items: flex-start; flex-direction: column; }
    .mobile-bottom-nav {
        position: fixed;
        z-index: 70;
        right: 10px;
        bottom: max(10px, env(safe-area-inset-bottom));
        left: 10px;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        align-items: stretch;
        padding: 6px;
        border: 1px solid rgba(203, 216, 213, .9);
        border-radius: 19px;
        background: rgba(255,255,255,.96);
        box-shadow: 0 13px 34px rgba(20, 49, 44, .16);
        backdrop-filter: blur(14px);
    }
    .mobile-bottom-nav a {
        min-width: 0;
        min-height: 48px;
        display: grid;
        place-content: center;
        justify-items: center;
        gap: 2px;
        padding: 4px;
        color: #61706d;
        border-radius: 13px;
        font-size: 9px;
        font-weight: 800;
    }
    .mobile-bottom-nav a.active { color: var(--brand-800); background: var(--brand-50); }
    .mobile-bottom-nav a.active .icon { color: var(--brand-600); }
}

@media (max-width: 420px) {
    .header-actions .hide-compact { display: none; }
    .stats { grid-template-columns: 1fr; }
    .product-grid { grid-template-columns: 1fr; }
    .product-image { height: 230px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
