/* La Botica y ficha de producto. Usa los tokens de styles.css. */
.page-store, .page-product { background: var(--paper); }
.h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.9rem, 3.4vw, 3rem); line-height: 1.02; letter-spacing: -.015em; }
.h3 em { font-style: italic; color: var(--apricot-lo); }
.h3--light { color: var(--on-dark); }
.h3--light em { color: var(--apricot-hi); }
.field { display: grid; gap: 6px; font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-2); }
.field select, .search input { font: inherit; font-size: .95rem; letter-spacing: 0; text-transform: none; color: var(--text); }
.field select { appearance: none; -webkit-appearance: none; width: 100%; padding: 13px 40px 13px 16px; border-radius: 16px; border: 1px solid var(--hair-l); background: #fffdf8 url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%230c2a2c' stroke-width='1.4' stroke-linecap='round'/></svg>") no-repeat right 16px center; cursor: pointer; transition: border-color .3s; }
.field select:hover { border-color: var(--text); }
.icon-btn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--hair-l); transition: background .3s var(--ease), transform .4s var(--ease); }
.icon-btn:hover { background: rgba(12, 42, 44, .06); }
.icon-btn:active { transform: scale(.94); }
.seg--3 { grid-template-columns: repeat(3, 1fr); min-width: 260px; }
.seg--3 .seg__thumb { width: calc(33.333% - 3.4px); }
.seg--3[data-v="perro"] .seg__thumb { transform: translateX(100%); }
.seg--3[data-v="gato"] .seg__thumb { transform: translateX(200%); }
#rt-species[data-v="gato"] .seg__thumb { transform: translateX(100%); }

/* Cabecera de la tienda */
.sh { position: relative; padding: 150px 0 clamp(60px, 8vw, 110px); background: var(--abyss); color: var(--on-dark); overflow: hidden; }
.sh__orb { position: absolute; right: -8%; top: -30%; width: min(70vw, 760px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--apricot) 38%, transparent), transparent 70%); filter: blur(10px); animation: drift 14s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translate(-6%, 8%) scale(1.08); } }
.sh__in { position: relative; display: grid; gap: 20px; justify-items: start; }
.sh__title { font-family: var(--serif); font-weight: 400; font-size: clamp(4.6rem, 15vw, 13rem); line-height: .86; letter-spacing: -.035em; }
.sh__title em { color: var(--apricot-hi); }
.sh__lead { max-width: 40rem; }
.sh__demo { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 999px; font-size: .84rem; color: var(--on-dark-2); border: 1px dashed rgba(241, 232, 214, .3); }
.sh__demo .ic { color: var(--sage); }

/* El dietista */
.ration { margin-top: calc(clamp(30px, 5vw, 60px) * -1); position: relative; z-index: 2; }
.ration__in { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(20px, 3vw, 48px); padding: clamp(22px, 3.2vw, 44px); }
.ration__head { display: grid; gap: 14px; align-content: start; }
.ration__p { color: var(--text-2); max-width: 30rem; }
.ration__form { display: grid; gap: 14px; align-content: start; }
.ration__row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end; }
.check { display: flex; align-items: center; gap: 10px; padding: 13px 4px; font-size: .95rem; cursor: pointer; }
.check input { position: absolute; opacity: 0; }
.check__box { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; border: 1.5px solid rgba(12, 42, 44, .4); color: transparent; transition: background .3s, color .3s, border-color .3s; }
.check input:checked + .check__box { background: var(--abyss); color: var(--on-dark); border-color: var(--abyss); }
.check input:focus-visible + .check__box { outline: 2px solid var(--apricot); outline-offset: 3px; }
.ration__out { grid-column: 1 / -1; display: grid; gap: 14px; padding-top: 20px; border-top: 1px solid var(--hair-l); }
.kcal { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.kcal b { font-family: var(--serif); font-weight: 400; font-size: clamp(2.6rem, 5vw, 4.2rem); line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kcal span { color: var(--text-2); font-size: .95rem; }
.rec { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.rec__item { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; padding: 10px 14px 10px 10px; border-radius: 20px; background: var(--cream); border: 1px solid var(--hair-l); transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.rec__item:hover { transform: translateY(-3px); box-shadow: 0 22px 36px -26px rgba(12, 42, 44, .5); }
.rec__item img { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; }
.rec__n { font-weight: 500; font-size: .92rem; line-height: 1.25; }
.rec__g { font-family: var(--serif); font-size: 1.5rem; line-height: 1; text-align: right; white-space: nowrap; }
.rec__g small { display: block; font-family: var(--sans); font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-2); margin-top: 4px; }
.ration__note { font-size: .8rem; color: var(--text-2); }

/* Barra de filtros */
.shop-bar { padding-top: clamp(40px, 6vw, 72px); display: grid; gap: 14px; }
.shop-bar__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.tab { padding: 10px 16px; border-radius: 999px; font-size: .9rem; color: var(--text-2); border: 1px solid transparent; transition: background .4s var(--ease), color .4s var(--ease), border-color .4s; }
.tab:hover { border-color: var(--hair-l); }
.tab.is-on { background: var(--abyss); color: var(--on-dark); }
.shop-bar__tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.search { display: flex; align-items: center; gap: 10px; padding: 0 16px; min-width: min(100%, 280px); border-radius: 16px; border: 1px solid var(--hair-l); background: #fffdf8; transition: border-color .3s, box-shadow .3s; }
.search:focus-within { border-color: var(--abyss); box-shadow: 0 0 0 4px rgba(12, 42, 44, .08); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; padding: 14px 0; background: none; }
.search .ic { color: var(--text-2); }
.field--sort select { min-width: 220px; }
.shop-bar__count { font-size: .85rem; color: var(--text-2); }
.shop-bar__count b { font-family: var(--serif); font-weight: 400; font-size: 1.3rem; color: var(--text); }

/* Rejilla de productos */
.grid-wrap { padding-block: 16px clamp(60px, 8vw, 110px); }
.pgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.prod { --rx: 0deg; --ry: 0deg; position: relative; display: flex; flex-direction: column; border-radius: 28px; background: #fffdf8; border: 1px solid var(--hair-l); overflow: hidden; transition: transform .6s var(--ease), box-shadow .6s var(--ease), opacity .5s; transform: perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry)); }
.prod:hover { box-shadow: 0 40px 60px -40px rgba(12, 42, 44, .55); }
.prod.is-off { display: none; }
.prod__link { display: flex; flex-direction: column; flex: 1; }
.prod__img { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--cream-2); }
.prod__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease); }
.prod:hover .prod__img img { transform: scale(1.07); }
.prod__tags { position: absolute; left: 12px; top: 12px; display: flex; gap: 6px; }
.badge { padding: 5px 10px; border-radius: 999px; font-size: .62rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; background: rgba(12, 42, 44, .82); color: var(--on-dark); }
.badge--low { background: var(--apricot); color: var(--abyss); }
.badge--out { background: rgba(241, 232, 214, .92); color: var(--text-2); }
.prod__sp { position: absolute; right: 12px; top: 12px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: rgba(248, 243, 233, .9); color: var(--text); font-size: 1rem; }
.prod__body { display: grid; gap: 3px; padding: 16px 18px 6px; }
.prod__brand { font-size: .62rem; letter-spacing: .18em; text-transform: uppercase; color: var(--apricot-lo); }
.prod__name { font-family: var(--serif); font-size: 1.28rem; line-height: 1.1; min-height: 2.8em; }
.prod__size { font-size: .78rem; color: var(--text-2); }
.prod__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px 16px 18px; }
.prod__price { font-family: var(--serif); font-size: 1.7rem; line-height: 1; letter-spacing: -.01em; }
.add { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px 10px 16px; border-radius: 999px; font-size: .85rem; font-weight: 500; background: var(--abyss); color: var(--on-dark); transition: transform .5s var(--ease), background .4s; }
.add:hover { background: var(--abyss-3); }
.add:active { transform: scale(.95); }
.add .ic { font-size: 1.1rem; transition: transform .5s var(--ease); }
.add:hover .ic { transform: rotate(90deg); }
.add.is-done { background: var(--sage-d); }
.add[disabled] { background: rgba(12, 42, 44, .08); color: var(--text-2); cursor: not-allowed; }
.empty { display: grid; justify-items: center; gap: 12px; padding: 70px 20px; text-align: center; border-radius: 28px; background: var(--cream); }
.empty[hidden] { display: none; }
.empty h3 { font-family: var(--serif); font-weight: 400; font-size: 2rem; }
.ask { padding-bottom: clamp(70px, 9vw, 130px); }
.ask__box { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; padding: clamp(28px, 4vw, 56px); border-radius: 36px; background: var(--abyss); color: var(--on-dark); position: relative; overflow: hidden; }
.ask__box::after { content: ''; position: absolute; right: -5%; bottom: -60%; width: 46%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--apricot) 30%, transparent), transparent); pointer-events: none; }
.ask__box > div { display: grid; gap: 14px; max-width: 40rem; position: relative; }
.ask__p { color: var(--on-dark-2); }
.ask .btn { position: relative; z-index: 1; }

/* Carrito */
.drawer { position: fixed; inset: 0; z-index: 55; visibility: hidden; }
.drawer.is-open { visibility: visible; }
.drawer__scrim { position: absolute; inset: 0; background: rgba(12, 42, 44, .5); opacity: 0; transition: opacity .6s var(--ease); }
.drawer.is-open .drawer__scrim { opacity: 1; }
.drawer__panel { position: absolute; top: 10px; right: 10px; bottom: 10px; width: min(460px, calc(100% - 20px)); display: flex; flex-direction: column; border-radius: 30px; background: var(--paper); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .6); transform: translateX(110%); transition: transform .8s var(--ease); outline: 0; }
.drawer.is-open .drawer__panel { transform: none; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 22px 22px 14px 28px; }
.drawer__head h2 { font-family: var(--serif); font-weight: 400; font-size: 2rem; }
.drawer__body { flex: 1; overflow: auto; padding: 4px 22px 14px; display: grid; gap: 10px; align-content: start; }
.line { display: grid; grid-template-columns: 72px 1fr; gap: 14px; padding: 10px; border-radius: 22px; background: #fffdf8; border: 1px solid var(--hair-l); }
.line img { width: 72px; height: 72px; border-radius: 16px; object-fit: cover; }
.line__n { font-family: var(--serif); font-size: 1.15rem; line-height: 1.12; }
.line__r { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.step { display: inline-flex; align-items: center; border-radius: 999px; border: 1px solid var(--hair-l); }
.step button { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; transition: background .3s; }
.step button:hover { background: rgba(12, 42, 44, .08); }
.step b { min-width: 24px; text-align: center; font-weight: 500; font-variant-numeric: tabular-nums; }
.line__p { font-family: var(--serif); font-size: 1.3rem; }
.drawer__empty { display: grid; justify-items: center; gap: 12px; padding: 60px 10px; text-align: center; color: var(--text-2); }
.drawer__empty h3 { font-family: var(--serif); font-weight: 400; font-size: 1.8rem; color: var(--text); }
.drawer__foot { display: grid; gap: 12px; padding: 16px 22px 22px; border-top: 1px solid var(--hair-l); }
.drawer__foot:empty { display: none; }
.free { display: grid; gap: 8px; font-size: .84rem; color: var(--text-2); }
.free i { position: relative; height: 5px; border-radius: 5px; background: rgba(12, 42, 44, .1); overflow: hidden; }
.free i::after { content: ''; position: absolute; inset: 0; width: var(--p, 0%); border-radius: 5px; background: linear-gradient(90deg, var(--sage), var(--apricot)); transition: width .8s var(--ease); }
.tot { display: flex; justify-content: space-between; align-items: baseline; font-size: .92rem; color: var(--text-2); }
.tot--big { color: var(--text); font-size: 1rem; }
.tot--big b { font-family: var(--serif); font-weight: 400; font-size: 2rem; }
.opt { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.opt button { padding: 11px 12px; border-radius: 16px; border: 1px solid var(--hair-l); font-size: .86rem; text-align: left; transition: background .4s var(--ease), border-color .4s, color .4s; }
.opt button small { display: block; color: var(--text-2); font-size: .74rem; }
.opt button.is-on { background: var(--abyss); color: var(--on-dark); border-color: var(--abyss); }
.opt button.is-on small { color: var(--on-dark-2); }
.done { display: grid; justify-items: center; gap: 14px; padding: 36px 12px; text-align: center; }
.done__tick { display: grid; place-items: center; width: 68px; height: 68px; border-radius: 50%; background: var(--abyss); color: var(--apricot-hi); font-size: 2rem; animation: pop .8s var(--ease); }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
.done h3 { font-family: var(--serif); font-weight: 400; font-size: 2rem; }
.done p { color: var(--text-2); max-width: 22rem; }

/* Ficha de producto */
.pd { padding: 130px 0 clamp(60px, 8vw, 110px); }
.pd__crumb { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 26px; font-size: .84rem; color: var(--text-2); }
.pd__crumb a:hover { color: var(--text); }
.pd__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(26px, 5vw, 80px); align-items: start; }
.pd__media { position: sticky; top: 100px; }
.pd__frame { position: relative; aspect-ratio: 1; border-radius: 28px; overflow: hidden; background: var(--cream-2); cursor: zoom-in; }
.pd__frame img { width: 100%; height: 100%; object-fit: cover; transform-origin: var(--zx, 50%) var(--zy, 50%); transition: transform .9s var(--ease); }
.pd__frame.is-zoom img { transform: scale(1.7); transition-duration: .5s; }
.pd__info { display: grid; gap: 20px; }
.pd__brand { font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--apricot-lo); }
.pd__name { font-family: var(--serif); font-weight: 400; font-size: clamp(2.3rem, 4.6vw, 4.2rem); line-height: .98; letter-spacing: -.02em; }
.pd__price { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.pd__price b { font-family: var(--serif); font-weight: 400; font-size: 2.8rem; line-height: 1; }
.pd__stock { display: inline-flex; align-items: center; gap: 8px; font-size: .86rem; color: var(--text-2); }
.pd__stock i { width: 8px; height: 8px; border-radius: 50%; background: #3fae77; }
.pd__stock[data-s="low"] i { background: var(--apricot); }
.pd__stock[data-s="out"] i { background: #b3453a; }
.pd__desc { color: var(--text-2); font-size: 1.04rem; max-width: 40rem; }
.pd__hl { display: grid; gap: 10px; }
.pd__hl li { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-radius: 18px; background: var(--cream); font-size: .96rem; }
.pd__hl .ic { color: var(--apricot-lo); }
.pd__note { display: flex; gap: 12px; padding: 16px 18px; border-radius: 18px; border: 1px solid color-mix(in srgb, var(--apricot) 50%, transparent); background: color-mix(in srgb, var(--apricot) 9%, transparent); font-size: .9rem; }
.pd__note .ic { flex: none; color: var(--apricot-lo); font-size: 1.3rem; margin-top: 1px; }
.pd__buy { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.pd__buy .step { padding: 4px; }
.pd__buy .step button { width: 40px; height: 40px; }
.pd__meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.pd__meta div { padding: 14px 16px; border-radius: 18px; border: 1px solid var(--hair-l); font-size: .88rem; }
.pd__meta span { display: block; font-size: .64rem; letter-spacing: .16em; text-transform: uppercase; color: var(--text-2); margin-bottom: 4px; }
.pd__ration { display: grid; gap: 10px; padding: 20px; border-radius: 24px; background: var(--abyss); color: var(--on-dark); }
.pd__ration .field { color: var(--on-dark-2); }
.pd__ration .field select { background-color: rgba(241, 232, 214, .06); color: var(--on-dark); border-color: var(--hair-d); background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23f1e8d6' stroke-width='1.4' stroke-linecap='round'/></svg>"); }
.pd__ration option { color: #0c2a2c; }
.pd__ration .row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pd__ration output { font-family: var(--serif); font-size: 1.7rem; line-height: 1.1; }
.pd__ration output em { color: var(--apricot-hi); }
.pd__ration small { color: var(--on-dark-2); }
.rel { padding-block: 0 clamp(70px, 9vw, 130px); }
.rel__head { margin-bottom: 26px; }
.rel .pgrid { grid-template-columns: repeat(4, 1fr); }
.pd-miss { display: grid; justify-items: center; gap: 16px; padding: 160px 0 120px; text-align: center; }

@media (max-width: 1100px) {
  .pgrid, .rel .pgrid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .ration__in { grid-template-columns: 1fr; }
  .pd__grid { grid-template-columns: 1fr; }
  .pd__media { position: static; }
  .pgrid, .rel .pgrid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}
@media (max-width: 560px) {
  .ration__row { grid-template-columns: 1fr 1fr; }
  .check { grid-column: 1 / -1; }
  .prod__name { font-size: 1.08rem; min-height: 3.4em; }
  .prod__body { padding: 12px 12px 4px; }
  .prod__foot { padding: 6px 8px 12px 12px; flex-wrap: wrap; }
  .prod__price { font-size: 1.4rem; }
  .add { padding: 9px 12px; }
  .add span { display: none; }
  .shop-bar__tools { width: 100%; }
  .search, .field--sort, .seg--3 { width: 100%; min-width: 0; }
  .drawer__panel { top: 6px; right: 6px; bottom: 6px; width: calc(100% - 12px); border-radius: 24px; }
  .sh { padding-top: 124px; }
}
@media (prefers-reduced-motion: reduce) {
  .sh__orb { animation: none; }
  .drawer__panel { transition-duration: .001s; }
}
