:root {
    --sand: #f3ede4;
    --stone: #e3d7c6;
    --ink: #171412;
    --muted: #6f665d;
    --accent: #b5542f;
    --accent-dark: #8c3f22;
    --card: rgba(255, 252, 247, 0.9);
    --line: rgba(23, 20, 18, 0.12);
    --success: #1f6b4f;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body.marketplace-body {
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(181, 84, 47, 0.12), transparent 32%),
        radial-gradient(circle at top right, rgba(227, 215, 198, 0.9), transparent 28%),
        linear-gradient(180deg, #fbf8f2 0%, #f3ede4 52%, #f9f4eb 100%);
    font-family: "Space Grotesk", "Helvetica Neue", sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

.container-shell {
    width: min(1240px, calc(100vw - 2rem));
    margin: 0 auto;
}

.marketplace-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(18px);
    background: rgba(251, 248, 242, 0.82);
    border-bottom: 1px solid var(--line);
}

.marketplace-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 76px;
}

.brand-lockup {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.brand-lockup__mark {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--line);
}

.brand-lockup__name {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 1.8rem;
    line-height: 1;
    letter-spacing: 0.02em;
}

.brand-lockup__tag {
    color: var(--muted);
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.marketplace-nav {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    font-size: 0.95rem;
}

.marketplace-nav a {
    position: relative;
    padding: 0.2rem 0;
}

.marketplace-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -0.2rem;
    width: 100%;
    height: 2px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 160ms ease;
    background: var(--accent);
}

.marketplace-nav a:hover::after {
    transform: scaleX(1);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-badge,
.button-pill,
.button-outline {
    border-radius: 999px;
    padding: 0.8rem 1.2rem;
    font-size: 0.92rem;
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--ink);
    color: #fff;
    border: 1px solid var(--ink);
}

.button-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--line);
}

.button-pill:hover,
.button-outline:hover,
.header-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(23, 20, 18, 0.08);
}

.header-badge {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.7);
}

.hero {
    padding: 3rem 0 2rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 1.25rem;
}

.hero-feature,
.hero-panel,
.editorial-card,
.catalog-shell,
.checkout-grid,
.account-shell,
.auth-shell,
.product-shell,
.bag-shell {
    background: var(--card);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 24px 80px rgba(28, 22, 18, 0.08);
    border-radius: 28px;
}

.hero-feature {
    min-height: 580px;
    padding: 2.75rem;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    background:
        linear-gradient(180deg, rgba(23, 20, 18, 0.08), rgba(23, 20, 18, 0.36)),
        url("https://images.unsplash.com/photo-1483985988355-763728e1935b?auto=format&fit=crop&w=1200&q=80") center/cover;
}

.hero-feature__content {
    color: #fff7ef;
    max-width: 30rem;
}

.eyebrow {
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.78rem;
    color: var(--muted);
}

.hero-feature .eyebrow {
    color: rgba(255, 247, 239, 0.75);
}

.display-title,
.section-title,
.product-title,
.auth-title {
    font-family: "Cormorant Garamond", Georgia, serif;
    line-height: 0.95;
    margin: 0.6rem 0 1rem;
}

.display-title {
    font-size: clamp(3.2rem, 7vw, 5.4rem);
}

.section-title {
    font-size: clamp(2.2rem, 4vw, 3.6rem);
}

.hero-panel {
    display: grid;
    gap: 1rem;
    padding: 1rem;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.hero-panel__card {
    border-radius: 24px;
    padding: 1.6rem;
    min-height: 220px;
    background: linear-gradient(180deg, rgba(255,255,255,0.85), rgba(245,237,227,0.95));
    border: 1px solid var(--line);
}

.hero-panel__card--dark {
    background: linear-gradient(180deg, #221a17, #3b2922);
    color: #fff6ef;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
    margin-top: 1.4rem;
}

.hero-stats strong {
    display: block;
    font-size: 1.15rem;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.section-copy {
    color: var(--muted);
    max-width: 34rem;
    line-height: 1.7;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.product-card {
    display: block;
    border-radius: 22px;
    overflow: hidden;
    background: rgba(255,255,255,0.7);
    border: 1px solid var(--line);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 42px rgba(23, 20, 18, 0.1);
}

.product-card__media {
    aspect-ratio: 0.8;
    background: linear-gradient(180deg, rgba(227,215,198,0.85), rgba(255,255,255,0.9));
    overflow: hidden;
}

.product-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card__body {
    padding: 1rem;
}

.product-meta {
    color: var(--muted);
    font-size: 0.87rem;
}

.price-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.price-row strong {
    font-size: 1.05rem;
}

.price-row s {
    color: var(--muted);
}

.chip-row,
.vendor-grid,
.detail-points,
.summary-stack,
.form-grid,
.bag-lines,
.order-list {
    display: grid;
    gap: 1rem;
}

.chip-row {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.editorial-card {
    padding: 1.6rem;
}

.vendor-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.vendor-card {
    padding: 1.5rem;
    border-radius: 22px;
    background: rgba(255,255,255,0.72);
    border: 1px solid var(--line);
}

.vendor-card__avatar {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--stone), #fff);
    margin-bottom: 1rem;
}

.catalog-shell,
.product-shell,
.bag-shell,
.checkout-grid,
.account-shell,
.auth-shell {
    padding: 1.4rem;
    margin: 1.6rem auto 3rem;
}

.catalog-shell {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1.4rem;
}

.filter-panel,
.summary-panel,
.auth-panel,
.checkout-panel,
.detail-panel {
    border-radius: 24px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.72);
    padding: 1.3rem;
}

.filter-panel form,
.auth-form,
.checkout-form {
    display: grid;
    gap: 1rem;
}

.field label {
    display: block;
    font-size: 0.88rem;
    color: var(--muted);
    margin-bottom: 0.45rem;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    border: 1px solid rgba(23, 20, 18, 0.14);
    border-radius: 16px;
    padding: 0.95rem 1rem;
    background: rgba(255,255,255,0.82);
    font: inherit;
}

.field textarea {
    min-height: 120px;
    resize: vertical;
}

.field-inline {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.badge-sale,
.badge-soft,
.badge-state {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 999px;
    padding: 0.35rem 0.7rem;
    font-size: 0.78rem;
}

.badge-sale {
    background: rgba(181, 84, 47, 0.12);
    color: var(--accent-dark);
}

.badge-soft {
    background: rgba(23, 20, 18, 0.08);
    color: var(--muted);
}

.badge-state {
    background: rgba(31, 107, 79, 0.12);
    color: var(--success);
}

.product-shell {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 1.25rem;
}

.product-gallery {
    display: grid;
    gap: 1rem;
}

.product-gallery__main {
    border-radius: 28px;
    overflow: hidden;
    aspect-ratio: 0.85;
    background: rgba(255,255,255,0.88);
}

.product-gallery__main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumb-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

.thumb-grid img {
    border-radius: 18px;
    aspect-ratio: 1;
    object-fit: cover;
    border: 1px solid var(--line);
}

.detail-points {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bag-shell,
.account-shell {
    display: grid;
    grid-template-columns: 1.4fr 0.6fr;
    gap: 1.2rem;
}

.bag-line,
.order-card {
    display: grid;
    grid-template-columns: 112px 1fr auto;
    gap: 1rem;
    align-items: center;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.78);
    padding: 1rem;
}

.bag-line__image {
    width: 112px;
    height: 136px;
    border-radius: 18px;
    overflow: hidden;
    background: var(--sand);
}

.bag-line__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.summary-stack {
    position: sticky;
    top: 6.2rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--line);
}

.summary-row:last-child {
    border-bottom: 0;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 1.2rem;
}

.form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid .field--full {
    grid-column: 1 / -1;
}

.order-list {
    grid-template-columns: 1fr;
}

.order-card {
    grid-template-columns: 1fr auto;
}

.order-card__meta {
    color: var(--muted);
    font-size: 0.9rem;
}

.auth-shell {
    max-width: 1040px;
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 1rem;
}

.auth-story {
    min-height: 620px;
    border-radius: 28px;
    padding: 2.2rem;
    display: flex;
    align-items: flex-end;
    color: #fff8f2;
    background:
        linear-gradient(180deg, rgba(23,20,18,0.12), rgba(23,20,18,0.7)),
        url("https://images.unsplash.com/photo-1529139574466-a303027c1d8b?auto=format&fit=crop&w=1200&q=80") center/cover;
}

.auth-story__panel {
    max-width: 28rem;
}

.alert-inline {
    border-radius: 16px;
    padding: 0.95rem 1rem;
    border: 1px solid;
    font-size: 0.94rem;
}

.alert-inline--error {
    color: #8f2e23;
    background: rgba(201, 92, 70, 0.08);
    border-color: rgba(201, 92, 70, 0.24);
}

.alert-inline--info {
    color: #27445b;
    background: rgba(52, 114, 170, 0.08);
    border-color: rgba(52, 114, 170, 0.2);
}

.marketplace-footer {
    padding: 2rem 0 3rem;
    color: var(--muted);
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border-top: 1px solid var(--line);
    padding-top: 1.2rem;
}

@media (max-width: 1080px) {
    .hero-grid,
    .catalog-shell,
    .product-shell,
    .bag-shell,
    .checkout-grid,
    .account-shell,
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .product-grid,
    .vendor-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .marketplace-header__inner {
        flex-wrap: wrap;
        padding: 1rem 0;
    }

    .summary-stack {
        position: static;
    }
}

@media (max-width: 720px) {
    .container-shell {
        width: min(100vw - 1rem, 1240px);
    }

    .hero-feature,
    .auth-story,
    .catalog-shell,
    .product-shell,
    .bag-shell,
    .checkout-grid,
    .account-shell,
    .auth-shell {
        border-radius: 22px;
        padding: 1rem;
    }

    .display-title {
        font-size: 2.8rem;
    }

    .product-grid,
    .vendor-grid,
    .chip-row,
    .form-grid,
    .detail-points,
    .thumb-grid {
        grid-template-columns: 1fr;
    }

    .bag-line,
    .order-card {
        grid-template-columns: 1fr;
    }

    .bag-line__image {
        width: 100%;
        height: 260px;
    }

    .marketplace-nav,
    .header-actions {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
    }
}