/* ============================================================
   4EVA-KLASY — styles
   ============================================================ */
:root {
  --ink: #16161a;
  --ink-soft: #3c3c42;
  --muted: #7a7a82;
  --paper: #faf7f1;
  --paper-alt: #f1ece2;
  --card: #ffffff;
  --line: #e6dfd2;
  --gold: #c9a227;
  --gold-deep: #a8851b;
  --gold-soft: #f4e9cb;
  --green: #2e7d4f;
  --red: #c0392b;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(22, 22, 26, 0.08);
  --shadow-lg: 0 24px 60px rgba(22, 22, 26, 0.18);
  --font-head: "Playfair Display", Georgia, serif;
  --font-body: "Poppins", "Segoe UI", system-ui, sans-serif;
  --header-h: 72px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.no-scroll { overflow: hidden; }

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

h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; }

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}

.container { width: min(1180px, 92%); margin-inline: auto; }

section { scroll-margin-top: calc(var(--header-h) + 12px); }

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 200;
  background: var(--ink);
  color: #fff;
  padding: 10px 18px;
  border-radius: 8px;
}
.skip-link:focus { left: 8px; }

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}
.btn:active { transform: scale(0.97); }

.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; box-shadow: 0 10px 24px rgba(22, 22, 26, 0.25); transform: translateY(-2px); }

.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  color: #1c1500;
}
.btn-gold:hover { box-shadow: 0 10px 24px rgba(201, 162, 39, 0.4); transform: translateY(-2px); }

.btn-outline { border: 2px solid var(--ink); color: var(--ink); background: transparent; }
.btn-outline:hover { background: var(--ink); color: #fff; transform: translateY(-2px); }

.btn-block { width: 100%; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  transition: background 0.15s ease;
}
.icon-btn:hover { background: var(--paper-alt); }
.icon-btn svg { width: 20px; height: 20px; }

/* ============ Header ============ */
.header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(250, 247, 241, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.header.scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 6px 24px rgba(22, 22, 26, 0.06);
}

.header-inner {
  position: relative;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 18px;
}

.logo {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.45rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.logo-dash { color: var(--gold); }
.logo-dot { color: var(--gold); }

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-inline: auto;
}
.nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-soft);
  position: relative;
  padding: 6px 0;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width 0.2s ease;
}
.nav a:hover::after { width: 100%; }
.nav a:hover { color: var(--ink); }
.nav a.active { color: var(--ink); }
.nav a.active::after { width: 100%; }
.shop-menu { position: relative; }
.shop-menu-toggle {
  font: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-soft);
  padding: 6px 0;
}
.shop-menu-toggle:hover, .shop-menu-toggle[aria-expanded="true"] { color: var(--ink); }
.shop-menu-toggle span { font-size: 0.8em; margin-left: 3px; }
.shop-options {
  position: absolute;
  top: calc(100% + 8px);
  left: -16px;
  min-width: 160px;
  padding: 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: 90;
}
.shop-options[hidden] { display: none; }
.shop-options a { display: block; padding: 9px 12px; border-radius: 7px; }
.shop-options a:hover { background: var(--paper-alt); }
.shop-options a::after { display: none; }

.cart-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: var(--card);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.cart-btn:hover { border-color: var(--gold); box-shadow: 0 6px 18px rgba(201, 162, 39, 0.25); }
.cart-btn svg { width: 21px; height: 21px; }

.cart-count {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--gold);
  color: #1c1500;
  font-size: 0.72rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  border: 2px solid var(--paper);
}
.cart-count.pop { animation: pop 0.35s ease; }
@keyframes pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.45); }
  100% { transform: scale(1); }
}

.header-pill,
.add-product-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--card);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
  white-space: nowrap;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.header-pill:hover,
.add-product-btn:hover {
  border-color: var(--gold);
  color: var(--ink);
  box-shadow: 0 6px 18px rgba(201, 162, 39, 0.22);
  transform: translateY(-1px);
}
.add-product-btn svg { width: 15px; height: 15px; }
.auth-btn svg { width: 17px; height: 17px; }
.auth-btn.signed-in {
  border-color: var(--gold);
  background: var(--gold-soft);
  color: var(--ink);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 9px;
  border-radius: 10px;
}
.menu-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ Hero ============ */
.hero {
  background:
    radial-gradient(1100px 500px at 85% -10%, var(--gold-soft), transparent 60%),
    radial-gradient(700px 400px at -10% 110%, #e9e2d2, transparent 60%),
    var(--paper);
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 40px;
  min-height: calc(92vh - var(--header-h));
  padding-block: 48px;
}

.eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 14px;
}
.eyebrow-gold { color: var(--gold-deep); }
.eyebrow-green { color: var(--green); }

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 700;
  margin-bottom: 18px;
}
.hero h1 em {
  font-style: italic;
  color: var(--gold-deep);
}
.hero-sub {
  color: var(--muted);
  max-width: 46ch;
  font-size: 1.05rem;
  margin-bottom: 28px;
}
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 36px; }

.hero-stats { display: flex; gap: 38px; flex-wrap: wrap; }
.hero-stats strong {
  display: block;
  font-family: var(--font-head);
  font-size: 1.5rem;
}
.hero-stats span { color: var(--muted); font-size: 0.85rem; }

.hero-visual {
  position: relative;
  height: 520px;
}
.hero-card {
  position: absolute;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--card);
  animation: floaty 7s ease-in-out infinite;
}
.hero-card img { width: 100%; height: 100%; object-fit: cover; }
.hero-card-main {
  width: 62%;
  aspect-ratio: 4 / 4.4;
  top: 6%;
  right: 8%;
  z-index: 1;
}
.hero-card-a {
  width: 38%;
  aspect-ratio: 1;
  left: 0;
  top: 22%;
  z-index: 2;
  animation-delay: 1.2s;
}
.hero-card-b {
  width: 34%;
  aspect-ratio: 1;
  right: 2%;
  bottom: 0;
  z-index: 2;
  animation-delay: 2.2s;
}
.hero-chip {
  position: absolute;
  z-index: 3;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line);
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: var(--shadow);
  animation: floaty 6s ease-in-out infinite;
}
.chip-a { left: 4%; bottom: 18%; animation-delay: 0.6s; }
.chip-b { right: 10%; top: 2%; animation-delay: 1.8s; }

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* ============ Sections ============ */
.section { padding: 84px 0; }
.section-alt { background: var(--paper-alt); }

.section-head { text-align: center; max-width: 560px; margin: 0 auto 46px; }
.section-head h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); margin-bottom: 10px; }
.section-head p { color: var(--muted); }

/* ============ Product grid & cards ============ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 26px;
}

.product-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 5px 11px;
  border-radius: 999px;
  color: #fff;
}
.badge-sale { background: var(--red); }
.badge-new { background: var(--green); }
.badge-bestseller { background: var(--gold); color: #1c1500; }

.product-media { position: relative; overflow: hidden; }
.product-media img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.product-card:hover .product-media img { transform: scale(1.05); }

.product-info {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.product-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}
.product-top h3 { font-size: 1.08rem; font-family: var(--font-body); font-weight: 600; }
.rating {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gold-deep);
  white-space: nowrap;
}
.product-sub {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: -6px;
}
.product-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: auto;
}
.price { font-weight: 700; font-size: 1.1rem; }
.price s {
  color: var(--muted);
  font-weight: 400;
  font-size: 0.85rem;
  margin-left: 6px;
}

.size-select {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8rem;
  color: var(--muted);
}
.size-select select {
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1.5px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
}
.size-select select:hover { border-color: var(--gold); }

.add-btn { padding: 11px 18px; font-size: 0.88rem; margin-top: 4px; }
.add-btn.added { background: var(--green); }
.add-btn:disabled {
  background: var(--line);
  color: var(--muted);
  cursor: not-allowed;
  transform: none;
}

/* stock visibility */
.stock-badge {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 2;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid transparent;
}
.stock-in {
  background: rgba(255, 255, 255, 0.92);
  color: #1d6b3c;
  border-color: rgba(29, 107, 60, 0.25);
}
.stock-low {
  background: #fff6e0;
  color: #8a5a00;
  border-color: rgba(138, 90, 0, 0.3);
}
.stock-out {
  background: var(--red);
  color: #fff;
}
.soldout-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  background: rgba(250, 247, 241, 0.55);
  backdrop-filter: grayscale(0.9);
  color: var(--ink);
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.product-card.is-soldout .product-media img { filter: grayscale(0.85); }

/* header sign-out */
.signout-btn[hidden] { display: none !important; }
.signout-btn { color: #a04b3a; }
.signout-btn:hover {
  border-color: var(--red);
  color: var(--red);
  box-shadow: 0 6px 18px rgba(192, 57, 43, 0.18);
}
.signout-btn svg { width: 15px; height: 15px; }

/* ============ Services ============ */
.perks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}
.perk {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 22px;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.perk:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.perk span { font-size: 1.9rem; display: block; margin-bottom: 10px; }
.perk h3 { font-family: var(--font-body); font-size: 1rem; margin-bottom: 4px; }
.perk p { color: var(--muted); font-size: 0.85rem; }

/* ============ About ============ */
.about-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.about-copy h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); margin-bottom: 16px; }
.about-copy > p:not(.eyebrow) { color: var(--ink-soft); margin-bottom: 26px; }
.about-stats { display: flex; gap: 40px; flex-wrap: wrap; }
.about-stats strong { display: block; font-family: var(--font-head); font-size: 1.6rem; color: var(--gold-deep); }
.about-stats span { font-size: 0.85rem; color: var(--muted); }

.about-media img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  aspect-ratio: 1;
  object-fit: cover;
  width: 100%;
}

/* ============ Contact ============ */
.contact-inner {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: center;
}
.contact-inner h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); margin-bottom: 10px; }
.contact-sub { color: var(--muted); margin-bottom: 24px; }

.newsletter { display: flex; gap: 10px; max-width: 460px; }
.newsletter input {
  flex: 1;
  font-family: inherit;
  font-size: 0.95rem;
  padding: 13px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--card);
  color: var(--ink);
}
.newsletter input:focus { outline: none; border-color: var(--gold); }

.contact-info { display: flex; flex-direction: column; gap: 18px; }
.contact-info div { display: flex; gap: 14px; align-items: flex-start; }
.contact-info span { font-size: 1.3rem; }
.contact-info p { color: var(--ink-soft); font-size: 0.95rem; }

/* ============ Footer ============ */
.footer { background: var(--ink); color: #cfcfd6; padding: 60px 0 0; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 44px;
}
.footer .logo { color: #fff; font-size: 1.3rem; }
.footer-brand p { font-size: 0.9rem; margin-top: 12px; max-width: 34ch; }
.pay-note { color: var(--muted); }
.footer h4 {
  color: #fff;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
  font-weight: 600;
}
.footer-grid a {
  display: block;
  font-size: 0.9rem;
  padding: 5px 0;
  color: #cfcfd6;
  transition: color 0.15s ease, transform 0.15s ease;
}
.footer-grid a:hover { color: var(--gold); transform: translateX(4px); }
.footer-bottom {
  border-top: 1px solid #2c2c33;
  padding: 20px 0;
  text-align: center;
  font-size: 0.82rem;
  color: var(--muted);
}

/* ============ Overlay & cart drawer ============ */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(22, 22, 26, 0.5);
  backdrop-filter: blur(2px);
  z-index: 95;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.overlay.show { opacity: 1; }

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100dvh;
  width: min(430px, 94vw);
  background: var(--paper);
  z-index: 100;
  display: flex;
  flex-direction: column;
  transform: translateX(105%);
  transition: transform 0.3s cubic-bezier(0.22, 0.8, 0.3, 1);
  box-shadow: var(--shadow-lg);
}
.cart-drawer.open { transform: translateX(0); }

.cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}
.cart-head h3 { font-size: 1.3rem; }
.cart-head span { color: var(--muted); font-family: var(--font-body); font-size: 0.95rem; font-weight: 400; }

.cart-body { flex: 1; overflow-y: auto; padding: 18px 22px; display: flex; flex-direction: column; gap: 16px; }

.cart-item {
  display: grid;
  grid-template-columns: 74px 1fr auto;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
  align-items: center;
  animation: slideIn 0.25s ease;
}
@keyframes slideIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.cart-item img {
  width: 74px;
  height: 74px;
  object-fit: cover;
  border-radius: 8px;
}
.ci-info h4 { font-size: 0.92rem; font-weight: 600; font-family: var(--font-body); }
.ci-meta { font-size: 0.78rem; color: var(--muted); margin: 2px 0 8px; }
.qty {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  background: var(--paper);
}
.qty button {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  transition: background 0.15s ease;
}
.qty button:hover { background: var(--gold-soft); }
.qty span { min-width: 24px; text-align: center; font-weight: 600; font-size: 0.9rem; }

.ci-right { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.ci-remove {
  color: var(--muted);
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  transition: color 0.15s ease, background 0.15s ease;
}
.ci-remove:hover { color: var(--red); background: #fbeae8; }
.ci-remove svg { width: 17px; height: 17px; }
.ci-price { font-weight: 700; font-size: 0.95rem; }

.cart-empty {
  margin: auto;
  text-align: center;
  padding: 40px 10px;
}
.cart-empty .empty-icon { font-size: 3rem; display: block; margin-bottom: 12px; }
.cart-empty p { font-weight: 600; font-size: 1.05rem; }
.cart-empty .muted { color: var(--muted); font-weight: 400; font-size: 0.9rem; margin: 4px 0 20px; }

.cart-foot {
  border-top: 1px solid var(--line);
  padding: 18px 22px 22px;
  background: var(--card);
}
.ship-note {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
.progress {
  height: 7px;
  background: var(--paper-alt);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 16px;
}
.progress > div {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), var(--gold-deep));
  transition: width 0.35s ease;
}
.totals { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; font-size: 0.93rem; }
.totals > div { display: flex; justify-content: space-between; color: var(--ink-soft); }
.totals .grand {
  font-weight: 700;
  color: var(--ink);
  font-size: 1.08rem;
  border-top: 1px dashed var(--line);
  padding-top: 10px;
  margin-top: 4px;
}
.secure-note {
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 12px;
}

/* ============ Checkout modal ============ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(22, 22, 26, 0.55);
  backdrop-filter: blur(3px);
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.modal.open { opacity: 1; visibility: visible; }

.modal-box {
  position: relative;
  width: min(620px, 100%);
  max-height: 88dvh;
  overflow-y: auto;
  background: var(--paper);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  padding: 34px 34px 28px;
  transform: translateY(14px) scale(0.98);
  transition: transform 0.25s ease;
}
.modal.open .modal-box { transform: translateY(0) scale(1); }

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--paper-alt);
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  transition: background 0.15s ease;
}
.modal-close:hover { background: var(--gold-soft); }

.modal-box h3 { font-size: 1.7rem; margin-bottom: 4px; }
.order-mini { color: var(--muted); font-size: 0.9rem; margin-bottom: 22px; }

fieldset {
  border: none;
  margin-bottom: 22px;
}
legend {
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.form-grid .span-2 { grid-column: span 2; }

.field { display: flex; flex-direction: column; gap: 6px; font-size: 0.82rem; font-weight: 600; color: var(--ink-soft); }
.field > input, .field > select, .password-wrap input {
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 400;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line);
  background: var(--card);
  color: var(--ink);
  width: 100%;
}
.field > input:focus, .field > select:focus, .password-wrap input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.15); }
.password-wrap { position: relative; width: 100%; }
.password-wrap input { padding-right: 68px; }
.password-toggle { position: absolute; top: 50%; right: 12px; transform: translateY(-50%); color: var(--gold-deep); font: inherit; font-size: 0.85rem; font-weight: 600; }
.password-toggle:hover { color: var(--ink); }
.field > input::placeholder { color: #b9b4a8; }
.field.invalid input { border-color: var(--red); }
.err-msg { color: var(--red); font-weight: 500; font-size: 0.76rem; }

.swatch-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.swatch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px 7px 8px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--card);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.swatch:hover { border-color: var(--gold); }
.swatch:has(input:checked) { border-color: var(--gold-deep); background: var(--gold-soft); color: var(--ink); }
.swatch input { accent-color: var(--gold-deep); width: 15px; height: 15px; }
.swatch .dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1.5px var(--line);
}

.pay-options { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.radio {
  flex: 1;
  min-width: 170px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1.5px solid var(--line);
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.radio:hover { border-color: var(--gold); }
.radio input { accent-color: var(--gold-deep); width: 17px; height: 17px; }

.card-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.card-fields.hidden { display: none; }

.checkout-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 15px 20px;
  margin-bottom: 16px;
  font-size: 0.95rem;
}
.checkout-total strong { font-size: 1.25rem; color: var(--gold); }

/* order success */
.order-success { text-align: center; padding: 18px 6px 6px; }
.success-icon {
  width: 78px;
  height: 78px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  color: #1c1500;
  font-size: 2.2rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  animation: pop 0.5s ease;
}
.order-success h3 { font-size: 1.8rem; margin-bottom: 10px; }
.order-success p { color: var(--ink-soft); margin-bottom: 6px; }
.order-success .muted { color: var(--muted); font-size: 0.88rem; }
.success-total {
  display: flex;
  justify-content: space-between;
  background: var(--paper-alt);
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  margin: 20px 0;
  font-size: 0.95rem;
}
.order-success .btn { margin-top: 6px; }

/* ============ Toast ============ */
.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%) translateY(90px);
  background: var(--ink);
  color: #fff;
  padding: 13px 24px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 120;
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.22, 0.8, 0.3, 1), opacity 0.3s ease;
  max-width: 90vw;
  text-align: center;
  pointer-events: none;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* ============ To top ============ */
.to-top {
  position: fixed;
  bottom: 26px;
  right: 26px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-lg);
  z-index: 80;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease, background 0.15s ease;
}
.to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { background: var(--gold-deep); }
.to-top svg { width: 20px; height: 20px; }

/* ============ Views (pages) ============ */
.view { display: none; }
.view.active { display: block; animation: viewIn 0.35s ease; }
@keyframes viewIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* ============ Business lines (home) ============ */
.lines-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.line-card {
  display: flex;
  align-items: center;
  gap: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 28px;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.line-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.line-card img {
  width: 116px;
  height: 116px;
  border-radius: 14px;
  object-fit: cover;
  flex-shrink: 0;
}
.line-card h3 { font-size: 1.4rem; margin-bottom: 4px; }
.line-card p { color: var(--muted); font-size: 0.9rem; margin-bottom: 10px; }
.line-link { color: var(--gold-deep); font-weight: 600; font-size: 0.9rem; }

/* ============ Auth (login / register) ============ */
.view#view-login > .section, .view#view-register > .section {
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  background-color: var(--paper-alt);
  background-image: url("../img/login-brand-bg.svg");
  background-size: cover;
  background-position: center;
}.auth-wrap { display: grid; place-items: center; padding: 60px 0 90px; }
.auth-card {
  width: min(470px, 100%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  padding: 32px 34px 28px;
}
.auth-tabs {
  display: flex;
  background: var(--paper-alt);
  border-radius: 999px;
  padding: 5px;
  margin-bottom: 24px;
}
.auth-tab {
  flex: 1;
  padding: 10px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--muted);
  transition: background 0.2s ease, color 0.2s ease;
}
.auth-tab.active { background: var(--ink); color: #fff; }
.auth-card form { display: flex; flex-direction: column; gap: 14px; }
.auth-provider-btn {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.auth-provider-btn:hover { background: var(--paper-alt); border-color: var(--gold); }
.auth-brand { display:flex; align-items:baseline; gap:7px; margin-bottom:2px; font-size:1.55rem; font-weight:700; letter-spacing:.04em; }
.auth-brand span:first-child { color:var(--ink); font-family:var(--font-head); }
.auth-brand span:nth-child(2) { color:var(--gold-deep); font-family:var(--font-body); }
.auth-brand i { color:var(--gold); font-family:var(--font-head); font-style:normal; }.auth-card h3 { font-size: 1.5rem; }
.auth-sub { color: var(--muted); font-size: 0.9rem; margin-top: -8px; }
.google-signin { border: 1.5px solid var(--line); background: var(--card); color: var(--ink); }
.auth-hint {
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 2px;
}
.link-btn {
  color: var(--gold-deep);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ============ Account ============ */
.account-popover {
  position: absolute;
  top: calc(100% - 3px);
  right: 72px;
  z-index: 100;
  width: 220px;
  padding: 8px;
  color: #f4f4f4;
  background: #202124;
  border: 1px solid #3a3b3d;
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0,0,0,.24);
}
.account-popover[hidden] { display:none; }
.auth-avatar { width:32px; height:32px; display:grid; place-items:center; overflow:hidden; border-radius:9px; background:#91eadc; color:#076a5b; font-size:.78rem; font-weight:600; }
.auth-avatar[hidden] { display:none; }
.auth-avatar img { width:100%; height:100%; object-fit:cover; }
.auth-btn.signed-in #authIcon { display:none; }
.account-popover-name { padding: 10px 12px; font-weight: 600; }
.account-popover button { display:flex; gap:12px; align-items:center; width:100%; padding:10px 12px; border-radius:8px; text-align:left; color:inherit; }
.account-popover button:hover { background:#303134; }
.account-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 24px;
  align-items: start;
  padding: 50px 0 90px;
}
.profile-card,
.orders-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
}
.avatar {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  color: #1c1500;
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
}
.profile-card h3 { font-size: 1.45rem; margin-bottom: 2px; }
.profile-card p { color: var(--ink-soft); font-size: 0.92rem; }
.profile-card .muted { color: var(--muted); font-size: 0.83rem; }
.profile-card .btn { margin-top: 18px; }
.orders-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}
.orders-head h3 { font-size: 1.3rem; }
.orders-card > .muted { color: var(--muted); font-size: 0.92rem; padding: 14px 0; }
.link-gold { color: var(--gold-deep); font-weight: 600; }
.order-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
.order-item:last-child { border-bottom: none; }
.order-item strong { font-size: 0.95rem; }
.order-item p { font-size: 0.8rem; color: var(--muted); }
.order-total { font-weight: 700; white-space: nowrap; }

.account-settings { display:grid; grid-template-columns:220px minmax(0, 1fr); gap:40px; max-width:1180px; margin:0 auto; padding:44px 0 80px; }
.settings-sidebar { border-right:1px solid var(--line); padding-right:12px; }
.settings-sidebar button { width:100%; display:flex; align-items:center; gap:14px; padding:13px 14px; text-align:left; border-radius:8px; color:var(--ink-soft); }
.settings-sidebar button.active { background:#edf7f3; color:#07836d; font-weight:600; }
.settings-main { min-width:0; }
.settings-main h2 { font-size:1.35rem; margin-bottom:22px; }
.settings-divider { height:1px; background:var(--line); margin:22px 0; }
.settings-row { display:grid; grid-template-columns:minmax(180px, .7fr) minmax(0, 1.3fr); gap:28px; align-items:start; }
.settings-row-copy h3 { font-family:var(--font-body); font-size:1rem; margin:10px 0; }
.settings-row-copy p,.settings-help { color:var(--muted); font-size:.88rem; line-height:1.55; }
.settings-card { overflow:hidden; background:var(--card); border:1px solid var(--line); border-radius:12px; box-shadow:0 2px 5px rgba(0,0,0,.04); }
.settings-photo-row { display:flex; align-items:center; gap:14px; padding:16px 20px; border-bottom:1px solid var(--line); }
.settings-avatar { width:40px; height:40px; display:grid; place-items:center; overflow:hidden; border-radius:12px; background:#91eadc; color:#076a5b; }
.settings-avatar img { width:100%; height:100%; object-fit:cover; }
.upload-photo { display:inline-block; padding:9px 14px; border:1px solid var(--line); border-radius:8px; background:var(--paper); cursor:pointer; font-weight:500; }
.settings-card-section { padding:17px 20px; border-bottom:1px solid var(--line); }
.settings-card-section:last-child { border-bottom:0; }
.settings-name-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.settings-card .field { gap:6px; }
.settings-card .field input,.settings-info-main input,.language-setting select { width:100%; padding:9px 11px; border:1px solid var(--line); border-radius:6px; background:var(--paper); color:var(--ink); font:inherit; font-weight:400; }
.settings-help { margin:11px 0 14px; }
.settings-info-row { display:flex; align-items:center; gap:18px; }
.settings-info-main { display:flex; flex:1; flex-direction:column; gap:5px; min-width:0; }
.settings-info-main > span,.language-setting { color:var(--muted); font-size:.82rem; }
.settings-info-main input { border-color:transparent; padding-left:0; background:transparent; }
.settings-info-main input:focus { border-color:var(--line); padding-left:9px; background:var(--paper); }
.verified-status { color:#9a6b00; white-space:nowrap; font-size:.85rem; }
.verified-status.verified { color:#07836d; }
.settings-link { color:#1769d2; font-weight:500; white-space:nowrap; }
.settings-link:hover,.single-line a:hover { text-decoration:underline; }
.service-card .settings-card-section { font-size:.9rem; }
.service-heading { display:flex; align-items:center; gap:12px; padding:16px 20px; }
.service-heading > span:nth-child(2) { flex:1; }
.google-mark { color:#4285f4; font-weight:700; font-size:1.2rem; }
.single-line { padding:17px 20px; }
.single-line a { display:flex; justify-content:space-between; color:#1769d2; }
.single-line a span { font-size:.88rem; }
.language-setting { display:flex; flex-direction:column; gap:8px; color:var(--ink-soft); }
.security-form { display:flex; flex-direction:column; gap:15px; padding:20px; }
.security-form .btn { align-self:flex-start; }
.account-panel[hidden] { display:none; }
.account-panel .orders-card { padding:22px; }
.account-panel .orders-card > .muted { padding:14px 0; }
/* ============ Product photo upload ============ */
.file-input { font-size: 0.85rem; color: var(--muted); }
.file-input::file-selector-button {
  font-family: inherit;
  border: none;
  background: var(--ink);
  color: #fff;
  padding: 9px 18px;
  border-radius: 999px;
  margin-right: 12px;
  margin-top: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.15s ease;
}
.file-input::file-selector-button:hover { background: var(--gold-deep); }
.img-preview { position: relative; width: 110px; }
.img-preview img {
  width: 110px;
  height: 110px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
}
.img-preview button {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 0.8rem;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
}

/* ============ Responsive ============ */
@media (max-width: 960px) {
  .hero-inner {
    grid-template-columns: 1fr;
    min-height: unset;
    padding-block: 44px 60px;
  }
  .hero-visual { height: 440px; max-width: 560px; margin-inline: auto; width: 100%; }
  .perks-grid { grid-template-columns: repeat(2, 1fr); }
  .about-inner, .contact-inner { grid-template-columns: 1fr; gap: 34px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .lines-grid { grid-template-columns: 1fr; }
  .account-grid { grid-template-columns: 1fr; }
  .account-settings { grid-template-columns:190px minmax(0,1fr); gap:22px; }
  .settings-row { grid-template-columns:1fr; gap:8px; }

  /* mobile nav */
  .menu-toggle { display: flex; }
  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    padding: 10px 5%;
    margin: 0;
    transform: translateY(-130%);
    transition: transform 0.3s cubic-bezier(0.22, 0.8, 0.3, 1);
    z-index: 85;
  }
  .nav.open { transform: translateY(0); }
  .nav a { padding: 14px 4px; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .nav a::after { display: none; }
  .shop-menu { width: 100%; }
  .shop-menu-toggle { padding: 14px 4px; width: 100%; text-align: left; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .shop-options { position: static; box-shadow: none; border: 0; border-radius: 0; padding: 0 0 8px 12px; background: transparent; }
  .nav .nav-cta {
    border-bottom: none;
    margin: 12px 0 8px;
    text-align: center;
    justify-content: center;
    display: inline-flex;
  }
}

@media (max-width: 620px) {
  :root { --header-h: 64px; }
  .logo { font-size: 1.2rem; }
  .add-product-btn span, .auth-btn span, .signout-btn span { display: none; }
  .auth-btn.signed-in .auth-avatar { display:grid; }
  .add-product-btn, .auth-btn, .signout-btn { padding: 10px 12px; }
  .section { padding: 62px 0; }
  .hero-visual { height: 380px; }
  .hero-stats { gap: 24px; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
  .product-info { padding: 12px 13px 14px; gap: 7px; }
  .product-top { flex-direction: column; gap: 2px; }
  .product-bottom { flex-wrap: wrap; }
  .add-btn { width: 100%; }
  .perks-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .account-settings { grid-template-columns:1fr; gap:18px; padding:20px 0 50px; }
  .settings-sidebar { display:flex; border-right:0; border-bottom:1px solid var(--line); padding:0 0 10px; }
  .settings-sidebar button { justify-content:center; padding:10px 6px; }
  .settings-info-row { gap:10px; flex-wrap:wrap; }
  .settings-info-main { flex-basis:100%; }
  .settings-name-grid { grid-template-columns:1fr; }
  .form-grid, .card-fields { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: span 1; }
  .modal-box { padding: 26px 20px 22px; }
  .newsletter { flex-direction: column; }
  .newsletter .btn { width: 100%; }
  .hero-chip { font-size: 0.72rem; padding: 7px 12px; }
  .to-top { bottom: 18px; right: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}















