/* =========================================================
   Uzladets.lv — E-commerce Theme
   Design system: brand tokens + reusable components
   Built on Tailwind CSS (CDN) with custom layer extensions
   ========================================================= */

:root {
  /* Brand palette */
  --ink:        #0B1220;
  --ink-2:      #15233A;
  --primary:    #0EA5A5;   /* electric teal */
  --primary-d:  #0B8A8A;
  --accent:     #C6F24E;   /* high-voltage lime */
  --accent-d:   #A7D32C;
  --surface:    #F6F8FA;
  --card:       #FFFFFF;
  --border:     #E6EBEF;
  --border-2:   #D5DCE3;
  --muted:      #5A6B7A;
  --muted-2:    #8A97A4;
  --success:    #10B981;
  --danger:     #EF4444;
  --warning:    #F59E0B;
  --sale:       #FF3B3B;

  /* Type */
  --font-display: "Bricolage Grotesque", "Manrope", system-ui, sans-serif;
  --font-body:    "Manrope", system-ui, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;

  /* Radii & shadows */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --shadow-1: 0 1px 2px rgba(11,18,32,0.05), 0 1px 1px rgba(11,18,32,0.03);
  --shadow-2: 0 6px 22px -8px rgba(11,18,32,0.18), 0 2px 6px rgba(11,18,32,0.06);
  --shadow-3: 0 18px 48px -12px rgba(11,18,32,0.28);
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1,h2,h3,h4,h5 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.font-display { font-family: var(--font-display); letter-spacing: -0.02em; }
.font-mono    { font-family: var(--font-mono); }

/* ---------- Container ---------- */
.u-container { max-width: 1320px; margin-inline: auto; padding-inline: 1rem; }
@media (min-width: 1024px){ .u-container{ padding-inline: 1.25rem; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .55rem; font-weight: 600; font-size: .92rem;
  padding: .75rem 1.15rem; border-radius: var(--r-md);
  transition: transform .15s ease, background .15s ease, color .15s ease, box-shadow .2s ease;
  white-space: nowrap; line-height: 1; border: 1px solid transparent;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--ink); color: #fff;
}
.btn-primary:hover { background: var(--ink-2); box-shadow: var(--shadow-2); }
.btn-accent {
  background: var(--accent); color: var(--ink);
}
.btn-accent:hover { background: var(--accent-d); }
.btn-teal { background: var(--primary); color: #fff; }
.btn-teal:hover { background: var(--primary-d); }
.btn-outline {
  background: #fff; color: var(--ink); border-color: var(--border-2);
}
.btn-outline:hover { border-color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: rgba(11,18,32,0.06); }
/* Outline-style button for dark backgrounds (hero, dark CTAs).
   Transparent body so the dark surface shows through, white text and
   semi-transparent white border that fully solidifies on hover. */
.btn-ghost-light {
  background: transparent; color: #fff;
  border-color: rgba(255,255,255,0.30);
}
.btn-ghost-light:hover {
  background: rgba(255,255,255,0.08);
  border-color: #fff;
  color: #fff;
}
.btn-sm { padding: .55rem .85rem; font-size: .82rem; border-radius: 10px; }
.btn-lg { padding: .95rem 1.4rem; font-size: 1rem; }
.btn-block { width: 100%; }

/* ---------- Form controls ---------- */
.field {
  width: 100%; padding: .8rem 1rem; border: 1px solid var(--border-2);
  background: #fff; border-radius: var(--r-md); font-size: .95rem;
  color: var(--ink); transition: border-color .15s ease, box-shadow .15s ease;
}
.field:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(14,165,165,0.18); }
.field-lg { padding: 1rem 1.15rem; }
.label { display: block; font-size: .82rem; font-weight: 600; color: var(--ink); margin-bottom: .4rem; }
.help  { font-size: .78rem; color: var(--muted); margin-top: .35rem; }

/* Scope to inputs only — WC checkout labels also use class "checkbox". */
input.checkbox, input.radio {
  appearance: none; width: 18px; height: 18px;
  border: 1.5px solid var(--border-2); background: #fff;
  border-radius: 5px; display: inline-grid; place-content: center;
  cursor: pointer; transition: border-color .15s, background .15s;
  flex: 0 0 18px;
}
input.radio { border-radius: 999px; }
input.checkbox:checked, input.radio:checked { background: var(--ink); border-color: var(--ink); }
input.checkbox:checked::after {
  content: ""; width: 10px; height: 10px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23C6F24E' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><path d='M3 8.5l3.5 3.5L13 5'/></svg>") center/contain no-repeat;
}
input.radio:checked::after {
  content:""; width: 8px; height: 8px; border-radius: 999px; background: var(--accent);
}

/* ---------- Cards ---------- */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--shadow-1);
}
.card-pad { padding: 1.25rem; }

/* ---------- Pills / badges ---------- */
.pill {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .25rem .6rem; border-radius: 999px;
  font-size: .72rem; font-weight: 700; letter-spacing: .02em;
  text-transform: uppercase;
}
.pill-sale    { background: var(--sale); color: #fff; }
.pill-stock   { background: rgba(16,185,129,.12); color: #047857; }
.pill-out     { background: rgba(239,68,68,.12); color: #b91c1c; }
.pill-new     { background: var(--accent); color: var(--ink); }
.pill-hot     { background: var(--ink); color: var(--accent); }
.pill-ghost   { background: rgba(11,18,32,.06); color: var(--ink); }

/* ---------- Product card ---------- */
.product-card {
  position: relative; background: #fff; border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 1rem; display: flex; flex-direction: column;
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.product-card:hover { box-shadow: var(--shadow-2); border-color: var(--border-2); transform: translateY(-2px); }
.product-card .pc-media {
  position: relative; aspect-ratio: 1/1; background: linear-gradient(180deg,#F4F7FA, #E8EFF4);
  border-radius: var(--r-md); overflow: hidden; display: grid; place-items: center;
}
.product-card .pc-media img { width: 78%; height: 78%; object-fit: contain; transition: transform .35s ease; }
.product-card:hover .pc-media img { transform: scale(1.04); }
.product-card .pc-badges { position: absolute; top: .6rem; left: .6rem; display: flex; flex-direction: column; gap: .3rem; z-index: 2; }
.product-card .pc-title {
  font-weight: 600; font-size: .9rem; line-height: 1.35; color: var(--ink);
  margin-top: .9rem; min-height: 2.5rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product-card .pc-brand { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.product-card .pc-price { display: flex; align-items: baseline; gap: .5rem; margin-top: .5rem; }
.product-card .pc-price .now { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; color: var(--ink); }
.product-card .pc-price .was { font-size: .85rem; color: var(--muted); text-decoration: line-through; }
.product-card .pc-foot { margin-top: .9rem; display: flex; gap: .4rem; }

/* ---------- Sale countdown chip ---------- */
.countdown {
  display: inline-flex; align-items: center; gap: .35rem;
  background: var(--ink); color: var(--accent);
  padding: .35rem .65rem; border-radius: 8px;
  font-family: var(--font-mono); font-size: .75rem; font-weight: 600;
}

/* ---------- Section heading ---------- */
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.section-head h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); }
.section-head .more { font-size: .85rem; font-weight: 600; color: var(--ink); display: inline-flex; align-items: center; gap: .35rem; }
.section-head .more:hover { color: var(--primary); }
.eyebrow {
  display: inline-flex; align-items: center; gap: .4rem; font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .12em; color: var(--primary);
}

/* ---------- Topbar / Header ---------- */
.topbar {
  background: var(--ink); color: #cfd5dc; font-size: .8rem;
}
.topbar a:hover { color: var(--accent); }

.header-main {
  background: #fff; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 60;
}

.search-box {
  display: flex; align-items: center; background: var(--surface);
  border: 1px solid var(--border); border-radius: 12px;
  padding: .35rem; transition: border-color .15s ease, box-shadow .15s ease;
}
.search-box:focus-within { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(14,165,165,0.15); background: #fff; }
.search-box select {
  background: transparent; border: 0; padding: .5rem .6rem; font-size: .85rem;
  border-right: 1px solid var(--border-2); color: var(--ink); cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%230B1220' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat; background-position: right .5rem center; padding-right: 1.4rem;
}
.search-box input {
  flex: 1; background: transparent; border: 0; padding: .5rem .8rem; font-size: .92rem; color: var(--ink);
}
.search-box input:focus { outline: none; }
.search-box button {
  background: var(--ink); color: #fff; padding: .55rem .9rem; border-radius: 9px; font-weight: 600; font-size: .85rem;
  display: inline-flex; align-items: center; gap: .4rem;
}
.search-box button:hover { background: var(--primary); }

.icon-btn {
  position: relative; display: inline-flex; align-items: center; gap: .55rem;
  padding: .5rem .65rem; border-radius: 12px; color: var(--ink);
}
.icon-btn:hover { background: var(--surface); }
.icon-btn .badge {
  position: absolute; top: 2px; right: 2px;
  background: var(--accent); color: var(--ink); font-size: .65rem; font-weight: 700;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  display: grid; place-items: center; line-height: 1;
}

/* ---------- Mega menu / nav ---------- */
.nav-row {
  background: #fff; border-bottom: 1px solid var(--border);
  position: relative; /* positioning context for full-width mega */
}
.nav-list { display: flex; align-items: center; gap: .15rem; padding: .45rem 0; }
.nav-list > li { position: static; } /* let mega expand to .nav-row width */
.nav-list > li > a {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .55rem .8rem; font-size: .9rem; font-weight: 600;
  color: var(--ink); position: relative; border-radius: 8px;
  white-space: nowrap;
  transition: background-color .15s ease, color .15s ease;
}
.nav-list > li > a:hover,
.nav-list > li > a:focus-visible { background: var(--surface); color: var(--ink); }

/* "you are here" marker — clean ink underline only for the truly active page */
.nav-list > li > a::after {
  content: ""; position: absolute; left: .8rem; right: .8rem; bottom: -.55rem;
  height: 2px; background: transparent; border-radius: 2px;
  transition: background-color .15s ease;
}
.nav-list > li > a.active::after,
.nav-list > li > a[aria-current="page"]::after,
.nav-list > li.is-current > a::after { background: var(--ink); }

/* Catalog launcher — "Visas kategorijas" item that owns the mega menu.
   Promoted to a solid ink button so it reads as an action, not a sibling link. */
.nav-list > li.has-mega > a {
  background: var(--ink); color: #fff;
  padding-left: .95rem; padding-right: .95rem;
}
.nav-list > li.has-mega > a:hover,
.nav-list > li.has-mega:hover > a,
.nav-list > li.has-mega:focus-within > a { background: var(--ink-2); color: #fff; }
.nav-list > li.has-mega > a::after { content: none; }

.mega {
  position: absolute; left: 0; right: 0; top: 100%;
  background: #fff;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 24px 48px -12px rgba(11,18,32,0.22), 0 8px 24px -8px rgba(11,18,32,0.10);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
  z-index: 50; pointer-events: none;
}
/* Invisible "bridge" above the panel — extends the mega's hoverable area
   upward to overlap the bottom of the launcher <li>. Without this the
   cursor briefly leaves both .has-mega and .mega when crossing the
   .nav-list bottom padding (~7px) + the translateY(6px) open animation
   offset, and the menu snaps shut before the user reaches the panel. */
.mega::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 0; right: 0;
  height: 18px;
  pointer-events: auto;
}
/* Stay open while the cursor is on the launcher <li> OR the panel itself
   (which now includes the bridge above). Without the third selector the
   menu closes as soon as the cursor crosses the link's bottom edge. */
.has-mega:hover .mega,
.has-mega:focus-within .mega,
.mega:hover { opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto; }

.mega-col h4 {
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em;
  color: var(--muted); margin-bottom: .65rem;
}
.mega-col ul li a {
  display: flex; align-items: center; gap: .5rem; padding: .35rem 0;
  font-size: .88rem; color: var(--ink);
}
.mega-col ul li a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--ink); }

/* Categories side-rail used in homepage hero */
.cat-rail {
  background: #fff; border-right: 1px solid var(--border); border-radius: var(--r-lg) 0 0 var(--r-lg);
}
.cat-rail a {
  display: flex; align-items: center; gap: .75rem; padding: .8rem 1rem;
  font-size: .9rem; font-weight: 500; color: var(--ink); border-bottom: 1px solid var(--border);
}
.cat-rail a:hover { background: var(--surface); color: var(--ink); }
.cat-rail a:last-child { border-bottom: 0; }

/* ---------- Breadcrumbs ---------- */
.crumbs { display: flex; align-items: center; gap: .4rem; font-size: .82rem; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--ink); }
.crumbs .sep { opacity: .5; }
.crumbs .current { color: var(--ink); font-weight: 600; }

/* ---------- Filter sidebar ---------- */
.facet { padding: 1rem 1.1rem; border-bottom: 1px solid var(--border); }
.facet:last-child { border-bottom: 0; }
.facet > summary {
  display: flex; align-items: center; justify-content: space-between;
  font-size: .92rem; font-weight: 700; color: var(--ink); cursor: pointer; list-style: none;
}
.facet > summary::-webkit-details-marker { display: none; }
.facet > summary::after {
  content: ""; width: 14px; height: 14px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230B1220' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>") center/contain no-repeat;
  transition: transform .15s ease;
}
.facet[open] > summary::after { transform: rotate(180deg); }
.facet .facet-body { margin-top: .85rem; display: flex; flex-direction: column; gap: .55rem; }
.facet label { display: flex; align-items: center; gap: .55rem; font-size: .88rem; color: var(--ink); cursor: pointer; }
.facet label .count { margin-left: auto; color: var(--muted-2); font-size: .78rem; }
.facet label:hover { color: var(--primary); }

/* Range slider */
.range-row { display: flex; gap: .5rem; }
.range-row .field { padding: .55rem .65rem; font-size: .85rem; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--border); }
.tabs button {
  padding: .85rem 1rem; font-size: .9rem; font-weight: 600; color: var(--muted);
  border-bottom: 2px solid transparent; transition: color .15s, border-color .15s;
}
.tabs button.active { color: var(--ink); border-bottom-color: var(--accent); }
.tabs button:hover { color: var(--ink); }

/* ---------- Tables ---------- */
.spec-table { width: 100%; border-collapse: collapse; }
.spec-table tr { border-bottom: 1px solid var(--border); }
.spec-table tr:nth-child(odd) td { background: var(--surface); }
.spec-table td { padding: .7rem .9rem; font-size: .88rem; }
.spec-table td:first-child { font-weight: 600; color: var(--muted); width: 40%; }

/* ---------- Hero gradient ----------
   Uses background-color + background-image longhand (NOT the shorthand)
   so other classes that touch background-image can layer on top without
   wiping out the dark base colour. */
.hero-bg {
  background-color: #0B1220;
  background-image:
    radial-gradient(900px 420px at 85% 0%, rgba(198,242,78,0.14), transparent 60%),
    radial-gradient(700px 380px at 0% 100%, rgba(14,165,165,0.18), transparent 60%),
    linear-gradient(135deg, #0B1220 0%, #15233A 60%, #1B2E4D 100%);
  color: #fff;
}
.hero-bg h1,
.hero-bg h2,
.hero-bg h3,
.hero-bg h4 { color: #fff; }

/* Subtle circuit grid pattern.
   Implemented as a ::before overlay so it never clobbers the parent's
   own `background-image` (e.g. `.hero-bg`). All current usages already
   sit inside a positioned (absolute / relative) parent, so the
   pseudo-element anchors correctly without us needing to set
   `position: relative` on `.circuit` itself (which would fight the
   Tailwind `.absolute` utility used in standalone overlay divs). */
.circuit::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 36px 36px;
  pointer-events: none;
}

/* ---------- USP strip ---------- */
.usp { display: flex; align-items: center; gap: .8rem; padding: 1rem; }
.usp-icon {
  width: 44px; height: 44px; border-radius: 12px; background: rgba(14,165,165,0.08);
  color: var(--primary); display: grid; place-items: center; flex: 0 0 44px;
}
.usp h4 { font-size: .92rem; font-weight: 700; }
.usp p  { font-size: .78rem; color: var(--muted); margin-top: .15rem; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: #c8d0d9; }
.footer h5 {
  color: #fff; font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .14em;
  margin-bottom: 1rem;
}
.footer a { color: #c8d0d9; font-size: .88rem; }
.footer a:hover { color: var(--accent); }
.footer .small { font-size: .78rem; color: #8b97a4; }

/* ---------- Brand strip ---------- */
.brand-tile {
  background: #fff; border: 1px solid var(--border); border-radius: var(--r-md);
  height: 80px; display: grid; place-items: center; transition: box-shadow .15s, border-color .15s;
  font-family: var(--font-display); font-weight: 700; color: var(--ink-2); font-size: 1.1rem;
  letter-spacing: -0.02em;
}
.brand-tile:hover { box-shadow: var(--shadow-2); border-color: var(--border-2); }

/* ---------- Quantity stepper (wrapper only — html/product.html) ---------- */
div.qty {
  display: inline-flex; align-items: center; border: 1px solid var(--border-2); border-radius: 10px; overflow: hidden;
}
div.qty button {
  width: 38px; height: 38px; display: grid; place-items: center; color: var(--ink);
  background: #fff; border: 0; padding: 0; cursor: pointer;
}
div.qty button:hover { background: var(--surface); }
div.qty input {
  width: 44px; height: 38px; text-align: center;
  border: 0 !important;
  border-left: 1px solid var(--border) !important;
  border-right: 1px solid var(--border) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  font-weight: 700; color: var(--ink); background: #fff;
  font-family: var(--font-mono);
  padding: 0;
  margin: 0;
  -moz-appearance: textfield;
  appearance: textfield;
}
div.qty input:focus { outline: none; box-shadow: none !important; }
div.qty input[type="number"]::-webkit-inner-spin-button,
div.qty input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ---------- Stepper / progress ---------- */
.steps { display: flex; align-items: center; gap: .5rem; }
.step { display: flex; align-items: center; gap: .55rem; color: var(--muted); font-size: .86rem; }
.step .num {
  width: 28px; height: 28px; border-radius: 999px; border: 1.5px solid var(--border-2);
  display: grid; place-items: center; font-weight: 700; font-size: .82rem; color: var(--muted);
}
.step.active .num { background: var(--ink); color: var(--accent); border-color: var(--ink); }
.step.done   .num { background: var(--primary); color: #fff; border-color: var(--primary); }
.step.active, .step.done { color: var(--ink); font-weight: 600; }
.step-divider { flex: 1; height: 2px; background: var(--border); border-radius: 2px; }
.step-divider.done { background: var(--primary); }

/* ---------- Toast / alert ---------- */
.alert {
  display: flex; gap: .65rem; align-items: flex-start;
  padding: .9rem 1rem; border-radius: var(--r-md); border: 1px solid;
  font-size: .88rem; line-height: 1.4;
}
.alert-info    { background: #ECFEFF; border-color: #A5F0F5; color: #155E68; }
.alert-success { background: #ECFDF5; border-color: #A7F3D0; color: #065F46; }
.alert-warning { background: #FFFBEB; border-color: #FDE68A; color: #92400E; }
.alert-danger  { background: #FEF2F2; border-color: #FECACA; color: #991B1B; }

/* ---------- Misc ---------- */
.divider { height: 1px; background: var(--border); }
.link-underline { background-image: linear-gradient(currentColor, currentColor); background-size: 100% 1px; background-repeat: no-repeat; background-position: 0 100%; }

/* Scrollbar (subtle) */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-thumb { background: #cdd6df; border-radius: 999px; border: 3px solid var(--surface); }
::-webkit-scrollbar-track { background: var(--surface); }

/* ---------- Mobile menu ---------- */
.mobile-menu {
  position: fixed; inset: 0 30% 0 0; background: #fff; z-index: 100;
  transform: translateX(-100%); transition: transform .25s ease;
  display: flex; flex-direction: column;
}
.mobile-menu.open { transform: translateX(0); }
.mobile-backdrop {
  position: fixed; inset: 0; background: rgba(11,18,32,.5); z-index: 99;
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.mobile-backdrop.open { opacity: 1; pointer-events: auto; }

/* ---------- Filter drawer (off-canvas on mobile) ---------- */
.filter-backdrop {
  position: fixed; inset: 0; background: rgba(11,18,32,.5);
  z-index: 105; opacity: 0; pointer-events: none;
  transition: opacity .2s ease;
}
.filter-backdrop.is-open { opacity: 1; pointer-events: auto; }
.filter-body { /* desktop: no special styling, just a wrapper */ }

@media (max-width: 1023px) {
  /* Convert #filterPanel into an off-canvas drawer */
  #filterPanel.filter-drawer {
    position: fixed; top: 0; bottom: 0; left: 0;
    width: 360px; max-width: 88vw;
    z-index: 110; background: #fff;
    transform: translateX(-100%);
    transition: transform .28s cubic-bezier(.4,0,.2,1);
    display: flex !important;
    flex-direction: column;
    box-shadow: 10px 0 40px rgba(11,18,32,.18);
    margin: 0;
  }
  #filterPanel.filter-drawer.is-open { transform: translateX(0); }

  /* Inner card adapts to drawer */
  #filterPanel.filter-drawer > .card {
    border: 0 !important; border-radius: 0 !important;
    box-shadow: none !important;
    height: 100%; display: flex; flex-direction: column;
    position: static !important; top: auto !important;
  }
  #filterPanel.filter-drawer .filter-body {
    flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  }
  #filterPanel.filter-drawer .filter-foot {
    border-top: 1px solid var(--border);
    padding: .9rem 1rem; background: var(--surface);
    display: flex; gap: .55rem; align-items: center;
  }
  #filterPanel.filter-drawer .filter-close { display: inline-flex; }
}

@media (min-width: 1024px) {
  .filter-backdrop { display: none; }
  #filterPanel .filter-close { display: none; }
  /* Apply / Clear footer stays visible on desktop too — the AJAX
     filter relies on it as the primary submit target. */
  #filterPanel .filter-foot {
    position: sticky; bottom: 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: .9rem 1rem;
    display: flex; gap: .55rem; align-items: center;
  }
}

/* Loading shim for AJAX filter / pagination updates. Applied to the main
   shop column while a fetch is in flight. */
.uz-loading { position: relative; pointer-events: none; }
.uz-loading::after {
  content: ""; position: absolute; inset: 0;
  background: rgba(246, 248, 250, 0.6);
  backdrop-filter: blur(1px);
  z-index: 4; border-radius: var(--r-lg);
}
.uz-loading > * { opacity: .5; transition: opacity .12s ease; }

/* ---------- Side cart drawer ---------- */
.side-cart {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 440px; max-width: 100vw;
  background: #fff; z-index: 110;
  transform: translateX(100%); transition: transform .25s ease;
  display: flex; flex-direction: column;
  box-shadow: -10px 0 40px rgba(11,18,32,.18);
}
.side-cart.open { transform: translateX(0); }
.side-cart-backdrop {
  position: fixed; inset: 0; background: rgba(11,18,32,.5); z-index: 105;
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.side-cart-backdrop.open { opacity: 1; pointer-events: auto; }
.side-cart-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--border);
}
.side-cart-head h3 { font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; }
.side-cart-body { flex: 1; overflow-y: auto; padding: 1rem 1.25rem; }
.side-cart-foot { border-top: 1px solid var(--border); padding: 1.1rem 1.25rem; background: var(--surface); }
.side-cart-item {
  display: grid; grid-template-columns: 64px 1fr auto; gap: .85rem;
  padding: .85rem 0; border-bottom: 1px dashed var(--border);
}
.side-cart-item:last-child { border-bottom: 0; }
.side-cart-item .sc-thumb {
  width: 64px; height: 64px; border-radius: 10px; background: var(--surface);
  display: grid; place-items: center; overflow: hidden;
}
.side-cart-item .sc-title { font-size: .85rem; font-weight: 600; line-height: 1.3; color: var(--ink); }
.side-cart-item .sc-brand { font-size: .68rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.side-cart-item .sc-price { font-family: var(--font-mono); font-weight: 700; font-size: .9rem; color: var(--ink); white-space: nowrap; }
.side-cart-item .sc-qty { display: inline-flex; align-items: center; gap: .35rem; margin-top: .4rem; }
.side-cart-item .sc-qty button {
  width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--border-2); color: var(--ink);
  display: grid; place-items: center; font-size: .75rem; line-height: 1; background: #fff;
}
.side-cart-item .sc-qty button:hover { background: var(--ink); color: var(--accent); border-color: var(--ink); }
.side-cart-item .sc-qty span { font-family: var(--font-mono); font-weight: 700; font-size: .82rem; min-width: 18px; text-align: center; }
.side-cart-item .sc-remove {
  background: none; border: 0; padding: 0; color: var(--muted-2); cursor: pointer;
  font-size: .72rem; margin-left: .35rem;
}
.side-cart-item .sc-remove:hover { color: #c00; }

/* ---------- Gallery slides ---------- */
[data-gallery-main] [data-gallery-slide] { display: none; }
[data-gallery-main] [data-gallery-slide].is-active { display: block; }
[data-gallery-thumb] {
  border: 1px solid var(--border);
  transition: border-color .15s ease, box-shadow .15s ease;
  cursor: pointer;
}
[data-gallery-thumb]:hover { border-color: var(--ink); }
[data-gallery-thumb].is-active { border-color: var(--ink); box-shadow: 0 0 0 2px var(--ink); }

/* ---------- Variant buttons ---------- */
[data-variant] {
  border: 1px solid var(--border-2);
  transition: border-color .15s ease, box-shadow .15s ease;
}
[data-variant]:hover { border-color: var(--ink); }
[data-variant].is-active {
  border-color: var(--ink); border-width: 2px; box-shadow: 0 0 0 1px var(--ink);
}
[data-variant-color] {
  position: relative; transition: transform .12s ease, box-shadow .15s ease;
}
[data-variant-color]:hover { transform: scale(1.08); }
[data-variant-color].is-active {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ink);
}

/* ---------- Text page layout (sidebar nav + content) ---------- */
.text-page {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 1024px) {
  .text-page { grid-template-columns: 260px 1fr; gap: 3rem; }
}

.text-page-nav { align-self: start; }
@media (min-width: 1024px) {
  .text-page-nav { position: sticky; top: 6.5rem; }
}
.text-page-nav h5 {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .12em;
  color: var(--muted); font-weight: 700;
  padding: 0 .25rem .85rem;
}
.text-page-nav ul { display: flex; flex-direction: column; gap: 2px; }
.text-page-nav ul li a {
  display: flex; align-items: center; gap: .7rem;
  padding: .65rem .85rem;
  font-size: .9rem; font-weight: 500; color: var(--ink);
  border-radius: 10px;
  transition: background .15s ease, color .15s ease;
}
.text-page-nav ul li a svg { color: var(--muted-2); flex: 0 0 16px; transition: color .15s ease; }
.text-page-nav ul li a:hover { background: var(--surface); color: var(--primary); }
.text-page-nav ul li a:hover svg { color: var(--primary); }
.text-page-nav ul li a.is-active {
  background: var(--ink); color: var(--accent);
}
.text-page-nav ul li a.is-active svg { color: var(--accent); }

/* Help-box callout typically used at the bottom of the side nav */
.help-box {
  margin-top: 1.25rem; padding: 1.1rem 1.15rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg);
}
.help-box h4 { font-size: .95rem; margin-bottom: .35rem; }
.help-box p { font-size: .82rem; color: var(--muted); line-height: 1.5; }

/* Long-form content styling for the main column */
.text-content { max-width: 760px; }
.text-content > * + * { margin-top: 1rem; }
.text-content h1 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
.text-content h2 { font-size: 1.5rem; margin-top: 2.25rem; }
.text-content h3 { font-size: 1.15rem; margin-top: 1.5rem; }
.text-content p, .text-content li { color: var(--muted); line-height: 1.7; }
.text-content p strong { color: var(--ink); }
.text-content ul.checklist { list-style: none; padding: 0; }
.text-content ul.checklist li {
  display: flex; gap: .65rem; align-items: flex-start;
  padding: .35rem 0;
}
.text-content ul.checklist li svg {
  flex: 0 0 18px; color: var(--primary); margin-top: .2rem;
}

/* ---------- View toggle (grid / list) ---------- */
[data-view-toggle] {
  display: grid; place-items: center;
  padding: .375rem; border-radius: 6px;
  color: var(--ink); background: transparent;
  transition: background .15s ease, color .15s ease;
}
[data-view-toggle]:hover { background: var(--surface); }
[data-view-toggle].is-active {
  background: var(--ink); color: var(--accent);
}

/* ---------- List view (category) ----------
   Transforms the product grid into a horizontal row layout. */
.list-view {
  display: flex !important;
  flex-direction: column !important;
  gap: .75rem !important;
}
.list-view .product-card {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr) 220px;
  grid-template-rows: auto auto auto;
  column-gap: 1.5rem;
  row-gap: .25rem;
  align-items: center;
  padding: 1.1rem 1.25rem;
}
/* Hover lift remains, but no Y translation in list view (feels off in dense lists) */
.list-view .product-card:hover { transform: none; }

.list-view .product-card > .pc-media {
  grid-column: 1; grid-row: 1 / -1;
  aspect-ratio: 1/1; width: 100%;
  align-self: center;
}
.list-view .product-card > .pc-media img { width: 82%; height: 82%; }

/* Hide hover-only quick actions in list view (they overlap the layout) */
.list-view .product-card > .pc-actions { display: none; }

/* Middle column text */
.list-view .product-card > .pc-brand,
.list-view .product-card > .pc-title,
.list-view .product-card > div:not(.pc-badges):not(.pc-actions):not(.pc-media):not(.pc-price):not(.pc-foot) {
  grid-column: 2;
}
.list-view .product-card > .pc-brand   { grid-row: 1; align-self: end; }
.list-view .product-card > .pc-title   {
  grid-row: 2; font-size: 1.05rem; line-height: 1.3;
  margin-top: 0; min-height: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* Right column: price + button stack */
.list-view .product-card > .pc-price {
  grid-column: 3; grid-row: 1 / 3;
  flex-direction: column; align-items: flex-end;
  text-align: right; margin-top: 0;
  gap: .1rem; align-self: center;
}
.list-view .product-card > .pc-price .now { font-size: 1.6rem; line-height: 1; }
.list-view .product-card > .pc-price .was { font-size: .85rem; }

.list-view .product-card > .pc-foot {
  grid-column: 3; grid-row: 3;
  margin-top: .55rem; justify-self: stretch;
}
.list-view .product-card > .pc-foot .btn { width: 100%; }

/* Badges stay top-left as before (absolute) */
.list-view .product-card > .pc-badges {
  flex-direction: row; flex-wrap: wrap;
  top: .85rem; left: .85rem;
}

/* Mobile: collapse to 2-column (image | content) and stretch button */
@media (max-width: 720px) {
  .list-view .product-card {
    grid-template-columns: 96px minmax(0, 1fr);
    grid-template-rows: auto auto auto auto;
    column-gap: 1rem;
    padding: .9rem 1rem;
  }
  .list-view .product-card > .pc-media       { grid-column: 1; grid-row: 1 / 5; }
  .list-view .product-card > .pc-brand       { grid-column: 2; grid-row: 1; align-self: start; }
  .list-view .product-card > .pc-title       { grid-column: 2; grid-row: 2; font-size: .92rem; }
  .list-view .product-card > div:not(.pc-badges):not(.pc-actions):not(.pc-media):not(.pc-price):not(.pc-foot) {
    grid-row: 3; font-size: .8rem;
  }
  .list-view .product-card > .pc-price {
    grid-column: 2; grid-row: 4;
    flex-direction: row; align-items: baseline; align-self: start;
    text-align: left; margin-top: .25rem;
  }
  .list-view .product-card > .pc-price .now { font-size: 1.15rem; }
  .list-view .product-card > .pc-foot {
    grid-column: 1 / -1; grid-row: 5;
    margin-top: .6rem;
  }
}

/* ---------- Animations ---------- */
@keyframes pulse-bolt {
  0%,100% { filter: drop-shadow(0 0 0 rgba(198,242,78,0)); }
  50%     { filter: drop-shadow(0 0 8px rgba(198,242,78,.7)); }
}
.bolt-pulse { animation: pulse-bolt 2.4s ease-in-out infinite; }

@keyframes float {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-6px); }
}
.float { animation: float 4.5s ease-in-out infinite; }

/* ---------- Print / utility ---------- */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* =========================================================
   Live search dropdown (header AJAX product search)
   ========================================================= */
.uz-search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 80;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-3);
  max-height: 70vh;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.uz-search-dropdown.hidden { display: none; }

.uz-search-section { padding: .55rem .55rem .7rem; }
.uz-search-section + .uz-search-section { border-top: 1px solid var(--border); }
.uz-search-section-title {
  font-size: .68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--muted);
  padding: .35rem .55rem .45rem;
}
.uz-search-section ul { list-style: none; margin: 0; padding: 0; }

.uz-search-item {
  display: flex; align-items: center; gap: .7rem;
  padding: .55rem .55rem;
  border-radius: var(--r-md);
  color: var(--ink); text-decoration: none;
  transition: background .12s ease;
}
.uz-search-item:hover,
.uz-search-item.is-keyboard {
  background: var(--surface);
}

/* Category row */
.uz-search-cat .title { flex: 1; font-size: .9rem; font-weight: 500; }
.uz-search-cat svg    { color: var(--muted-2); flex: 0 0 16px; }
.uz-search-cat .count {
  font-size: .72rem; color: var(--muted-2);
  background: var(--surface); padding: .15rem .45rem;
  border-radius: 999px; font-family: var(--font-mono);
}
.uz-search-item:hover .uz-search-cat .count,
.uz-search-cat:hover .count { background: #fff; }

/* Product row */
.uz-search-thumb {
  width: 48px; height: 48px; object-fit: contain;
  background: linear-gradient(180deg, #fff, var(--surface));
  border: 1px solid var(--border);
  border-radius: 8px; flex: 0 0 48px;
  padding: 2px;
}
.uz-search-info { min-width: 0; flex: 1; line-height: 1.3; }
.uz-search-info .brand {
  font-size: .68rem; color: var(--muted);
  text-transform: uppercase; letter-spacing: .06em; font-weight: 700;
}
.uz-search-info .title {
  font-size: .88rem; font-weight: 600; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word;
}
.uz-search-info .price {
  margin-top: .15rem; font-size: .82rem; color: var(--ink);
  font-family: var(--font-display); font-weight: 700;
}
.uz-search-info .price del   { color: var(--muted); font-weight: 400; margin-right: .35rem; }
.uz-search-info .price ins   { text-decoration: none; color: var(--ink); }
.uz-search-info .price .woocommerce-Price-currencySymbol { font-weight: 600; }

/* Highlighted query match */
.uz-search-dropdown mark {
  background: rgba(198, 242, 78, 0.5);
  color: var(--ink);
  padding: 0 .12em; border-radius: 3px;
}

/* Loading / empty / error states */
.uz-search-loading,
.uz-search-empty {
  padding: 1.5rem;
  text-align: center;
  color: var(--muted);
  font-size: .9rem;
}
.uz-search-loading::before {
  content: "";
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid var(--border-2);
  border-top-color: var(--ink);
  border-radius: 999px;
  margin-right: .6rem;
  vertical-align: -3px;
  animation: uz-spin .8s linear infinite;
}
@keyframes uz-spin { to { transform: rotate(360deg); } }

/* Footer "View all N results →" */
.uz-search-footer {
  display: flex; align-items: center; justify-content: center;
  gap: .5rem;
  padding: .85rem 1rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
  font-size: .85rem; font-weight: 700;
  color: var(--ink); text-decoration: none;
  transition: background .12s ease, color .12s ease;
}
.uz-search-footer:hover { background: var(--ink); color: var(--accent); }

/* Mobile: drop the dropdown into a wider, slightly tighter card */
@media (max-width: 767px) {
  .uz-search-dropdown { left: -.5rem; right: -.5rem; max-height: 60vh; }
}

/* =========================================================
   WooCommerce checkout
   ========================================================= */

/* Form-row defaults inside our checkout cards. WC's woocommerce_form_field()
   emits <p class="form-row form-row-wide / form-row-first / form-row-last">
   with a <label> + <input class="field"> inside. We use a grid in the
   form templates, but some fields are flagged "form-row-wide" and need to
   span the full grid width. */
.woocommerce-billing-fields .form-row,
.woocommerce-shipping-fields .form-row,
.woocommerce-additional-fields .form-row,
.woocommerce-account-fields .form-row {
  margin: 0 0 .25rem;
}
.woocommerce-billing-fields .form-row-wide,
.woocommerce-shipping-fields .form-row-wide,
.woocommerce-additional-fields .form-row-wide,
.woocommerce-account-fields .form-row-wide { grid-column: 1 / -1; }
.woocommerce-billing-fields .form-row > label,
.woocommerce-shipping-fields .form-row > label,
.woocommerce-additional-fields .form-row > label,
.woocommerce-account-fields .form-row > label {
  display: block; font-size: .82rem; font-weight: 600; color: var(--ink); margin-bottom: .4rem;
}
.woocommerce-billing-fields .form-row .required,
.woocommerce-billing-fields .form-row .optional,
.woocommerce-shipping-fields .form-row .required,
.woocommerce-shipping-fields .form-row .optional { color: var(--muted-2); margin-left: .15rem; }

/* Selects (country, state) — style via .field-like chrome + select2 patch */
.woocommerce-billing-fields select.field,
.woocommerce-shipping-fields select.field { min-height: 46px; appearance: none; -webkit-appearance: none; }
.woocommerce-billing-fields .select2-container .select2-selection,
.woocommerce-shipping-fields .select2-container .select2-selection { height: 46px !important; }
.woocommerce-billing-fields .select2-container--default .select2-selection--single,
.woocommerce-shipping-fields .select2-container--default .select2-selection--single {
  border: 1px solid var(--border-2); border-radius: var(--r-md); background: #fff;
}
.woocommerce-billing-fields .select2-container--default .select2-selection--single .select2-selection__rendered,
.woocommerce-shipping-fields .select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 44px; color: var(--ink); padding-left: .85rem;
}
.woocommerce-billing-fields .select2-container--default .select2-selection--single .select2-selection__arrow,
.woocommerce-shipping-fields .select2-container--default .select2-selection--single .select2-selection__arrow { height: 44px; }

/* Textareas inside checkout (order notes) */
.woocommerce-additional-fields textarea.field { min-height: 80px; resize: vertical; }

/* "Ship to different address" toggle wrapper */
#ship-to-different-address { margin-bottom: 0; }
#ship-to-different-address + .shipping_address { margin-top: 1rem; }

/* Payment method cards */
.uz-checkout-payment .wc_payment_methods { list-style: none; margin: 0; padding: 0; }
/* WC adds border-bottom on ul.payment_methods — we use a single divider on .place-order instead */
.uz-checkout-payment #payment ul.payment_methods,
.uz-checkout-payment .wc_payment_methods.payment_methods {
  border-bottom: none !important;
  padding-bottom: 0 !important;
}
/* Explicit vertical gap between payment methods. We can't rely on the
   Tailwind `space-y-3` utility on the <ul> alone because WC's own
   `woocommerce-general.css` ships `.woocommerce-page ul.payment_methods li
   { margin: 0; }` which wins on some cascade orderings. */
.uz-checkout-payment .wc_payment_methods > li.uz-payment-method,
.uz-checkout-payment .wc_payment_methods > li.wc_payment_method {
  margin: 0 0 .75rem;
  padding: 0;
}
.uz-checkout-payment .wc_payment_methods > li.uz-payment-method:last-child,
.uz-checkout-payment .wc_payment_methods > li.wc_payment_method:last-child {
  margin-bottom: 0;
}
.uz-payment-card {
  display: flex; align-items: center; gap: .75rem;
  border: 2px solid var(--border-2);
  border-radius: var(--r-md);
  padding: 1rem 1.1rem;
  cursor: pointer;
  background: #fff;
  transition: border-color .15s ease, background .15s ease;
}
.uz-payment-card:hover { border-color: var(--ink); }
.uz-payment-card input[type="radio"] { flex-shrink: 0; }
.uz-payment-method.is-active .uz-payment-card,
.uz-payment-card:has(input[type="radio"]:checked) {
  border-color: var(--ink);
  background: #fff;
}
.uz-payment-info {
  flex: 1; min-width: 0;
  display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap;
}
.uz-payment-title { font-weight: 600; color: var(--ink); font-size: .95rem; }
.uz-payment-icon { display: inline-flex; align-items: center; gap: .25rem; }
.uz-payment-icon img { height: 20px; width: auto; display: inline-block; }

/* Gateway-specific "extra fields" panel (CC number, etc.) */
.uz-checkout-payment .payment_box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 1rem;
  margin-top: .5rem;
  font-size: .9rem;
  color: var(--ink);
}
.uz-checkout-payment .payment_box p { margin: 0 0 .5rem; }
.uz-checkout-payment .payment_box p:last-child { margin-bottom: 0; }
.uz-checkout-payment .payment_box input.input-text { width: 100%; padding: .65rem .85rem; border: 1px solid var(--border-2); border-radius: var(--r-sm); background: #fff; font-size: .9rem; }

/* Payment block — reset WC's purple panel chrome */
.uz-checkout-payment #payment {
  background: transparent;
  border-radius: 0;
  padding: 0;
}
.uz-checkout-payment #payment div.form-row { padding: 0; }

/* Terms + place-order — full-width stack (no WC float side-by-side) */
.uz-checkout-payment .form-row.place-order,
.uz-checkout-payment .uz-checkout-place-order {
  display: block;
  width: 100%;
  clear: both;
  margin: 1.5rem 0 0;
  padding: 1.5rem 0 0;
  border-top: 1px solid var(--border);
}
.uz-checkout-terms {
  margin: 0;
  width: 100%;
  float: none !important;
}
.uz-checkout-terms .woocommerce-terms-and-conditions { display: none; }

/* Privacy notice above the T&C checkbox */
.uz-checkout-privacy {
  margin: 0 0 1.25rem;
  padding: 0;
  font-size: .875rem;
  line-height: 1.6;
  color: var(--muted);
}
.uz-checkout-privacy p {
  margin: 0 0 .75rem;
}
.uz-checkout-privacy p:last-child { margin-bottom: 0; }
.uz-checkout-privacy a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}
.uz-checkout-privacy a:hover { text-decoration: underline; }

/* T&C checkbox row */
.uz-checkout-terms-checkbox {
  margin: 0;
  width: 100%;
  padding: 0;
}
.uz-checkout-terms label {
  display: flex !important;
  align-items: flex-start;
  gap: .75rem;
  width: 100%;
  line-height: 1.5 !important;
  font-weight: 400;
  cursor: pointer;
  margin: 0;
  padding: 0;
}
.uz-checkout-terms label input.checkbox {
  margin-top: .2rem;
}
.uz-checkout-terms label > span { flex: 1; min-width: 0; }
.uz-checkout-terms a { text-decoration: none; }

/* Place-order button — spaced below terms */
.uz-checkout-payment #place_order,
.uz-checkout-payment .uz-checkout-submit {
  float: none !important;
  width: 100%;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
}
.uz-checkout-place-order .uz-checkout-submit,
.uz-checkout-place-order #place_order {
  margin-top: 1.25rem;
}

/* Place-order submit button — kill WC's default `.button` chrome so .btn wins */
#place_order.button { background: var(--ink); color: #fff; border: 1px solid transparent; }
#place_order.button:hover { background: var(--ink-2); box-shadow: var(--shadow-2); }
#place_order svg { flex-shrink: 0; }

/* Order review (right sidebar) */
.uz-checkout-items > .cart_item { /* generic row already styled inline */ }
.uz-checkout-totals-lines { color: var(--ink); }
.uz-checkout-totals-lines .text-muted { color: var(--muted); }
.uz-checkout-totals-lines .font-mono { font-family: var(--font-mono); }

/* WC checkout "Loading..." overlay — themed to use the design system surface */
.woocommerce-checkout .blockUI.blockOverlay,
.woocommerce-checkout-review-order .blockUI.blockOverlay {
  background: rgba(246, 248, 250, 0.7) !important;
  opacity: 1 !important;
  border-radius: var(--r-lg);
}
.woocommerce-checkout .blockUI.blockOverlay::before,
.woocommerce-checkout-review-order .blockUI.blockOverlay::before {
  content: "";
  position: absolute; left: 50%; top: 50%;
  width: 28px; height: 28px;
  margin: -14px 0 0 -14px;
  border: 3px solid var(--border-2);
  border-top-color: var(--ink);
  border-radius: 999px;
  animation: uz-spin .8s linear infinite;
  background: none !important;
}

/* Checkout notices — wrapper is layout-only; style the inner message only */
.uz-checkout-notices:empty { display: none; }
.uz-checkout-notices {
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  box-shadow: none;
}
.uz-checkout-notices .woocommerce-NoticeGroup,
.uz-checkout-notices .woocommerce-NoticeGroup-checkout,
.uz-checkout-notices .woocommerce-NoticeGroup-updateOrderReview {
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  box-shadow: none;
  list-style: none;
}
.uz-checkout-notices .woocommerce-error,
.uz-checkout-notices .woocommerce-message,
.uz-checkout-notices .woocommerce-info {
  list-style: none;
  margin: 0;
  padding: .75rem 1rem !important;
  border-radius: var(--r-md);
  border: 1px solid;
  font-size: .9rem;
  line-height: 1.5;
}
.uz-checkout-notices .woocommerce-error + .woocommerce-error,
.uz-checkout-notices .woocommerce-error + .woocommerce-message,
.uz-checkout-notices .woocommerce-message + .woocommerce-error {
  margin-top: .5rem;
}
.uz-checkout-notices .woocommerce-error { background: #FEF2F2; border-color: #FECACA; color: #991B1B; }
.uz-checkout-notices .woocommerce-message { background: #ECFDF5; border-color: #A7F3D0; color: #065F46; }
.uz-checkout-notices .woocommerce-info { background: #ECFEFF; border-color: #A5F0F5; color: #155E68; }
.uz-checkout-notices .woocommerce-error::before,
.uz-checkout-notices .woocommerce-message::before,
.uz-checkout-notices .woocommerce-info::before { display: none !important; content: none !important; }
.uz-checkout-notices .woocommerce-error li { list-style: none; margin: 0; padding: 0; }

/* Fallback if WC leaves a notice as a direct child of the form (before JS relocate) */
form.checkout.woocommerce-checkout > .woocommerce-NoticeGroup,
form.checkout.woocommerce-checkout > .woocommerce-error,
form.checkout.woocommerce-checkout > .woocommerce-message {
  width: 100%;
  margin-bottom: 1rem;
  padding: 0;
  border: none;
  background: none;
}

/* Inline validation errors (auto-added by WC) — not the NoticeGroup shell */
.woocommerce-NoticeGroup-checkout,
.woocommerce-NoticeGroup-updateOrderReview,
.woocommerce-NoticeGroup {
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  box-shadow: none;
  list-style: none;
}
.woocommerce-error,
.woocommerce-message {
  list-style: none; margin: 0 0 1rem; padding: .9rem 1rem;
  border-radius: var(--r-md); border: 1px solid; font-size: .9rem; line-height: 1.5;
}
.woocommerce-NoticeGroup-checkout .woocommerce-error,
.woocommerce-NoticeGroup-updateOrderReview .woocommerce-error,
.woocommerce-NoticeGroup-checkout .woocommerce-message,
.woocommerce-NoticeGroup-updateOrderReview .woocommerce-message {
  margin: 0;
}
.woocommerce-error { background: #FEF2F2; border-color: #FECACA; color: #991B1B; }
.woocommerce-message { background: #ECFDF5; border-color: #A7F3D0; color: #065F46; }
.woocommerce-error::before,
.woocommerce-message::before { display: none !important; content: none !important; } /* hide WC's font-icon */
.woocommerce-error li { list-style: none; }

/* Field-level error state */
.woocommerce-invalid input.field,
.woocommerce-invalid .select2-selection { border-color: #EF4444 !important; }
.woocommerce-validated input.field { border-color: #10B981 !important; }

/* "Ship to different address" checkbox row spacing */
.woocommerce-shipping-fields h3 { margin: 0; }

/* =========================================================
   WooCommerce cart page
   ========================================================= */

/* Cart items list — strip default WC table styling, use our grid rows */
.uz-cart-items div.qty {
  /* tighten the stepper a touch so it fits the 2-col allocation on md+ */
  border-radius: 10px;
}
.uz-cart-items div.qty input { width: 40px; }
.uz-cart-items div.qty button { width: 34px; }

/* Update cart + apply coupon buttons row */
.uz-cart-items .coupon .field { min-height: 38px; }
.uz-cart-items button[name="update_cart"][disabled],
.uz-cart-items button[name="update_cart"]:disabled { opacity: .35; cursor: not-allowed; }

/* Free-shipping progress bar */
.uz-cart-shipping-progress .h-2 > div { transition: width .5s cubic-bezier(.4,0,.2,1); }

/* Right sidebar */
.uz-cart-totals h3 { margin-top: 0; }
.uz-cart-totals .wc-proceed-to-checkout { padding: 0; margin: 0; }

/* Shipping calculator inside cart-totals (WC default outputs an inline form
   under the "Shipping" total line if the calculator is enabled). */
.uz-cart-totals .shipping-calculator-form { margin-top: .75rem; padding: .75rem; background: var(--surface); border-radius: var(--r-md); }
.uz-cart-totals .shipping-calculator-button { font-size: .75rem; color: var(--primary); text-decoration: none; }
.uz-cart-totals .shipping-calculator-button:hover { text-decoration: underline; }

/* Stop WC's woocommerce-message / -info on cart from getting WC's icon
   pseudo-element (already covered in checkout block, but keeping for
   completeness in case someone adds a cart-specific notice container). */
.woocommerce-cart .woocommerce-message,
.woocommerce-cart .woocommerce-info,
.woocommerce-cart .woocommerce-error {
  margin-bottom: 1rem;
  padding: .9rem 1rem !important;
  border-radius: var(--r-md);
  border: 1px solid;
  font-size: .9rem;
  line-height: 1.5;
}
.woocommerce-cart .woocommerce-message::before,
.woocommerce-cart .woocommerce-info::before,
.woocommerce-cart .woocommerce-error::before { content: none !important; display: none !important; }
.woocommerce-cart .woocommerce-message { background: #ECFDF5; border-color: #A7F3D0; color: #065F46; }
.woocommerce-cart .woocommerce-info    { background: #ECFEFF; border-color: #A5F0F5; color: #155E68; }
.woocommerce-cart .woocommerce-error,
.woocommerce-cart .woocommerce-error li { background: #FEF2F2; border-color: #FECACA; color: #991B1B; list-style: none; }
.woocommerce-cart .woocommerce-message .button,
.woocommerce-cart .woocommerce-info .button { display: none; }

/* Cart loading overlay during ajax qty updates */
.woocommerce-cart .blockUI.blockOverlay {
  background: rgba(246, 248, 250, 0.7) !important;
  opacity: 1 !important;
  border-radius: var(--r-lg);
}
.woocommerce-cart .blockUI.blockOverlay::before {
  content: "";
  position: absolute; left: 50%; top: 50%;
  width: 28px; height: 28px;
  margin: -14px 0 0 -14px;
  border: 3px solid var(--border-2);
  border-top-color: var(--ink);
  border-radius: 999px;
  animation: uz-spin .8s linear infinite;
  background: none !important;
}

/* Mobile: stack the cart row labels above the values neatly */
@media (max-width: 767px) {
  .uz-cart-items div.qty { margin-top: .25rem; }
}

/* =========================================================
   Order received / Thank-you page
   ========================================================= */

/* Subtle float animation on the success check icon */
@keyframes uz-thankyou-pop {
  0%   { transform: scale(.6); opacity: 0; }
  60%  { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); }
}
.uz-thankyou-hero > div > div:first-child {
  animation: uz-thankyou-pop .5s cubic-bezier(.34,1.56,.64,1) both;
}

/* Order overview list — strip default <ul> styling, our flex/grid wins */
.uz-thankyou-overview ul.woocommerce-order-overview { list-style: none; margin: 0; padding: 0; }
.uz-thankyou-overview ul.woocommerce-order-overview > li { margin: 0; padding: 0; }
.uz-thankyou-overview ul.woocommerce-order-overview > li strong { font-weight: 700; color: var(--ink); }

/* Order items rows */
.uz-order-items .order_item:last-child { border-bottom: 0 !important; }

/* WC sometimes outputs item meta as <ul><li>Attribute: value</li></ul> via
   wc_display_item_meta — flatten it into our muted inline text. */
.uz-order-items .wc-item-meta {
  list-style: none; margin: 0; padding: 0;
}
.uz-order-items .wc-item-meta li {
  display: inline; margin: 0; padding: 0;
}
.uz-order-items .wc-item-meta li:not(:last-child)::after { content: " · "; color: var(--muted-2); }
.uz-order-items .wc-item-meta strong { font-weight: 600; color: var(--ink); }

/* Customer address cards */
.uz-order-customer address { margin: 0; }
.uz-order-customer address br + br { display: none; } /* WC sometimes outputs double <br> */

/* "What happens next" timeline list */
.uz-thankyou-next-steps ul li { padding: 0; }

/* =========================================================
   Contacts page form (AJAX)
   ========================================================= */
.uz-contact-form .uz-invalid {
  border-color: #EF4444 !important;
}
.uz-contact-form .uz-field-error {
  color: #991B1B;
  font-size: .78rem;
  margin-top: .35rem;
}

.uz-contact-status:empty { display: none; }
.uz-contact-success,
.uz-contact-error {
  display: flex; align-items: flex-start; gap: .6rem;
  padding: .85rem 1rem;
  border-radius: var(--r-md);
  border: 1px solid;
  font-size: .9rem;
  line-height: 1.5;
}
.uz-contact-success {
  background: #ECFDF5; border-color: #A7F3D0; color: #065F46;
}
.uz-contact-error {
  background: #FEF2F2; border-color: #FECACA; color: #991B1B;
}
.uz-contact-success svg,
.uz-contact-error svg { flex-shrink: 0; margin-top: 1px; }

/* Submit-button spinner during AJAX */
.uz-spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 999px;
  animation: uz-spin .8s linear infinite;
  vertical-align: -2px;
  margin-right: .35rem;
}

/* Address/hours card on small screens — stack with a divider */
@media (max-width: 767px) {
  .uz-contact-addr-hours { gap: 1.5rem; }
}

/* Honeypot wrapper — visually hidden to humans, completely available to
   bots. Off-screen, no display:none (bots ignore display:none inputs). */
.uz-honeypot {
  position: absolute !important;
  left: -9999px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

/* Debug snippet shown inside the contact-form error banner when
   WP_DEBUG is on (or when the JS fallback shows the raw server output). */
.uz-contact-debug {
  margin-top: .5rem;
  padding: .55rem .65rem;
  background: rgba(255,255,255,.6);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: .72rem;
  line-height: 1.4;
  word-break: break-all;
  color: #7f1d1d;
}

/* Single product — price incl./excl. VAT breakdown */
.uz-product-price .font-mono { letter-spacing: -0.02em; }

/* =========================================================
   WooCommerce single-product buy-box integration
   The WC add-to-cart templates we override at
   woocommerce/single-product/add-to-cart/*.php render their
   markup INSIDE <form class="cart">. These tweaks make sure
   the form behaves like a block (matches html/product.html)
   and that WC's own .button class doesn't bleed into our .btn.
   ========================================================= */
.cart { display: block; margin: 0; }
.cart div.qty { margin-top: .4rem; }
.woocommerce form.cart div.qty input.input-text {
  border-top: 0 !important;
  border-bottom: 0 !important;
  min-height: 38px;
  line-height: 38px;
}
.cart .variations { width: 100%; border-collapse: collapse; margin-bottom: 1rem; }
.cart .variations th.label { text-align: left; padding: .6rem 0; font-size: .82rem; font-weight: 600; color: var(--ink); width: 36%; }
.cart .variations td.value { padding: .35rem 0 .35rem .5rem; }
.cart .variations select { width: 100%; padding: .65rem .8rem; border: 1px solid var(--border-2); background: #fff; border-radius: var(--r-md); font-size: .92rem; color: var(--ink); appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%230B1220' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>"); background-repeat: no-repeat; background-position: right .7rem center; padding-right: 2rem; }
.cart .variations select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(14,165,165,0.18); }
.cart .single_variation_wrap .woocommerce-variation-price { font-family: var(--font-display); font-weight: 700; color: var(--ink); margin-bottom: .5rem; }
.cart .single_variation_wrap .woocommerce-variation-availability { font-size: .82rem; color: var(--muted); margin-bottom: .75rem; }
.cart .woocommerce-variation { margin-bottom: 1rem; }
.cart .reset_variations { display: inline-block; margin-left: .5rem; }

/* WC adds these classes to the add-to-cart submit — neutralise the WC styles
   so our .btn wins without needing !important. */
.cart button.single_add_to_cart_button {
  background: var(--ink); color: #fff; border: 1px solid transparent;
}
.cart button.single_add_to_cart_button:hover { background: var(--ink-2); box-shadow: var(--shadow-2); }
.cart button.single_add_to_cart_button:disabled { opacity: .5; cursor: not-allowed; }
.cart button.uz-buy-now { background: var(--accent); color: var(--ink); }
.cart button.uz-buy-now:hover { background: var(--accent-d); }

/* WC stock messages — keep tone consistent */
.cart .stock { font-size: .82rem; color: var(--muted); margin-bottom: .75rem; }
.cart .stock.in-stock { color: #047857; }
.cart .stock.out-of-stock { color: #b91c1c; }

/* =========================================================
   Toolbar selects (sort + per-page on archive-product)
   `.field` already styles padding/border, but native <select>
   on macOS/Linux/Windows still draws its own dropdown chevron.
   Strip it and paint our own SVG chevron so both selects
   read the same as the rest of the design system.
   ========================================================= */
.woocommerce-ordering,
.uz-per-page { margin: 0; }

/* WC's woocommerce.css ships `.woocommerce .woocommerce-ordering { margin: 0 0 1em }`
   which leaks a bottom gap into our toolbar — kill it. */
.woocommerce .woocommerce-ordering,
.woocommerce-page .woocommerce-ordering { margin-bottom: 0 !important; }

/* =========================================================
   Single product gallery (WooCommerce Flexslider + lightbox)

   We disabled woocommerce-layout.css earlier, which carried WC's basic
   gallery sizing — so we have to re-style the markup that
   woocommerce_show_product_images() emits and that Flexslider rewrites
   at runtime. Target structure:

     <div class="woocommerce-product-gallery">
       <figure class="woocommerce-product-gallery__wrapper">
         <div class="woocommerce-product-gallery__image">
           <a href="full.jpg"><img src="large.jpg"></a>
         </div>
         ... (more images, all but the first are hidden by Flexslider)
       </figure>
       <a class="woocommerce-product-gallery__trigger">🔍</a>
       <ol class="flex-control-nav flex-control-thumbs">      ← inserted by Flexslider
         <li><img src="thumb1.jpg"></li>
         <li><img src="thumb2.jpg" class="flex-active"></li>
         ...
       </ol>
     </div>
   ========================================================= */

.woocommerce-product-gallery {
  position: relative;
  margin-bottom: 0;
}

/* Main image card — landscape 4/3 surface with a soft gradient (so
   portrait / landscape product photos don't look like they're floating
   in stark white space) + rounded border + tight inset padding.
   Aspect-ratio chosen as 4/3 so the card is ~25% shorter than a square
   at the same width — comfortable on both desktop and mobile without
   dominating the page. Also capped with max-height for very wide
   viewports so it never gets ludicrously tall.
   `!important` on height defeats Flexslider's inline height attribute
   so our aspect-ratio always wins (smoothHeight is also disabled in
   inc/woocommerce.php for belt-and-braces). */
.woocommerce-product-gallery .flex-viewport,
.woocommerce-product-gallery > .woocommerce-product-gallery__wrapper {
  background: linear-gradient(180deg, #FFFFFF 0%, #F4F7FA 100%);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  max-height: 560px;
  height: auto !important;
  margin-bottom: 1rem;
  position: relative;
}
/* Flexslider wraps the slides in an <ul class="slides"> — make sure it
   fills the viewport so the image inside can vertically center properly. */
.woocommerce-product-gallery .slides {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  position: relative;
}
.woocommerce-product-gallery .flex-viewport .slides > li {
  width: 100%;
  height: 100%;
  margin: 0;
}
/* Each slide fills the viewport and centers its image. */
.woocommerce-product-gallery .woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image,
.woocommerce-product-gallery .flex-viewport .woocommerce-product-gallery__image {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  margin: 0;
  background: transparent;
}
.woocommerce-product-gallery .woocommerce-product-gallery__image a {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 1rem;
  cursor: default;
}
.woocommerce-product-gallery .woocommerce-product-gallery__image img {
  max-width: 100%;
  max-height: 100%;
  width: auto !important;
  height: auto !important;
  object-fit: contain;
  margin: 0;
  display: block;
}
/* Placeholder (when the product has no images at all) */
.woocommerce-product-gallery .woocommerce-product-gallery__image--placeholder img { opacity: .35; }

/* Before Flexslider has booted, all slides stack vertically — hide the
   off-screen ones so the user sees just the first image, not a long list. */
.woocommerce-product-gallery:not(.flexslider) .woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image:nth-child(n+2) {
  display: none;
}

/* WC fades the gallery in once JS boots — start at full opacity so even if
   JS fails the customer sees the first image. */
.woocommerce-product-gallery { opacity: 1 !important; }

/* Thumbnail strip — Flexslider injects this <ol> AFTER the main viewport,
   placing it directly under the main image. Flex layout with fixed-size
   thumbs (so 3 thumbs don't get stretched across the full row by a grid,
   and a long list horizontally scrolls instead of squashing). */
.woocommerce-product-gallery .flex-control-thumbs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
}
.woocommerce-product-gallery .flex-control-thumbs li {
  margin: 0;
  cursor: pointer;
  width: 88px;
  height: 88px;
  flex: 0 0 88px;
  background: #fff;
  /* Always 2px border — only the COLOR changes for the active state, so
     thumbs never shift position when you click between them. */
  border: 2px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: border-color .15s ease, transform .15s ease;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  padding: 4px;
}
@media (max-width: 480px) {
  .woocommerce-product-gallery .flex-control-thumbs li {
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
  }
}
.woocommerce-product-gallery .flex-control-thumbs li:hover {
  border-color: var(--muted-2);
  transform: translateY(-1px);
}
.woocommerce-product-gallery .flex-control-thumbs li img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  margin: 0;
  display: block;
  opacity: 1;
}
/* Active thumb — Flexslider only adds `flex-active` to the <img>, so we
   climb up via :has() to highlight the wrapping <li>. Same 2px border
   width as the inactive state, just ink-colored, so no layout shift. */
.woocommerce-product-gallery .flex-control-thumbs li:has(img.flex-active) {
  border-color: var(--ink);
}

/* Lightbox trigger — WC outputs a plain anchor with a 🔍 emoji. Replace
   with a clean circular button + our SVG zoom icon. */
.woocommerce-product-gallery__trigger {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  z-index: 10;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  background: #fff;
  border: 1px solid var(--border-2);
  display: grid;
  place-items: center;
  color: var(--ink);
  text-decoration: none;
  font-size: 0;             /* hide the default emoji */
  line-height: 1;
  transition: background .15s, color .15s, box-shadow .15s, transform .15s;
}
.woocommerce-product-gallery__trigger:hover {
  background: var(--ink);
  color: var(--accent);
  transform: scale(1.05);
  box-shadow: var(--shadow-2);
}
.woocommerce-product-gallery__trigger::before {
  content: "";
  width: 18px;
  height: 18px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><path d='m20 20-3.5-3.5'/><path d='M11 8v6'/><path d='M8 11h6'/></svg>") center / contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><path d='m20 20-3.5-3.5'/><path d='M11 8v6'/><path d='M8 11h6'/></svg>") center / contain no-repeat;
}

/* Flexslider built-in prev/next arrows — re-skin to floating circles
   that match the lightbox trigger. */
.woocommerce-product-gallery .flex-direction-nav { list-style: none; margin: 0; padding: 0; }
.woocommerce-product-gallery .flex-direction-nav a {
  position: absolute;
  top: 50%;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  background: #fff;
  border: 1px solid var(--border-2);
  display: grid;
  place-items: center;
  color: var(--ink);
  text-decoration: none;
  font-size: 0;
  line-height: 1;
  margin-top: -1.125rem;
  z-index: 9;
  opacity: 0;
  transition: opacity .2s ease, background .15s ease;
}
.woocommerce-product-gallery:hover .flex-direction-nav a { opacity: 1; }
.woocommerce-product-gallery .flex-direction-nav a:hover { background: var(--ink); color: var(--accent); }
.woocommerce-product-gallery .flex-direction-nav .flex-prev { left: .75rem; }
.woocommerce-product-gallery .flex-direction-nav .flex-next { right: .75rem; }
.woocommerce-product-gallery .flex-direction-nav a::before {
  content: "";
  width: 14px;
  height: 14px;
  background-color: currentColor;
}
.woocommerce-product-gallery .flex-direction-nav .flex-prev::before {
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='15 18 9 12 15 6'/></svg>") center / contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='15 18 9 12 15 6'/></svg>") center / contain no-repeat;
}
.woocommerce-product-gallery .flex-direction-nav .flex-next::before {
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='9 18 15 12 9 6'/></svg>") center / contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='9 18 15 12 9 6'/></svg>") center / contain no-repeat;
}

/* PhotoSwipe lightbox — minor polish so the close/zoom buttons feel less
   "default WP" and more like our design system. */
.pswp__bg { background: rgba(11, 18, 32, .94); }


/* =========================================================
   My Account — sidebar navigation + content surfaces
   ========================================================= */

/* Sidebar nav (overridden navigation.php) */
.account-nav { padding: .55rem; }
.account-nav ul { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }
.account-nav li { margin: 0; }
.account-nav li a {
  display: flex; align-items: center; gap: .7rem;
  padding: .65rem .85rem;
  font-size: .9rem; font-weight: 500; color: var(--ink);
  border-radius: 10px;
  transition: background .15s ease, color .15s ease;
}
.account-nav li a svg { color: var(--muted-2); flex: 0 0 18px; transition: color .15s ease; }
.account-nav li a:hover { background: var(--surface); color: var(--primary); }
.account-nav li a:hover svg { color: var(--primary); }
.account-nav li.is-active a,
.account-nav li a.is-active {
  background: var(--ink); color: var(--accent);
}
.account-nav li.is-active a svg,
.account-nav li a.is-active svg { color: var(--accent); }
/* Sign-out item gets a subtle visual divider above + warning hover */
.account-nav li.woocommerce-MyAccount-navigation-link--customer-logout { border-top: 1px solid var(--border); margin-top: .45rem; padding-top: .25rem; }
.account-nav li.woocommerce-MyAccount-navigation-link--customer-logout a:hover { color: var(--danger); }
.account-nav li.woocommerce-MyAccount-navigation-link--customer-logout a:hover svg { color: var(--danger); }

/* Account tables (dashboard recent orders + orders.php) */
.account-table { width: 100%; border-collapse: collapse; }
.account-table thead th {
  text-align: left; padding: .75rem 1rem;
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.account-table tbody td { padding: .9rem 1rem; border-bottom: 1px solid var(--border); font-size: .9rem; vertical-align: middle; }
.account-table tbody tr:last-child td { border-bottom: 0; }
.account-table tbody tr:hover td { background: var(--surface); }

/* Status pills for order status — auto-coloured per WC slug */
.pill-status { background: rgba(11,18,32,.08); color: var(--ink); }
.pill-status-pending    { background: rgba(245,158,11,.15); color: #92400E; }
.pill-status-on-hold    { background: rgba(245,158,11,.15); color: #92400E; }
.pill-status-processing { background: rgba(14,165,165,.15); color: #065F5B; }
.pill-status-completed  { background: rgba(16,185,129,.15); color: #065F46; }
.pill-status-cancelled  { background: rgba(239,68,68,.12); color: #991B1B; }
.pill-status-refunded   { background: rgba(11,18,32,.08); color: var(--ink); }
.pill-status-failed     { background: rgba(239,68,68,.12); color: #991B1B; }

/* WC form-row defaults inside the account area — give .form-row consistent spacing
   when WC's woocommerce_form_field outputs <p class="form-row"> directly (e.g.
   form-edit-address.php's auto-generated fields). */
.woocommerce-MyAccount-content .form-row { margin-bottom: 1rem; display: block; }
.woocommerce-MyAccount-content .form-row > label { display: block; font-size: .82rem; font-weight: 600; color: var(--ink); margin-bottom: .4rem; }
.woocommerce-MyAccount-content .form-row > .required,
.woocommerce-MyAccount-content .form-row > .optional { color: var(--muted-2); margin-left: .15rem; }
.woocommerce-MyAccount-content .form-row select.field,
.woocommerce-MyAccount-content .form-row .select2-container .select2-selection {
  width: 100%; min-height: 46px;
}

/* WC's select2 widgets (used for country selects on the address form) — patch
   the rendered chrome so it visually matches our .field inputs */
.woocommerce-MyAccount-content .select2-container--default .select2-selection--single {
  border: 1px solid var(--border-2);
  border-radius: var(--r-md);
  background: #fff;
  height: 46px;
  padding: .25rem .25rem;
}
.woocommerce-MyAccount-content .select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 36px; color: var(--ink); padding-left: .65rem;
}
.woocommerce-MyAccount-content .select2-container--default .select2-selection--single .select2-selection__arrow { height: 44px; }

/* Two-column address edit grid wraps each generated <p class="form-row"> as full width.
   The form-row-first / form-row-last WC modifiers tell us when the field should
   take half width. */
.woocommerce-MyAccount-content .form-row-first,
.woocommerce-MyAccount-content .form-row-last { grid-column: span 1 / span 1; }
.woocommerce-MyAccount-content .form-row-wide  { grid-column: 1 / -1; }

/* WC notices — applies both to the full-width wrapper rendered above the
   account grid (uz-account-notices) AND to any notices that end up inside
   the content card (theoretical, since we render them at the top now). */
.uz-account-notices:empty,
.woocommerce-MyAccount-content .woocommerce-notices-wrapper:empty { display: none; }
.uz-account-notices .woocommerce-message,
.uz-account-notices .woocommerce-info,
.uz-account-notices .woocommerce-error,
.woocommerce-MyAccount-content .woocommerce-message,
.woocommerce-MyAccount-content .woocommerce-info,
.woocommerce-MyAccount-content .woocommerce-error {
  margin-bottom: 1.25rem;
  /* `!important` is required to defeat woocommerce-general.css which sets
     `padding: 1em 2em 1em 3.5em !important;` on these selectors. */
  padding: .9rem 1rem !important;
  border-radius: var(--r-md);
  border: 1px solid;
  font-size: .9rem;
  line-height: 1.5;
  position: relative;
}
/* WC's woocommerce-general.css injects a font-icon pseudo-element at
   `position: absolute; left: 1.5em` on .woocommerce-message / -info /
   -error — it overlaps our notice text. Strip it so our own padding wins. */
.uz-account-notices .woocommerce-message::before,
.uz-account-notices .woocommerce-info::before,
.uz-account-notices .woocommerce-error::before,
.woocommerce-MyAccount-content .woocommerce-message::before,
.woocommerce-MyAccount-content .woocommerce-info::before,
.woocommerce-MyAccount-content .woocommerce-error::before { content: none !important; display: none !important; }

.uz-account-notices .woocommerce-message,
.woocommerce-MyAccount-content .woocommerce-message { background: #ECFDF5; border-color: #A7F3D0; color: #065F46; }
.uz-account-notices .woocommerce-info,
.woocommerce-MyAccount-content .woocommerce-info    { background: #ECFEFF; border-color: #A5F0F5; color: #155E68; }
.uz-account-notices .woocommerce-error,
.uz-account-notices .woocommerce-error li,
.woocommerce-MyAccount-content .woocommerce-error,
.woocommerce-MyAccount-content .woocommerce-error li { background: #FEF2F2; border-color: #FECACA; color: #991B1B; list-style: none; }
.uz-account-notices .woocommerce-error,
.woocommerce-MyAccount-content .woocommerce-error { padding-left: 1rem; }
.uz-account-notices .woocommerce-message .button,
.uz-account-notices .woocommerce-info .button,
.woocommerce-MyAccount-content .woocommerce-message .button,
.woocommerce-MyAccount-content .woocommerce-info .button { display: none; } /* hide WC's default "View" / "Log in" buttons inside notices */

/* Mobile: collapse the account table to stacked rows */
@media (max-width: 720px) {
  .account-table--orders thead { display: none; }
  .account-table--orders tbody td {
    display: block; padding: .5rem 1rem; border: 0;
  }
  .account-table--orders tbody td:first-child { padding-top: 1rem; }
  .account-table--orders tbody td:last-child { padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
  .account-table--orders tbody td[data-title]::before {
    content: attr(data-title);
    display: block; font-size: .68rem; text-transform: uppercase;
    letter-spacing: .08em; color: var(--muted); margin-bottom: .15rem;
  }
}
.woocommerce-ordering select.field,
.uz-per-page select.field {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  /* !important is required to beat the inline `!px-3` Tailwind utility on
     the <select> markup (Tailwind's !important version of px-3 sets
     padding-right: .75rem and would otherwise let the chevron overlap the
     value text). */
  padding-right: 2.25rem !important;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%230B1220' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right .7rem center;
  cursor: pointer;
}
