/* =============================================
   FLORISTERÍA AMOR ES — Estilos principales
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400;1,600&family=DM+Sans:wght@300;400;500;600;700&display=swap');

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

:root {
  --vino:        #6b1a2a;
  --vino-dark:   #4a1020;
  --vino-deep:   #350b18;
  --vino-mid:    #8c2238;
  --vino-light:  #f5eaed;
  --vino-soft:   #eedde2;
  --gold:        #c9a84c;
  --gold-light:  #e8d5a3;
  --gold-pale:   #fdf8ee;
  --gold-dark:   #a07830;
  --cream:       #fdf6f0;
  --text-dark:   #1e0810;
  --text-mid:    #6b3040;
  --text-muted:  #9a6070;
  --border:      #d4b8be;
  --white:       #ffffff;
  --green-wa:    #25D366;
  --green-wa-h:  #1ebe5d;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--text-dark);
  min-height: 100vh;
}

/* =============================================
   HEADER
   ============================================= */
header {
  background: var(--vino-deep);
  border-bottom: 2px solid var(--gold);
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.logo-wrap {}
.logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--gold);
  font-style: italic;
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo-sub {
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.2em;
  color: var(--gold-light);
  text-transform: uppercase;
  opacity: 0.8;
  display: block;
  margin-top: -2px;
}

.cart-header-btn {
  background: var(--gold);
  color: var(--vino-deep);
  border: none;
  padding: 10px 20px;
  border-radius: 50px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  letter-spacing: 0.02em;
}
.cart-header-btn:hover { background: var(--gold-light); transform: scale(1.03); }

.cart-badge {
  background: var(--vino-deep);
  color: var(--gold);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* =============================================
   HERO
   ============================================= */
.hero {
  background: var(--vino);
  padding: 5rem 2rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-bottom: 3px solid var(--gold);
}
.hero-deco {
  position: absolute;
  font-size: 180px;
  opacity: 0.06;
  color: var(--gold);
  pointer-events: none;
  line-height: 1;
}
.hero-deco-1 { top: -30px; right: -10px; }
.hero-deco-2 { bottom: -50px; left: -10px; }

.hero-tag {
  display: inline-block;
  background: rgba(201,168,76,0.18);
  border: 1px solid var(--gold);
  color: var(--gold-light);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 6px 18px;
  border-radius: 50px;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 400;
  line-height: 1.15;
  color: var(--white);
  margin-bottom: 0.5rem;
}
.hero h1 em { color: var(--gold); font-style: italic; }

.hero p {
  font-size: 15px;
  color: rgba(255,255,255,0.72);
  max-width: 460px;
  margin: 1rem auto 0;
  line-height: 1.7;
}

/* =============================================
   GOLD DIVIDER
   ============================================= */
.gold-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 1.5rem 1rem 0;
  max-width: 1200px;
  margin: 0 auto;
}
.gold-divider::before, .gold-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gold);
  opacity: 0.3;
}
.gold-divider span { color: var(--gold); font-size: 15px; opacity: 0.7; }

/* =============================================
   PAGE BODY (Catalog + Sidebar)
   ============================================= */
.page-body {
  display: flex;
  align-items: flex-start;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
  gap: 28px;
}

.catalog-col { flex: 1; min-width: 0; }

/* =============================================
   FILTERS
   ============================================= */
.filters {
  padding: 1.2rem 0 0.6rem;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.filter-btn {
  background: var(--white);
  border: 1.5px solid var(--border);
  color: var(--vino);
  padding: 8px 18px;
  border-radius: 50px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.filter-btn.active,
.filter-btn:hover {
  background: var(--vino);
  border-color: var(--vino);
  color: var(--gold-light);
}

/* =============================================
   PRODUCT GRID
   ============================================= */
.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  padding: 1rem 0 2rem;
}

.card {
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform 0.22s, box-shadow 0.22s;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 32px rgba(107,26,42,0.14);
}

.card-img {
  width: 100%;
  height: 175px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 68px;
  position: relative;
}
.card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--gold);
  color: var(--vino-deep);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 50px;
}
.card-body { padding: 1rem 1.15rem 1.15rem; }
.card-category {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 4px;
}
.card-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--vino-dark);
  margin-bottom: 5px;
  line-height: 1.2;
}
.card-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 0.85rem;
}
.card-footer { display: flex; align-items: center; justify-content: space-between; }

.price {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--vino);
}
.price-currency { font-size: 12px; font-weight: 400; color: var(--text-muted); margin-right: 1px; }

.add-btn {
  background: var(--vino-light);
  color: var(--vino);
  border: 1.5px solid var(--vino);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  line-height: 1;
}
.add-btn:hover { background: var(--vino); color: var(--gold); transform: scale(1.1); }
.add-btn.added { background: var(--gold); color: var(--vino-deep); border-color: var(--gold); }

/* =============================================
   SIDEBAR CART
   ============================================= */
.sidebar-col {
  width: 310px;
  flex-shrink: 0;
  position: sticky;
  top: 88px;
  transition: width 0.35s ease, opacity 0.3s ease;
}
.sidebar-col.hidden {
  width: 0;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}

.sidebar-cart {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
}

.sidebar-cart-header {
  background: var(--vino-deep);
  border-bottom: 2px solid var(--gold);
  padding: 1rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sidebar-cart-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--gold);
}
.sidebar-cart-meta { display: flex; align-items: center; gap: 10px; }
.sidebar-cart-count { font-size: 12px; color: var(--gold-light); opacity: 0.8; }

.hide-cart-btn {
  background: rgba(201,168,76,0.15);
  border: 1px solid var(--gold);
  color: var(--gold);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  line-height: 1;
  font-family: inherit;
}
.hide-cart-btn:hover { background: rgba(201,168,76,0.35); }

.sidebar-items {
  padding: 0.5rem 1rem;
  max-height: 280px;
  overflow-y: auto;
}
.sidebar-items::-webkit-scrollbar { width: 4px; }
.sidebar-items::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.sidebar-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
}
.sidebar-empty-icon { font-size: 40px; margin-bottom: 8px; }
.sidebar-empty-text { font-size: 13px; line-height: 1.55; }

.s-item {
  display: flex;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--vino-light);
  align-items: center;
}
.s-item:last-child { border-bottom: none; }

.s-emoji {
  width: 44px;
  height: 44px;
  background: var(--vino-light);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}
.s-info { flex: 1; min-width: 0; }
.s-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--vino-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.s-price { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.s-qty { display: flex; align-items: center; gap: 5px; flex-shrink: 0; }
.qty-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--vino);
  background: var(--vino-light);
  color: var(--vino);
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  line-height: 1;
  font-family: inherit;
}
.qty-btn:hover { background: var(--vino); color: var(--gold); }
.qty-num { font-size: 13px; font-weight: 700; min-width: 18px; text-align: center; color: var(--vino-dark); }

/* =============================================
   SIDEBAR FOOTER (CHECKOUT)
   ============================================= */
.sidebar-footer {
  padding: 1rem 1.2rem 1.2rem;
  background: var(--cream);
  border-top: 1px solid var(--border);
}

.total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1rem;
}
.total-label { font-size: 11px; color: var(--text-muted); letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600; }
.total-price { font-family: 'Cormorant Garamond', serif; font-size: 24px; font-weight: 700; color: var(--vino); }

/* Selector de entrega */
.delivery-selector { margin-bottom: 1rem; }
.delivery-label-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-mid);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: block;
}
.delivery-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.delivery-opt {
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 10px 8px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
  background: var(--white);
}
.delivery-opt:hover { border-color: var(--vino); }
.delivery-opt.selected { border-color: var(--vino); background: var(--vino-light); }
.delivery-opt-icon { font-size: 20px; display: block; margin-bottom: 4px; }
.delivery-opt-name { font-size: 12px; font-weight: 700; color: var(--vino-dark); display: block; }
.delivery-opt-desc { font-size: 10px; color: var(--text-muted); display: block; margin-top: 2px; }

/* Campo dirección */
.address-field { margin-bottom: 0.85rem; display: none; }
.address-field.visible { display: block; }
.address-input {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  padding: 9px 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: var(--text-dark);
  background: var(--white);
  resize: none;
  outline: none;
}
.address-input:focus { border-color: var(--vino); }
.address-input::placeholder { color: var(--text-muted); }

/* Nota */
.note-input {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  padding: 9px 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: var(--text-dark);
  background: var(--white);
  resize: none;
  outline: none;
  margin-bottom: 0.85rem;
  display: block;
}
.note-input:focus { border-color: var(--vino); }
.note-input::placeholder { color: var(--text-muted); }

.whatsapp-btn {
  width: 100%;
  background: var(--green-wa);
  color: white;
  border: none;
  padding: 13px;
  border-radius: 50px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s, transform 0.15s;
}
.whatsapp-btn:hover { background: var(--green-wa-h); transform: scale(1.02); }
.whatsapp-btn:disabled { background: #c0b8b9; cursor: not-allowed; transform: none; }

/* =============================================
   CART FAB (botón flotante para reabrir)
   ============================================= */
.cart-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: var(--vino-deep);
  border: 2px solid var(--gold);
  color: var(--gold);
  border-radius: 50px;
  padding: 13px 22px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: none;
  align-items: center;
  gap: 9px;
  box-shadow: 0 4px 20px rgba(53,11,24,0.35);
  transition: background 0.2s, transform 0.15s;
  z-index: 200;
}
.cart-fab:hover { background: var(--vino); transform: scale(1.04); }
.cart-fab.visible { display: flex; }
.cart-fab-badge {
  background: var(--gold);
  color: var(--vino-deep);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* =============================================
   INFO SECTION
   ============================================= */
.info-section {
  background: var(--vino-deep);
  border-top: 3px solid var(--gold);
  border-bottom: 3px solid var(--gold);
  padding: 3rem 2rem;
}
.info-inner {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 2rem;
  text-align: center;
}
.info-item { color: var(--white); }
.info-icon { font-size: 28px; margin-bottom: 10px; }
.info-title {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 6px;
}
.info-text { font-size: 14px; color: rgba(255,255,255,0.76); line-height: 1.65; }
.info-links { display: flex; gap: 8px; justify-content: center; margin-top: 12px; flex-wrap: wrap; }
.info-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--gold);
  color: var(--vino-deep);
  padding: 7px 16px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s;
}
.info-link:hover { background: var(--gold-light); }

/* =============================================
   FOOTER
   ============================================= */
footer {
  background: var(--vino-deep);
  color: rgba(255,255,255,0.55);
  text-align: center;
  padding: 2rem;
  font-size: 12px;
  letter-spacing: 0.06em;
  border-top: 2px solid var(--gold);
}
footer .foot-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--gold);
  display: block;
  margin-bottom: 6px;
  font-style: italic;
}
footer a { color: var(--gold-light); text-decoration: none; }
footer a:hover { color: var(--gold); }

/* =============================================
   TOAST
   ============================================= */
.toast {
  display: none;
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--vino-deep);
  border: 1px solid var(--gold);
  color: var(--gold-light);
  padding: 11px 22px;
  border-radius: 50px;
  font-size: 13px;
  z-index: 300;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
  pointer-events: none;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* =============================================
   ANIMACIONES
   ============================================= */
@keyframes pulse-border {
  0%   { box-shadow: 0 0 0 0 rgba(201,168,76,0.55); }
  60%  { box-shadow: 0 0 0 8px rgba(201,168,76,0); }
  100% { box-shadow: none; }
}
.sidebar-cart.pulse { animation: pulse-border 0.6s ease-out; }

/* MODAL DE DETALLE */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(30,8,16,0.78);
  z-index: 500;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal-box {
  background: var(--white); border-radius: 20px;
  width: 100%; max-width: 680px; max-height: 90vh;
  overflow-y: auto; position: relative;
  transform: scale(0.95) translateY(16px);
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
  box-shadow: 0 24px 60px rgba(30,8,16,0.4);
}
.modal-overlay.open .modal-box { transform: scale(1) translateY(0); }

.modal-close {
  position: absolute; top: 14px; right: 14px;
  background: var(--vino-deep); border: 1.5px solid var(--gold);
  color: var(--gold); width: 34px; height: 34px;
  border-radius: 50%; font-size: 16px; font-weight: 700;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  z-index: 10; transition: background 0.2s; font-family: inherit;
}
.modal-close:hover { background: var(--vino); }

.modal-img-area {
  width: 100%; height: 440px;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.modal-main-img { width: 100%; height: 100%; object-fit: cover; }
.modal-emoji-display { font-size: 110px; }

.modal-badge {
  position: absolute; top: 14px; left: 14px;
  background: var(--gold); color: var(--vino-deep);
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 4px 12px; border-radius: 50px; z-index: 2;
}
.modal-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(53,11,24,0.72); border: 1.5px solid var(--gold);
  color: var(--gold); width: 38px; height: 38px; border-radius: 50%;
  font-size: 22px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s; z-index: 3; font-family: inherit;
}
.modal-nav:hover { background: var(--vino-deep); }
.modal-nav-prev { left: 12px; }
.modal-nav-next { right: 12px; }

.modal-counter {
  position: absolute; bottom: 12px; right: 14px;
  background: rgba(53,11,24,0.65); border: 1px solid var(--gold);
  color: var(--gold-light); font-size: 12px; font-weight: 600;
  padding: 3px 10px; border-radius: 50px; z-index: 3;
}
.modal-thumbs {
  display: flex; gap: 8px; padding: 10px 16px;
  overflow-x: auto; background: var(--vino-light);
  border-bottom: 1px solid var(--border);
}
.modal-thumb {
  width: 56px; height: 56px; object-fit: cover;
  border-radius: 8px; flex-shrink: 0;
  border: 2px solid transparent; cursor: pointer;
  transition: border-color 0.2s; opacity: 0.65;
}
.modal-thumb:hover { opacity: 1; }
.modal-thumb.active { border-color: var(--gold); opacity: 1; }

.modal-info { padding: 1.4rem 1.6rem 1.6rem; }
.modal-category { font-size: 10px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold-dark); margin-bottom: 6px; }
.modal-name { font-family: 'Cormorant Garamond', serif; font-size: 26px; font-weight: 700; color: var(--vino-dark); margin-bottom: 10px; line-height: 1.2; }
.modal-desc { font-size: 14px; color: var(--text-muted); line-height: 1.7; margin-bottom: 1.4rem; }
.modal-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.modal-price { font-family: 'Cormorant Garamond', serif; font-size: 28px; font-weight: 700; color: var(--vino); }

.modal-add-btn {
  background: var(--vino); color: var(--gold-light);
  border: none; padding: 13px 24px; border-radius: 50px;
  font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 700;
  cursor: pointer; transition: all 0.2s; white-space: nowrap;
}
.modal-add-btn:hover { background: var(--vino-dark); transform: scale(1.03); }
.modal-add-btn.added { background: var(--gold); color: var(--vino-deep); }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
  .page-body { flex-direction: column; padding: 0 1rem 2rem; }
  .sidebar-col { width: 100%; position: static; }
  .sidebar-col.hidden { width: 100%; height: 0; overflow: hidden; }
  .products { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
  .hero { padding: 3rem 1.5rem 2.5rem; }
  header { padding: 0 1rem; }
}
.card-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.3s ease;
}

.card-img-dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  transition: background 0.3s;
}

.dot.active {
  background: var(--gold);
}