/* dvrg.shop
   Tokens reproduce the previous site: the "extendable" theme's theme.json plus the
   saved global-styles overrides (wp_global_styles ID 5), verified against the
   15 Apr 2025 archive of /products/logo-tee/. */

:root {
  --fg:#010101;
  --bg:#fbfbfb;
  --primary:#174c2f;
  --secondary:#ffd800;
  --tertiary:#A8E1FF;
  --rule:#cccccca6;
  --muted:#5a5a5a;
  --error:#8f1d1d;

  --fs-body:clamp(0.875rem, 0.7916rem + 0.417vw, 1.125rem);
  --fs-small:1rem;
  --fs-medium:1.25rem;
  --fs-large:clamp(1.39rem, 1.39rem + ((1vw - 0.2rem) * 1.433), 2.25rem);
  --fs-x-large:clamp(1.85rem, 1.85rem + ((1vw - 0.2rem) * 1.917), 3rem);
  --fs-xx-large:clamp(2.25rem, 2.25rem + ((1vw - 0.2rem) * 2.5), 3.75rem);

  --sp-20:1rem;
  --sp-30:min(2rem, 5vw);
  --sp-40:min(3rem, 6vw);
  --sp-50:min(4rem, 7vw);

  --wide:80rem;
  --content:42rem;
  --lh-tiny:1.15;
  --lh-normal:1.6;
}

* { box-sizing:border-box; }

body {
  margin:0;
  background:var(--bg); color:var(--fg);
  font-family:"Space Mono", monospace;
  font-size:var(--fs-body); font-weight:400; line-height:var(--lh-normal);
  -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale;
}

.wide    { max-width:var(--wide);    margin-inline:auto; padding-inline:var(--sp-30); }
.content { max-width:var(--content); margin-inline:auto; padding-inline:var(--sp-30); }

a { color:var(--fg); }
a:hover { color:var(--primary); }

h1, h2, h3 { font-weight:400; letter-spacing:-0.02em; line-height:var(--lh-tiny); margin:0; }
h1 { font-size:var(--fs-xx-large); }
h2 { font-size:var(--fs-x-large); }
h3 { font-size:var(--fs-large); }

.muted { color:var(--muted); }
.mono-label { font-weight:700; }

/* ---------- header ---------- */
.site-header { padding-block:var(--sp-30); }
.site-header .wide { display:flex; align-items:center; justify-content:space-between; gap:1rem; }
.site-logo img { width:110px; height:auto; display:block; }
.site-nav { display:flex; align-items:center; gap:1.25rem; }
.site-nav a { text-decoration:none; }
.cart-link { display:inline-flex; align-items:center; gap:.4rem; text-decoration:none; }
.cart-count {
  display:inline-grid; place-items:center; min-width:1.5rem; height:1.5rem; padding:0 .35rem;
  background:var(--secondary); color:var(--fg); border-radius:1rem;
  font-size:.75rem; font-weight:700; line-height:1;
}
.cart-count[hidden] { display:none; }

/* ---------- product ---------- */
.columns { display:flex; flex-wrap:wrap; gap:var(--sp-40); align-items:flex-start; }
.col-gallery { flex:1 1 320px; max-width:512px; }
.col-details { flex:1 1 320px; min-width:0; }

.shot { width:100%; height:auto; aspect-ratio:4/5; object-fit:cover; display:block; background:#efefef; }
.thumbs { display:flex; align-items:flex-start; gap:.5rem; margin-top:.5rem; }
.thumbs button { padding:0; border:1px solid transparent; background:none; cursor:pointer; line-height:0; }
.thumbs img { width:80px; height:auto; aspect-ratio:4/5; object-fit:cover; display:block; opacity:.6; }
.thumbs button[aria-current="true"] { border-color:var(--fg); }
.thumbs button[aria-current="true"] img, .thumbs button:hover img { opacity:1; }
.thumbs button:focus-visible { outline:2px solid var(--fg); outline-offset:2px; }

.price { font-size:var(--fs-large); line-height:var(--lh-normal); margin:var(--sp-20) 0 0; }

.variations { margin:var(--sp-30) 0 0; border-collapse:collapse; }
.variations th { text-align:left; font-weight:700; padding:0 1rem .75rem 0; white-space:nowrap; }
.variations td { padding:0 0 .75rem; }

.description { margin-top:var(--sp-50); }
.description h2 { margin-bottom:var(--sp-20); }
.description p { margin:0 0 var(--sp-20); }
.eco { display:flex; align-items:center; gap:.65rem; }
.eco img { width:24px; height:auto; flex:0 0 auto; }
.size-chart { width:100%; max-width:34rem; height:auto; display:block; margin-top:var(--sp-20); }

/* ---------- form controls ----------
   The previous site left WooCommerce's selects and quantity box as unstyled browser
   controls. These are the theme's own input tokens (theme.json custom.elements.input)
   applied to them. */
select, input[type="text"], input[type="email"], input[type="tel"], input[type="number"], textarea {
  font-family:inherit; font-size:1.15rem; font-weight:400; line-height:1.384;
  color:var(--fg); background:var(--bg);
  border:1px solid var(--fg); border-radius:4px;
  padding:calc(0.667em + 1px) calc(1.333em + 1px);
  max-width:100%; width:100%;
}
input[type="number"] { width:6.5rem; padding-inline:calc(0.667em + 1px); }
select { width:auto; min-width:12rem; }
textarea { min-height:6rem; resize:vertical; }
select:focus-visible, input:focus-visible, textarea:focus-visible { outline:2px solid var(--primary); outline-offset:2px; }
input[aria-invalid="true"] { border-color:var(--error); }

.btn {
  display:inline-block;
  background:var(--secondary); color:var(--fg);
  font-family:inherit; font-size:inherit; font-weight:500; line-height:var(--lh-normal);
  text-align:center; text-decoration:none; border:1px solid var(--secondary); border-radius:2rem;
  padding:0.667em 1.333em; cursor:pointer;
  transition:background .15s, color .15s, border-color .15s;
}
.btn:hover { background:var(--primary); border-color:var(--primary); color:var(--bg); }
.btn:focus-visible { outline:2px solid var(--fg); outline-offset:3px; }
.btn[disabled] { opacity:.45; cursor:not-allowed; }
.btn[disabled]:hover { background:var(--secondary); border-color:var(--secondary); color:var(--fg); }
.btn-plain { background:transparent; border-color:var(--fg); }
.btn-plain:hover { background:var(--fg); border-color:var(--fg); color:var(--bg); }

.field { margin-bottom:var(--sp-20); }
.field label { display:block; font-weight:700; margin-bottom:.35rem; }
.field .hint { color:var(--muted); font-size:var(--fs-small); margin:.35rem 0 0; }
.row2 { display:grid; grid-template-columns:1fr 1fr; gap:var(--sp-20); }
@media (max-width:40rem) { .row2 { grid-template-columns:1fr; gap:0; } }

/* ---------- notices ---------- */
.notice { border:1px solid var(--fg); border-radius:4px; padding:var(--sp-20); margin-bottom:var(--sp-30); }
.notice-ok   { border-color:var(--primary); background:#174c2f10; }
.notice-bad  { border-color:var(--error);   background:#8f1d1d10; color:var(--error); }
.notice-info { border-color:var(--rule);    background:#A8E1FF26; }
.notice p { margin:0; }
.notice p + p { margin-top:.5rem; }

/* ---------- cart ---------- */
.cart-layout { display:flex; flex-wrap:wrap; gap:var(--sp-40); align-items:flex-start; }
.cart-main { flex:1 1 28rem; min-width:0; }
.cart-side { flex:1 1 18rem; min-width:0; max-width:24rem; }

table.lines { width:100%; border-collapse:collapse; }
table.lines th, table.lines td { text-align:left; padding:var(--sp-20) 0; border-bottom:1px solid var(--rule); vertical-align:middle; }
table.lines th { font-weight:700; border-bottom-color:var(--fg); }
table.lines td.num, table.lines th.num { text-align:right; white-space:nowrap; }
table.lines th + th, table.lines td + td { padding-left:1.25rem; }
.line-item { display:flex; gap:var(--sp-20); align-items:center; }
.line-item img { width:72px; height:auto; aspect-ratio:4/5; object-fit:cover; display:block; flex:0 0 auto; }
.line-meta { color:var(--muted); font-size:var(--fs-small); }
.link-btn { background:none; border:0; padding:0; font:inherit; color:var(--muted); text-decoration:underline; cursor:pointer; }
.link-btn:hover { color:var(--error); }

.totals { border:1px solid var(--fg); border-radius:4px; padding:var(--sp-30); }
.totals h2 { font-size:var(--fs-large); margin-bottom:var(--sp-20); }
.totals dl { display:grid; grid-template-columns:1fr auto; gap:.6rem 1rem; margin:0 0 var(--sp-20); }
.totals dt { margin:0; }
.totals dd { margin:0; text-align:right; white-space:nowrap; }
.totals .grand { border-top:1px solid var(--fg); padding-top:.75rem; font-size:var(--fs-medium); }
.totals .btn { width:100%; }
.discount-row dt, .discount-row dd { color:var(--primary); }

.coupon-form { display:flex; gap:.5rem; margin-bottom:var(--sp-20); }
/* flex-basis 0 with width:auto, so the global input width:100% doesn't fight the row */
.coupon-form input { flex:1 1 0; width:auto; min-width:0; text-transform:uppercase; font-size:var(--fs-body); }
/* width:auto beats the `.totals .btn { width:100% }` rule above for this one */
.coupon-form .btn { flex:0 0 auto; width:auto; padding-inline:1rem; white-space:nowrap; }
.applied-coupon { display:flex; align-items:baseline; justify-content:space-between; gap:1rem; margin-bottom:var(--sp-20); }

/* ---------- receipt / admin ---------- */
.panel { border:1px solid var(--rule); border-radius:4px; padding:var(--sp-30); margin-bottom:var(--sp-30); }
.panel h2 { font-size:var(--fs-large); margin-bottom:var(--sp-20); }
.kv { display:grid; grid-template-columns:auto 1fr; gap:.4rem 1.25rem; margin:0; }
.kv dt { font-weight:700; }
.kv dd { margin:0; }
.status {
  display:inline-block; padding:.15em .7em; border-radius:1rem;
  font-size:var(--fs-small); border:1px solid currentColor;
}
.status-pending    { color:#8a5a00; }
.status-processing { color:var(--primary); }
.status-completed  { color:var(--primary); background:#174c2f14; }
.status-cancelled  { color:var(--muted); }

.admin-bar { display:flex; flex-wrap:wrap; gap:1rem; align-items:center; justify-content:space-between; margin-bottom:var(--sp-30); }
.admin-tabs { display:flex; gap:1.25rem; }
.admin-tabs a[aria-current="page"] { font-weight:700; }
.table-scroll { overflow-x:auto; }
/* Only the admin tables have enough columns to need a scroll floor. */
.table-scroll.scroll-wide table { min-width:44rem; }

/* Compact order summary for narrow columns (checkout sidebar, receipt). */
.summary { list-style:none; margin:0 0 var(--sp-20); padding:0; }
.summary li { display:flex; gap:var(--sp-20); align-items:center; padding:var(--sp-20) 0; border-bottom:1px solid var(--rule); }
.summary li:first-child { border-top:1px solid var(--fg); }
.summary img { width:56px; height:auto; aspect-ratio:4/5; object-fit:cover; display:block; flex:0 0 auto; }
.summary .grow { flex:1 1 auto; min-width:0; }
.summary .amount { white-space:nowrap; }
code.code { font-weight:700; letter-spacing:.06em; }

/* ---------- footer ---------- */
.site-footer { margin-top:var(--sp-50); padding-bottom:var(--sp-30); }
.site-footer .wide {
  border-top:1px solid var(--rule); padding-top:var(--sp-30);
  display:flex; flex-wrap:wrap; gap:1rem; align-items:center; justify-content:space-between;
}
.site-title { font-size:var(--fs-small); font-weight:400; letter-spacing:-0.02em; }
.social { display:flex; gap:1rem; align-items:center; }
.social a { line-height:0; color:var(--fg); }
.social svg { width:22px; height:22px; fill:currentColor; display:block; }

.sr-only {
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0;
}
