/* War Torn Clothing Co. — storefront styles. Dark, rugged, mobile-first. */
:root {
  --bg: #0d0d0c;
  --bg2: #151513;
  --bg3: #1e1e1b;
  --ink: #e8e4d9;
  --muted: #9b978d;
  --line: rgba(232, 228, 217, .12);
  --olive: #5c6b2b;
  --olive-2: #7a8a3c;
  --sand: #c2b280;
  --red: #b3261e;
  --radius: 4px;
  --max: 1180px;
  --font-display: 'Bebas Neue', Impact, 'Arial Narrow', sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg) url('/assets/camo.png') repeat; background-attachment: fixed; color: var(--ink);
  font-family: var(--font-body); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body::before { /* subtle grain */
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
body > * { position: relative; z-index: 1; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, .display { font-family: var(--font-display); font-weight: 400; letter-spacing: .04em; line-height: 1; margin: 0; }
h1 { font-size: clamp(44px, 9vw, 96px); }
h2 { font-size: clamp(32px, 5vw, 52px); }
h3 { font-size: 24px; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.eyebrow { font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--sand); font-weight: 600; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 22px; border: 1px solid var(--ink); background: var(--ink); color: #0d0d0c;
  font-family: var(--font-display); font-size: 20px; letter-spacing: .12em; line-height: 1;
  border-radius: var(--radius); cursor: pointer; transition: transform .08s, background .15s, color .15s; text-transform: uppercase;
}
.btn:hover { background: var(--sand); border-color: var(--sand); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: #0d0d0c; }
.btn.olive { background: var(--olive); border-color: var(--olive); color: var(--ink); }
.btn.olive:hover { background: var(--olive-2); border-color: var(--olive-2); }
.btn.sm { padding: 10px 14px; font-size: 16px; }
.btn.block { width: 100%; }

/* announcement + header */
.announce { background: var(--olive); color: var(--ink); text-align: center; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; padding: 8px 16px; font-weight: 600; }
.announce:empty { display: none; }
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(13, 13, 12, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.logo { display: flex; align-items: center; color: var(--ink); }
.logo svg { height: 34px; width: auto; }
.nav { display: none; gap: 28px; font-size: 13px; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; }
.nav a { opacity: .8; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a.active { opacity: 1; border-color: var(--sand); }
.header-actions { display: flex; align-items: center; gap: 14px; }
.cart-btn { position: relative; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; }
.cart-btn .count { background: var(--sand); color: #0d0d0c; min-width: 20px; height: 20px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; padding: 0 6px; }
.burger { background: none; border: 0; color: var(--ink); width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer; }
.burger span { display: block; width: 22px; height: 2px; background: currentColor; box-shadow: 0 -7px 0 currentColor, 0 7px 0 currentColor; }
.mobile-nav { display: none; border-top: 1px solid var(--line); background: var(--bg2); }
.mobile-nav.open { display: block; }
.mobile-nav a { display: block; padding: 16px; border-bottom: 1px solid var(--line); font-family: var(--font-display); font-size: 26px; letter-spacing: .1em; }
@media (min-width: 860px) { .nav { display: flex; } .burger { display: none; } .mobile-nav { display: none !important; } }

/* hero */
.hero { position: relative; min-height: 78vh; display: grid; align-items: end; overflow: hidden; isolation: isolate; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 22%; z-index: -2; filter: saturate(.75) contrast(1.05); }
.hero::after { content: ''; position: absolute; inset: 0; z-index: -1; background:
  linear-gradient(180deg, rgba(13,13,12,.3) 0%, rgba(13,13,12,.45) 45%, rgba(13,13,12,.82) 80%, var(--bg) 100%),
  linear-gradient(90deg, rgba(13,13,12,.55) 0%, rgba(13,13,12,.25) 55%, rgba(13,13,12,0) 100%); }
.hero .wrap { padding-top: 120px; padding-bottom: 56px; }
.hero h1 { text-shadow: 0 2px 6px rgba(0,0,0,.85), 0 6px 28px rgba(0,0,0,.6); }
.hero p { text-shadow: 0 1px 10px rgba(0,0,0,.7); max-width: 520px; font-size: 18px; color: var(--ink); opacity: .9; margin: 14px 0 26px; }
.hero .meta { text-shadow: 0 1px 8px rgba(0,0,0,.8); display: flex; gap: 18px; flex-wrap: wrap; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--sand); margin-bottom: 12px; }

/* sections */
.section { padding: 64px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.section-head a { font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--sand); white-space: nowrap; }
.band { background: var(--bg2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* product grid */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (min-width: 700px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
@media (min-width: 1000px) { .grid.four { grid-template-columns: repeat(4, 1fr); } }
.card { display: block; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .15s, border-color .15s; }
.card:hover { transform: translateY(-3px); border-color: rgba(194,178,128,.5); }
.card .img { aspect-ratio: 1; background: #1a1a1a; position: relative; overflow: hidden; }
.card .img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .img img { transform: scale(1.04); }
.card .body { padding: 12px 14px 16px; }
.card .name { font-family: var(--font-display); font-size: 22px; letter-spacing: .05em; }
.card .cat { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.card .price { font-size: 15px; font-weight: 600; margin-top: 6px; display: flex; gap: 8px; align-items: baseline; }
.card .price s { color: var(--muted); font-weight: 400; }
.tag { position: absolute; top: 10px; left: 10px; background: var(--red); color: #fff; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; padding: 4px 8px; border-radius: 2px; }
.tag.sold { background: #333; color: var(--ink); }
.tag.sale { background: var(--sand); color: #0d0d0c; }
.swatches { display: flex; gap: 5px; margin-top: 8px; }
.swatch { width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); }

/* filters */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.chip { padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: var(--muted); cursor: pointer; background: transparent; }
.chip.active, .chip:hover { color: var(--ink); border-color: var(--sand); }

/* story split */
.split { display: grid; gap: 28px; align-items: center; }
@media (min-width: 860px) { .split { grid-template-columns: 1fr 1fr; gap: 56px; } .split.rev > :first-child { order: 2; } }
.split .photo { aspect-ratio: 4/3; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line); }
.split .photo img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.8); }
.split p { font-size: 17px; color: #cfcbc0; }
.lead { font-size: 20px; color: var(--ink); }

/* veterans strip */
.vets { display: grid; gap: 16px; align-items: center; padding: 28px; border: 1px solid rgba(194,178,128,.35); border-radius: var(--radius); background: linear-gradient(90deg, rgba(92,107,43,.25), transparent); }
@media (min-width: 760px) { .vets { grid-template-columns: auto 1fr auto; } }
.vets .star { font-family: var(--font-display); font-size: 48px; color: var(--sand); line-height: 1; }

/* newsletter */
.signup form { display: flex; gap: 8px; max-width: 520px; }
.signup input { flex: 1; }
input, textarea, select {
  width: 100%; background: var(--bg3); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; font: inherit; outline: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--sand); }
label { display: block; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; font-weight: 600; }
.field { margin-bottom: 16px; }
.msg { font-size: 14px; margin-top: 10px; min-height: 20px; }
.msg.ok { color: #9cc26a; } .msg.err { color: #e36a60; }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0 32px; margin-top: 48px; color: var(--muted); font-size: 14px; }
.site-footer .cols { display: grid; gap: 28px; }
@media (min-width: 760px) { .site-footer .cols { grid-template-columns: 2fr 1fr 1fr; } }
.site-footer h4 { margin: 0 0 12px; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink); }
.site-footer a { display: block; padding: 4px 0; }
.site-footer a:hover { color: var(--ink); }
.site-footer .admin-link { display: inline; padding: 0 0 0 10px; opacity: .5; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.site-footer .admin-link:hover { opacity: 1; }
.site-footer .legal { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 12px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* product page */
.product { display: grid; gap: 28px; padding: 32px 0 64px; }
@media (min-width: 860px) { .product { grid-template-columns: 1.1fr 1fr; gap: 56px; } }
.gallery .main { aspect-ratio: 1; background: #1a1a1a; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.gallery .main img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.thumbs img { width: 72px; height: 72px; object-fit: cover; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; opacity: .6; }
.thumbs img.active, .thumbs img:hover { opacity: 1; border-color: var(--sand); }
.pinfo h1 { font-size: clamp(38px, 6vw, 64px); }
.pinfo .price { font-size: 24px; font-weight: 600; margin: 12px 0 20px; display: flex; gap: 12px; align-items: baseline; }
.pinfo .price s { color: var(--muted); font-weight: 400; font-size: 18px; }
.options { display: flex; gap: 8px; flex-wrap: wrap; }
.opt { min-width: 48px; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: transparent; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.opt.active { border-color: var(--sand); background: rgba(194,178,128,.12); }
.opt.off { opacity: .35; text-decoration: line-through; cursor: not-allowed; }
.qty { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); }
.qty button { width: 40px; background: transparent; border: 0; color: var(--ink); font-size: 18px; cursor: pointer; }
.qty input { width: 48px; text-align: center; border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); border-radius: 0; padding: 10px 0; }
.desc { color: #cfcbc0; margin-top: 24px; white-space: pre-line; }
.details { margin-top: 24px; border-top: 1px solid var(--line); }
.details div { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--muted); display: flex; justify-content: space-between; gap: 16px; }
.details div b { color: var(--ink); font-weight: 600; }

/* cart */
.cart-layout { display: grid; gap: 28px; padding: 32px 0 64px; }
@media (min-width: 900px) { .cart-layout { grid-template-columns: 1.5fr 1fr; gap: 48px; align-items: start; } }
.line { display: grid; grid-template-columns: 84px 1fr auto; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: center; }
.line img { width: 84px; height: 84px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); }
.line .name { font-family: var(--font-display); font-size: 22px; letter-spacing: .04em; }
.line .var { font-size: 13px; color: var(--muted); }
.line .remove { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 13px; padding: 0; margin-top: 6px; text-decoration: underline; }
.line .right { text-align: right; font-weight: 600; }
.summary { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; position: sticky; top: 84px; }
.summary .row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 15px; color: var(--muted); }
.summary .row.total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 14px; color: var(--ink); font-size: 20px; font-weight: 700; }
.empty { text-align: center; padding: 64px 0; color: var(--muted); }
.notice { background: rgba(194,178,128,.1); border: 1px solid rgba(194,178,128,.35); padding: 12px 14px; border-radius: var(--radius); font-size: 14px; margin-bottom: 16px; }

/* page headers */
.page-head { padding: 56px 0 24px; border-bottom: 1px solid var(--line); margin-bottom: 32px; }
.prose { max-width: 720px; font-size: 17px; color: #cfcbc0; }
.prose h2 { margin: 36px 0 12px; color: var(--ink); }

/* toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #0d0d0c; padding: 12px 18px; border-radius: var(--radius); font-weight: 600; font-size: 14px; opacity: 0; transition: .2s; z-index: 100; pointer-events: none; white-space: nowrap; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
.toast a { text-decoration: underline; margin-left: 8px; }

/* marquee strip */
.strip { overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 12px 0; background: var(--bg2); }
.strip .track { display: flex; gap: 48px; white-space: nowrap; font-family: var(--font-display); font-size: 22px; letter-spacing: .18em; color: var(--sand); animation: slide 28s linear infinite; width: max-content; }
@keyframes slide { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .strip .track { animation: none; } }

/* photo mosaic */
.mosaic { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 760px) { .mosaic { grid-template-columns: repeat(4, 1fr); } }
.mosaic img { aspect-ratio: 1; width: 100%; object-fit: cover; border-radius: var(--radius); filter: saturate(.75); border: 1px solid var(--line); }
.mosaic img:nth-child(1) { grid-column: span 2; grid-row: span 2; }
