:root {
    --cream: #fbf5ea;
    --paper: #fffdf9;
    --burgundy: #6b1836;
    --burgundy-dark: #421022;
    --gold: #b98b42;
    --ink: #2f2528;
    --muted: #776b6e;
    --line: #eadfce;
    --success: #386641;
    --shadow: 0 18px 50px rgba(66, 16, 34, .09);
}

* { box-sizing: border-box; }

html { font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
}

a { color: inherit; }

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 1.1rem clamp(1.25rem, 5vw, 5rem);
    border-bottom: 1px solid var(--line);
    background: rgba(255, 253, 249, .96);
    position: sticky;
    top: 0;
    z-index: 10;
}

.brand {
    display: flex;
    align-items: center;
    gap: .8rem;
    text-decoration: none;
}

.brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--burgundy);
    color: white;
    display: grid;
    place-items: center;
    font-family: Georgia, serif;
    letter-spacing: .06em;
}

.brand strong, .brand small { display: block; }
.brand strong { font-family: Georgia, serif; color: var(--burgundy-dark); }
.brand small { color: var(--gold); margin-top: .15rem; }

.site-header nav {
    display: flex;
    gap: 1.25rem;
    font-weight: 650;
}

.site-header nav a { text-decoration: none; }
.site-header nav a:hover { color: var(--burgundy); }

main { min-height: 70vh; }

.hero {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    min-height: 600px;
    background: var(--cream);
    padding: clamp(3rem, 7vw, 7rem) clamp(1.25rem, 7vw, 8rem);
    align-items: center;
    gap: 4rem;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: .18em;
    font-size: .72rem;
    color: var(--gold);
    font-weight: 800;
}

.hero h1, .page-banner h1, .product-detail h1, .section h1 {
    font-family: Georgia, "Times New Roman", serif;
    color: var(--burgundy-dark);
    margin: .45rem 0 1rem;
}

.hero h1 {
    font-size: clamp(3.4rem, 7vw, 6.5rem);
    line-height: .92;
}

.hero p, .page-banner p {
    color: var(--muted);
    font-size: 1.08rem;
    line-height: 1.7;
    max-width: 620px;
}

.hero-card {
    min-height: 380px;
    border-radius: 48% 48% 18px 18px;
    border: 1px solid rgba(185, 139, 66, .4);
    padding: 1rem;
    background: #f7ead8;
    box-shadow: var(--shadow);
    display: grid;
    place-items: center;
}

.hero-card-inner {
    text-align: center;
    font-family: Georgia, serif;
    color: var(--burgundy);
}

.hero-card-inner span, .hero-card-inner strong, .hero-card-inner small { display: block; }
.hero-card-inner span { font-size: 2rem; }
.hero-card-inner strong { font-size: 4.2rem; line-height: 1; }
.hero-card-inner small { color: var(--gold); font-family: inherit; margin-top: .8rem; }

.section {
    padding: clamp(3rem, 7vw, 6rem) clamp(1.25rem, 6vw, 6rem);
}

.section.narrow {
    max-width: 900px;
    margin: 0 auto;
}

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

.section-heading h2, .section-heading h1 {
    font-family: Georgia, serif;
    color: var(--burgundy-dark);
    margin: .4rem 0 0;
    font-size: clamp(2rem, 4vw, 3rem);
}

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

.product-card {
    border: 1px solid var(--line);
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(47, 37, 40, .04);
}

.product-image {
    aspect-ratio: 1 / .82;
    background: var(--cream);
    display: grid;
    place-items: center;
    overflow: hidden;
    text-decoration: none;
}

.product-image img,
.product-detail-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-placeholder {
    font-family: Georgia, serif;
    font-size: 3rem;
    color: var(--burgundy);
    width: 100%;
    height: 100%;
    min-height: 220px;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 30% 20%, rgba(185,139,66,.18), transparent 34%),
        var(--cream);
}

.product-card-body { padding: 1.2rem; }
.product-category { color: var(--gold); font-size: .8rem; font-weight: 750; text-transform: uppercase; }
.product-card h3 { margin: .45rem 0 1rem; font-family: Georgia, serif; font-size: 1.35rem; }
.product-card h3 a { text-decoration: none; }
.product-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.product-card-footer > a { color: var(--burgundy); font-weight: 750; }

.page-banner {
    background: var(--cream);
    padding: clamp(3rem, 6vw, 6rem) clamp(1.25rem, 7vw, 7rem);
}
.page-banner h1 { font-size: clamp(3rem, 6vw, 5.5rem); }
.admin-banner { background: #f7efe6; }

.product-detail {
    padding: clamp(2rem, 6vw, 6rem) clamp(1.25rem, 7vw, 7rem);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 6vw, 6rem);
    align-items: center;
}

.product-detail-media {
    min-height: 500px;
    border-radius: 26px;
    overflow: hidden;
    background: var(--cream);
}

.product-detail-copy h1 { font-size: clamp(2.8rem, 5vw, 5rem); }
.product-detail-copy p { line-height: 1.7; color: var(--muted); }
.price-large { font-size: 1.55rem !important; color: var(--burgundy) !important; font-weight: 800; }

.variant-list {
    border-top: 1px solid var(--line);
    margin: 1rem 0 2rem;
}
.variant-list div {
    display: flex;
    justify-content: space-between;
    padding: .9rem 0;
    border-bottom: 1px solid var(--line);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: .75rem 1.2rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.button-primary { background: var(--burgundy); color: white; }
.button-secondary { border-color: var(--line); background: white; color: var(--ink); }
.button-disabled { background: #e7ded3; color: #8a7d78; cursor: not-allowed; }

.admin-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.admin-tile {
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 2rem;
    text-decoration: none;
    background: white;
}
.admin-tile span, .admin-tile strong, .admin-tile small { display: block; }
.admin-tile span { color: var(--gold); font-size: .78rem; text-transform: uppercase; font-weight: 800; }
.admin-tile strong { color: var(--burgundy-dark); font-family: Georgia, serif; font-size: 1.8rem; margin: .5rem 0; }
.admin-tile small { color: var(--muted); }
.admin-tile.muted { opacity: .6; }

.admin-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 18px;
}
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}
.admin-table th, .admin-table td {
    text-align: left;
    padding: 1rem;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
}
.admin-table th { background: var(--cream); color: var(--burgundy-dark); }
.admin-table td small { display: block; color: var(--muted); margin-top: .25rem; }

.form-card {
    border: 1px solid var(--line);
    background: white;
    border-radius: 20px;
    padding: clamp(1.25rem, 4vw, 2.5rem);
    box-shadow: var(--shadow);
}

.form-card label {
    display: block;
    margin: 1rem 0 .4rem;
    font-weight: 750;
}

.form-card input, .form-card textarea, .form-card select {
    width: 100%;
    min-height: 46px;
    border: 1px solid #d9cbbb;
    border-radius: 10px;
    padding: .75rem .85rem;
    font: inherit;
    background: white;
}

.form-card textarea { min-height: 120px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-actions { display: flex; justify-content: flex-end; gap: .75rem; margin-top: 1.5rem; }
.field-validation-error, .validation-summary-errors { color: #9c233f; font-size: .9rem; }
.alert-success {
    padding: 1rem 1.2rem;
    border-radius: 12px;
    background: #edf6ee;
    color: var(--success);
    margin-bottom: 1rem;
}

.site-footer {
    padding: 2rem clamp(1.25rem, 5vw, 5rem);
    border-top: 1px solid var(--line);
    color: var(--muted);
    background: var(--cream);
}

@media (max-width: 950px) {
    .hero, .product-detail { grid-template-columns: 1fr; }
    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hero { min-height: auto; }
    .hero-card { min-height: 300px; }
}

@media (max-width: 620px) {
    .site-header { align-items: flex-start; }
    .site-header nav { gap: .75rem; font-size: .9rem; }
    .brand small { display: none; }
    .product-grid, .admin-actions, .form-grid { grid-template-columns: 1fr; }
    .section-heading { align-items: flex-start; flex-direction: column; }
}

/* Phase 2: secured administration */
.nav-form{display:inline;margin:0}.nav-form button{border:0;padding:0;background:transparent;font:inherit;font-weight:650;cursor:pointer;color:inherit}.nav-form button:hover{color:var(--burgundy)}
.login-shell{min-height:70vh;display:grid;place-items:center;padding:3rem 1.25rem;background:radial-gradient(circle at 20% 20%,rgba(185,139,66,.13),transparent 28%),var(--cream)}
.login-card{width:min(100%,480px);padding:clamp(1.5rem,5vw,3rem);border:1px solid var(--line);border-radius:24px;background:white;box-shadow:var(--shadow)}
.login-card h1{font-family:Georgia,"Times New Roman",serif;color:var(--burgundy-dark);font-size:clamp(2.4rem,6vw,3.7rem);margin:.5rem 0}.login-card p{color:var(--muted);line-height:1.6;margin-bottom:2rem}.login-card label{display:block;margin:1rem 0 .4rem;font-weight:750}.login-card input:not([type="checkbox"]){width:100%;min-height:48px;padding:.8rem .9rem;border:1px solid #d9cbbb;border-radius:10px;font:inherit}.full-width{width:100%;margin-top:1rem}
.checkbox-line{display:flex!important;align-items:center;gap:.6rem;margin:1rem 0!important;font-weight:650!important}.checkbox-line input[type="checkbox"]{width:18px;height:18px}.checkbox-line.compact{margin:0!important;white-space:nowrap}.form-hint{display:block;color:var(--muted);margin-top:.35rem}.alert-error{padding:1rem 1.2rem;border-radius:12px;background:#fff0f2;color:#9c233f;margin-bottom:1rem}
.status-pill{display:inline-flex;border-radius:999px;padding:.3rem .65rem;font-size:.78rem;font-weight:800}.status-live{background:#edf6ee;color:#386641}.status-hidden{background:#f0ece8;color:#776b6e}
.admin-image-preview{width:180px;aspect-ratio:1;border:1px solid var(--line);border-radius:16px;overflow:hidden;background:var(--cream);margin-bottom:1.5rem}.admin-image-preview img{width:100%;height:100%;object-fit:cover}
.admin-subsection{margin-top:2rem;border-top:1px solid var(--line);padding-top:2rem}.admin-subsection h2{font-family:Georgia,"Times New Roman",serif;color:var(--burgundy-dark);font-size:2rem;margin:.35rem 0 1.5rem}
.variant-admin-row{display:grid;grid-template-columns:1.3fr .7fr .65fr auto;gap:.75rem;align-items:center;border:1px solid var(--line);border-radius:14px;padding:.8rem;margin-bottom:.65rem;background:white}.variant-admin-row input:not([type="hidden"]):not([type="checkbox"]){min-height:42px;border:1px solid #d9cbbb;border-radius:9px;padding:.65rem .75rem;font:inherit}.add-variant{margin-top:1rem;border-style:dashed}@media(max-width:720px){.variant-admin-row{grid-template-columns:1fr}}


/* Phase 2 branding: original Rich Cravings logo */
.brand-logo-link {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.brand-logo-main {
    display: block;
    width: 112px;
    height: 112px;
    object-fit: contain;
}

.login-brand {
    display: flex;
    justify-content: center;
    margin: -0.4rem 0 1.25rem;
}

.login-brand-logo {
    display: block;
    width: 150px;
    height: 150px;
    object-fit: contain;
}

@media (max-width: 720px) {
    .brand-logo-main {
        width: 84px;
        height: 84px;
    }

    .login-brand-logo {
        width: 125px;
        height: 125px;
    }
}

@media (max-width: 520px) {
    .site-header {
        gap: 1rem;
        padding-top: .75rem;
        padding-bottom: .75rem;
    }

    .brand-logo-main {
        width: 72px;
        height: 72px;
    }
}
