:root {
  --primary:   #FF6B35;
  --primary-d: #f84b06;
  --green:     #25D366;
  --green-d:   #1da851;
  --dark:      #1a1a2e;
  --card-bg:   #ffffff;
  --page-bg:   #FFF8F4;
  --text:      #050505;
  --muted:     #6b6b6b;
  --radius:    18px;
  --shadow:    0 6px 24px rgba(0,0,0,.10);
  --shadow-h:  0 12px 36px rgba(255,107,53,.22);
}

* { box-sizing: border-box; }

body {
  font-family: 'Nunito', sans-serif;
  color: var(--text);
  font-size: 18px;

  /* DISEÑO: Ondas fluidas de fondo */
  background-color: #f3ebe1 !important;
  background-image: 
    radial-gradient(circle at 100% 150%, #f3ebe1 24%, #ebe1d5 25%, #ebe1d5 28%, #f3ebe1 29%, #f3ebe1 36%, #ebe1d5 37%, #ebe1d5 40%, transparent 41%),
    radial-gradient(circle at 0% 0%, #ffffff 10%, #ebe1d5 11%, #ebe1d5 14%, #f3ebe1 15%, #f3ebe1 24%, #ebe1d5 25%, #ebe1d5 28%, transparent 29%) !important;
  background-size: 80px 80px !important;
}

/* ── HEADER ───────────────────────────────────── */
header {
  background: linear-gradient(135deg, #F2A134 0%, #F2A134 100%);
  color: #1B365D !important;
  padding: 2.4rem 1rem;
  text-align: center;
  box-shadow: 0 4px 16px rgba(240, 239, 239, 0.35);
}
header h1 { 
  font-size: clamp(1.6rem, 5vw, 2.4rem); 
  font-weight: 900; 
  margin: 0; 
  letter-spacing: -0.5px; 
  color: #1B365D !important; 
}
header p  { 
  margin: .3rem 0 0; 
  font-size: 1.05rem; 
  font-weight: 700; 
  color: #1B365D !important; 
  opacity: 1 !important; 
}

/* carrito badge en header */
#cart-btn {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: #010911;
  color: var(--primary);
  border: none;
  border-radius: 50px;
  padding: .45rem 1rem;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: .4rem;
  box-shadow: 0 2px 10px rgba(0,0,0,.15);
  transition: transform .15s;
}
#cart-btn:active { transform: translateY(-50%) scale(.95); }
#cart-count {
  background: var(--primary);
  color: hsl(0, 0%, 100%);
  border-radius: 50%;
  width: 26px; height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  font-weight: 900;
  transition: transform .2s;
}
#cart-count.bump { transform: scale(1.5); }

/* ── SECCIÓN CATÁLOGO ─────────────────────────── */
#catalog { padding: 2rem 1rem 3rem; }

#catalog h2 {
  font-size: clamp(1.35rem, 4vw, 1.9rem);
  font-weight: 900;
  text-align: center;
  margin-bottom: 1.8rem;
  color: var(--dark);
}

#catalog-tools h2 {
  font-size: clamp(1.35rem, 4vw, 1.9rem);
  font-weight: 900;
  text-align: center;
  margin-bottom: 1.8rem;
  color: var(--dark);
}

/* ── TARJETAS ─────────────────────────────────── */
.product-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .25s, box-shadow .25s;
  height: 100%;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-h);
}
.product-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-bottom: 3px solid #ffe5d9;
}
.card-body-inner {
  padding: 1.1rem 1.1rem 1.3rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.prod-name  { font-size: 1.15rem; font-weight: 800; margin-bottom: .25rem; }
.prod-price { font-size: 1.35rem; font-weight: 900; color: var(--primary); margin-bottom: .9rem; }
.btn-add {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: .65rem 1.2rem;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  transition: background .18s, transform .15s;
  margin-top: auto;
}
.btn-add:hover  { background: var(--primary-d); }
.btn-add:active { transform: scale(.96); }
.btn-add.added  { background: #2D6A4F; }

/* ── MODAL CARRITO ────────────────────────────── */
.modal-content { border-radius: var(--radius); border: none; }
.modal-header  {
  background: linear-gradient(135deg, var(--primary), #ff9a62);
  color: #fff;
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 1.2rem 1.5rem;
}
.modal-title { font-size: 1.4rem; font-weight: 900; }
.modal-header .btn-close { filter: brightness(0) invert(1); }

/* items del carrito */
#cart-items-list { list-style: none; padding: 0; margin: 0; }
#cart-items-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .75rem .5rem;
  border-bottom: 1px solid #f0e8e3;
  font-size: 1.05rem;
}
#cart-items-list li:last-child { border-bottom: none; }
.item-info  { flex: 1; }
.item-name  { font-weight: 700; }
.item-price { color: var(--primary); font-weight: 800; font-size: 1.1rem; }
.qty-ctrl   { display: flex; align-items: center; gap: .5rem; margin: 0 .8rem; }
.qty-btn    {
  background: #f0e8e3;
  border: none;
  border-radius: 50%;
  width: 32px; height: 32px;
  font-size: 1.15rem;
  font-weight: 900;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.qty-btn:hover  { background: var(--primary); color: #fff; }
.qty-num  { font-weight: 800; font-size: 1.05rem; min-width: 22px; text-align: center; }
.btn-remove {
  background: none;
  border: none;
  color: #c0392b;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0 .3rem;
}

#cart-total-row {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--dark);
  display: flex;
  justify-content: space-between;
  padding: .9rem .5rem 0;
  border-top: 2px solid #ffe5d9;
  margin-top: .5rem;
}
#cart-total-price { color: var(--primary); }

#empty-msg {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--muted);
  font-size: 1.1rem;
}
#empty-msg i { font-size: 3rem; display: block; margin-bottom: .7rem; color: #ddd; }

/* botón WhatsApp */
.btn-wsp {
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: .9rem 1.5rem;
  font-size: 1.15rem;
  font-weight: 900;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  cursor: pointer;
  transition: background .18s, transform .15s;
  animation: pulse-green 2.2s infinite;
}
.btn-wsp:hover  { background: var(--green-d); animation: none; }
.btn-wsp:active { transform: scale(.97); }
@keyframes pulse-green {
  0%,100% { box-shadow: 0 0 0 0 rgba(37,211,102,.5); }
  60%      { box-shadow: 0 0 0 12px rgba(37,211,102,0); }
}

/* ── FOOTER ───────────────────────────────────── */
footer {
  background: var(--dark);
  color: rgba(255,255,255,.75);
  text-align: center;
  padding: 1.5rem 1rem;
  font-size: .95rem;
}

/* ── RESPONSIVE AJUSTES FINOS ─────────────────── */
@media (max-width: 576px) {
  header h1 { font-size: 1.35rem; }
  #cart-btn { padding: .4rem .75rem; font-size: .95rem; }
  .prod-name  { font-size: 1.05rem; }
  .prod-price { font-size: 1.2rem; }
}

/* accesibilidad: foco visible */
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
