/* ═══════════════════════════════════════════════════════════════════════════
   Jo Lifestyle — "Blush Boutique" (design canvas, Option 3)
   ═══════════════════════════════════════════════════════════════════════════
   Loaded LAST on every storefront page. The engine's stylesheets (global.css,
   components.css, home.css, product.css …) stay as Cloco ships them, so a fix there
   can be copied over unchanged; everything that makes Jo Lifestyle look like itself
   lives in this one file: the colours, the two typefaces, soft rounded cards, rose
   pill buttons, a blush footer and a floating bar on a phone.

   Typefaces: Gloock (display: logo, titles) and Outfit (everything else), self-hosted
   in /assets/fonts like Cloco's Montserrat (latin subset from Google Fonts, SIL Open Font
   License — assets/fonts/OFL-*.txt). Outfit is preloaded on the main pages.
   ═══════════════════════════════════════════════════════════════════════════ */

@font-face {
  font-family: 'Outfit';
  src: url('/assets/fonts/Outfit-VariableFont.woff2') format('woff2-variations'),
       url('/assets/fonts/Outfit-VariableFont.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Gloock';
  src: url('/assets/fonts/Gloock-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Brand */
  --jo-rose: #B23A5B;         /* buttons, badges, the dot after the name */
  --jo-rose-dark: #8E2747;    /* hover */
  --jo-blush: #F9E4E1;        /* soft panels, footer */
  --jo-blush-soft: #FBEFEC;   /* image wells behind products */
  --jo-paper: #FFF8F6;        /* the page */
  --jo-ink: #2A1E22;          /* text, dark bar */
  --jo-muted: #5A4950;        /* secondary text (5.9:1 on the page) */
  --jo-radius: 22px;          /* cards */
  --jo-radius-sm: 14px;       /* images inside cards, inputs */

  /* The engine's tokens, pointed at the brand */
  --font-primary: 'Outfit', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Gloock', Georgia, 'Times New Roman', serif;
  --bg-color: #FFF8F6;
  --surface: #FFFFFF;
  --text-color: #2A1E22;
  --color-ink: #2A1E22;
  --color-ink-soft: #3A2B30;
  --text-strong: #3A2B30;
  --text-muted: #5A4950;
  --text-subtle: #7A6A70;
  --price-strike: #7A6A70;
  --surface-muted: #F7ECE9;
  --surface-alt: #F3E4E0;
  --surface-subtle: #FDF5F3;
  --border-color: #EFDCD8;
  --border-light: #F3E6E3;
  --glass-light: rgba(255, 248, 246, 0.92);
  --glass-strong: rgba(255, 248, 246, 0.97);
  --shadow-card: 0 4px 24px rgba(178, 58, 91, 0.08);
}

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

/* ── Display type ───────────────────────────────────────────────────────── */
.section-title,
.product-page-title,
.collection-title,
#collection-title,
.footer-col:first-child h3,
.sidemenu-logo {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

/* ── Announcement bar ───────────────────────────────────────────────────── */
.announcement-bar { background: var(--jo-rose); color: #fff; border-bottom: 0; }
.announcement-bar a, .announcement-bar .announce-nav { color: #fff; }

/* ── Top bar: "jo lifestyle." in Gloock ─────────────────────────────────── */
.topbar { background: var(--glass-light); border-bottom: 1px solid var(--border-light); }
.topbar .logo {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.45rem;
  letter-spacing: 0;
  text-transform: lowercase;
}
.topbar .logo::after { content: '.'; color: var(--jo-rose); }

/* Desktop: the search button reads as a search field (it still opens the search overlay). */
@media (min-width: 1024px) {
  .topbar-right { gap: 8px; }
  .topbar-right > button { width: 42px; height: 42px; border-radius: 50%; background: var(--jo-blush); }
  .topbar-right > .nav-search {
    width: auto; min-width: 300px; justify-content: flex-start; gap: 10px; white-space: nowrap;
    padding: 0 18px; border-radius: 999px; background: #fff;
    box-shadow: 0 2px 10px rgba(178, 58, 91, 0.08); color: var(--jo-muted);
  }
  .topbar-right > .nav-search::after { content: 'Search totes, clutches, colours…'; font-size: 0.88rem; }
  .topbar-right > .nav-order { background: var(--jo-ink); color: #fff; }
}

/* ── Product cards: white, rounded, the bag on a blush well ─────────────── */
.product-grid { gap: 12px; background: transparent; }
@media (min-width: 769px) { .product-grid { gap: 22px; } }
.product-card {
  background: #fff;
  border-radius: var(--jo-radius);
  padding: 8px;
  box-shadow: 0 2px 14px rgba(42, 30, 34, 0.04);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
@media (hover: hover) { .product-card:hover { box-shadow: var(--shadow-card); transform: translateY(-2px); } }
.product-image-wrapper { border-radius: var(--jo-radius-sm); background-color: var(--jo-blush-soft); }
.product-card-info { padding: 12px 6px 8px; }
.product-title { font-weight: 500; font-size: 0.92rem; }
.product-price { margin-bottom: 4px; }

.add-icon {
  width: 38px; height: 38px;
  background: var(--jo-rose); color: #fff;
  box-shadow: 0 4px 12px rgba(178, 58, 91, 0.3);
}
.love-icon { width: 36px; height: 36px; color: var(--jo-rose); }

.badge-discount { background: var(--jo-rose); border-radius: 999px; padding: 3px 9px; font-size: 0.66rem; }
.badge-promo { border-radius: 999px; }
.badge-soldout, .badge-flash { border-radius: 999px; }
.badge-flash { background: var(--jo-rose); color: #fff; }

/* ── Product page ───────────────────────────────────────────────────────── */
.product-page-title { font-size: clamp(1.6rem, 3vw, 2.1rem); line-height: 1.12; }
.btn-add-to-cart, .btn-buy-now { border-radius: 999px; letter-spacing: 0.3px; font-weight: 600; }
.btn-add-to-cart { background: #fff; color: var(--jo-rose); border: 1.5px solid var(--jo-rose); }
.btn-add-to-cart:hover { background: var(--jo-blush); }
.btn-buy-now { background: var(--jo-rose); border-color: var(--jo-rose); color: #fff; }
.btn-buy-now:hover { background: var(--jo-rose-dark); opacity: 1; }
.qty-btn, .qty-input { border-radius: 999px; }
.product-spec-tags span { background: var(--jo-blush); color: var(--jo-ink); }
.bg-sizes button.is-on { background: var(--jo-rose); border-color: var(--jo-rose); }
.product-accordion summary { font-weight: 600; }

/* ── Footer: blush ──────────────────────────────────────────────────────── */
.footer { background: var(--jo-blush); border-top: 0; }
.footer-col:first-child h3 { font-size: 1.6rem; text-transform: lowercase; }
.footer-col:first-child h3::after { content: '.'; color: var(--jo-rose); }
.footer-bottom { background: var(--jo-blush); color: var(--jo-muted); }

/* ── Phone: the bottom bar floats as a dark pill ────────────────────────── */
@media (max-width: 768px) {
  .mobile-bottom-bar {
    left: 10px; right: 10px; bottom: 10px; width: auto; height: 58px;
    border-radius: 999px; border: 0; padding: 5px;
    background: var(--jo-ink);
    box-shadow: 0 8px 24px rgba(42, 30, 34, 0.25);
  }
  .mobile-bottom-bar.nav-hidden { transform: translateY(calc(100% + 14px)); }
  .bottom-bar-item { color: #F3E3E7; border-radius: 999px; }
  .bottom-bar-item.active { color: #fff; background: var(--jo-rose); }
  .bottom-bar-label { letter-spacing: 0.2px; text-transform: none; font-size: 0.66rem; }
}

/* ── Small things that should match ─────────────────────────────────────── */
::selection { background: var(--jo-blush); color: var(--jo-ink); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-color: var(--jo-rose); }

/* ═══ Home: Jo Lifestyle sections (js/home-sections.js) ═══════════════════ */
.jo-highlights, .jo-deals, .jo-favourites, .jo-occasions, .jo-trust { padding: 0 16px; max-width: 1320px; margin: 0 auto; }
@media (min-width: 769px) { .jo-highlights, .jo-deals, .jo-favourites, .jo-occasions, .jo-trust { padding: 0 40px; } }
.jo-sec-title { text-align: left; margin: 0; font-size: clamp(1.5rem, 3vw, 2.3rem); }
.jo-sec-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.jo-sec-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.jo-sec-link { color: var(--jo-rose); font-weight: 600; font-size: 0.92rem; }
.jo-empty { grid-column: 1 / -1; text-align: center; padding: 40px 0; color: var(--jo-muted); }

/* Highlights: round links that scroll sideways on a phone */
.jo-highlights { padding-top: 14px; padding-bottom: 6px; }
.jo-hl-track { display: flex; gap: 16px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 4px; }
.jo-hl-track::-webkit-scrollbar { display: none; }
.jo-hl { flex: none; width: 78px; display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--jo-ink); text-decoration: none; }
.jo-hl-ring { width: 72px; height: 72px; border-radius: 50%; padding: 3px; background: conic-gradient(#B23A5B, #F2A7B5, #E9C46A, #B23A5B); display: block; }
.jo-hl-ring img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 3px solid var(--jo-paper); display: block; background: var(--jo-blush-soft); }
.jo-hl-name { font-size: 0.78rem; font-weight: 500; text-align: center; line-height: 1.2; }
@media (min-width: 769px) { .jo-hl { width: 96px; } .jo-hl-ring { width: 88px; height: 88px; } .jo-hl-name { font-size: 0.85rem; } }

/* Today's deals: a white box with the clock */
.jo-deals { margin-top: 22px; }
.jo-deals-box { background: #fff; border-radius: 26px; padding: 18px 14px; box-shadow: 0 4px 24px rgba(178, 58, 91, 0.06); }
@media (min-width: 769px) { .jo-deals-box { padding: 26px; } }
.jo-deals-box .product-card { box-shadow: none; background: var(--jo-paper); }
.jo-countdown { display: inline-flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }
.jo-countdown span { min-width: 38px; height: 36px; padding: 0 6px; border-radius: 10px; background: var(--jo-ink); color: #fff; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.jo-countdown b { color: var(--jo-ink); }

/* Favourites: chips */
.jo-favourites { margin-top: 36px; }
.jo-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.jo-chips::-webkit-scrollbar { display: none; }
.jo-chip { flex: none; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 0; background: #fff; color: var(--jo-ink); font: inherit; font-size: 0.88rem; font-weight: 500; cursor: pointer; }
.jo-chip.is-on { background: var(--jo-ink); color: #fff; }
.jo-chip:focus-visible { outline: 2px solid var(--jo-rose); outline-offset: 2px; }
#home-fav-grid.is-loading { opacity: 0.45; transition: opacity 0.2s; }

/* Shop by occasion: picture tiles */
.jo-occasions { margin-top: 40px; }
.jo-occ-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
@media (min-width: 769px) { .jo-occ-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; } }
.jo-occ { position: relative; min-height: 160px; border-radius: 22px; overflow: hidden; background: var(--jo-blush); padding: 16px; display: flex; flex-direction: column; justify-content: space-between; color: var(--jo-ink); text-decoration: none; }
@media (min-width: 769px) { .jo-occ { min-height: 230px; padding: 22px; } }
.jo-occ img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.jo-occ img + .jo-occ-name, .jo-occ img ~ .jo-occ-go { color: #fff; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35); }
.jo-occ-name { position: relative; font-family: var(--font-display); font-size: 1.3rem; line-height: 1.1; }
.jo-occ-go { position: relative; font-size: 0.85rem; font-weight: 600; }

/* Trust row */
.jo-trust { margin-top: 36px; margin-bottom: 30px; }
.jo-trust-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 769px) { .jo-trust-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; } }
.jo-trust-item { display: flex; gap: 10px; align-items: center; background: #fff; border-radius: 18px; padding: 14px; }
.jo-trust-dot { flex: none; width: 38px; height: 38px; border-radius: 50%; background: var(--jo-blush); color: var(--jo-rose); display: flex; align-items: center; justify-content: center; }
.jo-trust-item b { display: block; font-weight: 600; font-size: 0.9rem; }
.jo-trust-item small { display: block; color: var(--jo-muted); font-size: 0.8rem; }
@media (max-width: 480px) {
  .jo-trust-item { padding: 12px 10px; gap: 8px; }
  .jo-trust-dot { width: 28px; height: 28px; font-size: 0.8rem; }
  .jo-trust-item b { font-size: 0.84rem; }
}
