/* ==========================================================================
   Catálogo público de MioShop — identidad propia (rosa suave, rosa antiguo, crema)
   ========================================================================== */
:root {
  --rosa: #e8457e; --rosa-d: #c92e65; --rosa-suave: #fbdbe6; --rosa-xs: #fff1f5; --antiguo: #c98b98;
  --crema: #fbf3ee; --crema-2: #f4e7de; --blanco: #fff; --negro: #1f1a1c; --gris: #6f6468; --linea: #efe3dc;
  --wa: #1fa855; --r: 18px;
  --head: 'Fredoka', 'Nunito', system-ui, sans-serif;
  --body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--body); color: var(--negro); background: var(--crema); font-size: 15.5px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
body.no-scroll { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: var(--rosa-d); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--head); font-weight: 700; line-height: 1.1; margin: 0 0 .4em; letter-spacing: -.01em; }
.wrap { width: min(100% - 32px, 1160px); margin-inline: auto; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon.sm { width: 16px; height: 16px; }

.demo-strip { display: flex; justify-content: center; gap: 14px; align-items: center; flex-wrap: wrap; background: var(--negro); color: #f3d9e2; font-size: .76rem; padding: 6px 12px; text-align: center; }
.demo-strip a { color: #fff; font-weight: 800; }
.strip-btn { text-decoration: none; background: rgba(255, 255, 255, .12); padding: 3px 10px; border-radius: 99px; }

/* Encabezado */
.shop-header { position: sticky; top: 0; z-index: 40; background: rgba(255, 255, 255, .94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--linea); }
.shop-header .wrap { display: flex; align-items: center; gap: 16px; height: 70px; }
.shop-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--negro); }
.shop-brand img { width: 48px; height: 48px; border-radius: 50%; }
.shop-brand b { font-family: var(--head); font-size: 1.35rem; display: block; line-height: 1; }
.shop-brand small { color: var(--antiguo); font-weight: 800; font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; }
.shop-search { flex: 1; max-width: 460px; margin-left: auto; position: relative; display: block; }
.shop-search .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--antiguo); }
.shop-search input { width: 100%; border: 1.5px solid var(--linea); background: var(--crema); border-radius: 99px; padding: 11px 16px 11px 40px; outline: none; }
.shop-search input:focus { border-color: var(--rosa); background: #fff; }
.cart-btn { position: relative; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--rosa); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 8px 18px -8px var(--rosa); flex: none; }
.cart-btn span { position: absolute; top: -4px; right: -4px; min-width: 21px; height: 21px; border-radius: 99px; background: var(--negro); color: #fff; font-size: .72rem; font-weight: 800; display: grid; place-items: center; padding: 0 5px; border: 2px solid #fff; }
.cart-btn.bump { animation: bump .4s; }
@keyframes bump { 40% { transform: scale(1.18); } }

/* Banner */
.banner { position: relative; overflow: hidden; }
.banner img.banner-img { width: 100%; max-height: 420px; object-fit: cover; }
.hero-mio { background: radial-gradient(circle at 85% 20%, var(--rosa-suave), transparent 55%), linear-gradient(180deg, #fff 0%, var(--crema) 100%); }
.hero-mio .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 30px; align-items: center; padding: 38px 0 34px; }
.hero-mio .tag { display: inline-flex; gap: 6px; align-items: center; background: #fff; color: var(--rosa-d); padding: 6px 12px; border-radius: 99px; font-weight: 800; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; box-shadow: 0 6px 16px -10px rgba(201, 46, 101, .6); }
.hero-mio h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); margin: 14px 0 10px; }
.hero-mio h1 em { font-style: normal; color: var(--rosa); }
.hero-mio p { color: var(--gris); font-size: 1.08rem; max-width: 460px; }
.hero-mio .hero-ctas { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.hero-mio .badges { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.hero-mio .badges span { display: inline-flex; gap: 6px; align-items: center; background: #fff; border-radius: 14px; padding: 8px 12px; font-weight: 800; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.hero-mio .badges span:nth-child(1) .icon { color: var(--rosa); }
.hero-mio .badges span:nth-child(2) .icon { color: #e3a21a; }
.hero-mio .badges span:nth-child(3) .icon { color: #9a63d6; }
.collage { position: relative; height: 340px; }
.collage img { position: absolute; width: 46%; aspect-ratio: 3/4; object-fit: cover; border-radius: 22px; border: 5px solid #fff; box-shadow: 0 24px 40px -22px rgba(80, 30, 50, .5); }
.collage img:nth-child(1) { left: 0; top: 26px; transform: rotate(-5deg); }
.collage img:nth-child(2) { left: 27%; top: 0; z-index: 2; }
.collage img:nth-child(3) { right: 0; top: 34px; transform: rotate(5deg); }
.collage .sticker { position: absolute; z-index: 3; bottom: 6px; left: 34%; background: var(--rosa); color: #fff; font-family: var(--head); padding: 8px 16px; border-radius: 99px; font-size: 1.05rem; transform: rotate(-4deg); box-shadow: 0 10px 20px -10px var(--rosa); }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 99px; padding: 12px 20px; font-weight: 800; cursor: pointer; text-decoration: none; transition: transform .15s, background .2s; font-size: .95rem; line-height: 1.2; }
.btn:active { transform: scale(.98); }
.btn.rosa { background: var(--rosa); color: #fff; box-shadow: 0 10px 20px -12px var(--rosa); }
.btn.rosa:hover { background: var(--rosa-d); }
.btn.negro { background: var(--negro); color: #fff; }
.btn.wa { background: var(--wa); color: #fff; }
.btn.wa:hover { background: #178c46; }
.btn.claro { background: #fff; color: var(--negro); border: 1.5px solid var(--linea); }
.btn.block { width: 100%; }
.btn.sm { padding: 8px 14px; font-size: .85rem; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.pill { display: inline-flex; gap: 6px; align-items: center; border: 1.5px solid var(--linea); background: #fff; border-radius: 99px; padding: 8px 14px; font-weight: 700; cursor: pointer; font-size: .88rem; }
.pill.on { background: var(--negro); color: #fff; border-color: var(--negro); }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--linea); background: #fff; cursor: pointer; }

/* Categorías */
.cats { display: flex; gap: 8px; overflow-x: auto; padding: 20px 0 6px; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cat { flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; border: 0; background: none; cursor: pointer; font-weight: 800; font-size: .82rem; color: var(--gris); min-width: 74px; }
.cat .ci { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; background: var(--rosa-suave); display: grid; place-items: center; border: 3px solid transparent; transition: border .2s; }
.cat .ci img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.cat .ci .icon { color: var(--rosa); width: 26px; height: 26px; }
.cat.on { color: var(--negro); }
.cat.on .ci { border-color: var(--rosa); }

/* Promo y destacados */
.promo-band { margin: 16px 0 0; background: linear-gradient(90deg, var(--rosa), var(--antiguo)); color: #fff; border-radius: var(--r); padding: 14px 18px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.promo-band b { font-family: var(--head); font-size: 1.2rem; }
.promo-band .btn { margin-left: auto; background: #fff; color: var(--rosa-d); }
.sec-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 28px 0 12px; }
.sec-title h2 { font-size: 1.55rem; margin: 0; }
.sec-title small { color: var(--antiguo); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(170px, 210px); gap: 14px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.rail .card { scroll-snap-align: start; }

/* Catálogo */
.cat-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 30px 0 14px; flex-wrap: wrap; }
.cat-head h2 { font-size: 1.55rem; margin: 0; }
.filters { display: flex; gap: 8px; }
.filters select { border: 1.5px solid var(--linea); border-radius: 99px; padding: 8px 14px; background: #fff; font-weight: 700; }
.filter-panel { background: #fff; border-radius: var(--r); padding: 16px; margin-bottom: 16px; display: grid; gap: 14px; border: 1px solid var(--linea); }
.filter-panel h4 { font-family: var(--body); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--gris); margin: 0 0 8px; }
.fl-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.dot { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1.5px var(--linea); cursor: pointer; }
.dot.on { box-shadow: 0 0 0 2.5px var(--negro); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; padding-bottom: 50px; }
.card { background: #fff; border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 1px 2px rgba(80, 30, 50, .05); transition: transform .2s, box-shadow .2s; cursor: pointer; border: 0; padding: 0; text-align: left; }
.card:hover { transform: translateY(-3px); box-shadow: 0 18px 30px -20px rgba(80, 30, 50, .4); }
.card .pic { position: relative; aspect-ratio: 3/4; background: var(--crema-2); overflow: hidden; }
.card .pic img, .card .pic .ph { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .pic img { transform: scale(1.04); }
.card .tags { position: absolute; top: 10px; left: 10px; display: flex; flex-direction: column; gap: 5px; align-items: flex-start; }
.tag-s { background: #fff; color: var(--negro); font-size: .7rem; font-weight: 800; padding: 4px 9px; border-radius: 99px; }
.tag-s.rosa { background: var(--rosa); color: #fff; }
.tag-s.out { background: var(--negro); color: #fff; }
.tag-s.low { background: #fff4d6; color: #8a5a00; }
.card .quick { position: absolute; right: 10px; bottom: 10px; width: 40px; height: 40px; border-radius: 50%; background: #fff; display: grid; place-items: center; color: var(--rosa); box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .3); border: 0; cursor: pointer; }
.card .body { padding: 12px 14px 14px; display: grid; gap: 3px; }
.card .name { font-weight: 800; font-size: .95rem; line-height: 1.25; }
.card .price { font-family: var(--head); font-size: 1.15rem; color: var(--rosa-d); display: flex; gap: 8px; align-items: baseline; }
.card .price s { font-family: var(--body); color: var(--gris); font-size: .8rem; font-weight: 600; }
.card .sizes { color: var(--gris); font-size: .78rem; font-weight: 700; }
.card.sold { opacity: .72; }
.empty { text-align: center; padding: 50px 20px; color: var(--gris); grid-column: 1 / -1; }
.ph { position: relative; display: block; background: var(--crema-2); }
.ph-svg { width: 100%; height: 100%; display: block; }
.ph-tag { position: absolute; left: 8px; bottom: 8px; font-size: .64rem; font-weight: 800; background: rgba(255, 255, 255, .92); color: #7a6f68; padding: 2px 7px; border-radius: 99px; }

/* Detalle y modales */
.modal-wrap { position: fixed; inset: 0; background: rgba(31, 26, 28, .5); display: grid; place-items: center; padding: 18px; z-index: 100; opacity: 0; transition: opacity .2s; }
.modal-wrap.open { opacity: 1; }
.modal { background: #fff; border-radius: 24px; width: min(100%, 560px); max-height: calc(100vh - 36px); display: flex; flex-direction: column; transform: translateY(14px); transition: transform .22s; box-shadow: 0 30px 60px -20px rgba(31, 26, 28, .5); }
.modal-wrap.open .modal { transform: none; }
.modal.lg { width: min(100%, 900px); }
.modal.sm { width: min(100%, 420px); }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--linea); }
.modal-head h3 { margin: 0; font-size: 1.2rem; display: flex; gap: 8px; align-items: center; }
.modal-body { padding: 18px; overflow: auto; }
.modal-foot { padding: 14px 18px; border-top: 1px solid var(--linea); display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.detail { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.detail .pic { border-radius: 18px; overflow: hidden; aspect-ratio: 3/4; background: var(--crema-2); }
.detail .pic img, .detail .pic .ph { width: 100%; height: 100%; object-fit: cover; }
.detail h2 { font-size: 1.7rem; }
.detail .price { font-family: var(--head); font-size: 1.7rem; color: var(--rosa-d); display: flex; gap: 10px; align-items: baseline; }
.detail .price s { font-family: var(--body); font-size: 1rem; color: var(--gris); }
.detail .desc { color: var(--gris); }
.opt-title { font-weight: 800; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--gris); margin: 16px 0 8px; }
.opts { display: flex; gap: 8px; flex-wrap: wrap; }
.opt { min-width: 52px; padding: 10px 14px; border-radius: 14px; border: 1.5px solid var(--linea); background: #fff; font-weight: 800; cursor: pointer; display: grid; text-align: center; }
.opt small { font-weight: 700; font-size: .68rem; color: var(--gris); }
.opt.on { border-color: var(--rosa); background: var(--rosa-xs); color: var(--rosa-d); }
.opt[disabled] { opacity: .4; cursor: not-allowed; text-decoration: line-through; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--linea); border-radius: 99px; overflow: hidden; background: #fff; }
.qty button { border: 0; background: none; width: 36px; height: 36px; cursor: pointer; display: grid; place-items: center; }
.qty span { min-width: 28px; text-align: center; font-weight: 800; }
.detail .actions { display: grid; gap: 10px; margin-top: 20px; }
.stock-note { font-weight: 700; font-size: .86rem; margin-top: 10px; color: var(--gris); }
.stock-note.low { color: #a2620a; }

/* Carrito */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(100%, 420px); background: #fff; z-index: 90; transform: translateX(105%); transition: transform .28s ease; display: flex; flex-direction: column; box-shadow: -20px 0 50px -20px rgba(0, 0, 0, .3); }
.drawer.open { transform: none; }
.drawer-scrim { position: fixed; inset: 0; background: rgba(31, 26, 28, .45); z-index: 85; opacity: 0; pointer-events: none; transition: opacity .25s; }
.drawer.open + .drawer-scrim { opacity: 1; pointer-events: auto; }
.d-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--linea); }
.d-head h3 { margin: 0; }
.d-lines { flex: 1; overflow: auto; padding: 6px 18px; }
.line { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--linea); align-items: center; }
.line .th { width: 64px; height: 80px; border-radius: 12px; overflow: hidden; background: var(--crema-2); }
.line .th img, .line .th .ph { width: 100%; height: 100%; object-fit: cover; }
.line .th .ph-tag { display: none; }
.line b { display: block; font-size: .92rem; line-height: 1.25; }
.line small { color: var(--gris); font-weight: 700; }
.line .r { display: grid; gap: 8px; justify-items: end; }
.line .r b { font-family: var(--head); color: var(--rosa-d); }
.line .rm { border: 0; background: none; color: var(--gris); cursor: pointer; font-size: .76rem; font-weight: 700; text-decoration: underline; }
.d-foot { padding: 16px 18px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--linea); display: grid; gap: 10px; background: var(--crema); }
.d-total { display: flex; justify-content: space-between; align-items: baseline; }
.d-total b { font-family: var(--head); font-size: 1.6rem; }
.d-note { font-size: .78rem; color: var(--gris); margin: 0; text-align: center; }
label.f { display: grid; gap: 6px; font-weight: 800; font-size: .86rem; margin-bottom: 12px; }
label.f input, label.f select, label.f textarea { width: 100%; padding: 12px 14px; border: 1.5px solid var(--linea); border-radius: 14px; outline: none; background: #fff; font-weight: 600; }
label.f input:focus, label.f textarea:focus, label.f select:focus { border-color: var(--rosa); }
.seg2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.seg2 button { padding: 11px; border-radius: 14px; border: 1.5px solid var(--linea); background: #fff; font-weight: 800; cursor: pointer; }
.seg2 button.on { border-color: var(--rosa); background: var(--rosa-xs); color: var(--rosa-d); }
.summary { background: var(--crema); border-radius: 16px; padding: 12px 14px; margin-bottom: 14px; font-size: .88rem; }
.summary .r { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; }
.summary .t { font-weight: 800; font-size: 1rem; border-top: 1px dashed var(--linea); margin-top: 6px; padding-top: 8px; }
.qr-pay { display: grid; grid-template-columns: 200px 1fr; gap: 18px; align-items: start; }
.qr-box { background: #fff; border-radius: 18px; padding: 12px; border: 2px solid var(--rosa-suave); text-align: center; }
.qr-box img, .qr-box svg { width: 100%; aspect-ratio: 1; object-fit: contain; }
.qr-box small { display: block; color: var(--gris); font-weight: 700; font-size: .72rem; margin-top: 6px; }
.amount { background: var(--negro); color: #fff; border-radius: 16px; padding: 12px 14px; margin-bottom: 12px; }
.amount small { display: block; color: #f3c9d7; font-weight: 700; font-size: .76rem; }
.amount b { font-family: var(--head); font-size: 1.8rem; }
.steps { padding-left: 18px; margin: 0 0 12px; font-size: .9rem; }
.steps li { margin-bottom: 6px; }
.upload { display: flex; align-items: center; gap: 10px; border: 2px dashed var(--rosa-suave); border-radius: 16px; padding: 12px; cursor: pointer; font-weight: 800; color: var(--rosa-d); background: var(--rosa-xs); }
.upload img { width: 46px; height: 58px; object-fit: cover; border-radius: 8px; }
.notice { font-size: .78rem; color: var(--gris); background: #fff8e6; border: 1px solid #f3e1b0; border-radius: 12px; padding: 8px 10px; margin: 12px 0 0; }
.done { text-align: center; }
.done .ok { width: 70px; height: 70px; border-radius: 50%; background: #e3f7ea; color: var(--wa); display: grid; place-items: center; margin: 0 auto 12px; }
.done .ok .icon { width: 36px; height: 36px; }
.msg-prev { white-space: pre-wrap; text-align: left; background: #e7fbe9; border-radius: 14px 14px 14px 4px; padding: 12px 14px; font-size: .86rem; margin: 14px 0; border: 1px solid #c8efcf; }

/* Pie */
.shop-footer { background: var(--negro); color: #e8d9df; padding: 36px 0 90px; }
.shop-footer .wrap { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; }
.f-brand { display: flex; gap: 14px; align-items: center; }
.f-brand img { width: 64px; height: 64px; border-radius: 50%; }
.f-brand b { font-family: var(--head); font-size: 1.2rem; color: #fff; }
.f-brand p { margin: 2px 0 0; color: #f3b9cc; }
.f-info p { display: flex; gap: 8px; align-items: center; margin: 0 0 8px; font-size: .9rem; }
.f-made { grid-column: 1 / -1; font-size: .78rem; color: #a7969c; margin: 10px 0 0; border-top: 1px solid #3a3134; padding-top: 14px; }
.f-made a { color: #fff; }
.wa-float { position: fixed; right: 18px; bottom: 18px; width: 56px; height: 56px; border-radius: 50%; background: var(--wa); color: #fff; display: grid; place-items: center; box-shadow: 0 12px 24px -10px rgba(31, 168, 85, .8); z-index: 30; }
.wa-float .icon { width: 28px; height: 28px; }

.toasts { position: fixed; bottom: 86px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; z-index: 200; width: min(92vw, 420px); }
.toast { display: flex; gap: 10px; align-items: center; background: var(--negro); color: #fff; padding: 12px 16px; border-radius: 16px; font-weight: 700; font-size: .9rem; animation: tin .25s; transition: opacity .3s; }
.toast.ok .icon { color: #ff9cbd; }
.toast.error .icon { color: #ffb4b4; }
.toast.out { opacity: 0; }
@keyframes tin { from { opacity: 0; transform: translateY(10px); } }

@media (max-width: 820px) {
  .hero-mio .wrap { grid-template-columns: 1fr; padding-top: 24px; }
  .collage { height: 270px; max-width: 420px; width: 100%; margin: 0 auto; }
  .detail { grid-template-columns: 1fr; }
  .detail .pic { max-height: 56vh; aspect-ratio: auto; }
  .qr-pay { grid-template-columns: 1fr; }
  .qr-box { max-width: 220px; margin: 0 auto; }
}
@media (max-width: 640px) {
  .shop-header .wrap { flex-wrap: wrap; height: auto; padding: 10px 0; gap: 10px; }
  .shop-search { order: 3; max-width: none; flex-basis: 100%; }
  .shop-brand img { width: 42px; height: 42px; }
  .cart-btn { margin-left: auto; }
  .grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .card .body { padding: 10px; }
  .card .name { font-size: .86rem; }
  .card .quick { width: 34px; height: 34px; }
  .modal-wrap { padding: 0; align-items: end; }
  .modal { border-radius: 24px 24px 0 0; max-height: 94vh; width: 100% !important; }
  .shop-footer .wrap { grid-template-columns: 1fr; }
  .demo-strip { font-size: .7rem; }
  .hero-mio h1 { font-size: 2.1rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

[hidden] { display: none !important; }
