/* ============================================
   Hinojosa & Bustamante — Tienda
   Paleta y tipografía alineadas al sitio original
   ============================================ */

:root {
  --hb-ink: #1c1c1c;
  --hb-ink-soft: #4a4a4a;
  --hb-line: #e4e0d8;
  --hb-cream: #faf8f4;
  --hb-white: #ffffff;
  --hb-blue: #1447e6;
  --hb-blue-dark: #0e35b8;
  --hb-gold: #a9812f;
  --hb-green: #25d366;
  --radius-pill: 999px;
  --radius-card: 6px;
  --maxw: 1240px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Jost', 'Helvetica Neue', Arial, sans-serif;
  color: var(--hb-ink);
  background: var(--hb-white);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  margin: 0 0 0.5em;
  line-height: 1.15;
}

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

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--hb-line);
  background: var(--hb-white);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  max-width: var(--maxw);
  margin: 0 auto;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand img { height: 42px; width: auto; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  flex: 1;
}

.main-nav .nav-item {
  position: relative;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--hb-line);
  font-size: 14px;
  letter-spacing: .02em;
  white-space: nowrap;
  background: var(--hb-white);
  transition: border-color .15s ease, color .15s ease;
}

.pill:hover { border-color: var(--hb-ink); }

.pill.is-active {
  background: var(--hb-blue);
  border-color: var(--hb-blue);
  color: #fff;
}

.pill.tienda-pill {
  border-color: var(--hb-blue);
  color: var(--hb-blue);
  font-weight: 600;
}
.pill.tienda-pill:hover { background: var(--hb-blue); color: #fff; }

.nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid var(--hb-line);
  border-radius: 10px;
  padding: 8px;
  margin-top: 8px;
  min-width: 200px;
  box-shadow: 0 12px 28px rgba(0,0,0,.08);
}
/* Franja invisible que rellena el espacio entre el botón y el menú,
   para que el cursor no "pierda" el hover al bajar hacia los links. */
.nav-dropdown::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  height: 8px;
}
.nav-item:hover .nav-dropdown { display: block; }

.gallery-main {
  cursor: zoom-in;
  position: relative;
  overflow: hidden;
}
.gallery-main::after {
  content: "🔍";
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(255,255,255,.9);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
  pointer-events: none;
  transition: opacity .2s ease;
}
.gallery-main.is-zoomed::after { opacity: 0; }
.gallery-main.is-zoomed { cursor: zoom-out; }
.gallery-main img#mainImg {
  transition: transform .12s ease-out;
  transform-origin: 50% 50%;
  will-change: transform;
}
.gallery-main.is-zoomed img#mainImg { transform: scale(2); }
@media (max-width: 860px) {
  /* En celular no hay hover: solo se activa con un toque, sin seguir el dedo */
  .gallery-main.is-zoomed img#mainImg { transform: scale(1.8); }
}
.nav-dropdown a {
  display: block;
  padding: 9px 14px;
  border-radius: 6px;
  font-size: 14px;
}
.nav-dropdown a:hover { background: var(--hb-cream); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.cart-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--hb-ink);
  border-radius: var(--radius-pill);
  padding: 9px 18px;
  font-size: 14px;
  background: #fff;
  cursor: pointer;
}
.cart-btn:hover { background: var(--hb-ink); color: #fff; }
.cart-count {
  background: var(--hb-blue);
  color: #fff;
  font-size: 11px;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.asesor-btn {
  background: var(--hb-green);
  color: #fff;
  border-radius: var(--radius-pill);
  padding: 9px 20px;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.asesor-btn:hover { background: #1fb955; }

.menu-toggle { display: none; }

@media (max-width: 980px) {
  .main-nav { display: none; }
  .menu-toggle {
    display: inline-flex;
    border: 1px solid var(--hb-line);
    border-radius: 8px;
    padding: 9px 14px;
    background: none;
    font-size: 14px;
    cursor: pointer;
  }
  .header-top { flex-wrap: wrap; }
  .main-nav.is-open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    order: 3;
    padding-top: 14px;
  }
  .main-nav.is-open .pill { justify-content: center; }
  .nav-dropdown { position: static; box-shadow: none; display: none; margin-top: 4px; }
  .nav-item.is-open .nav-dropdown { display: block; }
}

/* ---------- Breadcrumb bar (filters strip like original) ---------- */
.filter-bar {
  border-bottom: 1px solid var(--hb-line);
  padding: 22px 0;
}
.filter-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.filter-row:last-child { margin-bottom: 0; }
.filter-label {
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--hb-ink-soft);
  min-width: 130px;
}
.filter-btn {
  border: 1px solid var(--hb-line);
  border-radius: var(--radius-pill);
  padding: 8px 18px;
  font-size: 13.5px;
  background: #fff;
  cursor: pointer;
  transition: all .15s ease;
}
.filter-btn:hover { border-color: var(--hb-ink); }
.filter-btn.is-active { background: var(--hb-blue); border-color: var(--hb-blue); color: #fff; }

/* ---------- Product grid ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 28px;
  padding: 36px 0 64px;
}

.product-card {
  border: 1px solid var(--hb-line);
  border-radius: var(--radius-card);
  overflow: hidden;
  background: #fff;
  transition: box-shadow .2s ease, transform .2s ease;
  display: flex;
  flex-direction: column;
}
.product-card:hover { box-shadow: 0 14px 30px rgba(0,0,0,.08); transform: translateY(-2px); }

.product-card .thumb {
  aspect-ratio: 1 / 1;
  background: var(--hb-cream);
  overflow: hidden;
}
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-card .thumb { position: relative; }
.product-card.is-agotado .thumb img { filter: grayscale(35%); opacity: .75; }
.badge-agotado {
  position: absolute; top: 10px; left: 10px;
  background: #1a1a1a; color: #fff;
  font-size: 11px; font-weight: 600; letter-spacing: .03em;
  padding: 4px 10px; border-radius: 20px; text-transform: uppercase;
}
.pd-badge-agotado {
  display: inline-block; background: #1a1a1a; color: #fff;
  font-size: 12px; font-weight: 600; letter-spacing: .03em;
  padding: 4px 12px; border-radius: 20px; text-transform: uppercase; margin-bottom: 10px;
}
.btn-primary[disabled] { background: #c9c9c9; cursor: not-allowed; pointer-events: none; }

.product-card .info { padding: 16px 18px 20px; flex: 1; display: flex; flex-direction: column; }
.product-card .cat { font-size: 12px; color: var(--hb-ink-soft); margin-bottom: 4px; }
.product-card h3 { font-size: 18px; margin-bottom: 8px; }
.product-card .price { margin-top: auto; font-size: 15px; font-weight: 600; color: var(--hb-blue); }
.product-card .price small { font-weight: 400; color: var(--hb-ink-soft); display: block; font-size: 11.5px; }

.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--hb-ink-soft);
}

/* ---------- Product detail ---------- */
.product-detail {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  padding: 44px 0 80px;
}
@media (max-width: 860px) { .product-detail { grid-template-columns: 1fr; gap: 28px; } }

.gallery-main {
  aspect-ratio: 1 / 1;
  background: var(--hb-cream);
  border-radius: var(--radius-card);
  overflow: hidden;
  margin-bottom: 12px;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 10px; flex-wrap: wrap; }
.gallery-thumbs img {
  width: 74px; height: 74px; object-fit: cover;
  border-radius: 6px; cursor: pointer; border: 2px solid transparent;
}
.gallery-thumbs img.is-active { border-color: var(--hb-blue); }

.pd-cat { font-size: 13px; color: var(--hb-ink-soft); margin-bottom: 6px; }
.pd-title { font-size: 32px; margin-bottom: 6px; }
.pd-price { font-size: 26px; font-weight: 600; color: var(--hb-blue); margin: 18px 0 24px; }
.pd-price small { display: block; font-size: 13px; font-weight: 400; color: var(--hb-ink-soft); margin-top: 4px; }

.option-group { margin-bottom: 26px; }
.option-label {
  font-size: 13px;
  letter-spacing: .04em;
  color: var(--hb-ink-soft);
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
}
.option-buttons { display: flex; gap: 10px; flex-wrap: wrap; }

.opt-btn {
  border: 1px solid var(--hb-line);
  border-radius: var(--radius-pill);
  padding: 10px 20px;
  font-size: 14px;
  background: #fff;
  cursor: pointer;
}
.opt-btn.is-active { background: var(--hb-ink); border-color: var(--hb-ink); color: #fff; }

.color-swatch {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--hb-line);
  border-radius: var(--radius-pill);
  padding: 7px 16px 7px 7px;
  cursor: pointer;
  background: #fff;
}
.color-swatch .dot { width: 20px; height: 20px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); }
.color-swatch.is-active { border-color: var(--hb-ink); }
.dot.amarillo { background: linear-gradient(135deg,#f4d78e,#c99b2e); }
.dot.blanco { background: linear-gradient(135deg,#f4f4f2,#c9c9c5); }
.dot.rosa { background: linear-gradient(135deg,#f3c9c3,#d9968a); }

.qty-row { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.qty-control { display: flex; align-items: center; border: 1px solid var(--hb-line); border-radius: var(--radius-pill); }
.qty-control button { border: none; background: none; width: 38px; height: 38px; font-size: 16px; cursor: pointer; }
.qty-control span { min-width: 30px; text-align: center; font-size: 15px; }

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--hb-ink);
  color: #fff;
  border: none;
  border-radius: var(--radius-pill);
  padding: 15px 26px;
  font-size: 15px;
  cursor: pointer;
  width: 100%;
}
.btn-primary:hover { background: #000; }

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--hb-green);
  color: #fff;
  border: none;
  border-radius: var(--radius-pill);
  padding: 14px 26px;
  font-size: 14.5px;
  cursor: pointer;
  width: 100%;
  margin-top: 12px;
}
.btn-whatsapp:hover { background: #1fb955; }

.pd-desc { margin-top: 30px; font-size: 14.5px; line-height: 1.7; color: var(--hb-ink-soft); border-top: 1px solid var(--hb-line); padding-top: 24px; }
.pd-desc h4 { font-size: 15px; color: var(--hb-ink); margin-bottom: 10px; }

.trust-row { display: flex; gap: 22px; margin-top: 26px; flex-wrap: wrap; }
.trust-item { font-size: 12.5px; color: var(--hb-ink-soft); display: flex; align-items: center; gap: 8px; }

/* ---------- Cart drawer ---------- */
.cart-overlay {
  position: fixed; inset: 0; background: rgba(20,20,20,.4);
  opacity: 0; pointer-events: none; transition: opacity .2s ease; z-index: 200;
}
.cart-overlay.is-open { opacity: 1; pointer-events: auto; }

.cart-drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: 420px; max-width: 92vw;
  background: #fff; z-index: 201; transform: translateX(100%);
  transition: transform .25s ease; display: flex; flex-direction: column;
  box-shadow: -12px 0 40px rgba(0,0,0,.15);
}
.cart-drawer.is-open { transform: translateX(0); }

.cart-head { padding: 22px 24px; border-bottom: 1px solid var(--hb-line); display: flex; justify-content: space-between; align-items: center; }
.cart-head h3 { font-size: 20px; margin: 0; }
.cart-close { background: none; border: none; font-size: 22px; cursor: pointer; }
.cart-items { flex: 1; overflow-y: auto; padding: 18px 24px; }
.cart-line { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--hb-line); }
.cart-line img { width: 68px; height: 68px; object-fit: cover; border-radius: 6px; background: var(--hb-cream); }
.cart-line .cl-info { flex: 1; }
.cart-line .cl-info h4 { font-size: 14.5px; margin: 0 0 4px; }
.cart-line .cl-info .cl-meta { font-size: 12px; color: var(--hb-ink-soft); margin-bottom: 6px; }
.cart-line .cl-price { font-size: 14px; font-weight: 600; }
.cart-line .cl-remove { font-size: 12px; color: #b3261e; background: none; border: none; cursor: pointer; padding: 0; margin-top: 6px; }
.cart-foot { border-top: 1px solid var(--hb-line); padding: 20px 24px 26px; }
.cart-subtotal { display: flex; justify-content: space-between; font-size: 16px; font-weight: 600; margin-bottom: 16px; }
.cart-empty { text-align: center; color: var(--hb-ink-soft); padding: 60px 10px; font-size: 14px; }

/* ---------- Footer ---------- */
.site-footer {
  background: #171512;
  color: #d8d3ca;
  padding: 46px 0 0;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 26px 20px; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; gap: 22px; padding-bottom: 22px; }
  .site-footer { padding-top: 34px; }
}
.footer-grid h4 { color: #fff; font-size: 14px; margin-bottom: 10px; font-family: 'Jost', sans-serif; letter-spacing: .03em; }
.footer-grid a, .footer-grid p, .footer-grid li { color: #b7b1a5; font-size: 13px; line-height: 1.55; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 4px; }
.footer-grid a:hover { color: #fff; }
.footer-brand img { height: 34px; margin-bottom: 12px; filter: brightness(0) invert(1); opacity: .9; }
.footer-brand p { max-width: 320px; }
.footer-bottom {
  padding: 16px 0;
  text-align: center;
  font-size: 11.5px;
  color: #7d7669;
  line-height: 1.5;
}

/* ---------- Generic page bits ---------- */
.page-hero { padding: 60px 0 30px; text-align: center; }
.page-hero h1 { font-size: 36px; }
.page-hero p { color: var(--hb-ink-soft); max-width: 560px; margin: 0 auto; }

.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--hb-ink); color: #fff; padding: 14px 24px; border-radius: var(--radius-pill);
  font-size: 14px; opacity: 0; pointer-events: none; transition: all .25s ease; z-index: 300;
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

.badge-note {
  font-size: 12px;
  background: #fdf3e0;
  color: #8a5c00;
  border: 1px solid #f0dba8;
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 16px;
}
