:root{
  --cream:#FEF4AF;
  --cream-soft:#FBF3D1;
  --blue:#1F3FA0;
  --blue-deep:#16245C;
  --blue-ink:#101B45;
  --pink:#E98AA0;
  --white:#FFFDF6;
  --line: rgba(22,36,92,0.12);
  --shadow: 0 10px 24px rgba(22,36,92,0.16);
  --radius: 18px;
  --radius-sm: 12px;
  --font-display: 'Tangerine', cursive;
  --font-head: 'Fraunces', serif;
  --font-body: 'Quicksand', sans-serif;
}

*{box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{
  margin:0;
  background:var(--cream);
  color:var(--blue-deep);
  font-family:var(--font-body);
  line-height:1.5;
}
.wrap{
  max-width:1100px;
  margin:0 auto;
  padding:0 24px;
}
img{max-width:100%;display:block;}
a{color:inherit;text-decoration:none;}
h1,h2,h3{font-family:var(--font-head); margin:0;}

/*===== HEADER =====*/
.site-header{
  position:sticky; top:0; z-index:50;
  background:rgba(247,233,160,0.92);
  backdrop-filter:blur(6px);
  border-bottom:1px solid var(--line);
}
.header-inner{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 24px;
}
.logo{
  display:block;
  line-height:0;
}
.logo img{
  height:46px;
  width:auto;
  display:block;
}
.main-nav{display:flex; gap:28px;}
.main-nav a{
  font-weight:600; font-size:0.95rem;
  color:var(--blue-deep);
  position:relative;
}
.main-nav a:hover{color:var(--blue);}
.cart-btn{
  position:relative;
  background:var(--blue); color:var(--white);
  border:none; border-radius:50%;
  width:42px; height:42px;
  display:flex; align-items:center; justify-content:center;
  cursor:pointer; box-shadow:var(--shadow);
}
.cart-count{
  position:absolute; top:-4px; right:-4px;
  background:var(--pink); color:var(--white);
  font-size:0.65rem; font-weight:700;
  width:18px; height:18px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
}

/* ===== HERO ===== */
.hero{
  position:relative;
  padding:72px 0 56px;
  text-align:center;
  overflow:hidden;
}
.hero-decor--star{
  position:absolute; top:120px; left:300px;
  width:120px; height:120px;
  background:#C7E04A;
  color:var(--blue-ink);
  font-weight:700; font-size:1.25rem; text-transform:uppercase;
  display:flex; align-items:center; justify-content:center;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  transform:rotate(-12deg);
}
.hero-eyebrow{
  color:var(--blue-deep);
  font-weight:600; letter-spacing:0.02em;
  margin-bottom:6px;
}
.hero-logo{
  width:min(420px, 80vw);
  margin:0 auto 18px;
}
.hero-copy{
  max-width:560px; margin:0 auto 30px; color:var(--blue-ink); font-size:1.05rem;
}
.hero-cta{display:flex; gap:14px; justify-content:center; flex-wrap:wrap;}

/* buttons */
.btn{
  display:inline-block; padding:13px 26px; border-radius:999px;
  font-weight:700; font-size:0.95rem; cursor:pointer; border:2px solid transparent;
  transition:transform .15s ease, box-shadow .15s ease;
}
.btn:hover{transform:translateY(-2px);}
.btn--primary{background:var(--blue); color:var(--white); box-shadow:var(--shadow);}
.btn--ghost{background:transparent; color:var(--blue-deep); border-color:var(--blue-deep);}
.btn--whatsapp{background:#1FA855; color:var(--white); border:none; width:100%; box-shadow:var(--shadow);}
.btn--block{width:100%;}
.btn--small{padding:8px 16px; font-size:0.85rem;}

/* ===== SECTIONS ===== */
section{padding:64px 0;}
.section-title{font-size:2.2rem; color:var(--blue); margin-bottom:6px;}
.section-sub{color:var(--blue-ink); opacity:0.8; margin-bottom:32px;}

/* how it works */
.how{background:var(--cream-soft); border-top:1px solid var(--line); border-bottom:1px solid var(--line);}
.how-grid{display:grid; grid-template-columns:repeat(3,1fr); gap:22px; margin-top:24px;}
.how-card{
  background:var(--white); border-radius:var(--radius); padding:26px;
  box-shadow:var(--shadow);
}
.how-num{
  display:inline-flex; align-items:center; justify-content:center;
  width:34px; height:34px; border-radius:50%; background:var(--blue); color:var(--white);
  font-weight:700; margin-bottom:12px;
}
.how-card h3{font-size:1.1rem; margin-bottom:6px; color:var(--blue-deep);}
.how-card p{margin:0; font-size:0.92rem; color:var(--blue-ink);}

/* product grid */
.product-grid{
  display:grid; grid-template-columns:repeat(auto-fill, minmax(220px,1fr));
  gap:20px;
}
.product-card{
  background:var(--white); border-radius:var(--radius);
  box-shadow:var(--shadow); padding:20px; cursor:pointer;
  border:2px solid transparent; transition:border-color .15s, transform .15s;
  text-align:left;
}
.product-card:hover{border-color:var(--blue); transform:translateY(-3px);}
.product-emoji{font-size:2.2rem; margin-bottom:10px;}
.product-card h3{font-size:1.05rem; color:var(--blue-deep); margin-bottom:4px;}
.product-card p{margin:0; font-size:0.85rem; color:var(--blue-ink); opacity:0.75;}
.product-price{
  margin-top:12px; font-weight:700; color:var(--blue); font-size:0.95rem;
}
.product-min{
  margin-top:4px; font-size:0.75rem; font-weight:700;
  color:var(--white); background:var(--blue-deep);
  display:inline-block; padding:2px 10px; border-radius:999px;
}

/* ===== MODAL ===== */
.modal-overlay{
  position:fixed; inset:0; background:rgba(16,27,69,0.55);
  display:none; align-items:center; justify-content:center; z-index:200; padding:20px;
}
.modal-overlay.open{display:flex;}
.modal{
  background:var(--white); border-radius:var(--radius);
  max-width:560px; width:100%; max-height:88vh; overflow-y:auto;
  padding:30px; position:relative; box-shadow:0 20px 50px rgba(16,27,69,0.4);
}
.modal-close{
  position:absolute; top:14px; right:14px; background:var(--cream);
  border:none; border-radius:50%; width:32px; height:32px; cursor:pointer; font-size:1rem;
}
.modal h2{color:var(--blue); font-size:1.6rem; margin-bottom:4px;}
.modal .modal-desc{color:var(--blue-ink); opacity:0.8; font-size:0.9rem; margin-bottom:18px;}
.field-group{margin-bottom:18px;}
.field-group > label.field-label{
  display:block; font-weight:700; font-size:0.9rem; margin-bottom:8px; color:var(--blue-deep);
}
.option-row{display:flex; flex-wrap:wrap; gap:8px;}
.option-pill{
  padding:8px 14px; border-radius:999px; border:2px solid var(--line);
  cursor:pointer; font-size:0.85rem; font-weight:600; background:var(--cream-soft);
}
.option-pill.selected{background:var(--blue); color:var(--white); border-color:var(--blue);}
.toggle-row{display:flex; align-items:center; justify-content:space-between; padding:10px 0; border-bottom:1px solid var(--line);}
.toggle-row:last-child{border-bottom:none;}
.toggle-row span.label{font-size:0.92rem; font-weight:600;}
.toggle-row span.extra{font-size:0.78rem; opacity:0.6; display:block; font-weight:400;}
.switch{position:relative; width:44px; height:24px; flex-shrink:0;}
.switch input{opacity:0; width:0; height:0;}
.slider-toggle{
  position:absolute; inset:0; background:#d8d2ad; border-radius:999px; cursor:pointer;
  transition: background 0.28s ease;
}
.slider-toggle:before{
  content:""; position:absolute; height:18px; width:18px; left:3px; top:3px;
  background:var(--white); border-radius:50%;
  box-shadow: 0 2px 5px rgba(16,27,69,0.22);
  transition: transform 0.55s cubic-bezier(0.34, 1.55, 0.64, 1),
              width 0.28s ease,
              box-shadow 0.2s ease;
}
/* compresión del thumb al presionar */
.switch:active .slider-toggle:before{
  width: 22px;
}
/* cuando está activado y se presiona, se comprime hacia la derecha */
.switch input:checked ~ .slider-toggle:before,
.switch input:checked + .slider-toggle:before{
  transform: translateX(20px);
}
.switch:active .slider-toggle:before{ width: 22px; }
.switch input:checked:active + .slider-toggle:before,
.switch input:checked + .slider-toggle:active:before {
  transform: translateX(18px);
  width: 22px;
}
.switch input:checked + .slider-toggle{ background:var(--blue); }
.switch input:checked + .slider-toggle:before{
  transform: translateX(20px);
  box-shadow: 0 2px 6px rgba(31,63,160,0.30);
}
.qty-row{display:flex; align-items:center; gap:12px;}
.qty-btn{
  width:36px; height:36px; border-radius:50%; border:2px solid var(--blue);
  background:var(--white); color:var(--blue); font-size:1.1rem; cursor:pointer; font-weight:700;
}
.qty-input{
  width:70px; text-align:center; padding:8px; border-radius:var(--radius-sm);
  border:2px solid var(--line); font-size:1rem; font-family:var(--font-body);
}
.modal-price{
  background:var(--cream-soft); border-radius:var(--radius-sm); padding:16px;
  display:flex; justify-content:space-between; align-items:center; margin:18px 0;
}
.modal-price .unit{font-size:0.78rem; opacity:0.7;}
.modal-price .total{font-size:1.4rem; font-weight:700; color:var(--blue);}
.wholesale-tag{
  display:inline-block; margin-top:4px; background:#C7E04A; color:var(--blue-ink);
  font-size:0.72rem; font-weight:700; padding:3px 10px; border-radius:999px;
}

/* ===== CART PANEL ===== */
.cart-overlay{
  position:fixed; inset:0; background:rgba(16,27,69,0.45);
  display:flex; justify-content:flex-end; z-index:180;
}
.cart-overlay.open{display:flex;}
.cart-panel{
  background:var(--white); width:100%; max-width:380px; height:100%;
  display:flex; flex-direction:column; box-shadow:-12px 0 30px rgba(16,27,69,0.3);
}
.cart-panel-head{
  display:flex; justify-content:space-between; align-items:center;
  padding:18px 20px; border-bottom:1px solid var(--line);
}
.cart-panel-head h3{color:var(--blue);}
.cart-panel-head button{background:none; border:none; font-size:1.1rem; cursor:pointer;}
.cart-panel-body{flex:1; overflow-y:auto; padding:14px 20px;}
.cart-panel-foot{padding:16px 20px; border-top:1px solid var(--line);}
.cart-item{
  display:flex; justify-content:space-between; gap:10px; padding:12px 0;
  border-bottom:1px solid var(--line); font-size:0.88rem;
}
.cart-item-info b{display:block; color:var(--blue-deep);}
.cart-item-info span{opacity:0.7; font-size:0.8rem;}
.cart-item-remove{background:none; border:none; color:var(--pink); cursor:pointer; font-size:0.8rem; font-weight:700;}

/* ===== QUOTE SECTION ===== */
.quote-date-row{
  background:var(--white); border-radius:var(--radius-sm); box-shadow:var(--shadow);
  padding:16px 18px; display:flex; align-items:center; gap:14px;
  margin-bottom:14px; flex-wrap:wrap;
}
.quote-date-label{
  font-weight:700; font-size:0.95rem; color:var(--blue-deep); white-space:nowrap;
}
.quote-date-input{
  font-family:var(--font-body); padding:9px 14px;
  border-radius:var(--radius-sm); border:2px solid var(--line);
  font-size:0.95rem; color:var(--blue-deep); background:var(--cream-soft);
}
.quote-date-input:focus{ outline:none; border-color:var(--blue); }
.quote-empty{
  background:var(--white); border-radius:var(--radius); padding:30px;
  text-align:center; box-shadow:var(--shadow); color:var(--blue-ink);
}
.quote-empty a{color:var(--blue); font-weight:700; text-decoration:underline;}
.quote-list{display:flex; flex-direction:column; gap:14px;}
.quote-row{
  background:var(--white); border-radius:var(--radius-sm); box-shadow:var(--shadow);
  padding:16px 18px; display:flex; justify-content:space-between; gap:14px; align-items:center;
}
.quote-row-info b{display:block; color:var(--blue-deep);}
.quote-row-info span{font-size:0.82rem; opacity:0.7;}
.quote-row-price{text-align:right; font-weight:700; color:var(--blue); white-space:nowrap;}
.quote-totals{
  margin-top:22px; background:var(--white); border-radius:var(--radius);
  box-shadow:var(--shadow); padding:22px;
}
.quote-totals-row{display:flex; justify-content:space-between; padding:6px 0; font-size:0.95rem;}
.quote-totals-row--final{font-size:1.3rem; font-weight:700; color:var(--blue); border-top:1px solid var(--line); margin-top:6px; padding-top:14px;}
.quote-note{font-size:0.78rem; opacity:0.65; margin:10px 0 18px;}
.quote-actions{display:flex; flex-direction:column; gap:10px;}

/* ===== CONTACT ===== */
.contacto{background:var(--cream-soft); border-top:1px solid var(--line);}
.contacto-inner{display:grid; grid-template-columns:1.3fr 1fr; gap:46px;}
.contact-form{display:flex; flex-direction:column; gap:16px; margin-top:20px;}
.contact-form label{font-weight:600; font-size:0.88rem; display:flex; flex-direction:column; gap:6px;}
.contact-form input, .contact-form textarea{
  font-family:var(--font-body); padding:11px 14px; border-radius:var(--radius-sm);
  border:2px solid var(--line); font-size:0.95rem; resize:vertical;
}
.form-hint{font-size:0.82rem; color:var(--blue); min-height:1.2em;}
.contacto-side h3{color:var(--blue); margin:18px 0 10px;}
.contacto-side h3:first-child{margin-top:0;}
.social-row{display:flex; flex-direction:column; gap:10px;}
.social-row a{
  display:flex; align-items:center; gap:10px; background:var(--white);
  padding:10px 14px; border-radius:999px; font-weight:600; box-shadow:var(--shadow);
}
.muted{font-size:0.88rem; opacity:0.75;}

/* footer */
.site-footer{padding:26px 0; text-align:center; font-size:0.82rem; color:var(--blue-ink); opacity:0.7;}

/* responsive */
@media (max-width:760px){
  .main-nav{display:none;}
  .hero-logo{width:78vw;}
  .how-grid{grid-template-columns:1fr;}
  .contacto-inner{grid-template-columns:1fr;}
}

/* ===== SECCIÓN EVENTOS — GRID ESTÁTICO ===== */
.eventos{padding:64px 0;}
.eventos-grid{
  display:grid;
  grid-template-columns:repeat(5,1fr);
  gap:16px;
  margin-top:32px;
  width:100%;
  padding:0 24px;
  box-sizing:border-box;
}
.evento-card{
  border-radius:var(--radius);
  overflow:hidden;
  background:var(--blue-deep);
  position:relative;
  aspect-ratio:1/1.6;
  box-shadow:var(--shadow);
}
.evento-card img{
  width:100%; height:100%; object-fit:cover; display:block;
}
.evento-card:nth-child(1){background:linear-gradient(145deg,#2850c0,#16245C);}
.evento-card:nth-child(2){background:linear-gradient(145deg,#e98aa0,#c0607a);}
.evento-card:nth-child(3){background:linear-gradient(145deg,#c8a840,#906020);}
.evento-card:nth-child(4){background:linear-gradient(145deg,#40a060,#206040);}
.evento-card:nth-child(5){background:linear-gradient(145deg,#9040c0,#602080);}
.evento-label{
  position:absolute; bottom:0; left:0; right:0;
  background:linear-gradient(transparent,rgba(16,27,69,0.85));
  color:#fff; font-weight:700; font-size:1.05rem;
  padding:48px 16px 20px; text-align:center;
  font-family:var(--font-body);
}
@media(max-width:760px){
  .eventos-grid{grid-template-columns:repeat(2,1fr);}
  .evento-card:last-child{grid-column:span 2;}
}
@media(max-width:480px){
  .eventos-grid{grid-template-columns:1fr;}
  .evento-card:last-child{grid-column:span 1;}
}

/* ===== IMÁGENES EN TARJETAS DEL CATÁLOGO ===== */
.product-img-wrap{
  width:100%; aspect-ratio:4/3; border-radius:var(--radius-sm);
  overflow:hidden; background:var(--cream-soft); margin-bottom:12px;
  display:flex; align-items:center; justify-content:center;
}
.product-img-wrap img{width:100%; height:100%; object-fit:cover; display:block;}
.product-img-placeholder{font-size:2.6rem; opacity:0.4;}

/* ===== IMAGEN EN MODAL ===== */
.modal-img-wrap{
  width:100%; aspect-ratio:4/3; border-radius:var(--radius-sm);
  overflow:hidden; background:var(--cream-soft); margin-bottom:18px;
  display:flex; align-items:center; justify-content:center;
}
.modal-img-wrap img{width:100%; height:100%; object-fit:cover; display:block; transition:opacity .25s;}
.modal-img-placeholder{font-size:3.5rem; opacity:0.35;}

/* ===== UPLOAD DISEÑO PERSONALIZADO ===== */
.upload-area{
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  border:2px dashed var(--blue); border-radius:var(--radius-sm);
  padding:28px 20px; background:var(--cream-soft); cursor:pointer;
  text-align:center; transition:background .15s, border-color .15s;
  gap:6px;
}
.upload-area:hover,.upload-area.drag-over{background:rgba(31,63,160,0.08); border-color:var(--blue-deep);}
.upload-icon{font-size:2rem;}
.upload-text{font-weight:600; font-size:0.92rem; color:var(--blue-deep);}
.upload-hint{font-size:0.78rem; opacity:0.65;}
.upload-error{color:#c0304a; font-size:0.8rem; margin:4px 0 0;}
.upload-warn{color:#b06000; font-size:0.82rem; margin:0 0 8px; background:#fff8e1; border-radius:8px; padding:8px 12px;}
.upload-preview{
  border:2px solid var(--blue); border-radius:var(--radius-sm);
  padding:12px; display:flex; flex-direction:column; gap:8px; align-items:center;
  background:var(--cream-soft);
}
.upload-preview img{max-height:140px; border-radius:6px; object-fit:contain;}
.upload-preview-name{font-size:0.82rem; font-weight:600; color:var(--blue-deep); word-break:break-all;}
.upload-remove{background:none; border:none; color:var(--pink); cursor:pointer; font-size:0.82rem; font-weight:700;}
.design-badge{
  display:inline-block; margin-top:3px; font-size:0.75rem;
  color:var(--blue); font-weight:600;
}
.btn--primary:disabled{opacity:0.45; cursor:not-allowed; transform:none !important;}
.desc-input{
  width:100%; font-family:var(--font-body); font-size:0.95rem;
  padding:11px 14px; border-radius:var(--radius-sm);
  border:2px solid var(--line); resize:vertical;
  background:var(--cream-soft);
}
.desc-input:focus{outline:none; border-color:var(--blue);}

/* ===== MODAL AVISO DISEÑOS ===== */
.design-notice-modal{max-width:480px;}
.design-notice-list{display:flex; flex-direction:column; gap:10px; margin-top:14px;}
.design-notice-item{
  display:flex; align-items:center; gap:12px;
  background:var(--cream-soft); border-radius:var(--radius-sm); padding:10px;
}
.design-notice-item img{width:56px; height:56px; object-fit:cover; border-radius:6px; flex-shrink:0;}
.design-notice-item span{font-size:0.85rem; font-weight:600; color:var(--blue-deep);}

/* ==========================================================================
   ANIMACIONES NINILY STUDIO (2, 4, 5, 7, 8, 10, 11, 12)
   ========================================================================== */

/* ── 2. Estrella NEW: oscilación ── */
@keyframes wobble {
  0%, 100% { transform: rotate(-12deg); }
  30%       { transform: rotate(-18deg) scale(1.08); }
  60%       { transform: rotate(-6deg) scale(0.96); }
}
.hero-decor--star { animation: wobble 3s ease-in-out infinite; }

/* ── 4. Modal: entrada con escala + fade ── */
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.92) translateY(16px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-overlay.open .modal {
  animation: modalIn 0.28s cubic-bezier(0.34, 1.3, 0.64, 1) both;
}

/* ── 5. Pills: pop al seleccionarse ── */
.option-pill {
  transition: background 0.18s, color 0.18s, border-color 0.18s, transform 0.15s;
}
.option-pill:active { transform: scale(0.93); }
.option-pill.selected { animation: pillPop 0.22s cubic-bezier(0.34, 1.5, 0.64, 1); }
@keyframes pillPop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.14); }
  100% { transform: scale(1); }
}

/* ── 7. Contador del carrito: rebote al agregar ── */
@keyframes badgeBounce {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.55); }
  65%  { transform: scale(0.88); }
  85%  { transform: scale(1.12); }
  100% { transform: scale(1); }
}
.cart-count.bump { animation: badgeBounce 0.45s cubic-bezier(0.34, 1.4, 0.64, 1); }

/* ── 8. Panel carrito: deslizamiento suave (requiere que .cart-overlay use opacity) ── */
.cart-overlay{
  opacity:0; visibility:hidden; pointer-events:none;
  transition: opacity 0.18s ease, visibility 0.18s ease;
  display:flex !important;
}
.cart-overlay.open{
  opacity:1; visibility:visible; pointer-events:all;
}
.cart-panel {
  transform: translateX(100%);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.cart-overlay.open .cart-panel {
  transform: translateX(0);
}

/* ── 10. Ripple en botones ── */
.btn--primary, .btn--whatsapp {
  position: relative;
  overflow: hidden;
}
.btn-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  transform: scale(0);
  animation: rippleAnim 0.5s linear;
  pointer-events: none;
}
@keyframes rippleAnim {
  to { transform: scale(4); opacity: 0; }
}

/* ── 11. Tarjetas catálogo: hover mejorado ── */
.product-card {
  transition: border-color 0.2s, transform 0.25s cubic-bezier(0.34, 1.4, 0.64, 1), box-shadow 0.2s;
}
.product-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 18px 36px rgba(22,36,92,0.22);
}

/* ── 12. How-cards: hover con elevación ── */
.how-card {
  transition: opacity 0.55s ease, transform 0.55s ease, box-shadow 0.2s;
}
.how-card:hover {
  transform: translateY(-6px) !important;
  box-shadow: 0 16px 32px rgba(22,36,92,0.2);
  transition: transform 0.22s cubic-bezier(0.34,1.4,0.64,1), box-shadow 0.2s, opacity 0.55s ease;
}

/* ── 3. Scroll reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── 9. ELIMINADO ── */
