/*
Theme Name: Teemcw Mart
Theme URI: https://teemcw.com/
Author: Teemcw
Description: Big-box, Walmart-style storefront for the Teemcw Timex watch catalogue: bright blue masthead with a pill search bar, Departments menu, category circles, product shelves with quick "+ Add" buttons, faceted shop, sticky buy box and a two-column cart.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: teemcw-mart
*/

/* =====================================================================
   Tokens
   ===================================================================== */
:root {
  --ink: #2e2f32;
  --ink-2: #46474a;
  --muted: #74767c;
  --faint: #909196;
  --line: #e3e4e5;
  --line-2: #f0f1f2;
  --line-3: #babbbe;
  --bg: #ffffff;
  --soft: #f8f8f8;
  --soft-2: #eeeff1;
  --ok: #2a8703;
  --ok-bg: #eaf5e4;
  --bad: #de1c24;
  --bad-bg: #fdecec;

  /* Accent slot: big-box yellow */
  --gold: #ffc220;
  --gold-2: #f2a900;
  --gold-soft: #fff8e5;
  --gold-ink: #2e2f32;

  --mast: #0071dc;     /* masthead blue */
  --mast-2: #f2f8fd;   /* department bar, light */
  --navy: #002d58;     /* search button, footer */
  --navy-2: #004f9a;
  --brand: #0071dc;    /* buttons and links */
  --brand-h: #004f9a;
  --tint: #e6f1fc;
  --tint-2: #cfe4f9;

  --r-xs: 4px;
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --pill: 999px;
  --sh-1: 0 1px 2px rgba(0, 0, 0, .08), 0 1px 4px rgba(0, 0, 0, .06);
  --sh-2: 0 6px 20px rgba(0, 0, 0, .12);
  --sh-3: 0 16px 44px rgba(0, 0, 0, .22);
  --wrap: 1440px;
  --gut: 24px;
  --mast-h: 76px;
  --font: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

@media (max-width: 760px) {
  :root { --gut: 16px; }
}

/* =====================================================================
   Base
   ===================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 96px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, svg, video { max-width: 100%; }
img { height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; }
address { font-style: normal; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--tint-2); color: var(--ink); }

.tm-wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-left: var(--gut); padding-right: var(--gut); }
.tm-main { min-height: 50vh; }

.screen-reader-text, .tm-skip {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}
.tm-skip:focus {
  clip: auto; clip-path: none; width: auto; height: auto; margin: 0; z-index: 1000;
  top: 8px; left: 8px; padding: 10px 16px; background: #fff; color: var(--ink); border-radius: var(--r-sm); box-shadow: var(--sh-2);
}

.tm-i { flex-shrink: 0; }

/* =====================================================================
   Buttons
   ===================================================================== */
.tm-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 22px;
  border-radius: var(--pill);
  border: 1.5px solid transparent;
  font-size: 15px; font-weight: 700; line-height: 1;
  white-space: nowrap; text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .1s ease, box-shadow .15s ease;
}
.tm-btn:active { transform: translateY(1px); }
.tm-btn--primary { background: var(--brand); color: #fff; }
.tm-btn--primary:hover { background: var(--brand-h); color: #fff; }
.tm-btn--gold { background: var(--gold); color: var(--gold-ink); }
.tm-btn--gold:hover { background: #ffd04d; color: var(--gold-ink); }
.tm-btn--ghost { background: #fff; color: var(--ink); border-color: var(--ink); }
.tm-btn--ghost:hover { background: var(--ink); color: #fff; }
.tm-btn--sm { height: 36px; padding: 0 16px; font-size: 14px; }
.tm-btn--lg { height: 54px; padding: 0 28px; font-size: 17px; }
.tm-btn--block { display: flex; width: 100%; }

/* Pills (filter chips, quick toggles) */
.tm-pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 14px;
  border-radius: var(--pill); border: 1px solid var(--line-3);
  background: #fff; color: var(--ink);
  font-size: 14px; font-weight: 600; white-space: nowrap;
  transition: border-color .15s, background-color .15s;
}
.tm-pill:hover { border-color: var(--ink); }
.tm-pill.is-on { background: var(--navy); border-color: var(--navy); color: #fff; }
.tm-pill b {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 10px; background: var(--gold); color: var(--gold-ink); font-size: 12px;
}
.tm-pill--x { background: var(--tint); border-color: transparent; }
.tm-pill--x:hover { border-color: var(--ink); }

.tm-flag {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  padding: 3px 9px; border-radius: var(--pill);
  background: #fff; color: var(--ink); box-shadow: var(--sh-1);
  font-size: 12px; font-weight: 700; letter-spacing: .01em;
}

/* Section heads */
.tm-sec { margin-top: 44px; }
.tm-sec__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.tm-sec__t { font-size: 22px; font-weight: 800; letter-spacing: -.01em; line-height: 1.2; }
.tm-sec__s { margin-top: 3px; color: var(--muted); font-size: 15px; }
.tm-sec__more {
  display: inline-flex; align-items: center; gap: 2px; flex-shrink: 0;
  font-size: 15px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px;
}
.tm-sec__more:hover { color: var(--brand); }
@media (max-width: 760px) {
  .tm-sec { margin-top: 32px; }
  .tm-sec__t { font-size: 20px; }
  .tm-sec__s { font-size: 14px; }
}

/* Breadcrumbs */
.tm-crumbs { padding: 14px 0 6px; font-size: 13.5px; color: var(--muted); }
.tm-crumbs ol { display: flex; flex-wrap: wrap; list-style: none; gap: 2px 0; }
.tm-crumbs li + li::before { content: "/"; margin: 0 8px; color: var(--line-3); }
.tm-crumbs a { text-decoration: underline; text-underline-offset: 2px; }
.tm-crumbs a:hover { color: var(--ink); }
.tm-crumbs [aria-current] { color: var(--ink); font-weight: 600; }

/* Empty states */
.tm-empty { max-width: 560px; margin: 32px auto 48px; text-align: center; display: grid; justify-items: center; gap: 12px; }
.tm-empty__ico { width: 76px; height: 76px; border-radius: 50%; background: var(--tint); display: grid; place-items: center; }
.tm-empty h1, .tm-empty h2 { font-size: 24px; font-weight: 800; }
.tm-empty p { color: var(--muted); }

/* Scrim (drawer + filters) */
.tm-scrim {
  position: fixed; inset: 0; z-index: 250;
  background: rgba(15, 14, 12, .5);
  opacity: 0; transition: opacity .25s ease;
}
.tm-scrim.is-open { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
}
