/* ============================================================
   Waterclick — Products catalog ([waterclick_products], page id 10)
   Fully scoped under .wc-shop — loads on a live site, must not leak.
   Brand: red #d72127 sole accent + cool greys. Single font: Prompt.
   No build step: landing.css and landing.scss are identical plain CSS.
   Card grid mirrors catalog.css so /products/ reads as one system with
   the shop / category archives.
   ============================================================ */

/* ---------- TOKENS (on .wc-shop, never :root) ---------- */
.wc-shop{
  --ink:#0A2430;        /* deep — text */
  --ink-2:#3A5563;      /* muted grey */
  --paper:#FFFFFF;      /* page ground under sticky bar */
  --surface:#FFFFFF;    /* card */
  --mist:#DCE8ED;       /* cool grey line */
  --mist-2:#EAF1F4;     /* cool grey fill */
  --red:#D72127;        /* brand red — sole accent */
  --red-deep:#B01015;
  --shadow:0 1px 2px rgba(10,36,48,.05), 0 8px 30px -12px rgba(10,36,48,.18);
  --shadow-lift:0 2px 4px rgba(10,36,48,.06), 0 24px 48px -18px rgba(10,36,48,.30);
  --r:14px;
  --hh:85px;            /* fixed site-header height — sticky filter offset */
  --font-sans:"Prompt","Noto Sans Thai","Sarabun",-apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,sans-serif;

  color:var(--ink);
  font-family:var(--font-sans);
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
}
.wc-shop *{box-sizing:border-box}
.wc-shop [hidden]{display:none!important}
.wc-shop :focus-visible{outline:2.5px solid var(--red);outline-offset:3px;border-radius:6px}

/* ---------- lead line ---------- */
.wc-shop .wc-lead{
  margin:0 0 22px;color:var(--ink-2);font-size:16px;max-width:74ch;
}

/* ============================================================
   SEARCH — the signature: a wide "clarity lens" field
   ============================================================ */
.wc-shop .wc-search{
  position:relative;display:flex;align-items:center;margin:0 0 20px;
}
.wc-shop .wc-search__label{
  position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;
}
.wc-shop .wc-search__ico{
  position:absolute;left:20px;width:22px;height:22px;color:var(--ink-2);
  pointer-events:none;transition:color .18s ease;
}
.wc-shop .wc-search__input{
  width:100%;height:60px;
  padding:0 52px 0 54px;margin:0;
  font-family:inherit;font-size:17px;color:var(--ink);
  background:var(--surface);
  border:1.5px solid var(--mist);border-radius:16px;
  box-shadow:var(--shadow);
  transition:border-color .18s ease, box-shadow .18s ease;
  -webkit-appearance:none;appearance:none;
}
.wc-shop .wc-search__input::placeholder{color:var(--ink-2);opacity:.75}
.wc-shop .wc-search__input::-webkit-search-cancel-button{-webkit-appearance:none}
.wc-shop .wc-search__input:focus{
  outline:none;border-color:var(--red);
  box-shadow:0 0 0 4px rgba(215,33,39,.13), var(--shadow-lift);
}
.wc-shop .wc-search:focus-within .wc-search__ico{color:var(--red)}
.wc-shop .wc-search__clear{
  position:absolute;right:14px;display:grid;place-items:center;
  width:32px;height:32px;border:none;border-radius:50%;cursor:pointer;
  background:var(--mist-2);color:var(--ink-2);font-size:22px;line-height:1;
  transition:background .16s ease, color .16s ease;
}
.wc-shop .wc-search__clear:hover{background:var(--red);color:#fff}

/* ---------- suggestions dropdown ---------- */
.wc-shop .wc-suggest{
  position:absolute;top:calc(100% + 8px);left:0;right:0;z-index:20;
  background:var(--surface);border:1px solid var(--mist);border-radius:14px;
  box-shadow:var(--shadow-lift);overflow:hidden;padding:6px;
  max-height:min(70vh,440px);overflow-y:auto;
}
.wc-shop .wc-suggest__item{
  display:flex;align-items:center;gap:12px;width:100%;
  padding:9px 12px;border:none;background:none;border-radius:10px;cursor:pointer;
  color:var(--ink);font-family:inherit;font-size:15px;text-align:left;text-decoration:none;
  transition:background .12s ease;
}
.wc-shop .wc-suggest__item:hover,
.wc-shop .wc-suggest__item.is-active{background:var(--mist-2)}
.wc-shop .wc-suggest__img{
  width:40px;height:40px;flex:0 0 40px;border-radius:8px;
  object-fit:contain;background:var(--mist-2);
}
.wc-shop .wc-suggest__name{
  flex:1 1 auto;min-width:0;line-height:1.35;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.wc-shop .wc-suggest__name mark{background:rgba(215,33,39,.16);color:var(--red-deep);padding:0 1px;border-radius:3px}
.wc-shop .wc-suggest__meta{
  flex:0 0 auto;color:var(--ink-2);font-size:13px;font-weight:600;
  font-variant-numeric:tabular-nums;white-space:nowrap;
}
.wc-shop .wc-suggest__cat{color:var(--ink-2);font-weight:500}
.wc-shop .wc-suggest__catico{
  width:40px;height:40px;flex:0 0 40px;display:grid;place-items:center;
  border-radius:8px;background:var(--mist-2);color:var(--red);font-size:16px;
}
.wc-shop .wc-suggest__none{padding:16px 14px;color:var(--ink-2);font-size:14px}

/* ============================================================
   FILTERS — sticky chip bar under the fixed header
   ============================================================ */
.wc-shop .wc-filters{
  position:sticky;top:var(--hh);z-index:6;
  display:flex;gap:9px;flex-wrap:wrap;align-items:center;
  padding:12px 0;margin:0 0 2px;
  background:var(--paper);
  border-bottom:1px solid var(--mist);
}
.wc-shop .wc-chip{
  display:inline-flex;align-items:center;gap:8px;
  padding:8px 15px;border-radius:999px;cursor:pointer;
  border:1px solid var(--mist);background:var(--surface);
  color:var(--ink-2);font-size:14px;font-weight:500;line-height:1;
  text-decoration:none;white-space:nowrap;
  transition:border-color .16s ease, color .16s ease, background .16s ease;
}
.wc-shop .wc-chip:hover{border-color:var(--red);color:var(--ink)}
.wc-shop .wc-chip__n{
  font-size:12px;font-weight:600;color:var(--ink-2);
  background:var(--mist-2);border-radius:999px;padding:2px 8px;
  font-variant-numeric:tabular-nums;transition:background .16s ease, color .16s ease;
}
.wc-shop .wc-chip.is-active{
  background:var(--red);border-color:var(--red);color:#fff;
  box-shadow:0 6px 16px -8px rgba(215,33,39,.6);
}
.wc-shop .wc-chip.is-active .wc-chip__n{background:rgba(255,255,255,.22);color:#fff}

/* ============================================================
   SUB-BAR — result count + sort
   ============================================================ */
.wc-shop .wc-subbar{
  display:flex;justify-content:space-between;align-items:center;gap:16px;
  margin:16px 0 20px;flex-wrap:wrap;
}
.wc-shop .wc-count{margin:0;color:var(--ink-2);font-size:14px}
.wc-shop .wc-count b{color:var(--ink);font-weight:600;font-variant-numeric:tabular-nums}
.wc-shop .wc-sort{display:inline-flex;align-items:center;gap:10px}
.wc-shop .wc-sort__lbl{color:var(--ink-2);font-size:14px}
.wc-shop .wc-sort__sel{
  font-family:inherit;font-size:14px;font-weight:500;color:var(--ink);cursor:pointer;
  background:var(--surface);border:1px solid var(--mist);border-radius:999px;
  padding:9px 38px 9px 16px;-webkit-appearance:none;appearance:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%233A5563' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 14px center;
  transition:border-color .16s ease;
}
.wc-shop .wc-sort__sel:hover{border-color:var(--red)}

/* ============================================================
   PRODUCT GRID + CARDS  (mirrors catalog.css, scoped to .wc-shop)
   ============================================================ */
.wc-shop ul.products{
  display:grid;gap:18px;margin:0;padding:0;list-style:none;
  grid-template-columns:repeat(2,minmax(0,1fr));
}
@media(min-width:1024px){
  .wc-shop ul.products,
  .wc-shop ul.products.columns-3,
  .wc-shop ul.products.columns-4{grid-template-columns:repeat(4,minmax(0,1fr))}
}
.wc-shop ul.products li.product.is-hidden{display:none!important}

.wc-shop ul.products li.product{
  list-style:none;margin:0;text-align:left;float:none;width:auto;
  display:flex;flex-direction:column;gap:12px;
  background:var(--surface);border:1px solid var(--mist);border-radius:var(--r);
  padding:14px;position:relative;overflow:hidden;box-shadow:var(--shadow);
  transition:transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.wc-shop ul.products li.product:hover{
  transform:translateY(-4px);box-shadow:var(--shadow-lift);border-color:var(--red);
}
/* signature echo: red "waterline" fills across the card top on hover */
.wc-shop ul.products li.product::before{
  content:"";position:absolute;top:0;left:0;right:0;height:3px;z-index:2;
  background:linear-gradient(90deg,var(--red),var(--red-deep));
  transform:scaleX(0);transform-origin:left;transition:transform .3s ease;
}
.wc-shop ul.products li.product:hover::before{transform:scaleX(1)}

.wc-shop ul.products li.product a.woocommerce-loop-product__link{
  display:flex;flex-direction:column;gap:10px;color:inherit;text-decoration:none;flex:1 1 auto;
}
.wc-shop ul.products li.product a.woocommerce-loop-product__link img,
.wc-shop ul.products li.product img{
  width:100%;aspect-ratio:1/1;object-fit:contain;
  background:transparent;padding:6px;margin:0;display:block;
}

/* discount badge */
.wc-shop ul.products li.product .onsale{
  position:absolute;top:22px;left:22px;z-index:3;
  background:var(--red);color:#fff;
  font-size:12px;font-weight:600;line-height:1;letter-spacing:.01em;
  padding:5px 10px;border-radius:999px;
  box-shadow:0 4px 12px -4px rgba(215,33,39,.5);font-variant-numeric:tabular-nums;
}

/* title — 2-line clamp keeps rows even */
.wc-shop ul.products li.product h2.woocommerce-loop-product__title{
  margin:0;padding:0;color:var(--ink);
  font-size:15px;line-height:1.4;font-weight:500;letter-spacing:-.005em;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
  min-height:2.8em;
}

/* price */
.wc-shop ul.products li.product .price{
  margin:0;font-size:inherit;line-height:1.3;
  display:flex;align-items:baseline;flex-wrap:wrap;gap:8px;font-variant-numeric:tabular-nums;
}
.wc-shop ul.products li.product .price .amount{font-size:18px;font-weight:600;color:var(--ink)}
.wc-shop ul.products li.product .price ins{position:static;padding:0;text-decoration:none;background:none;order:1}
.wc-shop ul.products li.product .price ins .amount{color:var(--ink)}
.wc-shop ul.products li.product .price del{position:static;left:auto;bottom:auto;transform:none;opacity:1;order:2}
.wc-shop ul.products li.product .price del .amount{font-size:13px;font-weight:400;color:var(--ink-2);text-decoration:line-through}

/* primary CTA */
.wc-shop ul.products li.product a.button,
.wc-shop ul.products li.product a.added_to_cart{font-family:var(--font-sans)}
.wc-shop ul.products li.product > a.button{
  display:flex;width:100%;justify-content:center;align-items:center;gap:8px;
  margin:0;min-height:0;border:none;cursor:pointer;background:var(--red);color:#fff;
  font-size:14px;font-weight:600;line-height:1.2;padding:11px 16px;border-radius:999px;
  transition:background .16s ease, transform .16s ease, box-shadow .16s ease;
}
.wc-shop ul.products li.product > a.button:hover{
  background:var(--red-deep);transform:translateY(-1px);
  box-shadow:0 10px 22px -8px rgba(215,33,39,.55);color:#fff;
}
.wc-shop ul.products li.product > a.button.loading{opacity:.75}
.wc-shop ul.products li.product a.added_to_cart{
  display:inline-flex;align-self:center;margin:2px 0 0;padding:2px 4px;
  font-size:13px;font-weight:500;color:var(--red-deep);text-decoration:none;
}
.wc-shop ul.products li.product a.added_to_cart:hover{text-decoration:underline}

/* compare button (compare.css colours; full-width secondary block) */
.wc-shop ul.products li.product .wc-cmp-btn{
  display:flex;width:100%;margin:8px 0 0;padding:.62em 1.1em;font-size:13px;
}
.wc-shop ul.products li.product a:focus-visible{outline:2.5px solid var(--red);outline-offset:3px;border-radius:6px}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.wc-shop .wc-empty{
  text-align:center;padding:56px 20px;border:1px dashed var(--mist);
  border-radius:var(--r);background:var(--mist-2);
}
.wc-shop .wc-empty__t{margin:0 0 6px;font-size:18px;font-weight:600;color:var(--ink)}
.wc-shop .wc-empty__d{margin:0 0 18px;color:var(--ink-2);font-size:14px}
.wc-shop .wc-empty__reset{
  border:none;cursor:pointer;font-family:inherit;font-weight:600;font-size:14px;
  background:var(--red);color:#fff;padding:11px 22px;border-radius:999px;
  transition:background .16s ease;
}
.wc-shop .wc-empty__reset:hover{background:var(--red-deep)}

/* ============================================================
   ABOUT / SEO block
   ============================================================ */
.wc-shop .wc-about{
  margin:52px 0 0;padding:32px 0 0;border-top:1px solid var(--mist);
}
.wc-shop .wc-about__h{margin:0 0 14px;font-size:clamp(20px,2.4vw,26px);font-weight:600;color:var(--ink);letter-spacing:-.01em}
.wc-shop .wc-about p{margin:0 0 14px;color:var(--ink-2);font-size:15px;max-width:78ch}
.wc-shop .wc-about p:last-child{margin-bottom:0}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media(max-width:1023px){
  /* horizontal-scroll chip rail on narrow screens */
  .wc-shop .wc-filters{
    flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;
    margin-left:-16px;margin-right:-16px;padding-left:16px;padding-right:16px;
  }
  .wc-shop .wc-filters::-webkit-scrollbar{display:none}
  .wc-shop .wc-chip{flex:0 0 auto}
}
@media(max-width:520px){
  .wc-shop .wc-search__input{height:54px;font-size:16px;padding:0 48px 0 48px}
  .wc-shop .wc-search__ico{left:16px;width:20px;height:20px}
  .wc-shop ul.products{gap:12px}
  .wc-shop ul.products li.product{padding:11px;gap:10px}
  .wc-shop ul.products li.product a.woocommerce-loop-product__link img,
  .wc-shop ul.products li.product img{padding:4px}
  .wc-shop ul.products li.product h2.woocommerce-loop-product__title{font-size:14px}
  .wc-shop ul.products li.product .price .amount{font-size:16px}
}

/* ============================================================
   DARK THEME
   ============================================================ */
@media (prefers-color-scheme:dark){
  .wc-shop{
    --ink:#EAF3F6; --ink-2:#9FB6C0; --paper:#06222C; --surface:#0C2E3A;
    --mist:#1B3F4C; --mist-2:#123240; --red:#FF5A5F; --red-deep:#E23C41;
    --shadow:0 1px 2px rgba(0,0,0,.4), 0 10px 34px -14px rgba(0,0,0,.6);
    --shadow-lift:0 2px 6px rgba(0,0,0,.5), 0 28px 56px -18px rgba(0,0,0,.7);
  }
  .wc-shop ul.products li.product > a.button,
  .wc-shop ul.products li.product .onsale,
  .wc-shop .wc-chip.is-active,
  .wc-shop .wc-empty__reset{color:#12060a}
  .wc-shop .wc-chip.is-active .wc-chip__n{color:#12060a}
}
:root[data-theme="light"] .wc-shop{
  --ink:#0A2430; --ink-2:#3A5563; --paper:#FFFFFF; --surface:#FFFFFF;
  --mist:#DCE8ED; --mist-2:#EAF1F4; --red:#D72127; --red-deep:#B01015;
  --shadow:0 1px 2px rgba(10,36,48,.05), 0 8px 30px -12px rgba(10,36,48,.18);
  --shadow-lift:0 2px 4px rgba(10,36,48,.06), 0 24px 48px -18px rgba(10,36,48,.30);
}
:root[data-theme="dark"] .wc-shop{
  --ink:#EAF3F6; --ink-2:#9FB6C0; --paper:#06222C; --surface:#0C2E3A;
  --mist:#1B3F4C; --mist-2:#123240; --red:#FF5A5F; --red-deep:#E23C41;
  --shadow:0 1px 2px rgba(0,0,0,.4), 0 10px 34px -14px rgba(0,0,0,.6);
  --shadow-lift:0 2px 6px rgba(0,0,0,.5), 0 28px 56px -18px rgba(0,0,0,.7);
}
:root[data-theme="dark"] .wc-shop ul.products li.product > a.button,
:root[data-theme="dark"] .wc-shop ul.products li.product .onsale,
:root[data-theme="dark"] .wc-shop .wc-chip.is-active,
:root[data-theme="dark"] .wc-shop .wc-empty__reset{color:#12060a}
:root[data-theme="dark"] .wc-shop .wc-chip.is-active .wc-chip__n{color:#12060a}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media(prefers-reduced-motion:reduce){
  .wc-shop *,
  .wc-shop ul.products li.product,
  .wc-shop ul.products li.product::before,
  .wc-shop ul.products li.product > a.button{transition:none!important}
  .wc-shop ul.products li.product:hover{transform:none}
  .wc-shop ul.products li.product:hover::before{transform:scaleX(1)}
}
