/* ---------- Colors & basics ---------- */
:root {
  /* speMEDIA brand: magenta and green. Flat colors only, no gradients. */
  --ink: #1b1b1b;
  --orange: #ed258f;   /* speMEDIA magenta, used for buttons and accents */
  --hot: #c41c77;      /* darker magenta for text on light backgrounds */
  --green: #6dab3c;    /* speMEDIA green */
  --muted: #626262;
  --line: #e6e6e8;
  --bg: #ffffff;
  /* Tiles for pictures and cards */
  --stone: #f4f4f5;
  --peach: #ffe4f2;
  --cream: #fdf2f8;
  --mist: #eef7e8;
  --radius: 14px;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  font-family: Poppins, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
}
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.icon {
  width: 1.25em; height: 1.25em; flex: none; vertical-align: -0.25em;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.muted { color: var(--muted); }

/* Full-width backgrounds, content centered at max 1200px */
.topbar, .header, .catnav, main, .footer { padding-inline: max(1rem, (100% - 1200px) / 2); }

.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.8rem 1.5rem; border: 0; border-radius: 8px;
  background: var(--hot); color: #fff; font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--ink); }
.eyebrow { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--hot); }
.section-title { margin-bottom: 1rem; font-size: 1.5rem; }
.section-head-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 1rem; }
.view-all { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.9rem; font-weight: 600; text-decoration: none; }
.view-all:hover { color: var(--hot); }

/* Picture placeholder (real pictures come from the Amrod API) */
.ph { display: grid; place-items: center; overflow: clip; background: var(--stone); color: rgb(19 19 19 / 0.25); }
.ph .icon { width: 2.5rem; height: 2.5rem; stroke-width: 1.5; }
.ph img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ---------- Top bar & header ---------- */
.topbar {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.25rem 1rem;
  padding-block: 0.5rem; background: var(--ink); color: #fff; font-size: 0.85rem;
}
.topbar p { display: flex; align-items: center; gap: 0.4rem; }
.sep { opacity: 0.4; }
.topbar-links { gap: 1.25rem; }
.topbar-links a { text-decoration: none; }
.topbar-links a:hover { color: var(--orange); }

.header {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem;
  padding-block: 1.1rem; background: #fff; border-bottom: 3px solid var(--orange);
}
.logo { display: flex; align-items: center; gap: 0.5rem; font-size: 1.3rem; font-weight: 800; letter-spacing: 0.1em; text-decoration: none; }
.logo span { color: var(--orange); }
.logo img { display: block; width: auto; height: 46px; }
.footer .logo img { height: 40px; filter: brightness(0) invert(1); }
.logo-mark { width: 1.9rem; height: 1.9rem; fill: var(--orange); stroke: var(--orange); stroke-width: 2; }

.search { flex: 1 1 320px; }
.search form { display: flex; overflow: clip; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.search form:focus-within { border-color: var(--ink); }
.search input { flex: 1; min-width: 0; padding: 0.7rem 1rem; border: 0; background: transparent; }
.search input:focus-visible { outline: none; }
.search button { display: grid; place-items: center; width: 3.2rem; border: 0; background: var(--hot); color: #fff; cursor: pointer; }
.search button:hover { background: var(--ink); }

.header-icons { display: flex; gap: 1.5rem; }
.header-icons a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 0.1rem; font-size: 0.8rem; text-decoration: none; }
.header-icons .icon { width: 1.5rem; height: 1.5rem; }
.badge {
  position: absolute; top: -0.35rem; right: calc(50% - 1.4rem);
  min-width: 1.2rem; padding-inline: 0.3rem; border-radius: 999px;
  background: var(--orange); color: #fff; font-size: 0.7rem; font-weight: 700; line-height: 1.2rem; text-align: center;
}

.catnav {
  display: flex; gap: 0.5rem 1.75rem; overflow-x: auto; padding-block: 0.8rem;
  border-bottom: 1px solid var(--line); background: #fff; font-size: 0.95rem; font-weight: 500; white-space: nowrap;
}
.catnav a { text-decoration: none; }
.catnav a:hover { color: var(--hot); }
.hot { margin-left: 0.2rem; padding: 0.05rem 0.4rem; border-radius: 6px; background: var(--orange); color: #fff; font-size: 0.7rem; font-weight: 700; }

/* ---------- Main sections ---------- */
main { display: grid; gap: 3rem; padding-block: 1.5rem 3rem; }

.hero {
  display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 2rem;
  padding: clamp(1.5rem, 4vw, 3.5rem); border-radius: 16px; background: var(--cream);
}
.hero-text { display: grid; justify-items: start; gap: 1rem; }
.hero h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); line-height: 1.1; }
.hero h1 span { display: block; color: var(--hot); }
.hero-text > p:not(.eyebrow) { max-width: 42ch; font-size: 1.05rem; color: var(--muted); }
.hero-perks { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; margin: 0.5rem 0 0; padding: 0; list-style: none; font-size: 0.9rem; font-weight: 600; }
.hero-perks li { display: flex; align-items: center; gap: 0.4rem; }
.hero-perks .icon { color: var(--hot); }
.hero-img { aspect-ratio: 4 / 3; border-radius: 12px; background: #fff; }
.hero-img .icon { width: 4rem; height: 4rem; }

.promos { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.promo { display: grid; grid-template-columns: 1fr 110px; align-items: center; gap: 1rem; padding: 1.5rem; border-radius: var(--radius); }
.promo h2 { margin-top: 0.25rem; font-size: 1.4rem; }
.promo p:not(.eyebrow) { font-size: 0.9rem; color: var(--muted); }
.promo a { display: inline-flex; align-items: center; gap: 0.35rem; margin-top: 1rem; font-size: 0.9rem; font-weight: 700; text-decoration: none; }
.promo a:hover { color: var(--hot); }
.promo .ph { aspect-ratio: 1; border-radius: 10px; background: #fff; }
.peach { background: var(--peach); }
.stone { background: var(--stone); }
.promo.dark { background: var(--ink); color: #fff; }
.promo.dark .eyebrow { color: var(--orange); }
.promo.dark p:not(.eyebrow) { color: #cfcbc7; }
.promo.dark a:hover { color: var(--orange); }
.promo.dark .ph { background: rgb(255 255 255 / 0.1); color: rgb(255 255 255 / 0.4); }

.cats { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
.cat { display: grid; justify-items: center; gap: 0.5rem; padding: 0; border: 0; background: none; font-size: 0.9rem; font-weight: 600; cursor: pointer; }
.cat .ph { width: 92px; height: 92px; border: 2px solid transparent; border-radius: 50%; }
.cat:hover .ph { border-color: var(--orange); }
.cat[aria-pressed="true"] .ph { border-color: var(--ink); }
.cat[aria-pressed="true"] { color: var(--hot); }

/* ---------- Products ---------- */
.shop-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.shop-head .section-title { margin-bottom: 0.1rem; }
.sort { font-size: 0.9rem; font-weight: 600; }
.sort select { margin-left: 0.4rem; padding: 0.5rem 0.7rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1rem; margin: 0; padding: 0; list-style: none; }
.card {
  position: relative; display: flex; flex-direction: column; gap: 0.2rem;
  padding: 0.75rem 0.75rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
}
@media (prefers-reduced-motion: no-preference) {
  .card { transition: transform 0.15s, box-shadow 0.15s; }
  .card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgb(19 19 19 / 0.08); }
}
.card-img { aspect-ratio: 1; margin-bottom: 0.6rem; border-radius: 10px; background: var(--tile, var(--stone)); }
.wish {
  position: absolute; top: 1.25rem; right: 1.25rem; display: grid; place-items: center;
  width: 2.1rem; height: 2.1rem; border: 1px solid var(--line); border-radius: 50%; background: #fff; cursor: pointer;
}
.wish .icon { width: 1.1rem; height: 1.1rem; }
.wish[aria-pressed="true"] { color: var(--orange); border-color: var(--orange); }
.wish[aria-pressed="true"] .icon { fill: currentColor; }
.card-title { font-size: 0.95rem; line-height: 1.3; }
.card-cat { font-size: 0.8rem; color: var(--muted); }
.rating { display: flex; align-items: center; gap: 0.3rem; font-size: 0.8rem; color: var(--muted); }
.star { width: 1rem; height: 1rem; fill: var(--orange); stroke: var(--orange); }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 0.5rem; }
.price strong { font-size: 1.1rem; }
.price s { margin-left: 0.3rem; font-size: 0.85rem; color: var(--muted); }
.add {
  display: grid; place-items: center; width: 2.4rem; height: 2.4rem;
  border: 1px solid var(--line); border-radius: 8px; background: var(--stone); cursor: pointer;
}
.add:hover, .add.added { background: var(--ink); color: #fff; }
.empty { display: grid; justify-items: center; gap: 1rem; padding: 2.5rem; border-radius: var(--radius); background: var(--stone); }
.sentinel { padding: 1.5rem; text-align: center; font-size: 0.9rem; color: var(--muted); }

/* ---------- Features, newsletter, footer ---------- */
.features {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem;
  margin: 0; padding: 1.5rem; border-radius: var(--radius); background: var(--cream); list-style: none;
}
.features li { display: flex; align-items: center; gap: 0.8rem; }
.features .icon { width: 2rem; height: 2rem; stroke-width: 1.6; color: var(--hot); }
.features span { display: block; font-size: 0.85rem; color: var(--muted); }

.newsletter {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: 2rem; border-radius: var(--radius); background: var(--peach);
}
.newsletter h2 { font-size: 1.5rem; }
.newsletter p { color: var(--muted); }
.newsletter form { display: flex; flex: 0 1 460px; flex-wrap: wrap; gap: 0.5rem; }
.newsletter input { flex: 1 1 220px; padding: 0.8rem 1rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.news-msg { flex-basis: 100%; font-weight: 600; }

.footer { padding-block: 2.5rem 1.25rem; background: var(--ink); color: #c7c3bf; }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 2rem; }
.footer .logo { margin-bottom: 0.75rem; color: #fff; }
.footer .logo span { color: var(--orange); }
.footer h3 { margin-bottom: 0.6rem; font-size: 1rem; color: #fff; }
.footer ul { display: grid; gap: 0.35rem; margin: 0; padding: 0; font-size: 0.9rem; list-style: none; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--orange); }
.copyright { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid rgb(255 255 255 / 0.15); font-size: 0.85rem; }

/* ---------- Header extras ---------- */
.chip { padding: 0.1rem 0.5rem; border-radius: 4px; background: var(--green); color: #fff; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.06em; }
.logo small { display: block; font-size: 0.55rem; font-weight: 600; letter-spacing: 0.24em; color: var(--muted); }
.footer-contact { margin-top: 0.75rem; font-size: 0.85rem; }
.footer-legal { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1.5rem; margin-top: 2rem; padding-top: 1rem; border-top: 1px solid rgb(255 255 255 / 0.15); font-size: 0.85rem; }
.footer-legal .copyright { margin: 0; padding: 0; border: 0; }
.legal-links { display: flex; flex-wrap: wrap; gap: 1.25rem; }

/* Photo hero with the heading over the picture, like BrightCure */
.hero-photo { position: relative; display: grid; align-items: end; min-height: 380px; padding: 2.5rem; border-radius: 16px; overflow: clip; background: var(--ink); color: #fff; }
.hero-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.55; }
.hero-photo .hero-text { position: relative; gap: 0.75rem; }
.hero-photo h1 { color: #fff; }
.hero-photo h1 span { color: var(--orange); }
.hero-photo p:not(.eyebrow) { color: #e7e2dd; }
.hero-photo .eyebrow { color: var(--orange); }
.hero-photo .hero-perks { color: #fff; }

/* Banner strip (quote request, advantage, etc.) */
.banner { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 1.5rem; padding: 2rem; border-radius: var(--radius); background: var(--ink); color: #fff; }
.banner h2 { font-size: 1.6rem; }
.banner p { margin-top: 0.4rem; color: #cfcbc7; }
.banner .btn { background: var(--hot); color: #fff; }
.banner .btn:hover { background: #fff; color: var(--ink); }

/* Service and info tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; margin: 0; padding: 0; list-style: none; }
.tile { display: grid; gap: 0.5rem; padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.tile .icon { width: 2rem; height: 2rem; color: var(--hot); }
.tile h3 { font-size: 1.05rem; }
.tile p { font-size: 0.9rem; color: var(--muted); }
.tile a { font-weight: 700; font-size: 0.9rem; text-decoration: none; }
.tile a:hover { color: var(--hot); }

/* Brand and link lists */
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.chips a { display: inline-block; padding: 0.5rem 1rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 0.9rem; text-decoration: none; }
.chips a:hover { border-color: var(--ink); background: var(--stone); }

/* ---------- Inner pages ---------- */
main.inner { gap: 1.5rem; }
a.cat { text-decoration: none; color: inherit; }
.btn.outline { background: #fff; color: var(--ink); border: 1px solid var(--ink); }
.btn.outline:hover { background: var(--ink); color: #fff; }
.crumbs { display: flex; flex-wrap: wrap; gap: 0.4rem; font-size: 0.85rem; color: var(--muted); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--hot); }
.page-head { display: grid; gap: 0.4rem; }
.page-head h1 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }

/* Shop: filter sidebar + product grid */
.shop-layout { display: grid; grid-template-columns: 240px 1fr; gap: 2rem; align-items: start; }
.side { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; background: #fff; }
/* On wide screens the filters stay in place while the products scroll. */
@media (min-width: 801px) {
  .side { position: sticky; top: 1rem; max-height: calc(100dvh - 2rem); overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
}
.side h2 { margin-bottom: 0.75rem; font-size: 1.1rem; }
.side ul { display: grid; gap: 0.15rem; margin: 0 0 1.25rem; padding: 0; list-style: none; font-size: 0.9rem; }
.side a { display: flex; justify-content: space-between; gap: 0.5rem; padding: 0.4rem 0.5rem; border-radius: 6px; text-decoration: none; }
.side a:hover { background: var(--stone); }
.side a[aria-current="true"] { background: var(--ink); color: #fff; }
.side .count { color: inherit; opacity: 0.6; }
.filter-toggle { display: none; }

.card-link { display: grid; gap: 0.4rem; text-decoration: none; color: inherit; }
.card-link:hover .card-title { color: var(--hot); }

/* Product page */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }
.gallery { display: grid; gap: 0.75rem; }
.gallery .main { aspect-ratio: 1; border-radius: var(--radius); background: var(--stone); }
.thumbs { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.thumbs button { width: 70px; height: 70px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--stone); overflow: clip; cursor: pointer; }
.thumbs button[aria-current="true"] { border-color: var(--ink); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.product-info { display: grid; gap: 1rem; justify-items: start; }
.product-info h1 { font-size: clamp(1.5rem, 3vw, 2.2rem); line-height: 1.2; }
.product-price { font-size: 2rem; font-weight: 800; }
.product-meta { display: grid; gap: 0.35rem; font-size: 0.9rem; color: var(--muted); }
.buy-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.qty { width: 5rem; padding: 0.7rem; border: 1px solid var(--line); border-radius: 8px; }
.product-desc { max-width: 60ch; color: var(--muted); }

/* Cart page */
.cart-layout { display: grid; grid-template-columns: 1fr 320px; gap: 2rem; align-items: start; }
.cart-lines { display: grid; gap: 0.75rem; margin: 0; padding: 0; list-style: none; }
.cart-line { display: grid; grid-template-columns: 90px 1fr auto; gap: 1rem; align-items: center; padding: 0.75rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.cart-line .ph { width: 90px; height: 90px; border-radius: 8px; }
.cart-line h3 { font-size: 0.95rem; }
.cart-line .line-price { font-weight: 700; }
.cart-actions { display: flex; align-items: center; gap: 0.5rem; }
.icon-btn { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; }
.icon-btn:hover { background: var(--ink); color: #fff; }
.summary { display: grid; gap: 0.75rem; padding: 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--cream); }
.summary-row { display: flex; justify-content: space-between; }
.summary-total { font-size: 1.3rem; font-weight: 800; }

/* Text pages */
.prose { max-width: 70ch; display: grid; gap: 1rem; }
.prose h2 { margin-top: 1rem; font-size: 1.25rem; }
.prose p, .prose li { color: var(--muted); }
.prose ul { display: grid; gap: 0.4rem; padding-left: 1.2rem; }
.form-grid { display: grid; gap: 1rem; max-width: 34rem; }
.form-grid label { font-weight: 600; font-size: 0.9rem; }
.form-grid input, .form-grid textarea { width: 100%; margin-top: 0.3rem; padding: 0.75rem 1rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; }

@media (max-width: 800px) {
  .hero { grid-template-columns: 1fr; }
  .header-icons { margin-left: auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .shop-layout, .product-detail, .cart-layout { grid-template-columns: 1fr; }
}

/* ---------- WhatsApp chat widget ---------- */
.wa-launcher {
  position: fixed; right: 1.25rem; bottom: 1.5rem; z-index: 60;
  display: grid; place-items: center; width: 3.5rem; height: 3.5rem;
  border: 0; border-radius: 50%; background: #25d366; color: #fff;
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.25); cursor: pointer;
}
.wa-launcher svg { width: 1.75rem; height: 1.75rem; }
.wa-launcher.open svg { width: 1.2rem; height: 1.2rem; }
@media (prefers-reduced-motion: no-preference) {
  .wa-launcher { transition: transform 0.15s; }
  .wa-launcher:hover { transform: scale(1.06); }
}

.wa-panel {
  position: fixed; right: 1.25rem; bottom: 5.75rem; z-index: 60;
  width: min(21rem, calc(100vw - 2.5rem));
  overflow: clip; border-radius: 16px; box-shadow: 0 18px 48px rgb(0 0 0 / 0.3);
  font-size: 0.9rem;
}
.wa-head { display: flex; align-items: center; gap: 0.75rem; padding: 0.85rem 1rem; background: #075e54; color: #fff; }
.wa-avatar { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: rgb(255 255 255 / 0.15); }
.wa-avatar svg { width: 1.25rem; height: 1.25rem; }
.wa-who { flex: 1; line-height: 1.25; }
.wa-who strong { display: block; font-size: 0.92rem; }
.wa-who small { display: block; font-size: 0.74rem; color: rgb(255 255 255 / 0.7); }
.wa-close { border: 0; background: none; color: inherit; font-size: 1.4rem; line-height: 1; padding: 0.15rem 0.35rem; border-radius: 999px; cursor: pointer; }
.wa-close:hover { background: rgb(255 255 255 / 0.15); }

.wa-body { padding: 1.25rem 1rem; background: #ece5dd; }
.wa-bubble { max-width: 85%; padding: 0.7rem 0.9rem; border-radius: 10px; border-top-left-radius: 0; background: #fff; color: #111b21; font-size: 0.86rem; line-height: 1.5; box-shadow: 0 1px 2px rgb(0 0 0 / 0.1); }

.wa-compose { display: flex; align-items: flex-end; gap: 0.5rem; padding: 0.75rem; background: #f0f2f5; }
.wa-compose textarea {
  flex: 1; min-height: 2.5rem; max-height: 7rem; resize: none;
  padding: 0.6rem 1rem; border: 0; border-radius: 999px; background: #fff; color: #111b21;
  font: inherit; font-size: 0.9rem; line-height: 1.4;
}
.wa-compose textarea:focus-visible { outline: 2px solid #25d366; outline-offset: 1px; }
.wa-send { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; flex: none; border: 0; border-radius: 50%; background: #25d366; color: #fff; cursor: pointer; }
.wa-send svg { width: 1.05rem; height: 1.05rem; }

@media (min-width: 640px) {
  .wa-launcher { right: 2rem; bottom: 2rem; }
  .wa-panel { right: 2rem; bottom: 6.5rem; }
}
