/* Byron Ceramics Overseas Storefront - Zero-Framework High-CWV Stylesheet (WCAG 2.1 AA) */
:root {
  --bg: #faf8f5;
  --surface: #ffffff;
  --surface-warm: #f3efe8;
  --ink: #1c1917;
  --ink-muted: #57534e;
  --line: #e5dfd5;
  --accent: #8c3d20;
  --accent-hover: #712f17;
  --ok: #166534;
  --ok-bg: #dcfce7;
  --err: #b91c1c;
  --err-bg: #fef2f2;
  --radius: 12px;
  --maxw: 1220px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.55;
  overflow-x: hidden;
}
h1, h2, h3 {
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.22;
  letter-spacing: -0.01em;
  margin: 0 0 0.6rem;
}
a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
a.btn, .nav-links a, .card-link, .brand-logo { text-decoration: none; }
img { max-width: 100%; height: auto; display: block; background: var(--surface-warm); }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

.visually-hidden:where(:not(:focus-within, :active)) {
  position: absolute !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  white-space: nowrap !important;
}

.topbar {
  background: #1c1917;
  color: #f5f5f4;
  font-size: 0.84rem;
  padding: 8px 0;
}
.topbar .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; align-items: center; }

header.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(250, 248, 245, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 68px;
  flex-wrap: wrap;
  padding-top: 8px;
  padding-bottom: 8px;
}
.brand-logo { font-family: Georgia, serif; font-size: 1.35rem; font-weight: 700; letter-spacing: 0.04em; }
.nav-links { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; font-size: 0.94rem; font-weight: 500; }
.nav-links a:hover, .nav-links a:focus-visible { color: var(--accent); }
.header-actions { display: flex; align-items: center; gap: 10px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.93rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.btn-primary { background: var(--accent); color: #ffffff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-outline { background: var(--surface); color: var(--ink); border-color: #c7bfb3; }
.btn-outline:hover { border-color: var(--ink); background: var(--surface-warm); }
.btn-wa { background: #14532d; color: #ffffff; }
.btn-wa:hover { background: #166534; }

.badge-count {
  background: #ffffff;
  color: var(--accent);
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 0.78rem;
  font-weight: 700;
}

.hero { padding: 36px 0 44px; border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 32px; align-items: center; }
.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  background: #f5ebe6;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.hero h1 { font-size: clamp(1.85rem, 3.4vw, 2.85rem); }
.hero p.lead { font-size: 1.06rem; color: var(--ink-muted); margin: 0 0 22px; max-width: 60ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-media { border-radius: 16px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 12px 32px rgba(28, 25, 23, 0.08); }
.hero-media img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }

.trust-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}
.trust-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.trust-item strong { display: block; font-size: 1.02rem; margin-bottom: 4px; }
.trust-item span { font-size: 0.88rem; color: var(--ink-muted); }

.section { padding: 44px 0; border-bottom: 1px solid var(--line); }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 24px; }
.muted { color: var(--ink-muted); }

.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.cat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}
.cat-card:hover { border-color: var(--accent); }

.series-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(275px, 1fr)); gap: 22px; }
.series-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.series-card img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.series-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.pill-row { display: flex; flex-wrap: wrap; gap: 6px; }
.pill {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-warm);
  color: var(--ink-muted);
}
.pill-stock { background: var(--ok-bg); color: var(--ok); }
.price-line { font-weight: 700; color: var(--accent); font-size: 0.98rem; margin-top: auto; padding-top: 6px; }

.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.hero-grid > *, .detail-grid > *, .footer-grid > *, .series-grid > *, .cat-grid > *, .trust-bar > * { min-width: 0; }
.thumb-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.thumb-strip img { width: 100%; min-width: 0; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); cursor: pointer; }

.assurance-box {
  background: var(--surface-warm);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 18px;
  font-size: 0.9rem;
}
.assurance-box ul { margin: 8px 0 0; padding-left: 18px; }

.table-scroll { position: relative; width: 100%; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table.spec-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
table.spec-table th, table.spec-table td { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
table.spec-table th { background: var(--surface-warm); font-weight: 700; }
.qty-input { width: 78px; min-height: 38px; padding: 6px 8px; border: 1px solid #c7bfb3; border-radius: 8px; font-size: 0.92rem; }

details.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 10px;
}
details.faq-item summary { font-weight: 700; cursor: pointer; }
details.faq-item p { margin: 10px 0 0; color: var(--ink-muted); }

/* Native Modal Dialog with Light-Dismiss &Accessible Validation */
dialog#inquiry-dialog {
  width: min(580px, calc(100vw - 24px));
  max-height: 90vh;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.22);
}
dialog#inquiry-dialog::backdrop {
  background-color: rgba(28, 25, 23, 0.58);
  backdrop-filter: blur(2px);
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.dialog-body { padding: 18px 20px 24px; overflow-y: auto; max-height: calc(90vh - 70px); }
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 2px; }
.field .hint { display: block; font-size: 0.82rem; color: var(--ink-muted); margin-bottom: 4px; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field select, .field textarea {
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  border: 1.5px solid #c7bfb3;
  border-radius: 8px;
  font-size: 0.95rem;
  background: #ffffff;
  color: var(--ink);
}
.error-msg {
  display: none;
  color: var(--err);
  font-size: 0.85rem;
  margin-top: 4px;
  font-weight: 500;
}
:is(:user-invalid, .user-invalid-fallback) {
  border-color: var(--err) !important;
  background-color: var(--err-bg) !important;
}
:is(:user-invalid, .user-invalid-fallback) + .error-msg {
  display: block;
}
input:user-valid { border-color: var(--ok); }

.basket-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 8px;
  background: var(--bg);
}
.basket-item img { width: 44px; height: 44px; border-radius: 6px; object-fit: cover; }

.consent-bar {
  position: fixed;
  bottom: 14px;
  left: 14px;
  right: 14px;
  max-width: 680px;
  margin: 0 auto;
  background: #1c1917;
  color: #f5f5f4;
  padding: 14px 18px;
  border-radius: 12px;
  z-index: 25;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 0.86rem;
}
.consent-bar.active { display: flex; }

/* Embedded AI Product & OEM Concierge Widget (Zero-Price Guardrail + Lead Handoff) */
.ai-fab {
  position: fixed;
  right: 16px;
  bottom: 18px;
  z-index: 24;
  box-shadow: 0 10px 26px rgba(28, 25, 23, 0.24);
  background: #1c1917;
  color: #ffffff;
  border: 1.5px solid #44403c;
  max-width: calc(100vw - 32px);
}
.ai-fab:hover { background: var(--accent); border-color: var(--accent); }
body:has(.consent-bar.active) .ai-fab { bottom: 98px; }

dialog#concierge-dialog {
  width: min(440px, calc(100vw - 24px));
  max-height: 85vh;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.25);
}
dialog#concierge-dialog::backdrop {
  background-color: rgba(28, 25, 23, 0.45);
  backdrop-filter: blur(2px);
}
.chat-log {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 46vh;
  overflow-y: auto;
  padding: 14px 16px;
  background: var(--bg);
}
.chat-msg {
  padding: 10px 13px;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.5;
  max-width: 92%;
  overflow-wrap: anywhere;
}
.chat-msg.bot {
  align-self: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
}
.chat-msg.user {
  align-self: flex-end;
  background: var(--accent);
  color: #ffffff;
}
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.chip-btn {
  background: var(--surface-warm);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}
.chip-btn:hover { border-color: var(--accent); color: var(--accent); }
.chat-form {
  display: flex;
  gap: 8px;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.chat-form input {
  flex: 1;
  min-width: 0;
  min-height: 42px;
  padding: 8px 12px;
  border: 1.5px solid #c7bfb3;
  border-radius: 999px;
  font-size: 0.92rem;
}

footer.site-footer { padding: 40px 0; background: #1c1917; color: #e7e5e4; font-size: 0.9rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 28px; }
footer.site-footer a { color: #e7e5e4; }

@media (max-width: 860px) {
  .hero-grid, .detail-grid, .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .trust-bar { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .trust-bar { grid-template-columns: minmax(0, 1fr); }
  .wrap { padding: 0 14px; }
}
@media print {
  header.site-header, .topbar, footer.site-footer, .no-print, .consent-bar { display: none !important; }
  body { background: #ffffff; }
}
