@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,700&family=Inter:wght@400;500;600;700&display=swap");

:root {
  --navy: #16305f;
  --navy-dark: #0d1f42;
  --red: #c8302e;
  --red-dark: #a52422;
  --cream: #faf5ec;
  --cream-dark: #f1e8d8;
  --white: #ffffff;
  --ink: #2a2620;
  --ink-soft: #6b6459;
  --line: #e4d9c4;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(22, 48, 95, 0.08);
  --font-display: "Fraunces", serif;
  --font-body: "Inter", sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.5;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.1; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 700;
  margin-bottom: 10px;
}
.eyebrow::before, .eyebrow::after { content: ""; width: 22px; height: 1px; background: var(--red); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn-primary { background: var(--red); color: var(--white); }
.btn-primary:hover { background: var(--red-dark); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--white); border: 1.5px solid rgba(255,255,255,0.7); }
.btn-outline:hover { background: rgba(255,255,255,0.12); }
.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: var(--navy-dark); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(22, 48, 95, 0.97);
  backdrop-filter: blur(6px);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  padding-bottom: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand img { height: 52px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { color: var(--white); font-family: var(--font-display); font-size: 1.05rem; }
.brand-text span { color: #cfd9ee; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; }

.main-nav { display: flex; align-items: center; gap: 30px; }
.main-nav a {
  color: #e7ecf7;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.15s;
}
.main-nav a:hover { color: var(--white); }

.header-actions { display: flex; align-items: center; gap: 14px; }
.cart-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.25);
  color: var(--white);
  padding: 9px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
}
.cart-btn:hover { background: rgba(255,255,255,0.18); }
.cart-count {
  background: var(--red);
  color: var(--white);
  font-size: 0.72rem;
  min-width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}
.nav-toggle { display: none; background: none; border: none; color: var(--white); font-size: 1.5rem; cursor: pointer; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  color: var(--white);
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(13,31,66,0.78) 0%, rgba(13,31,66,0.55) 45%, rgba(13,31,66,0.85) 100%);
}
.hero-content { position: relative; z-index: 2; max-width: 640px; }
.hero-content .eyebrow { color: #ff9d9c; }
.hero-content .eyebrow::before, .hero-content .eyebrow::after { background: #ff9d9c; }
.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  margin-bottom: 18px;
}
.hero h1 em { color: #ffb199; font-style: normal; }
.hero p { font-size: 1.08rem; color: #e6ebf5; max-width: 520px; margin-bottom: 30px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-badge {
  position: absolute;
  bottom: 40px;
  right: 40px;
  z-index: 2;
  background: rgba(255,255,255,0.95);
  color: var(--navy);
  border-radius: var(--radius);
  padding: 16px 22px;
  box-shadow: var(--shadow);
  text-align: center;
}
.hero-badge strong { display: block; font-family: var(--font-display); font-size: 1.6rem; color: var(--red); }
.hero-badge span { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); }

/* ---------- Historia ---------- */
.historia {
  padding: 110px 0;
  background: var(--white);
}
.historia .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.historia-img { position: relative; }
.historia-img img { border-radius: var(--radius); box-shadow: var(--shadow); }
.historia-img .tag {
  position: absolute;
  bottom: -20px;
  left: -20px;
  background: var(--navy);
  color: var(--white);
  padding: 16px 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.historia-img .tag strong { display: block; font-family: var(--font-display); font-size: 1.5rem; color: var(--white); }
.historia-img .tag span { font-size: 0.75rem; color: #cfd9ee; text-transform: uppercase; letter-spacing: 0.05em; }
.historia h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); margin-bottom: 18px; color: var(--navy); }
.historia p { color: var(--ink-soft); margin-bottom: 16px; }
.historia-list { margin-top: 22px; display: flex; flex-direction: column; gap: 12px; }
.historia-list li { display: flex; align-items: flex-start; gap: 12px; font-weight: 500; }
.historia-list li::before {
  content: "";
  width: 8px; height: 8px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--red);
  flex-shrink: 0;
}

/* ---------- Stats ---------- */
.stats {
  background: var(--navy);
  color: var(--white);
  padding: 56px 0;
  background-image: linear-gradient(180deg, rgba(13,31,66,0.92), rgba(13,31,66,0.92));
}
.stats .container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
.stat strong { display: block; font-family: var(--font-display); font-size: 2.6rem; color: #ff9d9c; }
.stat span { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; color: #cfd9ee; }

/* ---------- Calidad real (galería) ---------- */
.galeria { padding: 100px 0; background: var(--cream); }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 50px; }
.section-head h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); color: var(--navy); margin-bottom: 14px; }
.section-head p { color: var(--ink-soft); }
.galeria-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.galeria-grid figure {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 3/4;
  box-shadow: var(--shadow);
}
.galeria-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.galeria-grid figure:hover img { transform: scale(1.06); }

/* ---------- Catálogo ---------- */
.catalogo { padding: 100px 0; background: var(--white); }
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 44px;
}
.tab-btn {
  padding: 10px 22px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--white);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.15s;
}
.tab-btn:hover { border-color: var(--red); color: var(--red); }
.tab-btn.active { background: var(--navy); border-color: var(--navy); color: var(--white); }

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.product-card {
  background: var(--cream);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.product-card .thumb { aspect-ratio: 4/3; overflow: hidden; }
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.product-card:hover .thumb img { transform: scale(1.07); }
.product-body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.product-body h4 { font-size: 1rem; font-family: var(--font-body); font-weight: 700; color: var(--ink); }
.product-price { color: var(--red); font-weight: 700; font-size: 1.05rem; }
.product-price small { color: var(--ink-soft); font-weight: 500; font-size: 0.78rem; }
.product-footer { margin-top: auto; display: flex; align-items: center; gap: 10px; }
.qty-control {
  display: flex; align-items: center; gap: 0;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.qty-control button {
  width: 30px; height: 30px;
  border: none; background: var(--white);
  cursor: pointer; font-weight: 700; color: var(--navy);
}
.qty-control span { width: 30px; text-align: center; font-weight: 600; font-size: 0.9rem; }
.add-btn {
  flex: 1;
  background: var(--navy);
  color: var(--white);
  border: none;
  border-radius: 999px;
  padding: 9px 14px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s;
}
.add-btn:hover { background: var(--navy-dark); }

/* ---------- Envío ---------- */
.envio {
  background: var(--red);
  color: var(--white);
  padding: 54px 0;
}
.envio .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.envio h3 { font-size: 1.5rem; }
.envio p { color: #ffe3e2; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-dark);
  color: #d8dfef;
  padding: 70px 0 30px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer-brand img { height: 60px; margin-bottom: 14px; }
.footer-brand p { color: #aab6d6; font-size: 0.9rem; max-width: 260px; }
.site-footer h5 { color: var(--white); font-family: var(--font-body); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 16px; }
.site-footer ul { display: flex; flex-direction: column; gap: 10px; }
.site-footer a { color: #aab6d6; font-size: 0.92rem; }
.site-footer a:hover { color: var(--white); }
.footer-bottom {
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.8rem;
  color: #7f8bb0;
}

/* ---------- Carrito lateral ---------- */
.cart-overlay {
  position: fixed; inset: 0;
  background: rgba(13,31,66,0.5);
  z-index: 90;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s;
}
.cart-overlay.open { opacity: 1; pointer-events: auto; }

.cart-drawer {
  position: fixed;
  top: 0; right: 0;
  width: 400px; max-width: 92vw;
  height: 100vh;
  background: var(--white);
  z-index: 95;
  box-shadow: -12px 0 30px rgba(0,0,0,0.15);
  transform: translateX(100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
}
.cart-drawer.open { transform: translateX(0); }
.cart-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}
.cart-header h3 { font-family: var(--font-body); font-size: 1.1rem; }
.cart-close { background: none; border: none; font-size: 1.4rem; cursor: pointer; color: var(--ink-soft); }
.cart-items { flex: 1; overflow-y: auto; padding: 16px 24px; display: flex; flex-direction: column; gap: 16px; }
.cart-empty { color: var(--ink-soft); text-align: center; margin-top: 60px; font-size: 0.95rem; }
.cart-item { display: flex; gap: 12px; align-items: center; }
.cart-item img { width: 60px; height: 60px; border-radius: 10px; object-fit: cover; }
.cart-item-info { flex: 1; }
.cart-item-info h5 { font-size: 0.9rem; font-weight: 700; }
.cart-item-info span { font-size: 0.8rem; color: var(--ink-soft); }
.cart-item-remove { background: none; border: none; color: var(--red); cursor: pointer; font-size: 0.8rem; font-weight: 600; }
.cart-footer { padding: 20px 24px 26px; border-top: 1px solid var(--line); }
.cart-line { display: flex; justify-content: space-between; font-size: 0.9rem; color: var(--ink-soft); margin-bottom: 6px; }
.cart-total { display: flex; justify-content: space-between; font-weight: 700; font-size: 1.15rem; margin: 12px 0 18px; color: var(--navy); }

/* ---------- Modal de checkout (datos de entrega) ---------- */
.checkout-overlay {
  position: fixed; inset: 0;
  background: rgba(13,31,66,0.55);
  z-index: 100;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s;
}
.checkout-overlay.open { opacity: 1; pointer-events: auto; }

.checkout-modal {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -48%) scale(0.97);
  width: 460px; max-width: 92vw;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--white);
  border-radius: var(--radius);
  z-index: 105;
  box-shadow: 0 24px 60px rgba(0,0,0,0.25);
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.checkout-modal.open { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }
.checkout-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}
.checkout-header h3 { font-family: var(--font-body); font-size: 1.1rem; }
.checkout-close { background: none; border: none; font-size: 1.4rem; cursor: pointer; color: var(--ink-soft); }
.checkout-form { padding: 20px 24px 26px; display: flex; flex-direction: column; gap: 14px; }
.checkout-form label { display: flex; flex-direction: column; gap: 6px; font-size: 0.85rem; font-weight: 600; color: var(--navy); }
.checkout-form input,
.checkout-form textarea {
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 10px 12px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  resize: vertical;
}
.checkout-form input:focus,
.checkout-form textarea:focus { outline: none; border-color: var(--navy); }
.checkout-summary { background: var(--cream); border-radius: 10px; padding: 12px 14px; font-size: 0.85rem; color: var(--ink-soft); }
.checkout-summary strong { color: var(--navy); }
.checkout-error {
  background: #fdecea; color: var(--red-dark); border-radius: 8px;
  padding: 10px 12px; font-size: 0.85rem; font-weight: 600;
}
.checkout-submit[disabled] { opacity: 0.6; cursor: not-allowed; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .historia .container { grid-template-columns: 1fr; }
  .stats .container { grid-template-columns: repeat(2, 1fr); }
  .galeria-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .main-nav { display: none; }
  .nav-toggle { display: block; }
  .hero-badge { right: 20px; bottom: 20px; padding: 12px 16px; }
  .envio .container { flex-direction: column; text-align: center; }
}
@media (max-width: 480px) {
  .galeria-grid, .product-grid { grid-template-columns: 1fr 1fr; }
  .stats .container { grid-template-columns: 1fr 1fr; }
}
