:root {
    --navy-950: #071323;
    --navy-900: #0b1d33;
    --navy-800: #12375d;
    --blue-600: #1e5c99;
    --gold-500: #c9a45d;
    --gold-300: #ecd59a;
    --ink: #111827;
    --muted: #64748b;
    --line: #dbe4ef;
    --paper: #f7f9fc;
    --white: #ffffff;
    --danger: #b42318;
    --shadow: 0 18px 55px rgba(7, 19, 35, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: Vazirmatn, Tahoma, sans-serif;
    color: var(--ink);
    background: var(--paper);
    line-height: 1.7;
    overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; }
.skip-link { position: absolute; top: -80px; right: 16px; background: var(--gold-500); color: var(--navy-950); padding: 10px 14px; z-index: 20; }
.skip-link:focus { top: 12px; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(7, 19, 35, .92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(236, 213, 154, .18);
}
.nav-shell, .footer {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}
.nav-shell {
    min-height: 72px;
    display: flex;
    direction: rtl;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    color: var(--white);
}
.brand { display: inline-flex; direction: ltr; align-items: center; justify-content: flex-end; flex: 0 0 auto; min-height: 44px; }
.brand-wordmark { width: 142px; height: auto; object-fit: contain; }
.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    background: linear-gradient(145deg, var(--gold-300), var(--gold-500));
    color: var(--navy-950);
    font-family: Cormorant, serif;
    font-size: 28px;
}
.nav-links { display: flex; direction: rtl; flex-direction: row; align-items: center; gap: 8px; margin-left: auto; margin-right: 0; }
.nav-links a, .btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 10px 18px;
    transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.nav-links a { color: rgba(255,255,255,.82); }
.nav-links a:hover, .nav-links a:focus { color: var(--white); background: rgba(255,255,255,.08); }
.nav-toggle { display: none; width: 46px; height: 46px; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; background: transparent; }
.nav-toggle span { width: 18px; height: 2px; background: var(--white); display: block; margin: 4px auto; }

.hero {
    min-height: 720px;
    height: calc(100vh - 72px);
    max-height: 840px;
    display: grid;
    grid-template-columns: minmax(390px, .92fr) minmax(520px, 1.08fr);
    align-items: center;
    background: radial-gradient(circle at 20% 10%, #1d4b76 0, transparent 36%), var(--navy-950);
    color: var(--white);
    overflow: hidden;
}
.hero-copy { min-width: 0; padding: 72px max(42px, calc((100vw - 1180px) / 2)) 58px 44px; text-align: right; }
.hero-wordmark {
    width: min(560px, 100%);
    height: auto;
    margin: 8px 0 18px auto;
    direction: ltr;
}
.hero p { max-width: 640px; color: rgba(255,255,255,.84); font-size: 19px; font-weight: 500; }
.hero-media { min-width: 0; height: 100%; min-height: 560px; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.eyebrow { margin: 0 0 10px; color: var(--gold-500); font-weight: 800; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.btn { border: 1px solid transparent; cursor: pointer; font-weight: 800; }
.btn:hover { transform: translateY(-2px); }
.btn.primary { background: var(--gold-500); color: var(--navy-950); }
.btn.ghost { border-color: rgba(201,164,93,.42); color: inherit; background: transparent; }
.btn.light { background: var(--white); color: var(--navy-900); }
.btn.full { width: 100%; }

.trust-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 34px 0 0; max-width: 540px; }
.trust-strip div, .collection-card, .form-panel, .summary-box, .dash-panel, .table-panel, .dash-form, .login-panel {
    border: 1px solid rgba(201,164,93,.25);
    background: rgba(255,255,255,.88);
    box-shadow: var(--shadow);
}
.trust-strip div { padding: 18px; background: rgba(255,255,255,.075); color: var(--white); text-align: right; border-color: rgba(201,164,93,.34); }
.trust-strip dt { color: var(--gold-300); font-size: 13px; }
.trust-strip dd { margin: 0; font-weight: 800; font-size: 20px; }

.section { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 74px 0; }
.section-head { display: grid; justify-items: center; text-align: center; gap: 10px; max-width: 760px; margin: 0 auto 34px; }
.section-head h2, .page-hero h1, .detail-copy h1, .success-state h1 { margin: 0; color: var(--navy-950); font-size: clamp(28px, 3.1vw, 44px); line-height: 1.28; }
.section-head .btn { margin-top: 8px; }
.section-head.light h2, .section-head.light { color: var(--white); }
.collection-grid, .product-grid, .metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.collection-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 900px; margin: 0 auto; }
.collection-card {
    position: relative;
    padding: 28px;
    border-radius: 8px;
    min-height: 190px;
    background: linear-gradient(180deg, #ffffff, #fbfcfe);
}
.collection-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border-top: 3px solid rgba(201,164,93,.72);
    pointer-events: none;
}
.collection-card span { color: var(--gold-500); font-weight: 800; font-size: 14px; }
.collection-card h3 { color: var(--navy-900); margin: 22px 0 12px; font-size: 22px; }
.collection-card p { margin: 0; color: #26364a; }
.navy-band { width: 100%; max-width: none; padding: 78px max(16px, calc((100vw - 1180px) / 2)); background: linear-gradient(180deg, var(--navy-900), var(--navy-950)); }
.product-card { background: var(--white); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; min-width: 0; box-shadow: 0 12px 30px rgba(15,23,42,.08); }
.product-image { position: relative; aspect-ratio: 4 / 5; background: #dbe4ef; display: block; overflow: hidden; }
.product-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.product-card:hover img { transform: scale(1.04); }
.badge { position: absolute; top: 12px; right: 12px; background: var(--navy-950); color: var(--gold-300); padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.product-info { padding: 18px; }
.product-info h3 { margin: 4px 0 8px; color: var(--navy-950); }
.product-info p { margin: 0 0 10px; color: var(--muted); }
.muted { color: var(--muted); font-size: 13px; }
.price-row { display: flex; align-items: center; gap: 10px; color: var(--navy-900); }
.price-row span { color: var(--muted); text-decoration: line-through; }
.image-fallback { width: 100%; height: 100%; display: grid; place-items: center; font: 700 50px Cormorant, serif; color: var(--gold-500); }

.split, .checkout-layout, .cart-layout, .product-detail, .dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
.split h2 { font-size: clamp(28px, 3vw, 42px); line-height: 1.3; margin: 0 0 16px; color: var(--navy-950); }
.split p { color: #334155; font-size: 17px; }
.steps { display: grid; gap: 12px; }
.steps div { display: flex; align-items: center; gap: 16px; padding: 18px; border-right: 4px solid var(--gold-500); background: var(--white); }
.steps strong { color: var(--gold-500); font-size: 24px; }
.form-panel, .summary-box, .dash-form, .login-panel { border-radius: 8px; padding: 24px; }
.form-panel p, .dash-form p, .login-panel p { margin: 0 0 16px; }
label { display: grid; gap: 7px; font-weight: 700; color: var(--navy-900); }
form p { margin: 0 0 14px; }
.helptext { display: block; color: var(--muted); font-size: 12px; font-weight: 500; margin-top: 4px; }
.errorlist { margin: 0 0 12px; padding: 10px 14px; list-style: none; color: var(--danger); background: #fff5f5; border: 1px solid #fecaca; border-radius: 8px; }
input, textarea, select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
    background: var(--white);
    color: var(--ink);
}
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus, button:focus, a:focus { outline: 3px solid rgba(201,164,93,.45); outline-offset: 2px; }
.page-hero { background: var(--navy-950); color: var(--white); padding: 70px max(16px, calc((100vw - 1180px) / 2)); }
.page-hero h1, .page-hero p { color: var(--white); }
.compact { min-height: 260px; display: grid; align-content: center; }
.filter-bar { display: grid; grid-template-columns: 1fr 220px auto; gap: 12px; margin-bottom: 28px; }
.light-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.product-detail { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 70px 0; }
.detail-media img, .detail-media .image-fallback { border-radius: 8px; aspect-ratio: 1 / 1; object-fit: cover; background: #e8eef5; }
.specs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 24px 0; }
.specs div, .line-item, .summary-box div { background: var(--white); border: 1px solid var(--line); padding: 14px; border-radius: 8px; }
.specs dt, .summary-box span { color: var(--muted); font-size: 13px; }
.specs dd { margin: 0; font-weight: 800; }
.detail-price { display: block; color: var(--navy-900); font-size: 28px; margin-bottom: 18px; }
.purchase-box { display: grid; gap: 14px; }
.line-item { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; margin-bottom: 12px; }
.link-button { border: 0; background: transparent; color: var(--danger); cursor: pointer; min-height: 44px; }
.summary-box { display: grid; gap: 10px; position: sticky; top: 92px; }
.summary-box div { display: flex; justify-content: space-between; gap: 12px; }
.summary-total { border-color: var(--gold-500) !important; }
.success-state, .payment-screen { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 50px 16px; }
.payment-card { width: min(520px, 100%); background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 28px; box-shadow: var(--shadow); }
.summary-box.static { position: static; margin: 20px 0; box-shadow: none; }
.hero-actions.center { justify-content: center; margin-left: auto; margin-right: auto; }

.account-auth {
    min-height: calc(100vh - 72px);
    display: grid;
    place-items: center;
    padding: 54px 16px;
    background: radial-gradient(circle at 70% 10%, rgba(30,92,153,.42), transparent 34%), var(--navy-950);
}
.auth-panel {
    width: min(460px, 100%);
    padding: 30px;
    border-radius: 8px;
    background: var(--white);
    border: 1px solid rgba(201,164,93,.26);
    box-shadow: 0 26px 80px rgba(0,0,0,.22);
}
.auth-panel h1 { margin: 0 0 8px; color: var(--navy-950); font-size: clamp(28px, 4vw, 38px); }
.auth-panel > p { color: #334155; }
.auth-switch { margin: 18px 0 0; color: var(--muted); text-align: center; }
.auth-switch a { color: var(--navy-800); font-weight: 800; }

.account-layout { display: grid; grid-template-columns: 320px 1fr; gap: 28px; align-items: start; }
.account-side, .empty-state, .order-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    box-shadow: var(--shadow);
}
.account-side { display: grid; gap: 16px; padding: 22px; position: sticky; top: 96px; }
.account-side strong { color: var(--navy-950); font-size: 20px; }
.account-side dl { margin: 0; display: grid; gap: 10px; }
.account-side dl div { padding: 12px; border-radius: 8px; background: #f8fafc; border: 1px solid var(--line); }
.account-side dt { color: var(--muted); font-size: 12px; }
.account-side dd { margin: 0; color: var(--navy-950); font-weight: 800; overflow-wrap: anywhere; }
.account-main { min-width: 0; }
.account-title { grid-template-columns: 1fr auto; justify-items: stretch; text-align: right; max-width: none; }
.order-list { display: grid; gap: 12px; }
.order-card {
    min-height: 82px;
    display: grid;
    grid-template-columns: 90px 1fr 110px 150px;
    gap: 12px;
    align-items: center;
    padding: 18px;
    transition: transform .2s ease, border-color .2s ease;
}
.order-card:hover { transform: translateY(-2px); border-color: rgba(201,164,93,.58); }
.order-card span { color: var(--gold-500); font-weight: 800; direction: ltr; text-align: right; }
.order-card strong { color: var(--navy-950); }
.order-card small { color: var(--muted); }
.order-card b { color: var(--navy-900); text-align: left; }
.empty-state { padding: 28px; text-align: center; }
.empty-state h3 { margin: 0 0 8px; color: var(--navy-950); }
.empty-state p { color: var(--muted); }
.status-pill { display: inline-flex; align-items: center; min-height: 34px; padding: 6px 12px; border-radius: 999px; background: rgba(201,164,93,.16); color: var(--navy-950); font-weight: 800; }
.narrow-section { width: min(760px, calc(100% - 32px)); }

.messages { position: fixed; left: 18px; top: 88px; z-index: 30; display: grid; gap: 8px; max-width: 360px; }
.messages.inline { position: static; max-width: none; margin-bottom: 18px; }
.message { padding: 12px 14px; border-radius: 8px; background: var(--white); border-right: 4px solid var(--gold-500); box-shadow: var(--shadow); }
.empty { color: var(--muted); }
.footer { padding: 34px 0; display: flex; justify-content: space-between; gap: 20px; color: var(--muted); }
.footer-links { display: flex; gap: 16px; }

.dashboard-body { display: grid; grid-template-columns: 280px 1fr; min-height: 100vh; background: #eef3f8; }
.dash-sidebar { background: var(--navy-950); color: var(--white); padding: 24px; position: sticky; top: 0; height: 100vh; }
.dash-sidebar nav { display: grid; gap: 8px; margin-top: 28px; }
.dash-sidebar a { min-height: 44px; display: flex; align-items: center; padding: 10px 12px; border-radius: 8px; color: rgba(255,255,255,.84); }
.dash-sidebar a:hover { background: rgba(255,255,255,.08); color: var(--white); }
.dash-main { padding: 28px; min-width: 0; }
.dash-topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 22px; }
.dash-topbar h1 { margin: 0; color: var(--navy-950); }
.metric-grid div { min-height: 130px; border-radius: 8px; background: var(--white); border: 1px solid var(--line); padding: 22px; box-shadow: var(--shadow); }
.metric-grid span { color: var(--muted); }
.metric-grid strong { display: block; color: var(--navy-900); font-size: 30px; margin-top: 10px; }
.dash-panel, .table-panel { padding: 20px; border-radius: 8px; background: var(--white); }
.panel-head, .action-bar, .form-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.dash-row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.table-panel { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { text-align: right; padding: 14px 12px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: 13px; }
.dash-form { max-width: 860px; }
.dash-form.narrow { max-width: 520px; }
.dash-form input[type="checkbox"] { width: auto; min-height: auto; }
.login-body { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(circle at top, var(--navy-800), var(--navy-950)); padding: 16px; }
.login-panel { width: min(420px, 100%); }
.login-panel .brand-mark { margin: 0 auto 12px; }

@media (max-width: 900px) {
    .hero, .split, .checkout-layout, .cart-layout, .product-detail, .dash-grid, .account-layout { grid-template-columns: 1fr; }
    .hero { min-height: auto; height: auto; max-height: none; }
    .hero-copy { padding: 54px 20px; }
    .hero-media { min-height: 360px; }
    .collection-grid, .product-grid, .metric-grid, .light-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-body { grid-template-columns: 1fr; }
    .dash-sidebar { position: static; height: auto; }
    .account-side { position: static; }
    .dash-sidebar nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .order-card { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
    .nav-toggle { display: block; }
    .nav-shell { position: relative; flex-wrap: wrap; gap: 12px; }
    .nav-toggle { position: fixed; top: 13px; right: 16px; z-index: 12; background: rgba(255,255,255,.08); border-color: rgba(236,213,154,.42); }
    .nav-toggle::before { content: ""; display: block; width: 18px; height: 2px; margin: 0 auto; background: var(--white); box-shadow: 0 -6px 0 var(--white), 0 6px 0 var(--white); }
    .nav-toggle span { display: none; }
    .brand { margin-right: auto; }
    .brand-wordmark { width: 122px; }
    .nav-links { display: none; position: absolute; top: 72px; left: 16px; right: 16px; padding: 12px; background: var(--navy-900); border: 1px solid rgba(255,255,255,.12); border-radius: 8px; }
    .nav-links.is-open { display: grid; }
    .trust-strip, .collection-grid, .product-grid, .metric-grid, .light-grid, .filter-bar, .specs { grid-template-columns: 1fr; }
    .line-item { grid-template-columns: 1fr; }
    .footer, .dash-topbar, .panel-head, .action-bar, .form-actions { align-items: stretch; flex-direction: column; }
    .section { padding: 52px 0; }
    .hero { display: flex; flex-direction: column; width: 100%; }
    .hero-copy { width: 100%; padding: 50px 32px 42px; text-align: center; overflow: hidden; }
    .hero-wordmark { width: min(300px, 100%); margin-left: auto; margin-right: auto; }
    .hero p { max-width: 310px; margin-left: auto; margin-right: auto; font-size: 16px; overflow-wrap: anywhere; }
    .hero-actions { width: min(280px, 100%); margin-left: auto; margin-right: auto; flex-direction: column; align-items: stretch; justify-content: center; }
    .hero-actions .btn { width: 100%; }
    .hero-media { width: 100%; min-height: 280px; }
    .trust-strip { width: min(280px, 100%); margin-left: auto; margin-right: auto; }
    .trust-strip div { text-align: center; }
    .messages { right: 16px; left: 16px; max-width: none; }
    .dash-main { padding: 18px; }
    .auth-panel { padding: 22px; }
    .account-title { grid-template-columns: 1fr; text-align: center; }
    .order-card { grid-template-columns: 1fr; text-align: center; }
    .order-card span, .order-card b { text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
    *, html { scroll-behavior: auto; transition: none !important; animation: none !important; }
}
