/* BluLight smoke shop. Brand colours from the BluLight design system:
   blue #1211F8, deal blue #2029FF, navy #00045B, mint #00FDA2. */
:root {
  --blue: #1211F8;
  --blue-2: #2029FF;
  --navy: #00045B;
  --mint: #00FDA2;
  --ink: #0d1030;
  --muted: #5d6275;
  --line: #e3e5ee;
  --bg: #ffffff;
  --soft: #f4f5fb;
  --sale: #c4002f;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
h1, h2, h3 { line-height: 1.2; }
h1 { font-size: clamp(1.5rem, 4vw, 2.1rem); margin: 1.2rem 0 .4rem; }
[hidden] { display: none !important; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }

/* ---- the way back to blulight.com: always visible, never subtle */
.topbar {
  background: var(--navy); color: #fff; display: flex; justify-content: space-between;
  align-items: center; gap: 12px; padding: 8px 16px; font-size: .9rem;
}
.back-home {
  color: var(--navy); background: var(--mint); font-weight: 700; text-decoration: none;
  padding: 6px 14px; border-radius: 999px; white-space: nowrap;
}
.back-home:hover, .back-home:focus { background: #fff; }
.dispo-links { display: flex; align-items: center; gap: 6px 14px; flex-wrap: wrap; justify-content: flex-end; }
.dispo-links a { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.dispo-links a:hover { color: var(--mint); }
.dispo-label { opacity: .8; }

/* ---- header */
.site-header { border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 0; z-index: 20; }
.header-row { display: flex; align-items: center; gap: 16px; padding-top: 12px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.brand img { width: 130px; }
.brand-sub { color: var(--navy); font-weight: 800; letter-spacing: .04em; text-transform: uppercase; font-size: .8rem; }
.search { flex: 1; display: flex; max-width: 520px; margin-left: auto; }
.search input {
  flex: 1; min-width: 0; border: 2px solid var(--line); border-right: 0; border-radius: 999px 0 0 999px;
  padding: 9px 14px; font: inherit;
}
.search input:focus { outline: none; border-color: var(--blue); }
.search button {
  border: 0; background: var(--blue); color: #fff; padding: 0 16px; border-radius: 0 999px 999px 0; cursor: pointer;
}
.cart-link { position: relative; color: var(--navy); padding: 6px; }
.cart-count {
  position: absolute; top: -4px; right: -6px; background: var(--blue); color: #fff;
  font-size: .72rem; font-weight: 700; min-width: 20px; height: 20px; border-radius: 10px;
  display: grid; place-items: center; padding: 0 5px;
}
.cat-nav { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: none; }
.cat-nav::-webkit-scrollbar, .thumbs::-webkit-scrollbar { display: none; }
.cat-nav a {
  white-space: nowrap; text-decoration: none; color: var(--ink); background: var(--soft);
  padding: 6px 12px; border-radius: 999px; font-size: .9rem;
}
.cat-nav a[aria-current="page"], .cat-nav a:hover { background: var(--navy); color: #fff; }

/* ---- buttons */
.btn {
  display: inline-block; background: var(--blue); color: #fff; border: 2px solid var(--blue);
  padding: 10px 20px; border-radius: 999px; font-weight: 700; text-decoration: none; cursor: pointer; font-size: 1rem;
}
.btn:hover { background: var(--blue-2); }
.btn.ghost { background: transparent; color: var(--blue); }
.btn.big { padding: 13px 26px; font-size: 1.05rem; }
.btn.block { display: block; text-align: center; }
.btn:disabled, .btn.is-disabled { background: #b7b9c9; border-color: #b7b9c9; cursor: not-allowed; pointer-events: none; }

/* ---- home */
.hero {
  margin-top: 20px; border-radius: 20px; padding: 28px; color: #fff;
  background: linear-gradient(135deg, var(--navy), var(--blue));
  display: flex; align-items: center; justify-content: space-between; gap: 20px; overflow: hidden;
}
.hero h1 { margin-top: 0; }
.hero p { max-width: 560px; opacity: .92; }
.hero .btn { background: var(--mint); border-color: var(--mint); color: var(--navy); }
.hero .btn.ghost { background: transparent; color: #fff; border-color: #fff; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.hero-bear { width: 150px; flex-shrink: 0; }
.section-title { font-size: 1.3rem; margin: 2rem 0 .8rem; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; }
.section-head a { font-weight: 600; text-decoration: none; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.cat-tile {
  display: flex; flex-direction: column; text-decoration: none; color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff;
}
.cat-tile img { aspect-ratio: 1; object-fit: contain; background: var(--soft); width: 100%; }
.cat-tile span { padding: 10px 12px; font-weight: 700; display: flex; flex-direction: column; }
.cat-tile small { font-weight: 400; color: var(--muted); }

/* ---- ways into the dispensaries */
.dispo-block {
  margin-top: 28px; padding: 20px; border-radius: 18px; background: var(--soft); border: 1px solid var(--line);
  display: grid; grid-template-columns: 1fr 2fr; gap: 16px; align-items: center;
}
.dispo-block h2 { margin: 0 0 4px; font-size: 1.2rem; }
.dispo-block p { margin: 0; color: var(--muted); }
.dispo-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.dispo-card {
  display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 14px; text-decoration: none;
  background: linear-gradient(135deg, var(--navy), var(--blue)); color: #fff;
}
.dispo-card span { font-size: .85rem; color: var(--mint); }
.dispo-card:hover { box-shadow: 0 6px 20px rgba(0, 4, 91, .25); }
.dispo-inline { margin: 6px 0 0; }

/* ---- product grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.card {
  text-decoration: none; color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; background: #fff; transition: box-shadow .15s;
}
.card:hover { box-shadow: 0 6px 20px rgba(0, 4, 91, .12); }
.card-img { position: relative; background: var(--soft); aspect-ratio: 1; display: block; }
.card-img img { width: 100%; height: 100%; object-fit: contain; }
.card-body { padding: 10px 12px 14px; display: flex; flex-direction: column; gap: 3px; }
.card-vendor { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; margin: 0; }
.card-title { font-weight: 600; line-height: 1.3; }
.card-price { font-weight: 700; color: var(--navy); }
.card-price s, .price s { color: var(--muted); font-weight: 400; }
.card.is-sold { opacity: .6; }
.badge {
  position: absolute; top: 8px; left: 8px; font-size: .75rem; font-weight: 700; color: #fff;
  padding: 3px 9px; border-radius: 999px;
}
.badge.sold { background: #555b70; }
.badge.sale { background: var(--sale); }
.noimg { display: block; width: 100%; aspect-ratio: 1; background: var(--soft); }

/* ---- lists */
.list-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.list-head p { margin: 0; }
.sort-form { display: flex; align-items: center; gap: 8px; }
.sort-form select { font: inherit; padding: 7px 10px; border-radius: 10px; border: 1px solid var(--line); }
.pager { display: flex; justify-content: center; align-items: center; gap: 18px; margin: 28px 0; }
.pager a { font-weight: 700; text-decoration: none; }
.empty { text-align: center; padding: 48px 0; }
.notice { background: #fff5d6; border: 1px solid #f0d27a; padding: 10px 14px; border-radius: 10px; }

/* ---- product page */
.product { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 24px; }
.main-img { width: 100%; aspect-ratio: 1; object-fit: contain; background: var(--soft); border-radius: var(--radius); }
.noimg.big { border-radius: var(--radius); }
.thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; }
.thumbs button { border: 1px solid var(--line); border-radius: 10px; padding: 0; background: var(--soft); cursor: pointer; flex-shrink: 0; }
.thumbs img { width: 64px; height: 64px; object-fit: contain; border-radius: 10px; }
.buybox h1 { margin-top: .2rem; }
.price { font-size: 1.5rem; font-weight: 800; color: var(--navy); margin: .3rem 0 1rem; }
.add-form { display: flex; flex-direction: column; gap: 12px; }
.add-form label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .9rem; }
.add-form select, .add-form input {
  font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff;
}
.qty-row { display: flex; gap: 12px; align-items: flex-end; }
.qty input { width: 80px; }
.qty-row .btn { flex: 1; }
.description { margin-top: 20px; border-top: 1px solid var(--line); padding-top: 14px; overflow-wrap: anywhere; }
.description table { border-collapse: collapse; }
.description td, .description th { border: 1px solid var(--line); padding: 4px 8px; }

/* ---- cart */
.cart-lines { display: flex; flex-direction: column; }
.cart-line { display: grid; grid-template-columns: 80px 1fr auto; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: start; }
.cart-line.is-sold { opacity: .65; }
.cl-img img, .cl-img .noimg { width: 80px; height: 80px; object-fit: contain; background: var(--soft); border-radius: 10px; }
.cl-main { display: flex; flex-direction: column; gap: 4px; }
.cl-title { font-weight: 700; text-decoration: none; color: var(--ink); }
.cl-variant { color: var(--muted); font-size: .9rem; }
.cl-sold { color: var(--sale); font-size: .88rem; font-weight: 600; }
.cl-qty { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.cl-qty button { border: 1px solid var(--line); background: #fff; border-radius: 8px; min-width: 34px; height: 34px; font-size: 1.1rem; cursor: pointer; }
.cl-qty .cl-remove { border: 0; color: var(--muted); text-decoration: underline; font-size: .88rem; }
.cl-price { font-weight: 700; }
.cart-summary { max-width: 420px; margin: 20px 0 0 auto; display: flex; flex-direction: column; gap: 8px; }
.subtotal { display: flex; justify-content: space-between; font-size: 1.15rem; margin: 0; }
.keep-shopping { font-weight: 600; text-decoration: none; }
.cart-empty { text-align: center; padding: 40px 0; }

/* ---- footer */
.site-footer { background: var(--navy); color: #d9dcf5; margin-top: 56px; padding: 36px 0 20px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; }
.footer-grid img { width: 150px; margin-bottom: 10px; }
.site-footer h2 { font-size: .95rem; color: #fff; margin: 0 0 8px; }
.site-footer a { display: block; color: #d9dcf5; text-decoration: none; margin: 4px 0; }
.site-footer a:hover { color: var(--mint); }
.fineprint { font-size: .8rem; opacity: .7; margin-top: 20px; }

/* ---- toast */
.toast {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 50;
  background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .25); max-width: calc(100% - 32px);
}
.toast a { color: var(--mint); font-weight: 700; margin-left: 6px; }

/* ---- phone */
@media (max-width: 760px) {
  .topbar { flex-direction: column; gap: 6px; }
  .dispo-links { justify-content: center; font-size: .85rem; }
  .dispo-label { display: none; }
  .dispo-block { grid-template-columns: 1fr; }
  .dispo-cards { grid-template-columns: 1fr; }
  .header-row { flex-wrap: wrap; gap: 10px; }
  .brand img { width: 110px; }
  .cart-link { margin-left: auto; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .hero { padding: 22px; }
  .hero-bear { display: none; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .product { grid-template-columns: 1fr; gap: 18px; }
  .footer-grid { grid-template-columns: 1fr; }
  .cart-line { grid-template-columns: 64px 1fr auto; gap: 10px; }
  .cl-img img, .cl-img .noimg { width: 64px; height: 64px; }
  .cart-summary { max-width: none; }
}

/* ---- /embed: the strip blulight.com frames */
body.embed { background: transparent; padding: 0; }
.embed-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.embed-head strong { display: block; font-size: 1.2rem; color: var(--navy); }
.embed-head span { color: var(--muted); font-size: .9rem; }
.embed-row { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.embed-card {
  flex: 0 0 160px; scroll-snap-align: start; text-decoration: none; color: var(--ink); background: #fff;
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column;
}
.embed-card img { width: 100%; aspect-ratio: 1; object-fit: contain; background: var(--soft); }
.embed-title { padding: 8px 10px 0; font-size: .85rem; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.embed-price { padding: 4px 10px 10px; font-weight: 700; color: var(--navy); }
