:root {
    --bg: #f7f3eb;
    --surface: rgba(255, 255, 255, 0.78);
    --surface-solid: #fffdfa;
    --text: #231c14;
    --muted: #746555;
    --gold: #b88a2c;
    --gold-deep: #8c6415;
    --border: rgba(52, 40, 22, 0.12);
    --shadow: 0 30px 80px rgba(40, 25, 10, 0.12);
    --radius: 8px;
    --font-sans: Tahoma, "IRANSansX", "IRANSans", "Vazirmatn", "Segoe UI", sans-serif;
    --font-display: "IRANSansX", "IRANSans", "Vazirmatn", Tahoma, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body.site-body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    line-height: 1.75;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero {
    min-height: 100svh;
    padding: 28px clamp(20px, 4vw, 56px) 72px;
    background:
            linear-gradient(rgba(24, 18, 11, 0.28), rgba(24, 18, 11, 0.38)),
            url("https://images.unsplash.com/photo-1515562141207-7a88fb7ce338?auto=format&fit=crop&w=1600&q=80") center/cover no-repeat;
    color: #fffaf2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.topbar,
.hero-content,
.section-band,
.flow-shell,
.invoice-shell {
    width: min(1240px, 100%);
    margin: 0 auto;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.topbar-links {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.brand {
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 2vw, 1.8rem);
    font-weight: 800;
    letter-spacing: 0;
}

.hero-content {
    max-width: 760px;
    padding: 10svh 0 0;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--gold);
    font-size: 0.92rem;
}

.hero h1,
.section-head h2,
.flow-copy h1,
.invoice-header h1,
.boutique-panel h2 {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 800;
    line-height: 1.08;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 5rem);
    max-width: 12ch;
}

.hero-copy,
.section-head p,
.product-copy p,
.flow-copy p,
.boutique-panel p {
    color: rgba(255, 250, 242, 0.86);
    line-height: 1.9;
}

.hero-copy {
    max-width: 62ch;
    margin: 20px 0 28px;
}

.hero-actions,
.quote-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.primary-action,
.secondary-action,
.card-action {
    border-radius: var(--radius);
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 22px;
    font-weight: 700;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.primary-action {
    background: linear-gradient(135deg, #d2a648, #a86d11);
    color: #fffdf8;
    box-shadow: 0 18px 38px rgba(168, 109, 17, 0.26);
}

.secondary-action {
    background: rgba(255, 251, 245, 0.12);
    color: #fff8ee;
    border: 1px solid rgba(255, 248, 238, 0.24);
}

.card-action {
    background: #f1e4c7;
    color: #5f4307;
}

.primary-action:hover,
.secondary-action:hover,
.card-action:hover {
    transform: translateY(-1px);
}

.section-band {
    padding: 72px clamp(20px, 4vw, 56px);
}

.metrics-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    background: var(--surface-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px;
    box-shadow: var(--shadow);
    margin-top: -118px;
    position: relative;
}

.metrics-strip span,
.product-topline span,
.product-topline strong,
.product-meta dt,
.quote-breakdown dt,
.boutique-meta span,
.invoice-chip span {
    color: var(--muted);
    font-size: 0.92rem;
}

.metrics-strip strong,
.boutique-meta strong,
.invoice-chip strong {
    display: block;
    margin-top: 6px;
    font-size: 1rem;
}

.section-head {
    max-width: 720px;
    margin-bottom: 28px;
}

.section-head p,
.product-copy p,
.flow-copy p,
.boutique-panel p {
    color: var(--muted);
}

.section-head h2,
.flow-copy h1,
.invoice-header h1,
.boutique-panel h2 {
    font-size: clamp(1.9rem, 3vw, 3rem);
    margin-bottom: 12px;
}

.gallery-band {
    padding-top: 42px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.category-strip {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.category-chip {
    min-height: 44px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid rgba(52, 40, 22, 0.12);
    background: rgba(255, 253, 248, 0.82);
    color: var(--muted);
    font-weight: 700;
    transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.category-chip.is_active {
    background: #2f2416;
    border-color: #2f2416;
    color: #fff8ee;
}

.product-card,
.calculator-form,
.quote-panel,
.process-step,
.flow-card,
.invoice-panel {
    background: var(--surface);
    backdrop-filter: blur(18px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.product-card {
    overflow: hidden;
}

.product-media {
    aspect-ratio: 0.88;
}

.product-copy {
    padding: 20px;
}

.product-copy h3 {
    margin: 10px 0 8px;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.55rem;
}

.product-topline,
.product-meta,
.quote-breakdown,
.quote-breakdown.compact,
.invoice-grid {
    display: grid;
}

.product-topline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.product-meta,
.quote-breakdown {
    gap: 12px;
    margin: 20px 0 22px;
}

.product-meta div,
.quote-breakdown div {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(52, 40, 22, 0.08);
}

.product-meta dd,
.quote-breakdown dd,
.quote-breakdown.compact dd {
    margin: 0;
    text-align: left;
    font-weight: 700;
}

.calculator-layout,
.process-grid,
.flow-shell,
.invoice-grid,
.boutique-panel {
    display: grid;
    gap: 24px;
}

.calculator-layout {
    grid-template-columns: 1.05fr 0.95fr;
}

.calculator-form,
.quote-panel,
.flow-card,
.invoice-panel {
    padding: 24px;
}

.stack-form,
.calculator-form {
    display: grid;
    gap: 16px;
}

.empty-state {
    padding: 28px;
    background: rgba(255, 253, 248, 0.78);
    border: 1px dashed rgba(52, 40, 22, 0.18);
    border-radius: var(--radius);
}

.empty-state h3 {
    margin: 0 0 8px;
    font-family: var(--font-display);
    font-size: 1.3rem;
}

.empty-state p {
    margin: 0;
    color: var(--muted);
}

label {
    display: grid;
    gap: 10px;
}

label span {
    font-weight: 700;
}

input,
select {
    width: 100%;
    min-height: 48px;
    border-radius: var(--radius);
    border: 1px solid rgba(35, 28, 20, 0.14);
    padding: 0 14px;
    font-family: inherit;
    font-size: 1rem;
    background: rgba(255, 253, 248, 0.88);
}

.form-hint,
.error-text {
    margin: 0;
    font-size: 0.92rem;
}

.form-hint {
    color: var(--muted);
}

.error-text {
    color: #a32626;
}

.deposit-control {
    display: grid;
    gap: 16px;
    padding: 18px;
    border-radius: var(--radius);
    background: rgba(255, 251, 245, 0.78);
    border: 1px solid rgba(52, 40, 22, 0.1);
}

.deposit-header,
.deposit-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.deposit-header span,
.deposit-summary span,
.deposit-caption span {
    color: var(--muted);
    font-size: 0.92rem;
}

.deposit-header strong,
.deposit-summary strong,
.deposit-caption strong {
    display: block;
    margin-top: 6px;
    font-size: 1.08rem;
}

.deposit-caption {
    text-align: left;
}

.deposit-scale {
    display: flex;
    justify-content: space-between;
    color: var(--muted);
    font-size: 0.9rem;
}

input[type="range"] {
    padding: 0;
    appearance: none;
    min-height: 22px;
    border: 0;
    background: transparent;
}

input[type="range"]::-webkit-slider-runnable-track {
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, #d2a648, #8c6415);
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 24px;
    height: 24px;
    margin-top: -8px;
    border-radius: 50%;
    border: 2px solid #fff9f0;
    background: #2f2416;
    box-shadow: 0 8px 18px rgba(47, 36, 22, 0.24);
}

input[type="range"]::-moz-range-track {
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, #d2a648, #8c6415);
}

input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #fff9f0;
    background: #2f2416;
    box-shadow: 0 8px 18px rgba(47, 36, 22, 0.24);
}

.total-row dd,
.total-row dt {
    color: var(--gold-deep);
}

.full-width {
    width: 100%;
}

.process-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.process-step {
    padding: 22px;
}

.process-step strong {
    display: inline-flex;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    background: #f1e4c7;
    color: #5f4307;
}

.process-step h3 {
    margin: 16px 0 10px;
    font-size: 1.08rem;
}

.process-step p {
    margin: 0;
    color: var(--muted);
    line-height: 1.85;
}

.boutique-panel {
    grid-template-columns: 1.15fr 0.85fr;
    padding: 26px;
    background: #20180f;
    color: #fff7ea;
    border-radius: var(--radius);
}

.boutique-meta {
    display: grid;
    align-content: start;
    gap: 14px;
}

.flow-shell {
    grid-template-columns: 1.05fr 0.95fr;
    min-height: 100svh;
    align-items: center;
    padding: 48px clamp(20px, 4vw, 56px);
}

.flow-card,
.invoice-panel {
    background: rgba(255, 255, 255, 0.86);
}

.inline-quote {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--border);
}

.invoice-shell {
    padding: 42px clamp(20px, 4vw, 56px) 72px;
}

.invoice-header {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: end;
    margin-bottom: 24px;
}

.invoice-chip {
    padding: 18px 20px;
    background: rgba(255, 253, 248, 0.86);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.invoice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 1080px) {
    .product-grid,
    .process-grid,
    .calculator-layout,
    .flow-shell,
    .invoice-grid,
    .boutique-panel,
    .metrics-strip {
        grid-template-columns: 1fr;
    }

    .metrics-strip {
        margin-top: -56px;
    }
}

@media (max-width: 720px) {
    .hero {
        padding-inline: 20px;
        padding-bottom: 48px;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .topbar-links {
        gap: 12px;
    }

    .hero h1 {
        max-width: 10ch;
    }

    .invoice-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .product-topline,
    .metrics-strip,
    .product-meta div,
    .quote-breakdown div,
    .inline-quote {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: flex-start;
    }

    .deposit-header,
    .deposit-summary {
        grid-template-columns: 1fr;
    }

    .deposit-caption {
        text-align: right;
    }
}
