/* ── Variables & Reset ─────────────────────────────────── */
:root {
  --bg:      #f5f1ec;
  --card:    #fff;
  --text:    #171717;
  --muted:   #666;
  --accent:  #da9a04;
  --accent2: #89510a;
  --line:    #e8e2da;
  --shadow:  0 12px 30px rgba(0,0,0,.08);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: Inter, Arial, sans-serif; background: var(--bg); color: var(--text); }
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }

/* ── Topbar ─────────────────────────────────────────────── */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 28px;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  border-bottom: 1px solid var(--line);
  z-index: 100;
  width: 100%;
}
.brand { font-weight: 800; font-size: 1.2rem; display: flex; align-items: center; gap: 8px; }
.logo  { height: 34px; }
.nav   { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.nav a.active { font-weight: 700; }
.cart-link span { font-weight: 700; }

/* Dropdown Catálogo */
.nav-item { position: static; }
.nav-item > a { display: flex; align-items: center; gap: 4px; cursor: pointer; }
.nav-dropdown {
  display: none;
  position: fixed;
  top: 62px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px 0;
  min-width: 200px;
  box-shadow: 0 16px 40px rgba(0,0,0,.15);
  z-index: 9999;
}
.nav-dropdown.open { display: block; }
.nav-dropdown a {
  display: block;
  padding: 11px 20px;
  font-size: .9rem;
  transition: background .15s;
  color: var(--text);
}
.nav-dropdown a:hover { background: var(--bg); }

/* ── Cabecera de sección (páginas internas) ─────────────── */
.page-header {
  width: 100%;
  background: linear-gradient(135deg, #1a1209 0%, #3d2500 60%, #89510a 100%);
  padding: 44px 40px 36px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("https://picsum.photos/seed/header/1600/400") center/cover no-repeat;
  opacity: .13;
}
.page-header-inner { position: relative; max-width: 1280px; margin: 0 auto; }
.page-header h1 { font-size: clamp(1.6rem, 3vw, 2.6rem); font-weight: 800; }
.page-header p  { opacity: .8; margin-top: 6px; font-size: .95rem; }

/* ── Hero (index) ───────────────────────────────────────── */
.hero-bg {
  width: 100%;
  background: url("assets/hero.jpg") center/cover no-repeat;
  padding: 120px 60px;
  color: #fff;
  position: relative;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(0,0,0,.55), rgba(0,0,0,.1));
}
.hero-content {
  position: relative;
  max-width: 620px;
  z-index: 1;
}
.hero-content h1   { font-size: clamp(2.2rem, 4vw, 4rem); line-height: 1.05; }
.hero-content p    { opacity: .95; font-size: 1.05rem; margin-top: 12px; }
.hero-content .btn { margin-top: 22px; }

/* ── Main container ─────────────────────────────────────── */
main { max-width: 1280px; margin: 0 auto; padding: 28px; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  cursor: pointer;
  font-size: .9rem;
  font-weight: 600;
  transition: opacity .2s, transform .15s;
}
.btn:hover { opacity: .85; transform: translateY(-1px); }
.btn-dark  { background: var(--accent); color: #fff; }
.btn-light { background: #fff; color: var(--text); }

/* ── Cards & layout ─────────────────────────────────────── */
.hero-card, .card, .summary, .product-card, .filters {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}
.card { padding: 22px; }
.summary { padding: 22px; }

.product-grid, .grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin: 26px 0;
}
.product-card { overflow: hidden; }
.card-img-wrap { overflow: hidden; border-radius: 24px 24px 0 0; }
.product-card img { width: 100%; height: 320px; object-fit: cover; transition: transform .4s; }
.product-card:hover img { transform: scale(1.04); }
.product-card .p { padding: 16px; }

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-top: 30px;
  margin-bottom: 8px;
}

/* ── Filtros catálogo ───────────────────────────────────── */
.filters {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 12px;
  padding: 14px;
  margin-bottom: 0;
}
.filters input, .filters select, .card input, .card select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: .9rem;
}

/* Submenú pills de categoría */
.cat-pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 16px 0 4px;
}
.cat-pill {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: #fff;
  cursor: pointer;
  font-size: .85rem;
  font-weight: 500;
  transition: all .2s;
}
.cat-pill.active, .cat-pill:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ── Ficha producto ─────────────────────────────────────── */
.product-page {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 28px;
}
.product-page img { width: 100%; border-radius: 28px; box-shadow: var(--shadow); }
.product-detail   { padding: 28px; }

.eyebrow {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent2);
  color: #fff;
  font-size: .8rem;
  margin-bottom: 12px;
}

/* Selector talla/color */
.selector-group  { margin-top: 16px; }
.selector-label  { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); display: block; margin-bottom: 8px; }
.selector-pills  { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: #fff;
  cursor: pointer;
  font-size: .85rem;
  transition: all .18s;
}
.pill.active, .pill:hover {
  background: var(--text);
  border-color: var(--text);
  color: #fff;
}
.price-row   { margin: 14px 0; display: flex; align-items: center; gap: 10px; }
.price       { font-weight: 800; font-size: 1.05rem; }
.price.big   { font-size: 1.5rem; }
.orig-price  { color: var(--muted); font-size: .95rem; }
.sel-error   { color: #c0392b; font-size: .85rem; margin-top: 8px; }

/* ── Badges ─────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 999px;
  background: #f0f0f0;
  font-size: .78rem;
  margin-top: 8px;
}
.badge-offer {
  background: #c0392b;
  color: #fff;
}

/* ── Carrito & Checkout ─────────────────────────────────── */
.cart-layout, .checkout-layout {
  display: grid;
  grid-template-columns: 1.5fr .8fr;
  gap: 24px;
}
.row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.total   { border-bottom: 0; font-size: 1.1rem; }
.full    { width: 100%; text-align: center; }
.grid-2  { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.qty     { display: inline-flex; gap: 10px; align-items: center; }
.spaced  { display: flex; justify-content: space-between; align-items: start; gap: 16px; }
.muted   { color: var(--muted); font-size: .9rem; }

/* ── Ofertas ─────────────────────────────────────────────── */
.offer-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 18px 0;
}
.offer-filter {
  padding: 9px 20px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: #fff;
  cursor: pointer;
  font-weight: 600;
  font-size: .88rem;
  transition: all .2s;
}
.offer-filter.active, .offer-filter:hover {
  background: #c0392b;
  border-color: #c0392b;
  color: #fff;
}
.offer-banner {
  width: 100%;
  background: linear-gradient(120deg, #c0392b, #8e1a0e);
  color: #fff;
  padding: 48px 40px 36px;
  position: relative;
  overflow: hidden;
}
.offer-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("https://picsum.photos/seed/offers/1600/400") center/cover no-repeat;
  opacity: .1;
}
.offer-banner-inner { position: relative; max-width: 1280px; margin: 0 auto; }
.offer-banner h1 { font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 900; }
.offer-banner p  { opacity: .85; margin-top: 8px; }

/* ── Scroll top ─────────────────────────────────────────── */
.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 28px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(218,154,4,.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s, transform .2s;
  z-index: 999;
  font-size: 1.2rem;
}
.scroll-top.visible { opacity: 1; pointer-events: all; }
.scroll-top:hover   { transform: translateY(-3px); }

/* ── Toast ──────────────────────────────────────────────── */
#toast {
  position: fixed;
  bottom: 90px;
  right: 28px;
  background: #171717;
  color: #fff;
  padding: 12px 20px;
  border-radius: 14px;
  font-size: .9rem;
  opacity: 0;
  transform: translateY(10px);
  transition: all .3s;
  z-index: 9999;
  pointer-events: none;
}
#toast.show { opacity: 1; transform: translateY(0); }

/* ── Footer ─────────────────────────────────────────────── */
.footer {
  margin-top: 60px;
  padding: 28px;
  text-align: center;
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: #fff;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-bg { padding: 70px 28px; }
  .product-page, .cart-layout, .checkout-layout,
  .grid-4, .product-grid, .filters { grid-template-columns: 1fr; }
  .topbar { flex-direction: column; gap: 10px; padding: 14px; }
  .nav    { flex-wrap: wrap; justify-content: center; }
  .product-card img { height: 260px; }
  .page-header { padding: 32px 20px 24px; }
}
