/*
 Theme Name: SmokeOZ Blocks
 Theme URI: https://smokeoz.com
 Description: Clean, minimal WooCommerce block theme for SmokeOZ — Australian disposable device retail. Paper-white canvas, single teal accent, 21+ age gate.
 Requires at least: 6.5
 Tested up to: 6.6
 Requires PHP: 7.4
 Text Domain: smokeoz-blocks
 License: GPL-2.0-or-later
*/

/* Design tokens — single source of truth is theme.json (DESIGN.md == theme.json).
   Friendly names below map 1:1 to WordPress preset variables so there is no drift. */
:root{
  --bg: var(--wp--preset--color--background);
  --surface: var(--wp--preset--color--surface);
  --ink: var(--wp--preset--color--foreground);
  --muted: var(--wp--preset--color--muted);
  --primary: var(--wp--preset--color--primary);
  --primary-h: var(--wp--preset--color--primary-hover);
  --border: var(--wp--preset--color--border);
  --soft: var(--wp--preset--color--soft);
  --warn: var(--wp--preset--color--warn);
  --warn-bg: var(--wp--preset--color--warn-bg);
  --ink-strong: var(--wp--preset--color--ink-strong);
  --overlay: var(--wp--preset--color--overlay);
  --r-sm: var(--wp--preset--border-radius--small);
  --r: var(--wp--preset--border-radius--medium);
  --r-lg: var(--wp--preset--border-radius--large);
  --r-pill: var(--wp--preset--border-radius--pill);
  --maxw: 1200px;
  --fs-label: var(--wp--preset--font-size--label);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--ink); font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
h1,h2,h3 { letter-spacing: -0.01em; }

/* Buttons ---------------------------------------------------- */
.btn, .wp-block-button__link {
  border-radius: var(--r) !important; min-height: 48px; font-weight: 600;
  background: var(--primary); color: #fff !important; border: 1px solid transparent;
  padding: 13px 24px; display: inline-flex; align-items: center; justify-content: center;
  font-size: var(--fs-label); cursor: pointer;
}
.btn:hover, .wp-block-button__link:hover { background: var(--primary-h); color: #fff !important; }
/* Secondary action (ghost) — white fill, ink text, hairline border; hover shifts text to primary.
   Mirrors DESIGN.md button-ghost. */
.btn--ghost, .btn--ghost:hover {
  background: #fff !important; color: var(--ink) !important; border: 1px solid var(--border) !important;
}
.btn--ghost:hover { border-color: var(--primary) !important; color: var(--primary) !important; }
.wp-block-button__link.is-style-outline,
.is-style-outline .wp-block-button__link {
  background: #fff !important; color: var(--ink) !important; border: 1px solid var(--border) !important;
}
.wp-block-button__link.is-style-outline:hover,
.is-style-outline .wp-block-button__link:hover { border-color: var(--primary) !important; background: #fff !important; color: var(--primary) !important; }

/* Announcement ---------------------------------------------- */
.announce { background: var(--ink-strong); color: #fff; font-size: 13.5px; text-align: center; padding: 9px 16px; }
.announce a { color: #7FE3DA; }

/* Header ----------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(251,251,249,.92); backdrop-filter: saturate(180%) blur(8px); border-bottom: 1px solid var(--border); }
.site-header .nav { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand-logo { font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }
.brand-logo span { color: var(--primary); }
.site-header .menu { display: flex; gap: 26px; font-size: 15px; font-weight: 500; }
.site-header .menu a:hover { color: var(--primary); }
.site-header .actions { display: flex; align-items: center; gap: 14px; }
.cart-badge { position: relative; }
.cart-badge .badge { position: absolute; top: -7px; right: -9px; background: var(--primary); color: #fff; font-size: 11px; font-weight: 700; border-radius: 999px; min-width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.hamb { display: none; background: none; border: 0; cursor: pointer; }

/* Hero ------------------------------------------------------- */
.section { padding: 64px 0; }
.section.soft { background: var(--soft); }
.hero { padding: 72px 0; }
.hero .grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero p.lead { font-size: 18px; color: var(--muted); max-width: 520px; }
.hero .device { background: #fff; border: 1px solid var(--border); border-radius: var(--r-lg); padding: 32px; display: flex; align-items: center; justify-content: center; min-height: 360px; }
.eyebrow { display: inline-block; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--primary); font-weight: 700; margin-bottom: 14px; }

/* Trust row -------------------------------------------------- */
.trust { display: grid; grid-template-columns: repeat(5,1fr); gap: 16px; }
.trust .t { background: #fff; border: 1px solid var(--border); border-radius: var(--r); padding: 22px 18px; text-align: center; }
.trust .t strong { display: block; font-size: 14px; margin-bottom: 3px; }
.trust .t span { font-size: 13px; color: var(--muted); }
.trust .t svg { width: 30px; height: 30px; stroke: var(--primary); fill: none; stroke-width: 1.6; margin-bottom: 10px; }

/* Brands ----------------------------------------------------- */
.brands { display: grid; grid-template-columns: repeat(5,1fr); gap: 16px; }
.brand { display: flex; align-items: center; justify-content: center; padding: 30px 16px; border: 1px solid var(--border); border-radius: var(--r); background: #fff; font-weight: 700; font-size: 16px; min-height: 88px; transition: .15s; }
.brand:hover { border-color: var(--primary); color: var(--primary); }

/* Product cards --------------------------------------------- */
.products-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }
.product-card { background: #fff; border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; }
.product-card .ph { height: 200px; background: var(--soft); display: flex; align-items: center; justify-content: center; border-bottom: 1px solid var(--border); }
.product-card .pb { padding: 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.product-card .brand-n { font-size: 12px; color: var(--primary); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.product-card .name { font-weight: 600; font-size: 15px; }
.product-card .meta { font-size: 13px; color: var(--muted); }
.product-card .pr { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding-top: 12px; }
.product-card .price { font-weight: 700; font-size: 16px; }
.product-card .atc { background: var(--primary); color: #fff; border: 0; border-radius: var(--r-sm); min-width: 42px; height: 42px; font-weight: 700; cursor: pointer; font-size: 18px; }

/* Capacity --------------------------------------------------- */
.caps { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
.cap { background: var(--ink-strong); color: #fff; border-radius: var(--r); padding: 26px; text-align: center; }
.cap b { display: block; font-size: 26px; font-weight: 800; }
.cap span { font-size: 13px; color: #CBD5E1; }

/* FAQ -------------------------------------------------------- */
.faq { max-width: 820px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--border); padding: 16px 0; }
.faq summary { font-weight: 600; font-size: 16px; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--primary); font-weight: 700; font-size: 20px; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 10px 0 0; color: var(--muted); font-size: 15px; }

/* Newsletter ------------------------------------------------- */
.news { background: var(--soft); border-radius: var(--r); padding: 40px; text-align: center; }
.news form { display: flex; gap: 10px; max-width: 460px; margin: 18px auto 0; flex-wrap: wrap; }
.news input { flex: 1; min-width: 200px; min-height: 48px; padding: 0 16px; border: 1px solid var(--border); border-radius: var(--r); font-size: 15px; }

/* Footer ----------------------------------------------------- */
.site-footer { background: var(--ink-strong); color: #CBD5E1; padding: 56px 0 28px; font-size: 14px; }
.site-footer a { color: #CBD5E1; }
.site-footer a:hover { color: #fff; }
.fcols { display: grid; grid-template-columns: 1.4fr repeat(3,1fr); gap: 32px; }
.site-footer h4 { color: #fff; font-size: 14px; margin: 0 0 14px; text-transform: uppercase; letter-spacing: .04em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.warnbar { background: var(--warn-bg); border-top: 3px solid var(--warn); color: var(--warn); font-size: 13px; padding: 18px 0; margin-top: 40px; }
.warnbar strong { color: var(--warn); }

/* Section head ---------------------------------------------- */
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 30px; flex-wrap: wrap; }

/* Age gate --------------------------------------------------- */
#ageGate { position: fixed; inset: 0; z-index: 9999; background: var(--overlay); display: flex; align-items: center; justify-content: center; padding: 24px; }
#ageGate .box { max-width: 440px; width: 100%; background: #fff; border-radius: var(--r-lg); padding: 36px 28px; text-align: center; }
#ageGate h2 { font-size: 23px; margin: 6px 0 10px; }
#ageGate p { color: var(--muted); font-size: 14.5px; }
#ageGate .row { margin-top: 22px; display: flex; gap: 12px; flex-wrap: wrap; }
#ageGate .btn { flex: 1; min-width: 140px; }

/* WooCommerce blocks ---------------------------------------- */
.wc-block-product-collection { margin: 0; }
.wc-block-product-template { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.wc-block-product { background: #fff; border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; padding: 0; }
.wc-block-product__image { display: block; background: var(--soft); border-bottom: 1px solid var(--border); padding: 16px; }
.wc-block-product__image img { width: 100%; height: 180px; object-fit: contain; }
.wc-block-product__content { padding: 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.wc-block-product__title { font-weight: 600; font-size: 15px; }
.wc-block-product__title a { color: var(--ink); }
.wc-block-product__price { font-weight: 700; font-size: 16px; margin-top: auto; }
.wc-block-product__price .woocommerce-Price-amount { color: var(--ink); }
.wc-block-product__add-to-cart, .wc-block-product__button { margin-top: 12px; }
.wc-block-product__add-to-cart .wp-block-button__link,
.wc-block-product__button .wp-block-button__link { background: var(--primary); color: #fff; border-radius: var(--r-sm); min-height: 42px; font-weight: 700; width: 100%; }
.wc-block-product__add-to-cart .wp-block-button__link:hover,
.wc-block-product__button .wp-block-button__link:hover { background: var(--primary-h); }
.woocommerce .wc-block-grid__product { border: 1px solid var(--border); border-radius: var(--r); }

/* Single product */
.wc-block-single-product .wp-block-woocommerce-product-image { background: #fff; border: 1px solid var(--border); border-radius: var(--r-lg); padding: 24px; }
.wc-block-single-product .wc-block-components-product-title,
.wp-block-woocommerce-product-title { font-size: clamp(26px,3.4vw,38px); letter-spacing: -.02em; font-weight: 700; }
.wp-block-woocommerce-product-price .woocommerce-Price-amount { font-size: 24px; font-weight: 800; }
.wp-block-woocommerce-product-button .wp-block-button__link { background: var(--primary); color: #fff; border-radius: var(--r); min-height: 48px; font-weight: 600; }
.wp-block-woocommerce-product-button .wp-block-button__link:hover { background: var(--primary-h); }
.wp-block-woocommerce-product-details .wc-tab, .woocommerce-tabs { border-top: 1px solid var(--border); margin-top: 24px; }

/* Cart / checkout spacing */
.wc-block-cart, .wc-block-checkout { max-width: 1200px; margin: 0 auto; }
.is-medium .wc-block-cart__sidebar, .wc-block-checkout__sidebar { border: 1px solid var(--border); border-radius: var(--r); }

/* Responsive ------------------------------------------------- */
@media (max-width: 980px){
  .hero .grid { grid-template-columns: 1fr; gap: 32px; }
  .trust, .brands, .products-grid, .caps { grid-template-columns: repeat(2,1fr); }
  .fcols { grid-template-columns: 1fr 1fr; }
  .site-header .menu { display: none; }
  .hamb { display: inline-flex; }
}
@media (max-width: 560px){
  .wrap { padding: 0 16px; }
  .section { padding: 48px 0; }
  .trust, .brands, .products-grid, .caps, .fcols { grid-template-columns: 1fr; }
  .btn, .wp-block-button__link { width: 100%; }
}
