/* ============================================================================
   DAIRON — Storefront styles
   Premium · minimal · light neutral ground with graphite/metallic accents.
   ============================================================================ */

:root {
  /* Palette */
  --bg: #f6f6f4;            /* warm neutral page */
  --surface: #ffffff;       /* cards, drawers */
  --ink: #16171a;           /* near-black text */
  --ink-soft: #5c5f66;      /* secondary text */
  --line: #e4e4e0;          /* hairline borders */
  --graphite: #2a2c31;      /* dark accent / buttons */
  --graphite-700: #3a3d44;
  --metal: #9aa0a6;         /* metallic accent */
  --metal-sheen: linear-gradient(135deg, #c7ccd1 0%, #8d9298 45%, #b9bec4 100%);
  --accent: #1d1f23;

  /* Type */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Shape */
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(20, 23, 26, 0.04), 0 2px 8px rgba(20, 23, 26, 0.04);
  --shadow-lg: 0 12px 40px rgba(20, 23, 26, 0.14);

  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.no-scroll { overflow: hidden; }

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

a { color: inherit; text-decoration: none; }

h1, h2, h3 { margin: 0; line-height: 1.1; letter-spacing: -0.02em; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 22px;
}

/* ---------- Buttons ---------- */
.btn {
  font: inherit;
  font-weight: 600;
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 12px 22px;
  transition: transform 0.18s var(--ease), background-color 0.18s var(--ease),
    box-shadow 0.18s var(--ease), color 0.18s var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--graphite);
  color: #fff;
  display: inline-block;
}
.btn-primary:hover { background: #000; }

.btn-add {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
  padding: 9px 16px;
  font-size: 0.85rem;
}
.btn-add:hover { background: var(--ink); color: #fff; }

.btn-block { width: 100%; padding: 14px; }

.icon-btn {
  background: none;
  border: 0;
  cursor: pointer;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--ink-soft);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: background-color 0.15s var(--ease), color 0.15s var(--ease);
}
.icon-btn:hover { background: var(--line); color: var(--ink); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(246, 246, 244, 0.82);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.wordmark {
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: 0.18em;
  color: var(--ink);
}
.wordmark-dot { color: var(--metal); }
.wordmark-sm { font-size: 1.15rem; }

.nav {
  display: flex;
  gap: 34px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.nav a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-soft);
  position: relative;
  padding: 4px 0;
  transition: color 0.15s var(--ease);
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s var(--ease);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after { transform: scaleX(1); }

/* Cart button */
.cart-button {
  position: relative;
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--ink);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: background-color 0.15s var(--ease);
}
.cart-button:hover { background: var(--line); }
.cart-button.pulse { animation: pulse 0.4s var(--ease); }
@keyframes pulse {
  0% { transform: scale(1); }
  40% { transform: scale(1.18); }
  100% { transform: scale(1); }
}

.cart-count {
  position: absolute;
  top: 2px;
  right: 0;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--graphite);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 600;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease);
}
.cart-count.is-visible { opacity: 1; transform: scale(1); }

/* ---------- Hero ---------- */
.hero {
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 40px;
  padding-block: clamp(48px, 7vw, 96px);
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--metal);
  margin: 0 0 18px;
}
.hero-title {
  font-size: clamp(3.4rem, 9vw, 6.5rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  background: linear-gradient(180deg, #2a2c31 0%, #56595f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-tagline {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--ink-soft);
  max-width: 30ch;
  margin: 22px 0 32px;
}
.hero-media {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  overflow: hidden;
  background:
    radial-gradient(120% 100% at 70% 20%, #ffffff 0%, #ececea 55%, #e2e2df 100%);
  box-shadow: var(--shadow-sm);
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(56px, 8vw, 100px); }
.section-head { text-align: center; margin-bottom: 48px; }
.section-title {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  font-weight: 700;
}
.section-sub {
  color: var(--ink-soft);
  margin: 14px 0 0;
  font-size: 1.02rem;
}

/* ---------- Product grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
    border-color 0.25s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: #d6d6d2;
}
.card-media {
  border: 0;
  padding: 0;
  cursor: pointer;
  background:
    radial-gradient(120% 100% at 50% 20%, #ffffff 0%, #f0f0ee 60%, #e8e8e5 100%);
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}
.card:hover .card-media img { transform: scale(1.04); }

.card-body {
  padding: 18px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.card-name { font-size: 1.05rem; font-weight: 600; }
.card-spec {
  color: var(--ink-soft);
  font-size: 0.85rem;
  margin: 0 0 14px;
}
.card-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-price { font-weight: 600; font-size: 1.05rem; }

/* ---------- About ---------- */
.section-about {
  background: var(--surface);
  border-block: 1px solid var(--line);
}
.about-inner { max-width: 720px; margin-inline: auto; text-align: center; }
.about-inner .section-title { margin-bottom: 24px; }
.about-inner p { color: var(--ink-soft); margin: 0 0 18px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--graphite);
  color: #d9dadd;
  padding-top: 56px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 40px;
}
.site-footer .wordmark { color: #fff; }
.footer-tag { color: #9da1a8; margin: 14px 0 0; max-width: 28ch; font-size: 0.92rem; }
.footer-col h3 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #9da1a8;
  margin-bottom: 16px;
  font-weight: 600;
}
.footer-col a { color: #d9dadd; transition: color 0.15s var(--ease); }
.footer-col a:hover { color: #fff; }
.footer-social { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-bottom {
  border-top: 1px solid var(--graphite-700);
  padding-block: 22px;
  font-size: 0.82rem;
  color: #8b8f96;
}

/* ---------- Overlay ---------- */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(16, 17, 20, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s var(--ease), visibility 0.28s var(--ease);
  z-index: 50;
}
.overlay.is-active { opacity: 1; visibility: visible; }

/* ---------- Cart drawer ---------- */
.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(420px, 92vw);
  background: var(--surface);
  z-index: 60;
  transform: translateX(100%);
  transition: transform 0.32s var(--ease);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}
.cart-drawer.is-open { transform: translateX(0); }
.cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 22px 18px;
  border-bottom: 1px solid var(--line);
}
.cart-head h2 { font-size: 1.15rem; }
.cart-empty { padding: 40px 22px; color: var(--ink-soft); text-align: center; }
.cart-items {
  list-style: none;
  margin: 0;
  padding: 8px 22px;
  overflow-y: auto;
  flex: 1;
}
.cart-item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.cart-item-img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: #eee;
}
.cart-item-name { font-weight: 600; font-size: 0.95rem; margin: 0; }
.cart-item-price { color: var(--ink-soft); font-size: 0.85rem; margin: 2px 0 10px; }
.cart-item-line { font-weight: 600; font-size: 0.95rem; }

.qty {
  display: flex;
  align-items: center;
  gap: 8px;
}
.qty-btn {
  width: 26px;
  height: 26px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 7px;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  color: var(--ink);
  display: grid;
  place-items: center;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}
.qty-btn:hover { border-color: var(--ink); }
.qty-num { min-width: 18px; text-align: center; font-weight: 600; font-size: 0.9rem; }
.cart-remove {
  margin-left: 6px;
  background: none;
  border: 0;
  color: var(--metal);
  cursor: pointer;
  font-size: 0.8rem;
  text-decoration: underline;
  padding: 0;
}
.cart-remove:hover { color: var(--ink); }

.cart-footer { padding: 20px 22px 24px; border-top: 1px solid var(--line); }
.cart-subtotal-row {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 6px;
}
.cart-note { color: var(--ink-soft); font-size: 0.8rem; margin: 0 0 16px; }

/* ---------- Product modal ---------- */
.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -48%) scale(0.98);
  width: min(880px, 94vw);
  max-height: 90vh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: var(--radius);
  z-index: 60;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.26s var(--ease), transform 0.26s var(--ease),
    visibility 0.26s var(--ease);
  box-shadow: var(--shadow-lg);
}
.modal.is-open {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}
.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  background: rgba(255, 255, 255, 0.7);
}
.modal-body { display: grid; grid-template-columns: 1fr 1fr; }
.modal-media {
  background:
    radial-gradient(120% 100% at 50% 30%, #ffffff 0%, #efefec 60%, #e6e6e3 100%);
  aspect-ratio: 1 / 1;
}
.modal-media img { width: 100%; height: 100%; object-fit: cover; }
.modal-info { padding: 40px 36px; display: flex; flex-direction: column; }
.modal-brand {
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--metal);
  margin: 0 0 10px;
}
.modal-name { font-size: 1.7rem; font-weight: 700; }
.modal-spec { color: var(--ink-soft); margin: 8px 0 18px; }
.modal-desc { color: var(--ink-soft); margin: 0 0 28px; }
.modal-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.modal-price { font-size: 1.4rem; font-weight: 700; }
.modal-foot .btn-add { padding: 12px 24px; font-size: 0.95rem; }

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .nav { display: none; }            /* keep header clean on mobile */
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 32px;
  }
  .hero-copy { order: 2; }
  .hero-media { order: 1; max-width: 440px; margin-inline: auto; width: 100%; }
  .hero-tagline { margin-inline: auto; }
  .modal-body { grid-template-columns: 1fr; }
  .modal-media { aspect-ratio: 4 / 3; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 520px) {
  .grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .card-media { aspect-ratio: 16 / 10; }
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto; }
}
