/* ==========================================================================
   Anvogue CMS - storefront styles
   Replaces assets/css/style.css, which shipped as *uncompiled SCSS*
   (@tailwind base; @import './icomoon/style.css') and therefore produced
   zero usable rules in the browser. The compiled theme lives in
   dist/output-scss.css + dist/output-tailwind.css; this file provides the
   layout and component layer the CMS pages rely on.
   ========================================================================== */

:root {
  --ink: #101413;
  --ink-soft: #3d4744;
  --muted: #6b7a76;
  --line: #e4e8e6;
  --surface: #ffffff;
  --surface-alt: #f6f7f6;
  --accent: #111413;
  --accent-contrast: #ffffff;
  --danger: #b42318;
  --success: #0f7b57;
  --warning: #9a6700;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(16, 20, 19, .06);
  --shadow-md: 0 10px 30px rgba(16, 20, 19, .08);
  --page-max: 1280px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Inter, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { letter-spacing: -.02em; line-height: 1.2; margin: 0; }
p { margin: 0 0 1em; }

/* --- layout helpers ------------------------------------------------------ */
.container {
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: 20px;
}
.mx-auto { margin-inline: auto; }
.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;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--accent); color: #fff; padding: 12px 18px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* --- headings ------------------------------------------------------------ */
.heading1 { font-size: clamp(2rem, 4.5vw, 3.25rem); font-weight: 700; }
.heading2 { font-size: clamp(1.5rem, 2.6vw, 2.25rem); font-weight: 700; }
.heading3 { font-size: clamp(1.25rem, 2vw, 1.75rem); font-weight: 700; }
.heading4 { font-size: 1.125rem; font-weight: 700; }
.text-button-uppercase { text-transform: uppercase; letter-spacing: .08em; font-size: 12px; font-weight: 600; }

/* --- announcement bar ---------------------------------------------------- */
#top-nav {
  background: var(--accent);
  color: #fff;
  font-size: 13px;
}
.top-nav-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 40px;
  padding-block: 6px;
}
.top-nav-message { margin: 0; text-align: center; flex: 1; }
.top-nav-social { display: flex; gap: 14px; }
.top-nav-social a { color: rgba(255, 255, 255, .82); text-decoration: none; font-size: 12px; }
.top-nav-social a:hover { color: #fff; }

/* --- header -------------------------------------------------------------- */
#site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-main {
  display: flex;
  align-items: center;
  gap: 22px;
  min-height: 68px;
}
.site-brand { text-decoration: none; display: flex; align-items: center; flex-shrink: 0; }
.brand-logo { max-height: 36px; width: auto; }

.primary-nav { display: flex; align-items: center; gap: 20px; flex: 1; flex-wrap: wrap; }
.nav-link {
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ink-soft);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.nav-link:hover { color: var(--ink); border-bottom-color: var(--ink); }
.nav-link.is-active { color: var(--ink); border-bottom-color: var(--ink); }

.header-actions { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.header-action {
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  position: relative;
}
.header-action:hover { color: var(--ink); }
.cart-count {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  margin-left: 5px;
  padding-inline: 5px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .primary-nav {
    display: none;
    order: 5;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    width: 100%;
    padding-bottom: 12px;
  }
  .primary-nav.is-open { display: flex; }
  .nav-link { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .header-main { flex-wrap: wrap; }
  .top-nav-social { display: none; }
}

/* --- flash messages ------------------------------------------------------ */
.flash-wrap { padding-block: 14px 0; }
.alert {
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 14px;
  margin-bottom: 10px;
  border: 1px solid transparent;
}
.alert-success { background: #ecfdf3; color: #05603a; border-color: #abefc6; }
.alert-error   { background: #fef3f2; color: #8a1c13; border-color: #fecdca; }
.alert-warning { background: #fffaeb; color: #7a4f01; border-color: #fedf89; }
.alert-info    { background: #eff8ff; color: #175cd3; border-color: #b2ddff; }

/* --- buttons ------------------------------------------------------------- */
.cms-btn,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-contrast);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: opacity .15s ease, transform .12s ease;
}
.cms-btn:hover, .btn:hover { opacity: .88; }
.cms-btn:active, .btn:active { transform: translateY(1px); }
.cms-btn.ghost, .btn.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.cms-btn.ghost:hover, .btn.ghost:hover { border-color: var(--ink); opacity: 1; }
.cms-btn.small, .btn.small { padding: 8px 14px; font-size: 13px; }
.cms-btn.danger, .btn.danger { background: var(--danger); border-color: var(--danger); }

/* --- product cards ------------------------------------------------------- */
.cms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
}
.cms-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.product-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.product-card > a { text-decoration: none; display: block; padding: 12px 12px 0; }
.product-card img { aspect-ratio: 1 / 1; object-fit: cover; border-radius: 10px; background: var(--surface-alt); width: 100%; }
.product-card__body { padding: 12px 14px 16px; }
.product-card__name { font-size: 15px; font-weight: 600; margin: 0 0 6px; }
.product-card__cat { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 0 0 4px; }
.product-card__price { display: flex; align-items: baseline; gap: 8px; font-weight: 700; }

.cms-img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 12px; background: var(--surface-alt); }
.cms-price { font-weight: 700; font-size: 18px; }
.cms-old, .price-old { text-decoration: line-through; color: var(--muted); font-weight: 500; font-size: 14px; }
.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.badge-sale { background: #fef3f2; color: var(--danger); }
.badge-out { background: #f2f4f3; color: var(--muted); }
.badge-new { background: #ecfdf3; color: var(--success); }

/* --- sections ------------------------------------------------------------ */
.section { padding-block: 56px; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}
.section-link { font-size: 13px; font-weight: 600; color: var(--ink-soft); text-decoration: none; border-bottom: 1px solid currentColor; }
.section-link:hover { color: var(--ink); }

/* --- hero / slider ------------------------------------------------------- */
.hero { background: var(--surface-alt); }
.hero-slide {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 40px;
  min-height: 400px;
  padding-block: 48px;
}
.hero-slide__media img { border-radius: var(--radius); max-height: 400px; object-fit: contain; margin-inline: auto; }
.hero-slide__eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: 12px; font-weight: 700; color: var(--muted); margin: 0 0 12px; }
.hero-slide__title { font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 700; margin: 0 0 22px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
@media (max-width: 820px) {
  .hero-slide { grid-template-columns: 1fr; min-height: auto; padding-block: 32px; }
  .hero-slide__media { order: -1; }
}

/* --- product detail ------------------------------------------------------ */
.product-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
@media (max-width: 860px) { .product-layout { grid-template-columns: 1fr; gap: 28px; } }
.product-gallery img { border-radius: var(--radius); }
.product-title { font-size: clamp(1.5rem, 2.6vw, 2.1rem); margin: 8px 0 14px; }
.product-price { display: flex; align-items: baseline; gap: 12px; margin: 0 0 20px; }
.product-price .now { font-size: 26px; font-weight: 700; }
.product-desc { color: var(--ink-soft); margin-bottom: 26px; }
.product-desc img { border-radius: 10px; }
.stock-line { font-size: 13px; font-weight: 600; margin-bottom: 18px; }
.stock-in { color: var(--success); }
.stock-low { color: var(--warning); }
.stock-out { color: var(--danger); }

.qty-form { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="tel"], input[type="search"], input[type="datetime-local"], select, textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--surface);
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
input[type="number"] { max-width: 110px; }
textarea { resize: vertical; min-height: 90px; }
.field-error { color: var(--danger); font-size: 13px; font-weight: 600; }
.form-card { max-width: 460px; margin-inline: auto; }
.form-stack { display: grid; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

/* --- cart / table -------------------------------------------------------- */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 14px 10px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.data-table tfoot td { font-weight: 700; border-bottom: 0; }
.cart-line { display: flex; gap: 14px; align-items: center; }
.cart-line img { width: 64px; height: 64px; object-fit: cover; border-radius: 9px; background: var(--surface-alt); flex-shrink: 0; }
.cart-line__name { font-weight: 600; text-decoration: none; }
.cart-line__meta { font-size: 13px; color: var(--muted); }
.qty-inline { display: flex; align-items: center; gap: 6px; }
.qty-inline input { max-width: 74px; padding: 7px 9px; }
.link-quiet { background: none; border: 0; padding: 0; font: inherit; font-size: 13px; color: var(--muted); cursor: pointer; text-decoration: underline; }
.link-quiet:hover { color: var(--danger); }

.two-col { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 28px; align-items: start; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }
.summary-card { position: sticky; top: 88px; }
.summary-row { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; font-size: 14px; }
.summary-row.total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 14px; font-size: 17px; font-weight: 700; }

/* --- empty state / pagination ------------------------------------------- */
.empty-state { text-align: center; padding: 64px 20px; color: var(--muted); }
.empty-state h2 { color: var(--ink); margin-bottom: 10px; }
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 40px; flex-wrap: wrap; }
.pagination a, .pagination span {
  min-width: 38px; padding: 8px 12px; text-align: center; border-radius: var(--radius-sm);
  border: 1px solid var(--line); text-decoration: none; font-size: 14px;
}
.pagination .current { background: var(--accent); color: #fff; border-color: var(--accent); }

/* --- footer -------------------------------------------------------------- */
#site-footer { background: var(--accent); color: #fff; margin-top: 72px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; padding-block: 52px; }
.footer-title { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 16px; color: #fff; }
.footer-col p { margin: 0 0 9px; font-size: 14px; }
.footer-col a { color: rgba(255, 255, 255, .76); text-decoration: none; }
.footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-text { color: rgba(255, 255, 255, .72); }
.footer-social { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; font-size: 13px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .14); }
.footer-bottom .container { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 20px; }
.footer-bottom p { margin: 0; font-size: 13px; color: rgba(255, 255, 255, .62); }
.footer-meta { display: flex; gap: 10px; }
.footer-meta a { color: rgba(255, 255, 255, .62); text-decoration: none; }
.footer-meta a:hover { color: #fff; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* --- misc --------------------------------------------------------------- */
.prose h2 { margin: 1.4em 0 .5em; }
.prose h3 { margin: 1.2em 0 .4em; }
.prose ul, .prose ol { padding-left: 1.3em; margin-bottom: 1em; }
.prose a { color: var(--ink); text-underline-offset: 2px; }
.muted { color: var(--muted); }
.mt-0 { margin-top: 0; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: 16px; }
.mb-8 { margin-bottom: 32px; }
.visually-divider { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
