:root {
    --bg: #ececea;
    --bg-soft: #f5f5f3;
    --white: #ffffff;
    --black: #000000;
    --text: #1a1a1a;
    --text-muted: #6d6d6d;
    --text-light: #b0b0b0;
    --hero-title: #c8c8c8;
    --card-dark: #5a5550;
    --card-darker: #3f3b37;
    --border: #e2e2e0;
    --danger: #c0392b;
    --success: #2d6a4f;
    --warning: #b8860b;
    --radius: 24px;
    --radius-pill: 999px;
    --shadow: 0 18px 50px rgba(0, 0, 0, .08);
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Vazirmatn', Tahoma, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-body);
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font-family: inherit; }

/* ── Site Header ── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--white);
    border-bottom: 1px solid var(--border);
}
.site-header-inner {
    width: min(1280px, calc(100% - 40px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 20px;
    padding: 18px 0;
}
.header-utilities {
    display: flex;
    align-items: center;
    gap: 18px;
    justify-self: start;
}
.header-utilities a,
.header-utilities button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text);
    background: none;
    border: 0;
    cursor: pointer;
    padding: 0;
    transition: opacity .2s;
}
.header-utilities a:hover { opacity: .65; }
.header-utilities svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.6; }

.header-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    flex-wrap: wrap;
}
.header-nav a {
    font-size: 14px;
    color: var(--text);
    padding: 4px 14px;
    transition: opacity .2s;
}
.header-nav a:hover { opacity: .6; }
.header-nav .nav-sep {
    color: var(--text-light);
    font-size: 12px;
    user-select: none;
}

.site-logo {
    display: flex;
    align-items: center;
    justify-self: end;
}
.site-logo .logo-img {
    height: 68px;
    width: auto;
    display: block;
    object-fit: contain;
}

/* ── Page Shell ── */
.page-shell {
    width: min(1280px, calc(100% - 40px));
    margin: 0 auto;
    padding: 32px 0 64px;
}
.page-shell.full-bleed {
    width: 100%;
    max-width: none;
    padding: 0;
}

.flash {
    width: min(1280px, calc(100% - 40px));
    margin: 16px auto 0;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 14px;
    border: 1px solid var(--border);
    background: var(--white);
}
.flash.success { color: var(--success); border-color: rgba(45, 106, 79, .3); }
.flash.error { color: var(--danger); border-color: rgba(192, 57, 43, .3); }

/* ── Hero Banner (Landing) ── */
.hero-banner {
    position: relative;
    min-height: 78vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--bg);
    padding: 40px 0 60px;
}
.hero-watermark {
    position: absolute;
    left: 8%;
    top: 50%;
    transform: translateY(-50%);
    width: min(420px, 38vw);
    opacity: .12;
    pointer-events: none;
}
.hero-watermark svg { width: 100%; height: auto; }
.hero-content {
    position: relative;
    z-index: 2;
    width: min(1280px, calc(100% - 40px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 40px;
}
.hero-text-block { position: relative; }
.hero-display-title {
    font-family: var(--font-display);
    font-size: clamp(52px, 8vw, 110px);
    font-weight: 700;
    line-height: .95;
    color: var(--hero-title);
    margin: 0;
    letter-spacing: -2px;
}
.hero-display-title span { display: block; }
.hero-byline {
    font-family: var(--font-display);
    font-size: clamp(16px, 2vw, 22px);
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--text);
    margin: 20px 0 28px;
    text-transform: uppercase;
}
.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3;
}
.hero-product-img {
    width: min(380px, 80%);
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 24px 48px rgba(0, 0, 0, .15));
    position: relative;
    z-index: 2;
}
.hero-product-placeholder {
    width: min(320px, 70%);
    aspect-ratio: 1;
    border-radius: 50%;
    background: linear-gradient(145deg, #f0f0ee, #ddd);
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-size: 14px;
    letter-spacing: 2px;
    color: var(--text-muted);
    border: 1px solid var(--border);
    box-shadow: 0 24px 48px rgba(0, 0, 0, .1);
}
.hero-cta-wrap { margin-top: 8px; }

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 12px 28px;
    border-radius: var(--radius-pill);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--black);
    background: var(--black);
    color: var(--white);
    transition: .2s ease;
    text-align: center;
}
.btn:hover { background: #222; border-color: #222; transform: translateY(-1px); }
.btn-light {
    background: var(--white);
    color: var(--black);
    border-color: var(--white);
}
.btn-light:hover { background: #f0f0f0; border-color: #f0f0f0; }
.btn-outline {
    background: transparent;
    color: var(--black);
    border-color: var(--black);
}
.btn-outline:hover, .btn.secondary:hover { background: var(--black); color: var(--white); }
.btn.secondary {
    background: transparent;
    color: var(--black);
    border-color: var(--black);
}
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ── Access Section (Login + Membership) ── */
.access-section {
    background: var(--white);
    padding: 72px 0 88px;
    border-top: 1px solid var(--border);
}
.access-section-inner {
    width: min(1100px, calc(100% - 40px));
    margin: 0 auto;
}
.section-heading-center {
    text-align: center;
    margin-bottom: 48px;
}
.section-heading-center h2 {
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 800;
    margin: 0 0 12px;
}
.section-heading-center p {
    color: var(--text-muted);
    margin: 0;
    font-size: 15px;
}
.auth-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 32px;
    align-items: start;
}

/* ── Cards ── */
.card {
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
}
.card h2 {
    font-size: 22px;
    font-weight: 800;
    margin: 0 0 6px;
}
.section-kicker {
    display: block;
    font-size: 12px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.form-grid { display: grid; gap: 16px; }
.form-grid.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.full-row { grid-column: 1 / -1; }
label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
}
input, textarea, select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--white);
    color: var(--text);
    font-size: 14px;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, textarea:focus, select:focus {
    border-color: var(--black);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, .06);
}
input::placeholder, textarea::placeholder { color: #aaa; }
.muted { color: var(--text-muted); }
.small { font-size: 13px; }
.demo-access {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}
.align-end { justify-self: start; }

/* ── Collection Showcase (Split) ── */
.collections-section {
    padding: 64px 0;
    background: var(--white);
}
.collections-section-title {
    text-align: center;
    font-size: clamp(22px, 3vw, 30px);
    font-weight: 800;
    margin: 0 0 40px;
}
.collection-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 420px;
}
.collection-split.reverse { direction: ltr; }
.collection-split.reverse > * { direction: rtl; }
.collection-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 48px 40px;
    position: relative;
    overflow: hidden;
}
.collection-panel.dark {
    background: var(--black);
    color: var(--white);
}
.collection-panel.dark .collection-watermark {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    opacity: .08;
    pointer-events: none;
}
.collection-panel.dark .collection-watermark svg { width: 200px; height: 200px; }
.collection-panel h3 {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 800;
    margin: 0 0 16px;
    position: relative;
    z-index: 1;
}
.collection-panel p {
    font-size: 14px;
    line-height: 2;
    max-width: 340px;
    margin: 0 0 28px;
    opacity: .85;
    position: relative;
    z-index: 1;
}
.collection-panel .btn { position: relative; z-index: 1; }
.collection-image {
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-height: 320px;
}
.collection-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.collection-image-placeholder {
    width: 100%;
    height: 100%;
    min-height: 420px;
    background: linear-gradient(135deg, #e8e6e3 0%, #d4d2cf 100%);
    display: grid;
    place-items: center;
    color: var(--text-muted);
    font-size: 14px;
}

/* ── Products Section ── */
.products-section {
    padding: 72px 0 80px;
    background: var(--bg);
}
.products-section-header {
    width: min(1280px, calc(100% - 40px));
    margin: 0 auto 36px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}
.products-section-header h2 {
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 800;
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.products-section-header .heading-icon {
    width: 28px;
    height: 28px;
    opacity: .7;
}
.products-section-header p {
    color: var(--text-muted);
    margin: 0;
    font-size: 14px;
    max-width: 520px;
}

/* Category Tabs */
.tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 32px;
    width: min(1280px, calc(100% - 40px));
    margin-left: auto;
    margin-right: auto;
}
.tab {
    padding: 10px 18px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    color: var(--text-muted);
    border: 1px solid var(--border);
    background: var(--white);
    transition: .2s;
}
.tab span { margin-right: 6px; font-weight: 700; }
.tab.active, .tab:hover {
    background: var(--black);
    color: var(--white);
    border-color: var(--black);
}
.tab.active span, .tab:hover span { color: var(--white); }

/* Product Carousel */
.products-carousel-wrap {
    position: relative;
    width: min(1280px, calc(100% - 40px));
    margin: 0 auto;
}
.products-carousel {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 8px 4px 16px;
}
.products-carousel::-webkit-scrollbar { display: none; }
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 0;
    background: var(--card-dark);
    color: var(--white);
    cursor: pointer;
    display: grid;
    place-items: center;
    z-index: 5;
    transition: background .2s;
    box-shadow: var(--shadow);
}
.carousel-btn:hover { background: var(--black); }
.carousel-btn.prev { right: -20px; }
.carousel-btn.next { left: -20px; }
.carousel-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }

/* Product Card (Azadeh style) */
.product-card-v2 {
    flex: 0 0 min(320px, 85vw);
    scroll-snap-align: start;
    background: var(--card-dark);
    border-radius: var(--radius);
    padding: 24px 22px 22px;
    color: var(--white);
    display: flex;
    flex-direction: column;
    min-height: 480px;
}
.product-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}
.product-card-info h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 6px;
    line-height: 1.4;
}
.product-card-info h3 a { color: var(--white); }
.product-card-info h3 a:hover { opacity: .8; }
.product-card-meta {
    font-size: 12px;
    opacity: .7;
}
.product-card-price {
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
}
.product-card-v2 .btn {
    width: 100%;
    margin-bottom: 20px;
    background: var(--white);
    color: var(--black);
    border-color: var(--white);
    font-size: 13px;
    min-height: 40px;
    padding: 10px 20px;
}
.product-card-v2 .btn:hover { background: #f0f0f0; }
.product-card-v2 .btn.secondary {
    background: transparent;
    color: var(--white);
    border-color: rgba(255, 255, 255, .4);
    margin-bottom: 0;
}
.product-card-v2 .btn.secondary:hover { background: rgba(255, 255, 255, .12); color: var(--white); }
.product-card-image-wrap {
    flex: 1;
    background: #e8e6e3;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-height: 240px;
    margin-top: auto;
}
.product-card-image-wrap img {
    width: 85%;
    height: 85%;
    object-fit: contain;
}
.product-card-image-wrap .product-placeholder {
    width: 100%;
    height: 100%;
    min-height: 240px;
    display: grid;
    place-items: center;
    color: var(--text-muted);
    font-size: 13px;
    background: transparent;
    border: 0;
}

/* Grid fallback for product list */
.product-grid-v2 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    width: min(1280px, calc(100% - 40px));
    margin: 0 auto;
}
.product-grid-v2 .product-card-v2 {
    flex: unset;
    min-height: 460px;
}

/* ── Collection Head (logged-in page title) ── */
.collection-head {
    width: min(1280px, calc(100% - 40px));
    margin: 0 auto 8px;
    padding-top: 16px;
}
.collection-head .eyebrow {
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
    display: block;
    margin-bottom: 8px;
}
.page-title {
    font-size: clamp(28px, 3.5vw, 40px);
    font-weight: 800;
    margin: 0 0 8px;
}

/* ── Product Detail ── */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
    width: min(1100px, calc(100% - 40px));
    margin: 0 auto;
    padding-top: 24px;
}
.detail-image-wrap {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.detail-image {
    width: 100%;
    max-height: 520px;
    object-fit: contain;
}
.detail-copy {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
}
.detail-copy .eyebrow {
    font-size: 12px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    display: block;
    margin-bottom: 10px;
}
.detail-copy h1 {
    font-size: clamp(26px, 3vw, 36px);
    font-weight: 800;
    margin: 0;
    line-height: 1.35;
}
.detail-price {
    font-size: 24px;
    font-weight: 700;
    margin: 20px 0;
    color: var(--text);
}
.detail-copy p { color: var(--text-muted); line-height: 2.1; }
.notice-box {
    margin-top: 20px;
    padding: 16px;
    border-radius: 14px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.9;
}
.card-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px;
    color: var(--text-muted);
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

/* ── Admin & Tables (light theme) ── */
.admin-hero { margin-bottom: 24px; }
.admin-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin: 24px 0;
}
.mini-card {
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--white);
    transition: box-shadow .2s;
}
.mini-card:hover { box-shadow: var(--shadow); }
.mini-card strong {
    display: block;
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 4px;
}
.mini-card span { color: var(--text-muted); font-size: 14px; }

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
}
table { width: 100%; border-collapse: collapse; min-width: 880px; }
th, td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
    text-align: right;
}
th {
    background: var(--bg-soft);
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}
tr:last-child td { border-bottom: 0; }
.link { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.thumb {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--border);
    margin-bottom: 8px;
}
.badge, .status {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 600;
    background: var(--bg-soft);
    border: 1px solid var(--border);
}
.status.pending { color: var(--warning); background: #fef9e7; border-color: #f9e79f; }
.status.reviewing, .status.need_call, .status.contacted { color: #2471a3; background: #ebf5fb; border-color: #aed6f1; }
.status.approved { color: var(--success); background: #eafaf1; border-color: #a9dfbf; }
.status.rejected { color: var(--danger); background: #fdedec; border-color: #f5b7b1; }
.admin-actions { display: grid; gap: 10px; min-width: 260px; }
.compact-actions { padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--border); }
.compact-actions:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.create-user-box {
    background: var(--bg-soft);
    padding: 14px;
    border-radius: 14px;
    border: 1px solid var(--border);
}
.form-section, .narrow-card { margin: 24px 0; }
.narrow-card { max-width: 560px; }
.form-inline { display: flex; gap: 12px; align-items: end; }
.form-inline input { max-width: 360px; }
.split { display: grid; grid-template-columns: .85fr 1.15fr; gap: 24px; align-items: start; }
.product-summary h2 { margin: 12px 0; }
.product-summary p { color: var(--text-muted); line-height: 2; }

/* ── Site Footer ── */
.site-footer {
    background: var(--white);
    border-top: 1px solid var(--border);
    padding: 32px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .hero-content { grid-template-columns: 1fr; text-align: center; }
    .hero-text-block { order: 2; }
    .hero-visual { order: 1; }
    .hero-display-title { font-size: clamp(40px, 12vw, 72px); }
    .auth-grid { grid-template-columns: 1fr; }
    .collection-split { grid-template-columns: 1fr; }
    .collection-split.reverse { direction: rtl; }
    .product-detail { grid-template-columns: 1fr; }
    .admin-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .carousel-btn.prev { right: 4px; }
    .carousel-btn.next { left: 4px; }
}
@media (max-width: 768px) {
    .site-header-inner {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 14px;
    }
    .site-logo { justify-self: center; order: -1; }
    .site-logo .logo-img { height: 52px; }
    .header-nav { order: 1; }
    .header-utilities { justify-self: center; order: 2; }
    .header-nav a { padding: 4px 8px; font-size: 13px; }
    .form-grid.two-col { grid-template-columns: 1fr; }
    .admin-cards { grid-template-columns: 1fr; }
    .products-section-header { flex-direction: column; }
    .split { grid-template-columns: 1fr; }
    .form-inline { flex-direction: column; align-items: stretch; }
    .form-inline input { max-width: unset; }
    .page-shell { width: calc(100% - 24px); padding: 20px 0 48px; }
    .card { padding: 24px; }
}
