/* ==========================================================================
   ASTRO BARISTA — Estilos principales
   ========================================================================== */

:root {
  --dark: #1b140f;
  --dark-soft: #2a1f17;
  --cream: #f7f2ea;
  --cream-2: #efe6d8;
  --text: #2b2118;
  --muted: #756a5c;
  --gold: #c69a5a;
  --gold-dark: #a97f43;
  --white: #ffffff;
  --line: #e4dacb;
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius: 2px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 700; margin: 0 0 .5em; line-height: 1.2; }
p { margin: 0 0 1em; color: var(--muted); }
button { font-family: var(--sans); cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold-dark); outline-offset: 2px; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.eyebrow {
  display: inline-block;
  font-size: .78rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: .9em;
}
.section { padding: 90px 0; }
.section--tight { padding: 60px 0; }
.section-head { margin-bottom: 40px; }
.section-head.center { text-align: center; }

.btn {
  display: inline-block;
  padding: 15px 34px;
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--dark);
  font-size: .85rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  border-radius: var(--radius);
  transition: background .25s, color .25s, border-color .25s;
}
.btn:hover { background: var(--gold); color: var(--white); }
.btn--solid { background: var(--gold); color: var(--white); }
.btn--solid:hover { background: var(--gold-dark); border-color: var(--gold-dark); }
.btn--light { border-color: rgba(255,255,255,.6); color: var(--white); }
.btn--light:hover { background: var(--white); color: var(--dark); border-color: var(--white); }
.btn--block { width: 100%; text-align: center; }
.link-btn {
  background: none; border: none; padding: 0; margin-top: .6em;
  color: var(--gold-dark); font-size: .82rem; text-transform: uppercase;
  letter-spacing: .06em; border-bottom: 1px solid transparent;
}
.link-btn:hover { border-bottom-color: var(--gold-dark); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: transparent;
  transition: background .3s ease, box-shadow .3s ease, padding .3s ease;
}
.site-header.is-solid {
  background: var(--dark);
  box-shadow: 0 2px 18px rgba(0,0,0,.2);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 0;
  transition: padding .3s ease;
}
.site-header.is-solid .nav-inner { padding: 16px 0; }

.logo {
  font-family: var(--serif);
  font-size: 1.6rem;
  color: var(--white);
  letter-spacing: .02em;
}

.nav-main { display: flex; gap: 36px; }
.nav-main > li { position: relative; }
.nav-main a.nav-link {
  color: var(--white);
  font-size: .92rem;
  display: flex; align-items: center; gap: 5px;
  padding: 6px 0;
}
.nav-main a.nav-link.is-active { color: var(--gold); }
.nav-main a.nav-link:hover { color: var(--gold); }
.caret { font-size: .6rem; opacity: .8; }

.dropdown {
  position: absolute;
  top: 100%; left: 50%;
  transform: translateX(-50%);
  background: var(--white);
  min-width: 210px;
  padding: 10px 0;
  box-shadow: 0 18px 40px rgba(0,0,0,.18);
  opacity: 0;
  visibility: hidden;
  translate: 0 8px;
  transition: opacity .2s ease, translate .2s ease, visibility .2s;
}
.nav-main li:hover .dropdown,
.nav-main li:focus-within .dropdown {
  opacity: 1; visibility: visible; translate: 0 0;
}
.dropdown a {
  display: block;
  padding: 10px 22px;
  font-size: .88rem;
  color: var(--text);
}
.dropdown a:hover { background: var(--cream); color: var(--gold-dark); }

.nav-actions { display: flex; align-items: center; gap: 18px; }
.nav-actions a.register { color: var(--white); font-size: .88rem; }
.nav-actions a.register:hover { color: var(--gold); }
.cart-link {
  color: var(--white);
  font-size: .88rem;
  position: relative;
  display: flex; align-items: center; gap: 6px;
}
.cart-count {
  background: var(--gold);
  color: var(--white);
  font-size: .68rem;
  border-radius: 50%;
  width: 18px; height: 18px;
  display: inline-flex; align-items: center; justify-content: center;
}
.nav-actions .btn { padding: 11px 24px; }

.nav-toggle {
  display: none;
  background: none; border: none;
  width: 30px; height: 22px;
  position: relative;
}
.nav-toggle span, .nav-toggle::before, .nav-toggle::after {
  content: ''; position: absolute; left: 0; right: 0; height: 2px; background: var(--white);
}
.nav-toggle::before { top: 0; }
.nav-toggle span { top: 10px; }
.nav-toggle::after { bottom: 0; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex; align-items: center;
  background-size: cover;
  background-position: center;
  color: var(--white);
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(15,10,7,.86) 0%, rgba(15,10,7,.55) 55%, rgba(15,10,7,.35) 100%);
}
.hero-content { position: relative; max-width: 640px; }
.hero h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); color: var(--white); margin-bottom: .4em; }
.hero p { color: rgba(255,255,255,.78); max-width: 480px; }

.page-banner {
  position: relative;
  min-height: 46vh;
  display: flex; align-items: center; justify-content: center;
  background-size: cover; background-position: center;
  color: var(--white);
  text-align: center;
}
.page-banner::before { content: ''; position: absolute; inset: 0; background: rgba(15,10,7,.62); }
.page-banner h1 { position: relative; color: var(--white); font-size: clamp(2rem, 4vw, 2.8rem); }
.breadcrumb {
  background: var(--cream-2);
  padding: 16px 0;
  font-size: .85rem;
  color: var(--muted);
}
.breadcrumb a { color: var(--gold-dark); }

/* ---------- Featured split blocks ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.split.reverse .split__media { order: 2; }
.split__media img { border-radius: var(--radius); }
.feature-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 24px; }
.feature-pair .img-card { position: relative; border-radius: var(--radius); overflow: hidden; }
.feature-pair .img-card img { height: 100%; object-fit: cover; }
.mini-product { max-width: 320px; }
.mini-product h4 { font-size: 1.3rem; margin-bottom: .2em; }
.mini-product .price-now { font-size: 1.05rem; font-weight: 600; }

.price-old { color: var(--muted); text-decoration: line-through; margin-right: 8px; font-size: .92em; }
.price-now { color: var(--text); font-weight: 600; }

/* ---------- Product cards / grid ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px 30px;
}
.product-card { position: relative; }
.product-card__media {
  position: relative; display: block; overflow: hidden;
  aspect-ratio: 1/1; border-radius: var(--radius); margin-bottom: 18px;
  background: var(--cream-2);
}
.product-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.product-card:hover .product-card__media img { transform: scale(1.06); }
.badge {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  background: var(--gold); color: var(--white);
  font-size: .68rem; text-transform: uppercase; letter-spacing: .04em;
  padding: 5px 11px; border-radius: 30px;
}
.product-card__title { font-size: 1.05rem; margin-bottom: .3em; }
.product-card__title a:hover { color: var(--gold-dark); }
.product-card__price { margin-bottom: 0; }

/* ---------- Shop layout ---------- */
.shop-layout { display: grid; grid-template-columns: 250px 1fr; gap: 50px; align-items: start; }
.shop-sidebar { background: var(--white); border: 1px solid var(--line); padding: 28px; border-radius: var(--radius); }
.shop-sidebar h4 { font-size: 1rem; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 1em; }
.shop-sidebar + .shop-sidebar, .sidebar-block + .sidebar-block { margin-top: 34px; padding-top: 30px; border-top: 1px solid var(--line); }
.price-track { height: 4px; background: var(--line); border-radius: 4px; position: relative; margin: 20px 0 10px; }
.price-track span { position: absolute; left: 15%; right: 55%; top: 0; bottom: 0; background: var(--gold); border-radius: 4px; }
.price-track i { position: absolute; top: -6px; width: 16px; height: 16px; background: var(--gold-dark); border-radius: 50%; border: 2px solid var(--white); box-shadow: 0 0 0 1px var(--gold-dark); }
.price-track i.left { left: 12%; } .price-track i.right { left: 42%; }
.price-range { display: flex; justify-content: space-between; font-size: .85rem; color: var(--muted); }
.cat-list li { display: flex; justify-content: space-between; padding: 8px 0; font-size: .92rem; border-bottom: 1px dashed var(--line); }
.cat-list li:last-child { border-bottom: none; }
.cat-list a:hover { color: var(--gold-dark); }
.search-box { display: flex; margin-top: 8px; }
.search-box input { flex: 1; padding: 10px 12px; border: 1px solid var(--line); border-right: none; font-family: var(--sans); border-radius: var(--radius) 0 0 var(--radius); }
.search-box button { padding: 10px 16px; background: var(--gold); color: var(--white); border: none; border-radius: 0 var(--radius) var(--radius) 0; }
.shop-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 34px; font-size: .9rem; color: var(--muted); }
.shop-toolbar select { padding: 9px 14px; border: 1px solid var(--line); background: var(--white); font-family: var(--sans); border-radius: var(--radius); }
.shop-layout .product-grid { grid-template-columns: repeat(3, 1fr); }

/* ---------- Subscription banner ---------- */
.subscribe-banner { background: var(--cream-2); }
.subscribe-banner .split { padding: 30px 0; }
.subscribe-banner__img { display: flex; justify-content: center; }
.subscribe-banner__img img { max-width: 320px; }

/* ---------- 3 col image cards ---------- */
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.trio-card { position: relative; aspect-ratio: 3/4; border-radius: var(--radius); overflow: hidden; display: flex; align-items: flex-end; padding: 30px; }
.trio-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.trio-card::before { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(10,7,5,.82), rgba(10,7,5,.05) 60%); z-index: 1; }
.trio-card__body { position: relative; z-index: 2; color: var(--white); }
.trio-card__body h3 { color: var(--white); font-size: 1.4rem; margin-bottom: .5em; }

/* ---------- Testimonial ---------- */
.testimonial { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 60px; background: var(--cream-2); }
.testimonial__text { padding: 60px 0 60px 24px; }
.testimonial__text p.quote { font-family: var(--serif); font-size: 1.4rem; color: var(--text); font-style: italic; }
.testimonial__author { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-dark); }
.testimonial__img img { width: 100%; height: 100%; object-fit: cover; max-height: 480px; }

/* ---------- Blog ---------- */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 30px; }
.blog-card__media { aspect-ratio: 4/3; overflow: hidden; border-radius: var(--radius); margin-bottom: 20px; }
.blog-card__media img { width: 100%; height: 100%; object-fit: cover; }
.blog-card h3 { font-size: 1.15rem; margin-bottom: .4em; }
.blog-card h3 a:hover { color: var(--gold-dark); }
.blog-meta { font-size: .78rem; color: var(--muted); margin-top: .8em; }

/* ---------- Sale banner ---------- */
.sale-banner { background: var(--cream-2); position: relative; overflow: hidden; }
.sale-banner .container { display: flex; align-items: center; justify-content: space-between; padding: 60px 24px; gap: 40px; }
.sale-banner img { max-width: 320px; margin: 0 auto; }
.sale-banner .side { flex: 1; }
.sale-banner .side.right { text-align: right; }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark); color: rgba(255,255,255,.65); padding: 80px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr repeat(4, 1fr); gap: 40px; padding-bottom: 50px; border-bottom: 1px solid rgba(255,255,255,.1); }
.footer-grid h5 { color: var(--white); font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 1.2em; }
.footer-grid ul li { margin-bottom: .7em; }
.footer-grid ul a:hover { color: var(--gold); }
.footer-logo { color: var(--white); font-family: var(--serif); font-size: 1.6rem; margin-bottom: .5em; }
.newsletter-form { display: flex; margin-top: 16px; max-width: 320px; }
.newsletter-form input { flex: 1; padding: 12px 14px; border: 1px solid rgba(255,255,255,.2); background: transparent; color: var(--white); font-family: var(--sans); border-radius: var(--radius) 0 0 var(--radius); }
.newsletter-form input::placeholder { color: rgba(255,255,255,.5); }
.newsletter-form button { padding: 12px 20px; background: var(--gold); border: none; color: var(--white); border-radius: 0 var(--radius) var(--radius) 0; white-space: nowrap; }
.social-row { display: flex; gap: 14px; margin-top: 22px; }
.social-row a { width: 34px; height: 34px; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .85rem; }
.social-row a:hover { border-color: var(--gold); color: var(--gold); }
.footer-bottom { display: flex; justify-content: space-between; padding-top: 24px; font-size: .8rem; }

/* ---------- Forms (contacto / cuenta / checkout) ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { margin-bottom: 20px; }
.field.full { grid-column: 1 / -1; }
.field label { display: block; font-size: .85rem; margin-bottom: 7px; color: var(--text); font-weight: 500; }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 16px; border: 1px solid var(--line);
  font-family: var(--sans); border-radius: var(--radius); background: var(--white);
}
.field textarea { resize: vertical; min-height: 130px; }
.tabs { display: flex; gap: 10px; margin-bottom: 34px; border-bottom: 1px solid var(--line); }
.tabs button { background: none; border: none; padding: 14px 4px; margin-right: 30px; font-size: .95rem; color: var(--muted); border-bottom: 2px solid transparent; }
.tabs button.is-active { color: var(--text); border-color: var(--gold); font-weight: 600; }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; }
.info-card { background: var(--white); border: 1px solid var(--line); padding: 30px; border-radius: var(--radius); }
.info-card h4 { font-size: 1rem; margin-bottom: .8em; }
.info-card p { margin-bottom: .4em; font-size: .92rem; }
.demo-note { background: #fbf1de; border: 1px solid #edd7ab; color: #6b4f18; padding: 14px 18px; border-radius: var(--radius); font-size: .88rem; margin-bottom: 26px; }

/* ---------- Cart / checkout table ---------- */
.cart-table { width: 100%; border-collapse: collapse; margin-bottom: 30px; }
.cart-table th { text-align: left; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 0 0 16px; border-bottom: 1px solid var(--line); }
.cart-table td { padding: 20px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.cart-product { display: flex; align-items: center; gap: 16px; }
.cart-product img { width: 76px; height: 76px; object-fit: cover; border-radius: var(--radius); }
.qty-input { width: 66px; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius); font-family: var(--sans); }
.remove-btn { background: none; border: none; color: var(--muted); font-size: 1.1rem; }
.remove-btn:hover { color: #b5473f; }
.cart-summary { max-width: 380px; margin-left: auto; background: var(--white); border: 1px solid var(--line); padding: 28px; border-radius: var(--radius); }
.cart-summary .row { display: flex; justify-content: space-between; padding: 10px 0; font-size: .94rem; }
.cart-summary .row.total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 16px; font-weight: 700; font-size: 1.1rem; font-family: var(--serif); }
.empty-state { text-align: center; padding: 70px 20px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--dark); color: var(--white);
  padding: 14px 26px; border-radius: 30px; font-size: .88rem;
  opacity: 0; pointer-events: none; transition: opacity .3s ease, transform .3s ease;
  z-index: 999; box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- Utility ---------- */
.mt-lg { margin-top: 60px; }
.text-center { text-align: center; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  .nav-main, .nav-actions .register { display: none; }
  .nav-toggle { display: block; }
  .site-header.nav-open .nav-main {
    display: flex; flex-direction: column; gap: 0;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--dark); padding: 10px 24px 24px;
  }
  .site-header.nav-open .nav-main .dropdown {
    position: static; transform: none; opacity: 1; visibility: visible;
    box-shadow: none; background: transparent; padding-left: 14px; display: none;
  }
  .site-header.nav-open .nav-main li.dropdown-open .dropdown { display: block; }
  .site-header.nav-open .nav-main a.nav-link { padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
  .site-header.nav-open .dropdown a { color: rgba(255,255,255,.75); }

  .split, .testimonial, .shop-layout, .footer-grid { grid-template-columns: 1fr; }
  .product-grid, .trio, .blog-grid, .feature-pair { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .sale-banner .container { flex-direction: column; text-align: center; }
  .sale-banner .side.right { text-align: center; }
}
@media (max-width: 600px) {
  .product-grid, .trio, .blog-grid, .feature-pair { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
  .hero { min-height: 80vh; }
}
