/* theme-bold: hand-rolled storefront for popper.is.
   No CDN dependencies. Bold serif headings, dense grids, drop-down cart.
   Visually loud where theme-utility is quiet. */

:root {
  --brand-primary: #e63946;
  --brand-primary-contrast: #ffffff;
  --brand-accent: #1d3557;
  --brand-bg: #ffffff;
  --brand-surface: #faf7f5;
  --brand-fg: #0f1115;
  --brand-muted: #5c5c5c;
  --brand-border: #ededed;
  --font-heading: Georgia, "Times New Roman", serif;
  --font-body: -apple-system, "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

body.theme-bold {
  margin: 0;
  background: var(--brand-bg);
  color: var(--brand-fg);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand-primary); text-decoration: underline; text-underline-offset: 3px; }
a:hover { text-decoration: none; }

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0 0 0.4em;
}
h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 0.8em; }

.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;
}

/* ---------- Announcement bar ---------- */
.bold-announcement {
  text-align: center;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.78rem;
  padding: 0.6rem 1rem;
}
.bold-announcement a { color: inherit; }

/* ---------- Header ---------- */
.bold-header { border-bottom: 4px solid var(--brand-fg); background: var(--brand-bg); }
.bold-header-inner {
  max-width: 1280px; margin: 0 auto;
  padding: 1.2rem 1.5rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 2rem;
}
.bold-wordmark {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  color: var(--brand-fg);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.bold-wordmark img { max-height: 44px; width: auto; }
.bold-nav { display: flex; gap: 1.6rem; justify-content: center; flex-wrap: wrap; }
.bold-nav a {
  color: var(--brand-fg);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.bold-nav a:hover { color: var(--brand-primary); }
@media (max-width: 720px) { .bold-nav { display: none; } }

/* ---------- Drop-down cart ---------- */
.bold-cart-wrap { position: relative; justify-self: end; }
.bold-cart-trigger {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--brand-fg); color: var(--brand-primary-contrast);
  border: 0; padding: 0.7rem 1.1rem;
  font-family: var(--font-body); font-weight: 700; font-size: 0.9rem;
  text-transform: uppercase; letter-spacing: 0.06em;
  cursor: pointer;
  border-radius: 999px;
}
.bold-cart-trigger:hover { background: var(--brand-primary); }
.bold-cart-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.3rem; height: 1.3rem; padding: 0 0.4rem;
  background: var(--brand-primary); color: var(--brand-primary-contrast);
  border-radius: 999px;
  font-size: 0.75rem; font-weight: 700;
}
.bold-cart-count[hidden] { display: none; }

.bold-cart-panel {
  position: absolute; top: calc(100% + 0.6rem); right: 0;
  width: min(380px, calc(100vw - 2rem));
  background: var(--brand-bg);
  border: 2px solid var(--brand-fg);
  box-shadow: 8px 8px 0 0 var(--brand-fg);
  z-index: 60;
}
.bold-cart-panel[hidden] { display: none; }
.bold-cart-panel-inner { padding: 1rem 1.2rem 1.2rem; }
.bold-cart-empty { color: var(--brand-muted); margin: 0.4rem 0 0.2rem; }
.bold-cart-lines { list-style: none; padding: 0; margin: 0 0 0.8rem; max-height: 50vh; overflow-y: auto; }
.bold-cart-line { display: grid; grid-template-columns: 56px 1fr auto; gap: 0.75rem; align-items: center; padding: 0.6rem 0; border-bottom: 1px solid var(--brand-border); }
.bold-cart-line-thumb { width: 56px; height: 56px; overflow: hidden; background: var(--brand-surface); }
.bold-cart-line-thumb img { width: 100%; height: 100%; object-fit: cover; }
.bold-cart-line-name { color: var(--brand-fg); font-weight: 600; font-size: 0.9rem; text-decoration: none; display: block; }
.bold-cart-line-meta { color: var(--brand-muted); font-size: 0.78rem; }
.bold-cart-line-total { font-weight: 700; }
.bold-cart-message {
  font-size: 0.82rem; color: var(--brand-muted);
  background: var(--brand-surface); border: 2px solid var(--brand-fg);
  padding: 0.55rem 0.75rem; margin: 0 0 0.6rem;
}
.bold-cart-message p { margin: 0; }
.bold-cart-message p + p { margin-top: 0.4rem; }
.bold-cart-message a { color: var(--brand-primary); text-decoration: underline; font-weight: 700; }
.bold-cart-message strong { color: var(--brand-fg); }
.bold-cart-message ul, .bold-cart-message ol { padding-left: 1.1em; margin: 0.2rem 0; }
.bold-cart-summary { display: flex; justify-content: space-between; padding: 0.6rem 0; border-top: 2px solid var(--brand-fg); font-size: 1rem; }
.bold-cart-min { color: #8a4a00; background: #fff7e6; border: 1px solid #f0c97a; padding: 0.5rem 0.6rem; font-size: 0.8rem; margin: 0.3rem 0; }
.bold-cart-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin-top: 0.4rem; }

/* ---------- Buttons ---------- */
.bold-btn-primary, .bold-btn-ghost {
  display: inline-block; text-align: center;
  padding: 0.65rem 1rem;
  font-family: var(--font-body); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  font-size: 0.85rem;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid var(--brand-fg);
}
.bold-btn-primary { background: var(--brand-primary); color: var(--brand-primary-contrast); }
.bold-btn-primary:hover { background: var(--brand-fg); }
.bold-btn-primary.is-disabled { background: var(--brand-muted); border-color: var(--brand-muted); cursor: not-allowed; }
.bold-btn-ghost { background: var(--brand-bg); color: var(--brand-fg); }
.bold-btn-ghost:hover { background: var(--brand-fg); color: var(--brand-primary-contrast); }

/* ---------- Breadcrumbs ---------- */
.bold-breadcrumbs { font-size: 0.85rem; color: var(--brand-muted); margin: 1.2rem 0; }
.bold-breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0; margin: 0; }
.bold-breadcrumbs li { display: flex; gap: 0.4rem; align-items: center; }
.bold-breadcrumbs a { color: var(--brand-muted); }
.bold-breadcrumbs [aria-current] { color: var(--brand-fg); font-weight: 600; }

/* ---------- Layout ---------- */
.bold-page {
  max-width: 1280px; margin: 0 auto;
  padding: 1.5rem;
}
.bold-page-narrow { max-width: 880px; margin: 0 auto; padding: 1.5rem; }

/* ---------- Hero ---------- */
.bold-hero {
  position: relative;
  background: var(--brand-fg);
  overflow: hidden;
  margin-bottom: 0;
}
.bold-hero-slides { list-style: none; padding: 0; margin: 0; position: relative; aspect-ratio: 16 / 6; min-height: 300px; }
.bold-hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 0.5s ease; }
.bold-hero-slide.is-current { opacity: 1; }
.bold-hero-slide a, .bold-hero-slide img { display: block; width: 100%; height: 100%; }
.bold-hero-slide img { object-fit: cover; }
.bold-hero-caption {
  position: absolute; bottom: 1.5rem; left: 1.5rem; right: 1.5rem;
  background: var(--brand-bg);
  border: 4px solid var(--brand-fg);
  padding: 1rem 1.5rem;
  max-width: 520px;
}
.bold-hero-caption h2 { color: var(--brand-fg); margin: 0; }
.bold-hero-nav {
  position: absolute; inset: 0;
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 1rem;
  pointer-events: none;
}
.bold-hero-nav .hero-nav-btn {
  pointer-events: auto;
  width: 46px; height: 46px; border: 2px solid var(--brand-bg);
  background: rgba(0,0,0,0.4); color: var(--brand-bg);
  font-size: 1.25rem; cursor: pointer;
}
.bold-hero-dots {
  position: absolute; bottom: 0.6rem; left: 0; right: 0;
  display: flex; justify-content: center; gap: 0.4rem;
  list-style: none; padding: 0; margin: 0;
}
.bold-hero-dots .hero-dot {
  width: 12px; height: 12px;
  background: var(--brand-bg); border: 2px solid var(--brand-fg);
  cursor: pointer; padding: 0;
}
.bold-hero-dots .hero-dot.is-current { background: var(--brand-primary); }

/* ---------- Product grid ---------- */
.bold-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem 1.2rem;
}
.bold-card { background: var(--brand-bg); border: 2px solid var(--brand-fg); transition: transform 0.15s ease; }
.bold-card:hover { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 0 var(--brand-fg); }
.bold-card-link { color: inherit; text-decoration: none; display: block; }
.bold-card-image { aspect-ratio: 1 / 1; overflow: hidden; background: var(--brand-surface); border-bottom: 2px solid var(--brand-fg); }
.bold-card-image img, .bold-card-image .bold-svg-placeholder { width: 100%; height: 100%; object-fit: cover; }
.bold-card-body { padding: 0.9rem 1rem 1rem; }
.bold-card-name {
  font-family: var(--font-heading); font-weight: 700;
  font-size: 1.05rem; margin: 0 0 0.3rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.bold-card-price { font-weight: 700; margin: 0; }
.bold-price-sale { color: var(--brand-primary); }
.bold-price-was { color: var(--brand-muted); text-decoration: line-through; font-size: 0.85em; margin-left: 0.4rem; }
.bold-card-stock { color: var(--brand-muted); font-size: 0.8rem; margin: 0.2rem 0 0; }

/* Quick-add overlay revealed on card hover/focus. JS submits via /cart/api/add. */
.bold-card { position: relative; }
.bold-card-quickadd {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; gap: 0.4rem; align-items: stretch;
  padding: 0.5rem;
  background: var(--brand-fg);
  border-top: 2px solid var(--brand-fg);
  opacity: 0; transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  pointer-events: none;
}
.bold-card:hover .bold-card-quickadd,
.bold-card:focus-within .bold-card-quickadd {
  opacity: 1; transform: translateY(0); pointer-events: auto;
}
.bold-card-quickadd input[type=number] {
  width: 3.2rem; padding: 0.35rem; text-align: center;
  background: var(--brand-bg); color: var(--brand-fg);
  border: 2px solid var(--brand-bg); font-weight: 700;
}
.bold-card-quickadd button {
  flex: 1; padding: 0.35rem 0.7rem;
  background: var(--brand-primary); color: var(--brand-primary-contrast);
  border: 2px solid var(--brand-bg);
  font-family: var(--font-body); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.78rem;
  cursor: pointer;
}
.bold-card-quickadd button:disabled { opacity: 0.5; cursor: not-allowed; }
@media (prefers-reduced-motion: reduce) { .bold-card-quickadd { transition: none; } }

/* ---------- Section headings ---------- */
.bold-section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 2.5rem 0 1.2rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--brand-fg);
}

/* ---------- Categories list (home) ---------- */
.bold-cat-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0.6rem; }
.bold-cat-list a {
  display: block; padding: 0.8rem 1rem;
  background: var(--brand-bg);
  border: 2px solid var(--brand-fg); color: var(--brand-fg);
  text-decoration: none; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.85rem;
}
.bold-cat-list a:hover { background: var(--brand-fg); color: var(--brand-bg); }

/* ---------- Tables ---------- */
.bold-table { width: 100%; border-collapse: collapse; }
.bold-table th, .bold-table td { padding: 0.8rem 1rem; text-align: left; border-bottom: 1px solid var(--brand-border); }
.bold-table thead { background: var(--brand-fg); color: var(--brand-primary-contrast); }
.bold-table thead th { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; }
.bold-table tfoot td, .bold-table tfoot th { background: var(--brand-surface); }

/* ---------- Forms ---------- */
.bold-form label { display: block; margin-bottom: 0.9rem; }
.bold-form label > span:first-child { display: block; font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.3rem; }
.bold-form input[type=text], .bold-form input[type=email], .bold-form input[type=tel], .bold-form input[type=number], .bold-form input[type=date], .bold-form select, .bold-form textarea {
  width: 100%; padding: 0.65rem 0.8rem;
  border: 2px solid var(--brand-fg);
  background: var(--brand-bg); color: var(--brand-fg);
  font-family: inherit; font-size: 1rem;
}
.bold-form input:focus, .bold-form select:focus, .bold-form textarea:focus {
  outline: 0; border-color: var(--brand-primary);
}
.bold-fieldset { border: 2px solid var(--brand-fg); padding: 1rem 1.2rem; margin: 0 0 1.2rem; }
.bold-fieldset legend { font-family: var(--font-heading); font-weight: 800; font-size: 1.1rem; padding: 0 0.4rem; }
.bold-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.bold-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.8rem; }
@media (max-width: 540px) { .bold-row-2, .bold-row-3 { grid-template-columns: 1fr; } }

/* ---------- Notices ---------- */
.bold-notice { padding: 0.9rem 1rem; border: 2px solid var(--brand-fg); margin: 0 0 1rem; font-weight: 600; }
.bold-notice-warn { background: #fff7e6; border-color: #c08400; }
.bold-notice-error { background: #ffe5e5; border-color: var(--brand-primary); }
.bold-notice-ok { background: #e7faec; border-color: #1f7a3a; }

/* ---------- Article (blog body) ---------- */
.bold-article { font-size: 1.06rem; }
.bold-article > * + * { margin-top: 1.1em; }
.bold-article h2 { margin-top: 1.8em; }
.bold-article h3 { margin-top: 1.4em; }
.bold-article ul, .bold-article ol { padding-left: 1.4em; }
.bold-article blockquote { border-left: 4px solid var(--brand-primary); padding: 0 1em; color: var(--brand-muted); font-style: italic; }
.bold-article hr { border: 0; border-top: 2px solid var(--brand-fg); margin: 2em 0; }
.bold-article section[data-faq] { background: var(--brand-surface); border: 2px solid var(--brand-fg); padding: 1rem 1.4rem; }

/* ---------- Footer ---------- */
.bold-footer { background: var(--brand-fg); color: var(--brand-bg); margin-top: 4rem; }
.bold-footer-inner { max-width: 1280px; margin: 0 auto; padding: 3rem 1.5rem 2rem; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
@media (max-width: 720px) { .bold-footer-inner { grid-template-columns: 1fr; } }
.bold-footer-wordmark { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 800; margin: 0 0 0.4rem; }
.bold-footer-heading { font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.85rem; margin: 0 0 0.6rem; color: var(--brand-primary); }
.bold-footer ul { list-style: none; padding: 0; margin: 0; }
.bold-footer li + li { margin-top: 0.3rem; }
.bold-footer a { color: var(--brand-bg); text-decoration: none; }
.bold-footer a:hover { color: var(--brand-primary); text-decoration: underline; }
.bold-footer-bottom { border-top: 1px solid rgba(255,255,255,0.15); padding: 1.2rem 1.5rem; text-align: center; font-size: 0.8rem; color: rgba(255,255,255,0.7); }
.bold-footer-bottom p { margin: 0; }

/* ---------- Anchor offset for sticky-header-less theme ---------- */
:target { scroll-margin-top: 1rem; }
