:root {
  --bg: #ffffff;
  --surface: #f5f5f7;
  --surface-2: #ffffff;
  --text: #1d1d1f;
  --text-secondary: #6e6e73;
  --accent: #0071e3;
  --accent-text: #ffffff;
  --border: rgba(0, 0, 0, 0.08);
  --shadow: 0 2px 24px rgba(0, 0, 0, 0.06);
  --danger: #d0342c;
  --oferta: #ff9500;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000;
    --surface: #1c1c1e;
    --surface-2: #17181a;
    --text: #f5f5f7;
    --text-secondary: #98989d;
    --accent: #2997ff;
    --border: rgba(255, 255, 255, 0.12);
    --shadow: 0 2px 24px rgba(0, 0, 0, 0.5);
  }
}
:root[data-theme="dark"] {
  --bg: #000000;
  --surface: #1c1c1e;
  --surface-2: #17181a;
  --text: #f5f5f7;
  --text-secondary: #98989d;
  --accent: #2997ff;
  --border: rgba(255, 255, 255, 0.12);
  --shadow: 0 2px 24px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); }
body {
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
button { font-family: inherit; }
a { color: inherit; }

.logo-light, .logo-dark { height: 28px; width: auto; }
.logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-light { display: none; }
  :root:not([data-theme="light"]) .logo-dark { display: block; }
}
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: block; }

header.site {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 4vw, 48px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.cart-icon-link { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 980px; color: var(--text); text-decoration: none; }
.cart-icon-link:hover { background: var(--surface); }
.cart-badge { position: absolute; top: 0; right: 0; background: var(--accent); color: var(--accent-text); font-size: 10px; font-weight: 700; min-width: 16px; height: 16px; border-radius: 980px; display: flex; align-items: center; justify-content: center; padding: 0 3px; }

.btn {
  border: none;
  border-radius: 980px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-primary { background: var(--accent); color: var(--accent-text); }
.btn-ghost { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn-danger { background: transparent; color: var(--danger); border: 1px solid rgba(208,52,44,0.35); }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn-disabled { background: var(--surface); color: var(--text-secondary); border: 1px solid var(--border); cursor: default; }

.ship-banner {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  text-align: center;
  padding: 9px 16px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text-secondary);
}
.flag-py { vertical-align: middle; margin-left: 5px; border-radius: 2px; box-shadow: 0 0 0 1px var(--border); }

.hero { padding: clamp(28px, 6vw, 56px) clamp(16px, 4vw, 48px) 8px; max-width: 1180px; margin: 0 auto; text-align: center; }
.hero h1 { font-size: clamp(26px, 4vw, 40px); font-weight: 600; letter-spacing: -0.015em; margin: 0 0 8px; text-wrap: balance; }
.hero p { color: var(--text-secondary); font-size: clamp(15px, 1.6vw, 18px); margin: 0; max-width: 56ch; margin-inline: auto; }

.hero-banner {
  position: relative;
  width: 100%;
  min-height: clamp(340px, 56vw, 620px);
  overflow: hidden;
  background: var(--surface);
}
.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}
.hero-slide.is-active { opacity: 1; pointer-events: auto; }
.hero-slide .hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  z-index: 0;
}
.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 25%, rgba(0,0,0,0.78) 100%);
  z-index: 1;
}
.hero-slide--clean::after { content: none; }
.hero-dots {
  position: absolute;
  z-index: 3;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}
.hero-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255,255,255,0.45);
  cursor: pointer;
}
.hero-dot.is-active { background: #fff; }

.gallery-arrow, .hero-arrow {
  display: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  border: none;
  border-radius: 50%;
  background: rgba(0,0,0,0.45);
  color: #fff;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  transition: background 0.2s ease, opacity 0.2s ease;
}
.gallery-arrow:hover, .hero-arrow:hover { background: rgba(0,0,0,0.65); }
.gallery-arrow:disabled { opacity: 0.25; cursor: default; }
.gallery-arrow:disabled:hover { background: rgba(0,0,0,0.45); }
.gallery-arrow { width: 28px; height: 28px; font-size: 17px; }
.gallery-arrow.prev { left: 8px; }
.gallery-arrow.next { right: 8px; }
.hero-arrow { width: 44px; height: 44px; font-size: 26px; }
.hero-arrow.prev { left: clamp(10px, 3vw, 26px); }
.hero-arrow.next { right: clamp(10px, 3vw, 26px); }
/* Arrows are for precise pointers (mouse/trackpad): on touch, swiping the
   image already works, so we don't clutter the photo with extra buttons. */
@media (hover: hover) and (pointer: fine) {
  .gallery-arrow, .hero-arrow { display: flex; }
}
.hero-banner-content {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  margin: 0 auto;
  width: 100%;
  padding: 0 clamp(16px, 4vw, 48px) clamp(30px, 5vw, 56px);
  color: #fff;
}
.hero-banner-content .eyebrow { display: inline-block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.85; margin-bottom: 8px; }
.hero-banner-content h2 { font-size: clamp(28px, 5vw, 48px); font-weight: 700; margin: 0 0 8px; letter-spacing: -0.015em; text-wrap: balance; max-width: 20ch; }
.hero-banner-content p { font-size: clamp(14px, 1.7vw, 18px); opacity: 0.92; margin: 0 0 16px; max-width: 50ch; }
.hero-banner-content .hero-price { font-size: clamp(19px, 2.6vw, 26px); font-weight: 700; margin-bottom: 16px; }

.featured { max-width: 1180px; margin: 0 auto; padding: 8px clamp(16px, 4vw, 48px) 0; }
.featured-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.featured-head h2 { font-size: clamp(20px, 2.6vw, 26px); font-weight: 600; margin: 0; letter-spacing: -0.01em; }
.featured-head p { color: var(--text-secondary); font-size: 13.5px; margin: 0; }
.featured-rail {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding-bottom: 10px;
  margin: 0 -4px;
  padding-inline: 4px;
}
.featured-card {
  position: relative;
  flex: 0 0 auto;
  width: min(78vw, 300px);
  scroll-snap-align: start;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.featured-media { position: relative; aspect-ratio: 4/3; background: var(--surface); }
.featured-media img { width: 100%; height: 100%; object-fit: cover; }
.featured-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; }
.featured-body .card-price { font-size: 20px; margin-bottom: 6px; }

.search-bar { display: flex; align-items: center; gap: 10px; max-width: 560px; margin: 20px auto 0; padding: 0 clamp(16px, 4vw, 48px); color: var(--text-secondary); }
.search-bar svg { flex: none; }
.search-bar input { flex: 1; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 980px; padding: 10px 16px; font-size: 14.5px; font-family: inherit; }
.search-bar input::placeholder { color: var(--text-secondary); }
.search-bar input:focus { outline: none; border-color: var(--accent); }

.filters { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; padding: 20px clamp(16px, 4vw, 48px) 0; max-width: 1180px; margin: 0 auto; }
.chip { border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: 8px 18px; border-radius: 980px; font-size: 14px; font-weight: 500; cursor: pointer; }
.chip.active { background: var(--text); color: var(--bg); border-color: var(--text); }

.grid { max-width: 1180px; margin: 0 auto; padding: 24px clamp(16px, 4vw, 48px) 80px; display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 22px; }
.empty-state { text-align: center; color: var(--text-secondary); padding: 60px 20px; font-size: 15px; grid-column: 1/-1; }

.card { background: var(--surface-2); border: 1px solid var(--border); border-radius: 20px; overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); position: relative; }
.card-media { position: relative; aspect-ratio: 4/3; background: var(--surface); display: flex; overflow-x: auto; scroll-snap-type: x mandatory; }
.card-media img { flex: 0 0 100%; scroll-snap-align: start; width: 100%; height: 100%; object-fit: cover; }
.card-media::-webkit-scrollbar { display: none; }
.dots { position: absolute; z-index: 2; bottom: 8px; left: 0; right: 0; display: flex; justify-content: center; gap: 5px; }
.dots button { width: 5px; height: 5px; padding: 0; border: none; border-radius: 50%; background: rgba(255,255,255,0.6); box-shadow: 0 0 0 1px rgba(0,0,0,0.2); cursor: pointer; }
.dots button.is-active { background: #fff; }

.card-media-link { position: absolute; inset: 0; z-index: 1; }

.badge-oferta { position: absolute; top: 12px; left: 12px; background: var(--oferta); color: #1d1d1f; font-size: 11px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; padding: 5px 10px; border-radius: 980px; z-index: 2; }
.badge-agotado { position: absolute; top: 12px; left: 12px; background: var(--text-secondary); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; padding: 5px 10px; border-radius: 980px; z-index: 2; }
.stock-note { font-size: 12.5px; font-weight: 600; color: var(--danger); margin: 2px 0 8px; }
.stock-note-out { color: var(--text-secondary); }

.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-category { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--accent); }
.card-title { font-size: 17px; font-weight: 600; margin: 0; line-height: 1.3; }
.card-title a { color: inherit; text-decoration: none; }
.card-title a:hover { text-decoration: underline; }
.card-details-link { display: inline-block; margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--accent); text-decoration: none; }
.card-details-link:hover { text-decoration: underline; }
.card-subtitle { font-size: 13.5px; color: var(--text-secondary); line-height: 1.4; margin: 0; }
.card-price { font-size: 19px; font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; }
.price-old { display: block; text-decoration: line-through; color: var(--danger); font-size: 13px; font-weight: 600; margin-bottom: 2px; font-variant-numeric: tabular-nums; }
.card-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.wa-btn { background: #25D366; color: #06210f; font-weight: 700; font-size: 14px; padding: 10px 16px; flex: 1; }
.admin-mini-actions { display: flex; gap: 8px; }
.icon-btn { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 980px; padding: 8px 14px; font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none; }

/* El footer es siempre negro (estilo Apple.com), sin importar si el resto
   del sitio está en modo claro u oscuro según el sistema del visitante —
   por eso redefine las mismas variables de color solo para adentro del
   footer, así todo lo que ya usa var(--surface)/var(--text)/var(--border)
   ahí adentro (íconos de redes, insignias de pago, links legales) se ve
   bien automáticamente sin tocar cada regla una por una. */
footer.site {
  --surface: #1c1c1e;
  --surface-2: #17181a;
  --text: #f5f5f7;
  --text-secondary: #98989d;
  --border: rgba(255, 255, 255, 0.12);
  background: #000000;
  border-top: 1px solid var(--border);
  padding: 24px clamp(16px, 4vw, 48px) 28px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 12.5px;
}
footer.site p { margin: 0; }

/* redes sociales + métodos de pago, arriba del copyright del footer */
.footer-block-title { margin: 0 0 12px; font-size: 15px; font-weight: 700; color: var(--text); }
.footer-social { margin: 0 0 30px; }
.footer-social-icons { display: flex; justify-content: center; gap: 10px; }
.footer-social-icons a {
  width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none;
}
.footer-social-icons a:hover { background: var(--surface-2); color: var(--text); }

.footer-payments { margin: 0 0 26px; }
.payment-group { margin: 0 0 16px; }
.payment-group:last-child { margin-bottom: 0; }
.payment-group-label { display: block; margin: 0 0 8px; font-size: 12px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.03em; }
.payment-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 8px; }
.payment-badge { border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: 5px 12px; border-radius: 980px; font-size: 12px; font-weight: 500; white-space: nowrap; }

.credit-footer {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  color: var(--text-secondary);
  font-size: 12px;
  text-decoration: none;
}
.credit-footer:hover { color: var(--text); }
.credit-logo { height: 13px; width: auto; display: none; vertical-align: middle; }
.credit-logo-light { display: inline-block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .credit-logo-light { display: none; }
  :root:not([data-theme="light"]) .credit-logo-dark { display: inline-block; }
}
:root[data-theme="dark"] .credit-logo-light { display: none; }
:root[data-theme="dark"] .credit-logo-dark { display: inline-block; }

.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); backdrop-filter: blur(4px); align-items: flex-start; justify-content: center; padding: 5vh 16px; overflow-y: auto; z-index: 100; }
.modal-overlay:not([hidden]) { display: flex; }
.modal-overlay[hidden] { display: none; }
.modal { background: var(--bg); border-radius: 20px; max-width: 560px; width: 100%; padding: 26px clamp(18px, 4vw, 32px) 30px; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.modal h2 { margin: 0 0 18px; font-size: 21px; font-weight: 600; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text-secondary); }
.field small { display: block; color: var(--text-secondary); font-size: 12px; margin-top: 4px; }
input[type="text"], input[type="number"], input[type="tel"], input[type="password"], input[type="email"], input[type="url"], select, textarea {
  width: 100%; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-size: 15px; font-family: inherit;
}
textarea { resize: vertical; min-height: 80px; }
.checkbox-row { display: flex; align-items: center; gap: 10px; }
.checkbox-row input { width: 18px; height: 18px; }

/* botón "ojito" para mostrar/ocultar contraseña (login del panel) */
.password-field { position: relative; }
.password-field input { padding-right: 44px; }
.password-toggle {
  position: absolute; top: 50%; right: 5px; transform: translateY(-50%);
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  background: none; border: none; border-radius: 8px; cursor: pointer; color: var(--text-secondary);
}
.password-toggle:hover { background: var(--surface-2); }
.password-toggle:disabled { cursor: default; opacity: 0.5; }
.password-toggle .icon-eye-off { display: none; }
.password-toggle.is-visible .icon-eye { display: none; }
.password-toggle.is-visible .icon-eye-off { display: block; }
.checkbox-row label { margin: 0; font-size: 14px; font-weight: 500; color: var(--text); }

.thumbs { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.thumb { position: relative; width: 72px; height: 72px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .rm { position: absolute; top: 2px; right: 2px; background: rgba(0,0,0,0.6); color: #fff; border: none; border-radius: 50%; width: 20px; height: 20px; font-size: 12px; line-height: 1; cursor: pointer; }
.thumb label { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.35); color: #fff; font-size: 10px; opacity: 0; }
.thumb input[type=checkbox] { position: absolute; top: 4px; left: 4px; }

.color-variant-row { display: flex; gap: 8px; margin-bottom: 8px; }
.color-variant-row input[type=text] { flex: 1; min-width: 0; }
.color-variant-row input[type=file] { flex: 1.4; min-width: 0; font-size: 12.5px; }

.modal-actions { display: flex; gap: 10px; margin-top: 22px; }
.modal-actions .btn { flex: 1; }

.flash { max-width: 1180px; margin: 14px auto 0; padding: 0 clamp(16px, 4vw, 48px); }
.flash-inner { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px 16px; font-size: 13.5px; }
.flash-inner.error { border-color: rgba(208,52,44,0.4); color: var(--danger); }

/* product detail page */
.pdp { max-width: 1180px; margin: 0 auto; padding: 20px clamp(16px, 4vw, 48px) 60px; }
.pdp-back { display: inline-block; margin-bottom: 18px; font-size: 14px; font-weight: 600; color: var(--text-secondary); text-decoration: none; }
.pdp-back:hover { color: var(--text); }
.pdp-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.pdp-media { aspect-ratio: 1/1; border-radius: 20px; }
.pdp-media img { object-fit: contain; background: var(--surface-2); }
.pdp-info { position: sticky; top: 20px; }
.pdp-title { font-size: clamp(22px, 3vw, 30px); font-weight: 700; margin: 6px 0 8px; letter-spacing: -0.01em; line-height: 1.2; }
.pdp-subtitle { color: var(--text-secondary); font-size: 15px; margin: 0 0 14px; }
.pdp-price { font-size: clamp(24px, 3vw, 30px); font-weight: 700; margin-bottom: 18px; font-variant-numeric: tabular-nums; }
.pdp-price .price-old { font-size: 15px; }
.pdp-section { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border); }
.pdp-section h2 { font-size: 15px; font-weight: 600; margin: 0 0 12px; }
.pdp-specs { margin: 0; padding-left: 20px; color: var(--text-secondary); font-size: 14.5px; line-height: 1.7; }
.pdp-description { margin: 0; color: var(--text-secondary); font-size: 14.5px; line-height: 1.6; white-space: pre-line; }

/* selector de color en la página de producto (ej: fundas/estuches) */
.pdp-color-current { margin: 0 0 10px; font-size: 14.5px; color: var(--text-secondary); }
.pdp-color-preview { display: block; width: 140px; height: 140px; object-fit: contain; background: var(--surface-2); border-radius: 14px; margin-bottom: 12px; }
.pdp-color-swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.pdp-color-swatch { width: 56px; height: 56px; border-radius: 10px; overflow: hidden; padding: 0; border: 2px solid var(--border); background: var(--surface); cursor: pointer; }
.pdp-color-swatch img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pdp-color-swatch.is-active { border-color: var(--text); }
@media (max-width: 760px) {
  .pdp-layout { grid-template-columns: 1fr; }
  .pdp-info { position: static; }
}
.pdp-price-note { margin: -12px 0 14px; font-size: 12.5px; color: var(--text-secondary); }
.pdp-cash-price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin: 0 0 18px; padding: 10px 14px; background: var(--surface); border-radius: 12px; }
.pdp-cash-price-label { font-size: 12.5px; color: var(--text-secondary); }
.pdp-cash-price-amount { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pdp-actions { display: flex; flex-direction: column; gap: 10px; margin-bottom: 4px; }

/* productos relacionados (debajo del detalle de producto) */
.related-products-title { max-width: 1180px; margin: 8px auto 0; padding: 0 clamp(16px, 4vw, 48px); font-size: clamp(20px, 2.6vw, 26px); font-weight: 600; letter-spacing: -0.01em; }

/* footer legal links */
.footer-legal { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 16px; margin: 10px 0 0; }
.footer-legal a { color: var(--text-secondary); text-decoration: none; font-size: 12.5px; }
.footer-legal a:hover { color: var(--text); text-decoration: underline; }

/* legal pages: reuse .pdp-section rhythm, just a bit narrower */
.legal-page { max-width: 760px; }

/* carrito */
.cart-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.cart-row { display: grid; grid-template-columns: 64px 1fr auto auto auto; align-items: center; gap: 14px; padding: 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); }
.cart-row img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; background: var(--surface); }
.cart-row-info h4 { margin: 0 0 4px; font-size: 15px; }
.cart-row-info h4 a { color: inherit; text-decoration: none; }
.cart-row-info h4 a:hover { text-decoration: underline; }
.cart-row-info span { font-size: 13px; color: var(--text-secondary); }
.cart-qty { width: 64px; padding: 8px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 14px; text-align: center; }
.cart-row-subtotal { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cart-summary { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; padding: 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); }
.cart-summary-total { display: flex; flex-direction: column; }
.cart-summary-total span { font-size: 12.5px; color: var(--text-secondary); }
.cart-summary-total strong { font-size: 21px; font-variant-numeric: tabular-nums; }
.cart-summary-actions { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 640px) {
  .cart-row { grid-template-columns: 52px 1fr; grid-template-areas: "img info" "img qty" "img actions"; }
  .cart-row img { grid-area: img; }
  .cart-row-info { grid-area: info; }
  .cart-qty { grid-area: qty; justify-self: start; }
  .cart-row-subtotal { display: none; }
  .cart-row > .icon-btn { grid-area: actions; justify-self: start; }
}

/* checkout */
.checkout-layout { align-items: start; }
.checkout-summary { background: var(--surface-2); border: 1px solid var(--border); border-radius: 16px; padding: 18px 20px; position: sticky; top: 20px; }
.checkout-summary h2 { font-size: 15px; font-weight: 600; margin: 0 0 12px; }
.checkout-summary-row { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; padding: 7px 0; border-top: 1px solid var(--border); }
.checkout-summary-row:first-of-type { border-top: none; }
.checkout-summary-total { font-weight: 700; font-size: 16px; margin-top: 4px; }
@media (max-width: 760px) {
  .checkout-summary { position: static; margin-top: 22px; }
}

/* admin dashboard */
.admin-shell { max-width: 1100px; margin: 0 auto; padding: 24px clamp(16px, 4vw, 40px) 80px; }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.admin-table-toolbar { display: flex; justify-content: flex-end; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.admin-row { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-2); margin-bottom: 10px; }
.admin-row img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; background: var(--surface); }
.admin-row .info { flex: 1; min-width: 0; }
.admin-row .info h4 { margin: 0 0 4px; font-size: 15px; }
.admin-row .info span { font-size: 13px; color: var(--text-secondary); }
.shipping-fee-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 16px; }
.shipping-fee-grid .field { margin-bottom: 10px; }

.login-shell { max-width: 380px; margin: 10vh auto; padding: 0 20px; }
.login-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: 20px; padding: 30px 26px; box-shadow: var(--shadow); }
.login-card h1 { font-size: 22px; margin: 0 0 6px; }
.login-card p.sub { color: var(--text-secondary); font-size: 13.5px; margin: 0 0 20px; }

@media (max-width: 520px) {
  header.site { padding: 12px 16px; }
}
