/* ============================================================================
   Verde & Co — fresh-market storefront. Warm, light, editorial. Not a default
   theme: hand-tuned palette, Fraunces display type, soft paper surfaces.
   (Brand name/logo are placeholders — swap for the client's own.)
   ============================================================================ */
:root {
    --paper:      #FBF6EC;   /* warm cream page */
    --paper-2:    #F4ECDD;   /* deeper cream band */
    --surface:    #FFFFFF;   /* cards */
    --ink:        #2B2420;   /* espresso text */
    --ink-soft:   #6F655C;   /* muted text */
    --line:       #E8DCC8;   /* hairlines */
    --clay:       #D2603A;   /* primary — terracotta */
    --clay-dk:    #B44C2B;
    --forest:     #1F4E3D;   /* secondary — pine */
    --honey:      #E8A33D;   /* highlight */
    --rose:       #F6EBE2;   /* soft image backdrop */
    --sage:       #EAF0E8;   /* soft tint */
    --danger:     #B4442E;
    --shadow:     0 10px 30px -12px rgba(43, 36, 32, .22);
    --shadow-sm:  0 4px 14px -8px rgba(43, 36, 32, .25);
    --radius:     18px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    color: var(--ink);
    background:
        radial-gradient(900px 500px at 100% -5%, rgba(232,163,61,.12), transparent 60%),
        radial-gradient(800px 500px at -10% 0%, rgba(31,78,61,.08), transparent 55%),
        var(--paper);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--forest); text-decoration: none; }
a:hover { color: var(--clay); }

h1, h2, h3 { font-family: "Fraunces", Georgia, serif; font-weight: 600; letter-spacing: -.01em; }

.shell { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.topbar {
    position: sticky; top: 0; z-index: 20;
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 20px; margin: 0 -20px 4px;
    background: rgba(251, 246, 236, .82);
    backdrop-filter: saturate(140%) blur(10px);
    border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.brand img { height: 42px; width: auto; max-width: 180px; object-fit: contain; display: block; }
.brand-name { font-family: "Fraunces", serif; font-weight: 600; font-size: 22px; line-height: 1; }
.brand-tag { display: block; font-family: "Inter", sans-serif; font-size: 10px; letter-spacing: .22em;
             text-transform: uppercase; color: var(--ink-soft); margin-top: 3px; }
.topbar nav { display: flex; gap: 10px; align-items: center; }
.navlink { padding: 9px 14px; border-radius: 999px; font-weight: 600; font-size: 15px; color: var(--ink); }
.navlink:hover { background: var(--paper-2); color: var(--ink); }
.cart-link { display: inline-flex; align-items: center; gap: 7px; background: var(--forest); color: #fff; }
.cart-link:hover { background: #17402f; color: #fff; }
.badge { background: var(--honey); color: #3a2a06; font-weight: 800; border-radius: 999px;
         min-width: 20px; text-align: center; padding: 1px 7px; font-size: 12px; }

.content { padding: 20px 0 56px; }
.muted { color: var(--ink-soft); }
.right { text-align: right; }
.error { color: var(--danger); font-weight: 600; }
.ok { color: var(--forest); font-weight: 600; }

/* ---------- Hero ---------- */
.hero {
    position: relative; overflow: hidden;
    background: linear-gradient(135deg, var(--forest), #2d6a52);
    color: #fdfaf3; border-radius: 24px; padding: 40px 36px; margin: 10px 0 30px;
    box-shadow: var(--shadow);
}
.hero::after {
    content: ""; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px;
    background: radial-gradient(circle, rgba(232,163,61,.55), transparent 62%);
}
.hero .eyebrow { font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: #cfe3d7; }
.hero h1 { font-size: clamp(30px, 4.5vw, 46px); margin: 10px 0 8px; color: #fff; max-width: 16ch; }
.hero p { margin: 0; max-width: 46ch; color: #e7f0e9; font-size: 16px; }

/* ---------- Product grid ---------- */
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 6px 0 18px; }
.section-head h2 { font-size: 26px; margin: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 22px; }

.card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    display: flex; flex-direction: column; overflow: hidden; box-shadow: var(--shadow-sm);
    transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card.sold-out { opacity: .72; }

.thumb {
    aspect-ratio: 4 / 3; background: var(--rose);
    display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.ph { background: linear-gradient(135deg, var(--sage), var(--rose)); }
.thumb .mono { font-family: "Fraunces", serif; font-size: 44px; color: var(--forest); opacity: .55; }

.card-body { padding: 16px 16px 6px; flex: 1; }
.eyebrow { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--forest); font-weight: 700; }
.card h3 { margin: 6px 0 8px; font-size: 18px; line-height: 1.2; }
.price { font-family: "Fraunces", serif; font-size: 22px; font-weight: 600; color: var(--clay); }
.stock { margin: 8px 0 2px; }

.pill { font-size: 12px; padding: 3px 10px; border-radius: 999px; font-weight: 600; }
.pill-ok  { background: var(--sage); color: var(--forest); }
.pill-low { background: #fbeccb; color: #8a5a07; }
.pill-out { background: #f6e0da; color: var(--danger); }

.card .add { margin: 12px 16px 16px; }

/* ---------- Buttons ---------- */
.btn {
    border: 0; border-radius: 999px; padding: 12px 18px; font: inherit; font-weight: 700;
    background: var(--clay); color: #fff; cursor: pointer; width: 100%;
    box-shadow: 0 8px 18px -10px rgba(210,96,58,.8); transition: background .15s, transform .12s;
}
.btn:hover { background: var(--clay-dk); transform: translateY(-1px); }
.btn:disabled { background: #e3d9c8; color: var(--ink-soft); cursor: not-allowed; box-shadow: none; transform: none; }
.btn-primary { width: auto; padding: 13px 26px; }
.btn-ghost { background: transparent; color: var(--forest); box-shadow: none; border: 1.5px solid var(--line); }
.btn-ghost:hover { background: var(--paper-2); color: var(--forest); }
.link { background: none; border: 0; color: var(--clay); cursor: pointer; padding: 0; font: inherit; font-weight: 600; }

/* ---------- Cart ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th { text-align: left; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); padding: 8px; border-bottom: 1px solid var(--line); }
.cart-table td { padding: 12px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.cart-prod { display: flex; align-items: center; gap: 12px; }
.cart-prod .mini { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; background: var(--rose); }
.cart-prod .mini.ph { display: flex; align-items: center; justify-content: center; font-family: "Fraunces", serif; color: var(--forest); }
.cart-table input { width: 72px; padding: 8px; background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; font: inherit; }
.cart-total td { font-family: "Fraunces", serif; font-size: 18px; }
.actions { margin-top: 22px; display: flex; gap: 12px; }

/* ---------- Checkout ---------- */
.checkout { display: grid; grid-template-columns: 1fr 360px; gap: 22px; align-items: start; }
.field { display: flex; flex-direction: column; margin-bottom: 14px; }
.field label { font-size: 13px; color: var(--ink-soft); margin-bottom: 6px; font-weight: 500; }
.field input, .field textarea {
    padding: 11px 12px; background: var(--paper); color: var(--ink);
    border: 1.5px solid var(--line); border-radius: 12px; font: inherit; transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field textarea:focus { outline: 0; border-color: var(--clay); box-shadow: 0 0 0 3px rgba(210,96,58,.15); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.summary { position: sticky; top: 86px; }
.sum-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.sum-item .mini { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; background: var(--rose); }
.sum-item .grow { flex: 1; }
.sum-item .q { color: var(--ink-soft); font-size: 13px; }
.sum-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 14px; font-family: "Fraunces", serif; font-size: 22px; }
#payment-element { margin: 14px 0 18px; }
.validation-message, .validation-errors { color: var(--danger); font-size: 13px; }

/* ---------- Footer ---------- */
.footer { margin-top: 40px; padding: 26px 0; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 14px;
          display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.foot-col { display: flex; flex-direction: column; gap: 4px; }
.foot-col strong { color: var(--ink); font-family: "Fraunces", serif; font-weight: 600; font-size: 15px; }
.foot-right { text-align: right; align-items: flex-end; }
@media (max-width: 560px) { .foot-right { text-align: left; align-items: flex-start; } }

@media (max-width: 760px) {
    .checkout { grid-template-columns: 1fr; }
    .summary { position: static; }
    .hero { padding: 30px 24px; }
}
