/* Behest Of Nature — static UI shared stylesheet
  Palette: aubergine plum + saffron gold + warm blush cream.
  Drop-in for Django Oscar templates. */

:root {
  --bg: #f6ead9;
  --surface: #efe0c8;
  --surface-2: #e8d4b6;
  --card: #fbf3e4;
  --fg: #2a1128;
  --muted: #7a5c6e;
  --border: #d9c4a8;

  --plum: #3a1435;
  --plum-2: #4c1c47;
  --plum-fg: #fbf3e4;

  --saffron: #e4a61b;
  --saffron-2: #f2b834;
  --saffron-fg: #2a1128;

  --danger: #b23a2b;
  --success: #2f7d55;

  --radius: 8px;
  --radius-lg: 14px;

  --font-display: "Fraunces", "Cormorant Garamond", Georgia, serif;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --shadow-sm: 0 1px 2px rgba(42,17,40,.06);
  --shadow: 0 6px 24px rgba(42,17,40,.10);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; overflow-x: hidden; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1,h2,h3,h4 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.01em; margin: 0; }
button { font: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }
input, select { font: inherit; }

.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .container { padding: 0 24px; } }

/* HEADER */
.site-header { position: sticky; top: 0; z-index: 40; background: var(--plum); color: var(--plum-fg); box-shadow: var(--shadow-sm); }
.utility-bar { background: rgba(0,0,0,.15); border-bottom: 1px solid rgba(255,255,255,.08); font-size: 12px; }
.utility-bar .container { display: flex; justify-content: space-between; align-items: center; height: 32px; }
.utility-bar a:hover { color: var(--saffron-2); }
.utility-links { display: flex; gap: 16px; }

.main-bar { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.main-bar .container { display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.brand-mark {
  display: grid; place-items: center; width: 36px; height: 36px;
  border-radius: 999px; background: var(--saffron); color: var(--saffron-fg);
  font-family: var(--font-display); font-weight: 700; font-size: 18px;
}
.brand-name { font-family: var(--font-display); font-size: 18px; font-weight: 600; line-height: 1; }
.brand-tag { font-size: 10px; text-transform: uppercase; letter-spacing: .15em; opacity: .7; }

.deliver-to { display: flex; gap: 6px; align-items: center; padding: 6px 8px; border-radius: 6px; font-size: 11px; }
.deliver-to:hover { background: rgba(255,255,255,.1); }
.deliver-to .label { opacity: .6; font-size: 10px; display: block; }

.search {
  flex: 1; min-width: 0; display: flex; height: 40px;
  background: var(--bg); border-radius: var(--radius); overflow: hidden;
}
.search select {
  background: var(--surface-2); border: 0; color: var(--fg); padding: 0 10px; font-size: 13px;
}
.search input {
  flex: 1; border: 0; background: transparent; padding: 0 12px; color: var(--fg); outline: none;
}
.search button {
  background: var(--saffron); color: var(--saffron-fg); padding: 0 16px;
}
.search button:hover { filter: brightness(.95); }

.header-actions { display: flex; align-items: center; gap: 4px; }
.header-actions .action { display: flex; flex-direction: column; padding: 6px 10px; border-radius: 6px; font-size: 12px; }
.header-actions .action:hover { background: rgba(255,255,255,.1); }
.header-actions .action .label { opacity: .6; font-size: 10px; }
.cart-btn { position: relative; display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 6px; }
.cart-btn:hover { background: rgba(255,255,255,.1); }
.cart-badge {
  position: absolute; top: -4px; right: 12px;
  background: var(--saffron); color: var(--saffron-fg);
  min-width: 20px; height: 20px; border-radius: 999px;
  display: grid; place-items: center; font-size: 10px; font-weight: 700;
}

.mega-nav { background: rgba(0,0,0,.2); border-top: 1px solid rgba(255,255,255,.08); }
.mega-nav .container { display: flex; gap: 20px; align-items: center; height: 40px; overflow-x: auto; font-size: 13px; }
.mega-nav a { white-space: nowrap; }
.mega-nav a:hover, .mega-nav a.active { color: var(--saffron-2); }
.mega-nav .season { margin-left: auto; color: var(--saffron-2); font-weight: 500; }

/* HERO */
.hero { padding: 40px 0; }
.hero .container { display: grid; grid-template-columns: 1fr; gap: 32px; align-items: center; }
@media (min-width: 900px) { .hero .container { grid-template-columns: 1fr 1fr; padding: 24px; } .hero { padding: 60px 0; } }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(228,166,27,.2); color: var(--plum);
  padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 500;
}
.chip .dot { width: 6px; height: 6px; background: var(--saffron); border-radius: 999px; }
.hero h1 { font-size: 40px; line-height: 1.05; margin-top: 16px; }
.hero h1 .accent { color: var(--plum); display: block; }
@media (min-width: 900px) { .hero h1 { font-size: 60px; } }
.hero p { color: var(--muted); max-width: 460px; margin-top: 16px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.btn { display: inline-block; padding: 12px 24px; border-radius: var(--radius); font-size: 14px; font-weight: 500; transition: all .15s; }
.btn-primary { background: var(--plum); color: var(--plum-fg); }
.btn-primary:hover { filter: brightness(1.15); }
.btn-accent { background: var(--saffron); color: var(--saffron-fg); font-weight: 600; }
.btn-accent:hover { filter: brightness(.95); }
.btn-outline { background: transparent; color: var(--plum); border: 1px solid rgba(58,20,53,.3); }
.btn-outline:hover { background: var(--plum); color: var(--plum-fg); }
.btn-block { display: block; width: 100%; text-align: center; padding: 14px; }

.trust-row { margin-top: 32px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; font-size: 12px; color: var(--muted); }
@media (min-width: 600px) { .trust-row { grid-template-columns: repeat(4, 1fr); } }
.trust-row .item { display: flex; align-items: center; gap: 8px; }
.trust-row svg { color: var(--plum); }

.hero-image { position: relative; }
.hero-image::before { content: ""; position: absolute; inset: -16px; background: rgba(228,166,27,.3); border-radius: 24px; transform: rotate(-2deg); }
.hero-image { display: flex; align-items: center; justify-content: center; }
.hero-image img { position: relative; border-radius: 16px; box-shadow: var(--shadow); object-fit: cover; width: 100%; height: auto; max-height: min(70vh, 680px); }
.hero-card {
  position: absolute; bottom: 16px; left: 16px; right: 16px;
  background: rgba(251,243,228,.95); backdrop-filter: blur(6px);
  padding: 16px; border-radius: 12px; box-shadow: var(--shadow); border: 1px solid var(--border);
}
@media (min-width: 600px) { .hero-card { right: auto; max-width: 260px; } }
.hero-card .eyebrow { font-size: 10px; text-transform: uppercase; letter-spacing: .15em; color: var(--muted); }
.hero-card .title { font-family: var(--font-display); font-size: 18px; font-weight: 600; margin-top: 4px; }
.hero-card .price { font-size: 12px; color: var(--muted); margin-top: 4px; }
.strike { text-decoration: line-through; color: var(--muted); }

/* SECTIONS */
.section { padding: 48px 0; }
.section-title { font-size: 24px; margin-bottom: 24px; }
@media (min-width: 768px) { .section-title { font-size: 30px; } }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 24px; gap: 16px; }
.section-head .eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--plum); font-weight: 500; }
.section-head .link { color: var(--plum); font-weight: 500; font-size: 14px; }
.section-head .link:hover { text-decoration: underline; }
.bg-surface { background: var(--surface); }

/* CATEGORY TILES */
.cat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (min-width: 900px) { .cat-grid { grid-template-columns: repeat(4, 1fr); } }
.cat-tile { position: relative; overflow: hidden; border-radius: var(--radius-lg); aspect-ratio: 4/5; background: var(--surface); }
.cat-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.cat-tile:hover img { transform: scale(1.05); }
.cat-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(58,20,53,.85), rgba(58,20,53,.2) 60%, transparent); }
.cat-tile .caption { position: absolute; bottom: 0; left: 0; right: 0; padding: 16px; color: var(--plum-fg); z-index: 2; }
.cat-tile .caption .name { font-family: var(--font-display); font-size: 20px; font-weight: 600; }
.cat-tile .caption .count { font-size: 12px; opacity: .8; }

/* PRODUCT GRID / CARD */
.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (min-width: 768px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .product-grid { grid-template-columns: repeat(4, 1fr); } }
.product-grid.wide { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) { .product-grid.wide { grid-template-columns: repeat(5, 1fr); } }

.product-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: all .2s;
}
.product-card:hover { border-color: rgba(58,20,53,.4); box-shadow: var(--shadow); }
.product-card .media { position: relative; aspect-ratio: 1/1; background: var(--surface); overflow: hidden; }
.product-card .media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.product-card:hover .media img { transform: scale(1.05); }
.badge {
  position: absolute; top: 12px; padding: 4px 10px;
  border-radius: 999px; font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .1em;
}
.badge.plum { left: 12px; background: var(--plum); color: var(--plum-fg); }
.badge.saffron { right: 12px; background: var(--saffron); color: var(--saffron-fg); font-size: 10px; font-weight: 700; letter-spacing: 0; text-transform: none; }
.oos-veil { position: absolute; inset: 0; background: rgba(246,234,217,.75); display: grid; place-items: center; }
.oos-veil span { background: var(--fg); color: var(--bg); padding: 6px 12px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.product-card .body { padding: 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-card .meta { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.product-card .name { font-size: 14px; font-weight: 500; line-height: 1.35; color: var(--fg); }
.product-card:hover .name { color: var(--plum); }
.rating-line { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.rating-line .stars { color: var(--saffron); }
.price-line { display: flex; align-items: baseline; gap: 8px; margin-top: 4px; }
.price { font-size: 18px; font-weight: 600; color: var(--plum); }
.mrp { font-size: 12px; }
.unit { font-size: 11px; color: var(--muted); }

/* PROMISE STRIP */
.promise { background: var(--plum); color: var(--plum-fg); padding: 56px 0; }
.promise .container { display: grid; gap: 32px; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 900px) { .promise .container { grid-template-columns: 2fr 1fr; } }
.promise .eyebrow { color: var(--saffron-2); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; }
.promise h2 { font-size: 30px; margin-top: 8px; }
@media (min-width: 768px) { .promise h2 { font-size: 36px; } }
.promise p { margin-top: 12px; opacity: .8; max-width: 640px; }
.stat-cards { display: flex; flex-direction: column; gap: 12px; }
.stat-card { border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.05); border-radius: 12px; padding: 16px; }
.stat-card .n { font-family: var(--font-display); font-size: 30px; font-weight: 600; color: var(--saffron-2); }
.stat-card .l { font-size: 14px; opacity: .8; }

/* FOOTER */
.footer { margin-top: 64px; background: var(--plum); color: var(--plum-fg); }
.footer-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; padding: 48px 0; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(4, 1fr); } }
.footer h4 { color: var(--saffron-2); font-family: var(--font-sans); font-size: 13px; font-weight: 600; margin-bottom: 12px; }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 8px; font-size: 13px; opacity: .8; }
.footer li:hover { opacity: 1; color: var(--saffron-2); }
.footer .newsletter { display: flex; margin-top: 12px; }
.footer .newsletter input {
  flex: 1; background: rgba(255,255,255,.1); border: 0; padding: 10px 12px;
  border-radius: 8px 0 0 8px; color: var(--plum-fg); outline: none;
}
.footer .newsletter input::placeholder { color: rgba(251,243,228,.5); }
.footer .newsletter button { background: var(--saffron); color: var(--saffron-fg); padding: 10px 16px; border-radius: 0 8px 8px 0; font-weight: 500; }
.footer-bar { border-top: 1px solid rgba(255,255,255,.1); }
.footer-bar .container {
  display: flex; flex-direction: column; gap: 12px; padding: 16px;
  font-size: 11px; opacity: .6;
}
@media (min-width: 768px) { .footer-bar .container { flex-direction: row; justify-content: space-between; } }
.footer-bar .links { display: flex; gap: 16px; }

/* Breadcrumb */
.breadcrumb { font-size: 12px; color: var(--muted); padding: 16px 0; }
.breadcrumb a:hover { color: var(--plum); }
.breadcrumb .sep { margin: 0 6px; }

/* PLP layout */
.plp-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.plp-header h1 { font-size: 30px; }
@media (min-width: 768px) { .plp-header h1 { font-size: 36px; } }
.plp-header p { color: var(--muted); font-size: 14px; margin-top: 4px; }
.plp-layout { display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .plp-layout { grid-template-columns: 240px 1fr; } }
.filter-rail { display: none; }
@media (min-width: 900px) { .filter-rail { display: block; position: sticky; top: 128px; align-self: start; } }
.filter-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.filter-card h3 { font-family: var(--font-sans); font-size: 13px; font-weight: 600; margin-bottom: 12px; }
.filter-card ul { list-style: none; padding: 0; margin: 0; }
.filter-card li a { display: flex; justify-content: space-between; padding: 4px 8px; border-radius: 4px; font-size: 13px; }
.filter-card li a:hover { background: var(--surface); }
.filter-card li a.active { background: var(--plum); color: var(--plum-fg); }
.filter-card .check-list label { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 4px 0; cursor: pointer; }
.filter-card .check-list input { accent-color: var(--plum); }

.select-sort { position: relative; }
.select-sort select {
  appearance: none; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 8px 32px 8px 12px; font-size: 13px; outline: none;
}
.select-sort::after {
  content: "▾"; position: absolute; right: 10px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--muted);
}

/* PDP */
.pdp { display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 1000px) { .pdp { grid-template-columns: minmax(360px,520px) minmax(420px,1fr) 320px; align-items: start; gap: 28px; } }
.gallery { display: flex; gap: 12px; }
.thumbs { display: none; flex-direction: column; gap: 8px; }
@media (min-width: 768px) { .thumbs { display: flex; } }
.thumb { width: 64px; height: 64px; border-radius: 6px; overflow: hidden; border: 1px solid var(--border); }
.thumb.active { border-color: var(--plum); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery { display: flex; gap: 12px; min-width: 0; max-width: 520px; }
.thumbs { flex: 0 0 auto; }
.main-image { flex: 1 1 auto; min-width: 0; position: relative; background: var(--surface); border-radius: var(--radius-lg); overflow: hidden; display:flex; align-items:center; justify-content:center; }
.main-image img { width: 100%; max-width: 520px; height: auto; display: block; object-fit: cover; object-position: center; max-height: min(68vh, 640px); }

.gallery { align-items: center; }

@media (max-width: 999px) {
  .hero-image img { max-height: 55vh; }
  .main-image img { max-height: 50vh; }
  .hero .container { gap: 20px; }
}

.pdp-title { font-size: 30px; margin-top: 8px; line-height: 1.15; }
@media (min-width: 768px) { .pdp-title { font-size: 36px; } }
.tagline { color: var(--muted); margin-top: 8px; }
.rating-pill { display: inline-flex; align-items: center; gap: 4px; background: rgba(228,166,27,.2); padding: 4px 8px; border-radius: 6px; font-size: 13px; }
.rating-pill .star { color: var(--saffron); }
.pdp-price { display: flex; align-items: baseline; gap: 12px; margin-top: 24px; }
.pdp-price .now { font-family: var(--font-display); font-size: 36px; font-weight: 600; color: var(--plum); }
.tax-line { font-size: 11px; color: var(--muted); }

.info-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-top: 24px; }
.info-card h3 { font-family: var(--font-sans); font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.info-card dl { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0 0; font-size: 12px; }
.info-card dt { color: var(--muted); }
.info-card dd { margin: 0; font-weight: 500; }

.review { border: 1px solid var(--border); background: var(--card); border-radius: 6px; padding: 12px; margin-bottom: 12px; }
.review .head { display: flex; gap: 8px; align-items: center; font-size: 13px; }
.review .name { font-weight: 500; }
.review .stars { color: var(--saffron); }
.review p { margin: 4px 0 0; font-size: 13px; color: var(--muted); }

.buybox { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-sm); }
@media (min-width: 1000px) { .buybox { position: sticky; top: 128px; align-self: start; } }
.buybox .big-price { font-family: var(--font-display); font-size: 26px; font-weight: 600; color: var(--plum); }
.stock-line { display: flex; align-items: center; gap: 8px; margin-top: 16px; font-size: 13px; font-weight: 500; }
.stock-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--success); }
.field-label { font-size: 11px; color: var(--muted); display: block; margin-top: 16px; }
.pin-row { display: flex; gap: 8px; margin-top: 4px; }
.pin-row input { flex: 1; padding: 8px 12px; border-radius: 6px; border: 1px solid var(--border); background: var(--bg); outline: none; }
.pin-row input:focus { border-color: var(--plum); }
.pin-row button { border: 1px solid var(--plum); color: var(--plum); padding: 8px 12px; border-radius: 6px; }
.pin-row button:hover { background: var(--plum); color: var(--plum-fg); }

.qty { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 6px; margin-top: 4px; }
.qty button { width: 36px; height: 36px; display: grid; place-items: center; }
.qty button:hover { background: var(--surface); }
.qty span { width: 40px; text-align: center; font-weight: 500; }

.buybox-actions { margin-top: 20px; display: flex; flex-direction: column; gap: 8px; }
.trust-list { list-style: none; padding: 0; margin: 20px 0 0; font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 8px; }
.trust-list li { display: flex; align-items: center; gap: 8px; }
.trust-list svg { color: var(--plum); }

/* CART */
.cart-layout { display: grid; grid-template-columns: 1fr; gap: 32px; margin-top: 24px; }
@media (min-width: 900px) { .cart-layout { grid-template-columns: 1fr 360px; } }
.cart-item { display: flex; gap: 16px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }
.cart-item .thumb-lg { width: 96px; height: 96px; flex-shrink: 0; border-radius: 6px; overflow: hidden; background: var(--surface); }
.cart-item .thumb-lg img { width: 100%; height: 100%; object-fit: cover; }
.cart-item .body { flex: 1; min-width: 0; }
.cart-item .row1 { display: flex; justify-content: space-between; gap: 12px; }
.cart-item .name { font-weight: 500; }
.cart-item .name:hover { color: var(--plum); }
.cart-item .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.cart-item .stock { font-size: 12px; color: var(--success); font-weight: 500; margin-top: 4px; }
.cart-item .line-price { font-weight: 600; color: var(--plum); text-align: right; }
.cart-item .actions { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.link-btn { background: none; border: 0; color: var(--muted); font-size: 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.link-btn:hover { color: var(--plum); }
.link-btn.danger:hover { color: var(--danger); }

.summary { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; position: sticky; top: 128px; }
.summary h3 { font-family: var(--font-sans); font-size: 15px; font-weight: 600; }
.summary dl { display: flex; flex-direction: column; gap: 8px; margin: 16px 0; font-size: 13px; }
.summary .line { display: flex; justify-content: space-between; }
.summary .line dt { color: var(--muted); }
.summary .savings { color: var(--plum); font-weight: 500; }
.free-ship-note { background: rgba(228,166,27,.2); color: var(--plum); padding: 8px 10px; border-radius: 6px; font-size: 12px; }
.coupon-row { display: flex; gap: 8px; margin-top: 16px; }
.coupon-row input { flex: 1; padding: 8px 12px; border-radius: 6px; border: 1px solid var(--border); background: var(--bg); outline: none; }
.total-row { border-top: 1px solid var(--border); padding-top: 16px; margin-top: 16px; display: flex; justify-content: space-between; font-weight: 600; }
.total-row .amt { color: var(--plum); font-family: var(--font-display); font-size: 20px; }

/* Utilities */
.hidden-md { display: none; }
@media (min-width: 768px) { .hidden-md { display: flex; } .hide-md-up { display: none; } }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
