/* ════════════════════════════════════════════════════════════════
   VERDEMENTE · TIENDA ONLINE
   Estilos propios de la tienda (usa las variables de styles.css)
════════════════════════════════════════════════════════════════ */

/* ──────────────────────────────────────────
   NAV (agrega botón carrito + volver)
────────────────────────────────────────── */
.nav-right {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-cart {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--verde-claro);
  color: var(--blanco);
  border: none;
  cursor: pointer;
  padding: 10px 20px;
  border-radius: 50px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  transition: background 0.2s, transform 0.2s;
}
.nav-cart:hover { background: var(--verde-oscuro); transform: translateY(-1px); }
.nav-cart svg { width: 20px; height: 20px; fill: currentColor; }

.cart-count {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 50px;
  background: var(--blanco);
  color: var(--verde-oscuro);
  font-size: 0.78rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.cart-count.is-empty { opacity: 0.55; }

.nav-back {
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gris-texto);
  transition: color 0.2s;
}
.nav-back:hover { color: var(--verde-claro); }

/* ──────────────────────────────────────────
   HERO / ENCABEZADO DE LA TIENDA
────────────────────────────────────────── */
.store-hero {
  padding: 130px 48px 50px;
  background: var(--crema);
  position: relative;
  overflow: hidden;
  text-align: center;
}
.store-hero .hero-bg-circle.c1 { width: 480px; height: 480px; top: -180px; right: -120px; }
.store-hero .hero-bg-circle.c2 { width: 240px; height: 240px; bottom: -120px; left: -60px; }

.store-hero-inner { position: relative; z-index: 2; max-width: 720px; margin: 0 auto; }

.store-hero .hero-badge { animation: fadeUp 0.6s ease both; }

.store-hero h1 {
  font-family: 'Fraunces', serif;
  font-weight: 900;
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  line-height: 1.08;
  color: var(--verde-oscuro);
  margin: 6px 0 14px;
  animation: fadeUp 0.6s 0.1s ease both;
}
.store-hero h1 em { font-style: italic; color: var(--verde-claro); }

.store-hero p {
  font-size: 1.08rem;
  line-height: 1.6;
  color: #555;
  max-width: 520px;
  margin: 0 auto;
  animation: fadeUp 0.6s 0.2s ease both;
}

.store-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  background: var(--blanco);
  border: 1px solid rgba(113,192,21,0.28);
  color: var(--verde-oscuro);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 50px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  animation: fadeUp 0.6s 0.3s ease both;
}

/* ──────────────────────────────────────────
   AVISO DE PRECIOS
────────────────────────────────────────── */
.price-banner {
  background: linear-gradient(135deg, rgba(113,192,21,0.12), rgba(11,118,30,0.08));
  border-top: 1px solid rgba(113,192,21,0.2);
  border-bottom: 1px solid rgba(113,192,21,0.2);
  padding: 16px 48px;
}
.price-banner-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
}
.price-banner-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
  line-height: 1;
}
.price-banner p {
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--verde-oscuro);
}
.price-banner strong { font-weight: 700; }

/* ──────────────────────────────────────────
   BARRA DE FILTROS + BUSCADOR (sticky)
────────────────────────────────────────── */
.store-toolbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(113,192,21,0.15);
  padding: 16px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.store-cats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.cat-chip {
  padding: 9px 18px;
  border-radius: 50px;
  border: 2px solid transparent;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--crema);
  color: var(--gris-texto);
}
.cat-chip.active {
  background: var(--verde-claro);
  color: var(--blanco);
  border-color: var(--verde-claro);
}
.cat-chip:hover:not(.active) {
  border-color: var(--verde-claro);
  color: var(--verde-oscuro);
}

.store-search {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 320px;
}
.store-search input {
  width: 100%;
  padding: 11px 16px 11px 42px;
  border-radius: 50px;
  border: 1px solid rgba(113,192,21,0.3);
  background: var(--crema);
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--gris-texto);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.store-search input:focus {
  border-color: var(--verde-claro);
  box-shadow: 0 0 0 3px rgba(113,192,21,0.15);
}
.store-search::before {
  content: '🔍';
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
  opacity: 0.6;
}

/* ──────────────────────────────────────────
   GRILLA DE PRODUCTOS
────────────────────────────────────────── */
.store-grid-wrap { padding: 40px 48px 90px; background: var(--blanco); }

.store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 22px;
  max-width: 1200px;
  margin: 0 auto;
}

.store-empty-grid {
  text-align: center;
  color: var(--gris-suave);
  font-size: 1rem;
  padding: 60px 0;
}

.store-card {
  background: var(--crema);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}
.store-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--sombra);
}
.store-card-img {
  height: 170px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(113,192,21,0.12), rgba(11,118,30,0.08));
}
.store-card-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.92;
  transition: transform 0.4s, opacity 0.3s;
}
.store-card:hover .store-card-img img { transform: scale(1.05); opacity: 1; }
.store-card-cat {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(255,255,255,0.92);
  color: var(--verde-oscuro);
  font-weight: 700;
  font-size: 0.72rem;
  padding: 5px 11px;
  border-radius: 50px;
  z-index: 2;
}

/* Sin stock */
.store-card.agotado .store-card-img img { filter: grayscale(0.85); opacity: 0.5; }
.store-card.agotado .store-card-precio .precio { color: var(--gris-suave); }
.store-card-agotado {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(58,58,58,0.9);
  color: #fff;
  font-weight: 700;
  font-size: 0.72rem;
  padding: 5px 11px;
  border-radius: 50px;
  z-index: 2;
}
.btn-agregar:disabled {
  background: #d8dcd2;
  color: var(--gris-suave);
  cursor: not-allowed;
  box-shadow: none;
}

.store-card-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.store-card-body h4 {
  font-family: 'Fraunces', serif;
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--verde-oscuro);
  margin-bottom: 3px;
}
.store-card-detalle {
  font-size: 0.8rem;
  color: var(--gris-suave);
  margin-bottom: 12px;
}
.store-card-precio {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-top: auto;
  margin-bottom: 14px;
}
.store-card-precio .precio {
  font-family: 'Fraunces', serif;
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--gris-texto);
}
.store-card-precio .precio-unidad {
  font-size: 0.82rem;
  color: var(--gris-suave);
  font-weight: 600;
}

/* Botón agregar / stepper en tarjeta */
.btn-agregar {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 50px;
  background: var(--verde-claro);
  color: var(--blanco);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 16px rgba(113,192,21,0.28);
}
.btn-agregar:hover {
  background: var(--verde-oscuro);
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(11,118,30,0.3);
}

.stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--blanco);
  border: 2px solid var(--verde-claro);
  border-radius: 50px;
  padding: 4px;
  gap: 4px;
}
.step-btn {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: var(--verde-claro);
  color: var(--blanco);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  flex-shrink: 0;
}
.step-btn:hover { background: var(--verde-oscuro); }
.step-cant {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--verde-oscuro);
  flex: 1;
  text-align: center;
}
.stepper-sm { border-width: 1.5px; padding: 3px; }
.stepper-sm .step-btn { width: 28px; height: 28px; font-size: 1.1rem; }
.stepper-sm .step-cant { font-size: 0.82rem; }

/* ──────────────────────────────────────────
   CARRITO · OVERLAY + DRAWER
────────────────────────────────────────── */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11,118,30,0.35);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  z-index: 200;
}
.cart-overlay.open { opacity: 1; visibility: visible; }

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 420px;
  max-width: 92vw;
  background: var(--blanco);
  z-index: 201;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 40px rgba(0,0,0,0.12);
}
.cart-drawer.open { transform: translateX(0); }

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px;
  border-bottom: 1px solid rgba(113,192,21,0.15);
  flex-shrink: 0;
}
.cart-header h3 {
  font-family: 'Fraunces', serif;
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--verde-oscuro);
  display: flex;
  align-items: center;
  gap: 10px;
}
.cart-close {
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: var(--crema);
  color: var(--gris-texto);
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  flex-shrink: 0;
}
.cart-close:hover { background: var(--verde-claro); color: var(--blanco); }

.cart-back {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--verde-oscuro);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
}
.cart-back:hover { color: var(--verde-claro); }

/* Pasos: se muestra items o checkout */
.cart-step { display: none; flex-direction: column; flex: 1; min-height: 0; }
.cart-drawer[data-step="items"]    .cart-step-items    { display: flex; }
.cart-drawer[data-step="checkout"] .cart-step-checkout { display: flex; }

.cart-body { flex: 1; overflow-y: auto; padding: 16px 24px; }

.cart-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--gris-suave);
}
.cart-empty-emoji { font-size: 3rem; display: block; margin-bottom: 14px; opacity: 0.7; }
.cart-empty p { font-weight: 700; color: var(--gris-texto); margin-bottom: 6px; font-size: 1.02rem; }
.cart-empty span { font-size: 0.88rem; }

/* Línea de producto en el carrito */
.cart-line {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  position: relative;
}
.cart-line-img {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  background: linear-gradient(135deg, rgba(113,192,21,0.15), rgba(11,118,30,0.1));
}
.cart-line-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cart-line-info { flex: 1; min-width: 0; }
.cart-line-info h5 {
  font-family: 'Fraunces', serif;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--verde-oscuro);
  margin-bottom: 2px;
}
.cart-line-precio { font-size: 0.78rem; color: var(--gris-suave); }
.cart-line-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}
.cart-line-sub {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--gris-texto);
  white-space: nowrap;
}
.cart-line-del {
  position: absolute;
  top: 12px;
  right: 0;
  width: 24px;
  height: 24px;
  border: none;
  background: none;
  color: var(--gris-suave);
  font-size: 0.85rem;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.2s, color 0.2s;
}
.cart-line-del:hover { background: rgba(220,53,69,0.1); color: #dc3545; }

/* Footer del carrito */
.cart-footer {
  padding: 20px 24px 24px;
  border-top: 1px solid rgba(113,192,21,0.15);
  flex-shrink: 0;
  background: var(--blanco);
}
.cart-total-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 4px;
}
.cart-total-row .lbl { font-weight: 600; color: var(--gris-texto); }
.cart-total-row .val {
  font-family: 'Fraunces', serif;
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--verde-oscuro);
}
.cart-total-note {
  font-size: 0.76rem;
  color: var(--gris-suave);
  margin-bottom: 16px;
}

.btn-checkout {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 50px;
  background: var(--verde-claro);
  color: var(--blanco);
  font-family: inherit;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(113,192,21,0.35);
}
.btn-checkout:hover:not(:disabled) {
  background: var(--verde-oscuro);
  transform: translateY(-2px);
}
.btn-checkout:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }

.btn-vaciar {
  width: 100%;
  margin-top: 10px;
  padding: 11px;
  border: none;
  background: none;
  color: var(--gris-suave);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  border-radius: 50px;
  transition: background 0.2s, color 0.2s;
}
.btn-vaciar:hover { background: rgba(220,53,69,0.1); color: #dc3545; }

/* ──────────────────────────────────────────
   CHECKOUT · FORMULARIO
────────────────────────────────────────── */
.checkout-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 24px 4px;
}
.checkout-head h4 {
  font-family: 'Fraunces', serif;
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--verde-oscuro);
}

.checkout-form { padding: 12px 24px 24px; }
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gris-texto);
  margin-bottom: 6px;
}
.field label .req { color: var(--verde-claro); }
.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.12);
  background: var(--crema);
  font-family: inherit;
  font-size: 0.92rem;
  color: var(--gris-texto);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { resize: vertical; min-height: 70px; }
.field input:focus,
.field textarea:focus {
  border-color: var(--verde-claro);
  box-shadow: 0 0 0 3px rgba(113,192,21,0.15);
}
.field input.field-error,
.field textarea.field-error {
  border-color: #dc3545;
  box-shadow: 0 0 0 3px rgba(220,53,69,0.12);
}

/* Selector entrega (retiro / envío) */
.entrega-opts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.entrega-opt {
  position: relative;
  cursor: pointer;
}
.entrega-opt input { position: absolute; opacity: 0; pointer-events: none; }
.entrega-opt .box {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 13px 14px;
  border: 2px solid rgba(0,0,0,0.1);
  border-radius: 14px;
  background: var(--crema);
  transition: border-color 0.2s, background 0.2s;
}
.entrega-opt .box .emo { font-size: 1.3rem; }
.entrega-opt .box .txt { font-size: 0.86rem; font-weight: 700; color: var(--gris-texto); }
.entrega-opt input:checked + .box {
  border-color: var(--verde-claro);
  background: rgba(113,192,21,0.1);
}

.oculto { display: none !important; }

.checkout-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--crema);
  border-radius: 14px;
  margin: 4px 0 16px;
}
.checkout-total .lbl { font-weight: 600; font-size: 0.9rem; }
.checkout-total .val {
  font-family: 'Fraunces', serif;
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--verde-oscuro);
}

.btn-enviar-wa {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px;
  border: none;
  border-radius: 50px;
  background: #25d366;
  color: var(--blanco);
  font-family: inherit;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(37,211,102,0.35);
}
.btn-enviar-wa:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(37,211,102,0.45);
}
.btn-enviar-wa svg { width: 24px; height: 24px; fill: currentColor; }

/* Botón carrito flotante (mobile) */
.cart-fab {
  position: fixed;
  bottom: 28px;
  left: 28px;
  z-index: 150;
  display: none;
  align-items: center;
  gap: 8px;
  background: var(--verde-oscuro);
  color: var(--blanco);
  border: none;
  cursor: pointer;
  padding: 14px 20px;
  border-radius: 50px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 6px 24px rgba(11,118,30,0.4);
}
.cart-fab svg { width: 20px; height: 20px; fill: currentColor; }

/* ──────────────────────────────────────────
   RESPONSIVE
────────────────────────────────────────── */
@media (max-width: 900px) {
  .store-hero { padding: 110px 24px 40px; }
  .price-banner { padding: 14px 24px; }
  .price-banner p { font-size: 0.86rem; }
  .store-toolbar { padding: 14px 24px; }
  .store-grid-wrap { padding: 32px 24px 90px; }
  .store-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
  .store-card-img { height: 140px; }

  /* El menú de links se oculta (igual que la home), pero el carrito sigue visible */
  .nav-links { display: none; }
  .nav-right { gap: 14px; }
  .nav-back { display: none; }
  .cart-fab { display: inline-flex; }
}

@media (max-width: 480px) {
  .store-search { max-width: 100%; }
  .store-grid { grid-template-columns: 1fr 1fr; }
  .store-card-body { padding: 14px; }
  .store-card-precio .precio { font-size: 1.2rem; }
}
