/* Bella Shop — customer storefront (mobile-first) */

:root {
  --bg: #faf6f0;
  --surface: #ffffff;
  --text: #241b16;
  --muted: #7a6a5f;
  --border: #ece2d5;
  --accent: #b5462a;
  --accent-soft: #fbeee9;
  --indigo: #23305e;
  --gold: #f2c14e;
  --ok: #1f8a4c;
  --whatsapp: #1fa855;
  --whatsapp-dark: #178a45;
  --radius: 18px;
  --gutter: 16px;
  --shadow: 0 1px 2px rgba(36, 27, 22, .05), 0 6px 20px rgba(36, 27, 22, .07);
  --font: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

.icon { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 18px; height: 18px; }
.icon-xs { width: 13px; height: 13px; stroke-width: 3; }
.logo-mark { width: 34px; height: 34px; flex: none; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(250, 246, 240, .92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand span { font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; color: var(--indigo); letter-spacing: -.01em; }

.header-contact {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 999px;
  background: var(--indigo); color: #fff; text-decoration: none; font-size: .9rem; font-weight: 600;
}

/* ---------- Hero ---------- */

.hero {
  position: relative; overflow: hidden; margin: 18px 0 6px; padding: 28px 22px 30px;
  border-radius: 24px; color: #fff;
  background-color: var(--indigo);
  background-image:
    radial-gradient(circle, rgba(242, 193, 78, .5) 0 5px, transparent 6px),
    radial-gradient(circle, transparent 0 13px, rgba(181, 70, 42, .7) 14px 19px, transparent 20px);
  background-size: 46px 46px, 92px 92px;
  background-position: 0 0, 23px 23px;
}

.hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(35, 48, 94, .97) 30%, rgba(35, 48, 94, .7) 65%, rgba(35, 48, 94, .25));
}

.hero > * { position: relative; max-width: 560px; }

.hero-eyebrow {
  display: inline-block; margin: 0 0 10px; padding: 3px 10px; border-radius: 999px;
  background: var(--gold); color: var(--indigo); font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}

.hero h1 { margin: 0 0 8px; font-family: var(--font-display); font-size: 1.85rem; line-height: 1.12; font-weight: 700; }
.hero-text { margin: 0; color: rgba(255, 255, 255, .85); font-size: 1rem; }

@media (min-width: 700px) {
  .hero { padding: 48px 44px; margin-top: 24px; }
  .hero h1 { font-size: 2.6rem; }
  .hero-text { font-size: 1.1rem; }
}

/* ---------- Filters ---------- */

.filters {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  margin: 0 calc(-1 * var(--gutter)); padding: 16px var(--gutter) 8px;
}
.filters::-webkit-scrollbar { display: none; }

.chip {
  flex: none; padding: 9px 16px; border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); text-decoration: none; font-size: .92rem; font-weight: 500; white-space: nowrap;
  transition: border-color .15s;
}
.chip:hover { border-color: var(--accent); }
.chip.is-active { background: var(--text); border-color: var(--text); color: #fff; }

.result-count { margin: 6px 0 12px; color: var(--muted); font-size: .88rem; }

/* ---------- Product grid ---------- */

.product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; margin: 0; padding: 0; list-style: none; }

@media (min-width: 640px) { .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 18px; } }
@media (min-width: 960px) { .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.product-card { display: block; height: 100%; text-decoration: none; }

.product-card-media {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--radius);
  background: var(--border); box-shadow: var(--shadow);
}

.product-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.product-card:hover .product-card-media img { transform: scale(1.04); }
.product-card.is-sold-out img { opacity: .55; filter: grayscale(.45); }

.badge {
  position: absolute; top: 10px; left: 10px; padding: 3px 10px; border-radius: 999px;
  background: rgba(36, 27, 22, .85); color: #fff; font-size: .75rem; font-weight: 600;
}

.product-card-body { padding: 10px 2px 0; }
.product-card-body h2 { margin: 1px 0 0; font-size: 1rem; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.meta { margin: 0; color: var(--muted); font-size: .8rem; }
.price { margin: 3px 0 0; color: var(--accent); font-weight: 700; }
.price--large { margin: 0; font-size: 1.6rem; }

.no-photo {
  width: 100%; height: 100%;
  background:
    repeating-linear-gradient(45deg, transparent 0 12px, rgba(181, 70, 42, .12) 12px 24px),
    repeating-linear-gradient(-45deg, transparent 0 12px, rgba(35, 48, 94, .10) 12px 24px),
    var(--bg);
}
.no-photo--large { aspect-ratio: 4 / 5; border-radius: var(--radius); }

.empty { padding: 48px 0; text-align: center; color: var(--muted); }

/* ---------- How to order ---------- */

.how { margin: 48px 0 0; padding: 26px 20px; border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); }
.how h2 { margin: 0 0 18px; font-family: var(--font-display); font-size: 1.45rem; color: var(--indigo); }

.steps { display: grid; gap: 18px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
@media (min-width: 700px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 24px; } .how { padding: 32px; } }

.steps li { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; align-items: start; }
.steps strong { grid-column: 2; font-weight: 600; }
.steps li > span:last-child { grid-column: 2; color: var(--muted); font-size: .92rem; }

.step-icon {
  grid-row: span 2; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px;
  background: var(--accent-soft); color: var(--accent);
}

/* ---------- Footer ---------- */

.site-footer { margin-top: 40px; padding: 28px 0 calc(100px + env(safe-area-inset-bottom)); background: var(--indigo); color: rgba(255, 255, 255, .8); }
.footer-inner { display: grid; gap: 18px; }
.footer-brand { display: flex; gap: 12px; align-items: center; }
.footer-brand strong { color: #fff; font-family: var(--font-display); font-size: 1.15rem; }
.footer-brand p { margin: 0; font-size: .9rem; }
.footer-contact { display: inline-flex; align-items: center; gap: 8px; color: #fff; font-weight: 500; }

@media (min-width: 700px) {
  .footer-inner { grid-template-columns: 1fr auto; align-items: center; }
  .site-footer { padding-bottom: 32px; }
}

/* Floating WhatsApp button */

.fab-whatsapp {
  position: fixed; right: var(--gutter); bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 25;
  display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%;
  background: var(--whatsapp); color: #fff; box-shadow: 0 8px 22px rgba(31, 168, 85, .45);
}
.fab-whatsapp .icon { width: 28px; height: 28px; }

/* ---------- Product detail ---------- */

.back-link {
  display: inline-flex; align-items: center; gap: 2px; margin: 14px 0; padding: 4px 8px 4px 0;
  color: var(--muted); text-decoration: none; font-size: .92rem; font-weight: 500;
}

.product-detail { display: grid; gap: 22px; }
@media (min-width: 860px) { .product-detail { grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: start; } }

.gallery { position: relative; min-width: 0; }

.gallery-track {
  display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory;
  border-radius: var(--radius); scrollbar-width: none;
}
.gallery-track::-webkit-scrollbar { display: none; }

.gallery-track img {
  flex: 0 0 100%; width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
  border-radius: var(--radius); scroll-snap-align: start; background: var(--border);
}

.gallery-dots { position: absolute; left: 0; right: 0; bottom: 14px; display: flex; justify-content: center; gap: 6px; }
.gallery-dots span { width: 7px; height: 7px; border-radius: 999px; background: rgba(255, 255, 255, .6); box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: width .2s; }
.gallery-dots span.is-active { width: 20px; background: #fff; }

@media (min-width: 860px) {
  .gallery-track { flex-direction: column; gap: 16px; overflow: visible; }
  .gallery-dots { display: none; }
  .product-info { position: sticky; top: 88px; }
}

.product-info h1 { margin: 4px 0 10px; font-family: var(--font-display); font-size: 2rem; line-height: 1.1; color: var(--text); }
@media (min-width: 860px) { .product-info h1 { font-size: 2.5rem; } }

.price-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; }

.stock { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; }
.stock-in { background: #e6f4eb; color: var(--ok); }
.stock-out { background: #efe9e2; color: var(--muted); }

.description { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); }
.description p { margin: 0 0 10px; }

/* Order button: sticky at the bottom of the screen on phones */

.order-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
  background: rgba(250, 246, 240, .96); border-top: 1px solid var(--border); backdrop-filter: blur(8px);
}

.order-note { margin: 14px 0 0; color: var(--muted); font-size: .85rem; }

@media (min-width: 860px) {
  .order-bar { position: static; margin-top: 24px; padding: 0; background: none; border: 0; backdrop-filter: none; }
}

.sold-out-note { margin: 0 0 8px; color: var(--muted); font-size: .9rem; text-align: center; }
@media (min-width: 860px) { .sold-out-note { text-align: left; } }

.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 54px;
  padding: 12px 20px; border-radius: 999px; font-size: 1.05rem; font-weight: 700; text-align: center; text-decoration: none;
  transition: background .15s, transform .05s;
}
.btn:active { transform: scale(.98); }
.btn-whatsapp { background: var(--whatsapp); color: #fff; box-shadow: 0 6px 18px rgba(31, 168, 85, .3); }
.btn-whatsapp:hover { background: var(--whatsapp-dark); }
.btn-secondary { background: var(--surface); color: var(--accent); border: 2px solid var(--accent); }

.has-order-bar .site-footer { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
@media (min-width: 860px) { .has-order-bar .site-footer { padding-bottom: 32px; } }

a:focus-visible, .btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
