/* Tienda online (/tienda, /ca/botiga, /en/shop). Usa los colores, tipos y botones de style.css. */
.page-shop{--shop-top:100px}
.shop{max-width:1760px;margin:0 auto;padding:0 clamp(16px,5vw,64px) 64px}
.shop-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* Cabecera de la tienda: título y «Recoger / A domicilio» */
.shop-intro{display:flex;align-items:flex-end;justify-content:space-between;gap:16px 40px;flex-wrap:wrap;padding:26px 0 22px}
.shop-intro h1{font-size:clamp(40px,4.2vw,62px);margin:10px 0 0}
.shop-mode{display:flex;gap:10px}
.shop-mode button{position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:1px;min-width:230px;padding:12px 18px 12px 46px;border:2px solid #d3d8e1;border-radius:10px;background:#fff;color:var(--ink);text-align:left;transition:border-color .2s,background .2s}
.shop-mode button::before{content:"";position:absolute;left:16px;top:50%;width:18px;height:18px;margin-top:-9px;border-radius:50%;border:2px solid #b9c0cc;background:#fff;box-sizing:border-box}
.shop-mode button:hover{border-color:#b9c6e4}
.shop-mode button[aria-checked="true"]{border-color:var(--blue);background:#f3f6ff}
.shop-mode button[aria-checked="true"]::before{border:5px solid var(--blue)}
.shop-mode b{font-size:15px}
.shop-mode span{font-size:12.5px;color:var(--muted)}
.shop-mode span:empty::before{content:"\00a0"}
.shop-pruebas{margin:0 0 20px;padding:10px 16px;background:var(--yellow);border-radius:8px;font-size:13.5px;line-height:1.45}
.shop-pruebas b{letter-spacing:1px;margin-right:10px}

/* Tres columnas: categorías | carta | tu pedido */
.shop-layout{display:grid;grid-template-columns:210px minmax(0,1fr) 360px;gap:36px;align-items:start}
.shop-cats{position:sticky;top:calc(var(--shop-top) + 20px);max-height:calc(100vh - var(--shop-top) - 40px);overflow:auto;scrollbar-width:thin}
.shop-search{display:block;width:100%;padding:11px 16px;margin:0 0 12px;border:1px solid #cfd5df;border-radius:30px;background:#fff;color:var(--ink);font:inherit;font-size:14px}
.shop-search:focus{outline:2px solid var(--blue);outline-offset:1px;border-color:var(--blue)}
.shop-cats ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:2px}
.shop-cats a{display:block;padding:8px 12px;border-radius:6px;font-size:14px;font-weight:700;color:var(--ink);transition:background .2s}
.shop-cats a:hover{background:#edf1ff;color:var(--ink)}
.shop-cats a[aria-current]{background:var(--ink);color:#fff}

/* Carta */
.shop-estado{color:var(--muted);padding:30px 0}
.shop-estado.is-error{color:#8c1d12;font-weight:700}
.shop-cat{scroll-margin-top:calc(var(--shop-top) + 18px);margin-bottom:36px}
.shop-cat[hidden],.shop-card[hidden]{display:none}
.shop-cat h2{font-size:clamp(26px,2.1vw,34px);margin:0 0 14px}
.shop-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.shop-card{position:relative;display:flex;align-items:stretch;gap:14px;width:100%;min-height:124px;padding:14px;border:1px solid #e1e5ee;border-radius:12px;background:#fff;color:var(--ink);text-align:left;transition:border-color .2s,box-shadow .2s,transform .2s}
.shop-card:hover{border-color:#b9c6e4;box-shadow:0 10px 26px #14234214;transform:translateY(-1px)}
.shop-card-text{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}
.shop-card-name{font-size:16px;line-height:1.3}
.shop-card-desc{font-size:13.5px;line-height:1.45;color:var(--muted);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.shop-card-foot{margin-top:auto;display:flex;align-items:center;flex-wrap:wrap;gap:6px 10px;padding-top:6px}
.shop-card-price{font-weight:800;font-size:15px}
.shop-card-img{flex:none;width:120px;height:120px;margin:-6px -6px -6px 0;border-radius:9px;overflow:hidden;background:#fff}
.shop-card-img img{width:100%;height:100%;object-fit:cover;transition:transform .4s}
.shop-card:hover .shop-card-img img{transform:scale(1.04)}
.shop-card-img.is-empty{display:none}
.shop-card-add{position:absolute;right:10px;bottom:10px;width:34px;height:34px;border-radius:50%;background:var(--blue);color:#fff;display:flex;align-items:center;justify-content:center;font-size:22px;font-weight:700;line-height:1;box-shadow:0 0 0 3px #fff;transition:transform .2s}
.shop-card:hover .shop-card-add{transform:scale(1.08)}
.shop-card.no-photo .shop-card-text{padding-right:44px}
.shop-card.is-out{opacity:.55;cursor:not-allowed;transform:none;box-shadow:none}
.shop-card-out{font-size:10.5px;font-weight:800;letter-spacing:.8px;text-transform:uppercase;background:#eef0f5;color:var(--muted);padding:3px 9px;border-radius:99px}
/* Destacados: tarjetas grandes con foto arriba */
.shop-cat.is-featured .shop-grid{grid-template-columns:repeat(auto-fill,minmax(210px,1fr))}
.shop-card.is-big{flex-direction:column-reverse;justify-content:flex-end;padding:0;overflow:hidden}
.shop-card.is-big .shop-card-img{width:100%;height:auto;aspect-ratio:4/3;margin:0;border-radius:0}
.shop-card.is-big .shop-card-text{padding:12px 14px 16px;padding-right:52px}

/* Tu pedido (columna derecha en ordenador; ventana desde la barra inferior en móvil) */
.shop-cart{position:sticky;top:calc(var(--shop-top) + 20px)}
.shop-cart-box{background:#fff;border:1px solid #e1e5ee;border-radius:14px;padding:20px 20px 22px;max-height:calc(100vh - var(--shop-top) - 40px);overflow:auto}
.shop-cart h2{font-size:32px;margin:0 0 10px}
.shop-cart-empty{color:var(--muted);font-size:14px;margin:4px 0 16px}
.shop-lines{list-style:none;margin:0 0 14px;padding:0}
.shop-line{display:flex;gap:12px;justify-content:space-between;padding:12px 0;border-bottom:1px solid #eef0f5}
.shop-line:first-child{padding-top:4px}
.shop-line-main{min-width:0;display:flex;flex-direction:column;gap:2px;font-size:14px;line-height:1.35}
.shop-line-main small{font-size:12.5px;color:var(--muted);line-height:1.4}
.shop-line-notes{font-style:italic}
.shop-line-side{display:flex;flex-direction:column;align-items:flex-end;gap:6px;flex:none}
.shop-line-price{font-weight:800;font-size:14px}
.shop-qty{display:inline-flex;align-items:center;border:1px solid #cfd5df;border-radius:99px;background:#fff}
.shop-qty-btn{width:42px;height:42px;border:0;border-radius:50%;background:none;color:var(--blue);font-size:21px;font-weight:700;line-height:1}
.shop-qty-btn:disabled{color:#c3c8d2;cursor:default}
.shop-qty output{min-width:22px;text-align:center;font-weight:800}
.shop-qty.is-small .shop-qty-btn{width:30px;height:30px;font-size:17px}
.shop-qty.is-small output{min-width:18px;font-size:13px}
.shop-cart-mode{display:flex;flex-direction:column;gap:2px;padding:12px 14px;margin-bottom:12px;background:#f3f6ff;border-radius:8px;font-size:13px;line-height:1.45}
.shop-cart-mode b{font-size:14px}
.shop-link{align-self:flex-start;margin-top:4px;padding:0;border:0;background:none;color:var(--blue);font-weight:700;font-size:13px;text-decoration:underline;text-underline-offset:3px}
.shop-totals{display:block;margin:0 0 12px;color:var(--ink)}
.shop-totals div{display:flex;justify-content:space-between;gap:10px;padding:4px 0;font-size:14px}
.shop-totals dt{color:var(--muted)}
.shop-totals dd{margin:0;font-weight:700}
.shop-totals .is-total{margin-top:6px;padding-top:10px;border-top:1px solid #e1e5ee;font-size:17px}
.shop-totals .is-total dt{color:var(--ink);font-weight:800}
.shop-cart-min{margin:0 0 12px;padding:9px 12px;background:#fff6d6;border-radius:6px;font-size:13px}
.shop-go{width:100%}
.shop-go:disabled,.shop-add:disabled{background:#b9c0cc;border-color:#b9c0cc;transform:none;cursor:not-allowed}

/* Ficha del producto */
.shop-dialog{width:min(560px,calc(100% - 24px));max-width:none;max-height:min(880px,calc(100dvh - 32px));padding:0;border:0;border-radius:16px;background:#fff;color:var(--ink);box-shadow:0 30px 80px #1423425c;overflow:hidden}
.shop-d{position:relative;display:flex;flex-direction:column;max-height:min(880px,calc(100dvh - 32px))}
.shop-d-scroll{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain}
.shop-d-img{aspect-ratio:16/10;background:#fff;overflow:hidden}
.shop-d-img img{width:100%;height:100%;object-fit:contain}
.shop-d-img.is-empty{display:none}
.shop-d-body{padding:20px 24px 6px}
.shop-d-body h2{font-size:clamp(28px,3vw,38px);margin:0 50px 8px 0}
.shop-d-img+.shop-d-body h2{margin-right:0}
.shop-dialog h2:focus,.shop-sheet h2:focus{outline:none}
.shop-d-desc{margin:0 0 14px;color:var(--muted);font-size:15px}
.shop-d-close{position:absolute;top:12px;right:12px;z-index:2;width:40px;height:40px;border:0;border-radius:50%;background:#ffffffeb;box-shadow:0 2px 10px #1423422e;color:var(--ink);font-size:26px;line-height:1}
.shop-d-group{min-width:0;margin:0 0 14px;padding:0;border:0}
.shop-d-group legend{display:flex;justify-content:space-between;align-items:baseline;gap:10px;width:100%;padding:10px 0 8px;border-bottom:1px solid #e9ecf2}
.shop-d-group legend b{font-size:15px}
.shop-d-rule{flex:none;font-size:12px;font-weight:700;color:var(--muted)}
.shop-opt{display:flex;align-items:center;gap:12px;min-height:48px;padding:6px 2px;border-bottom:1px solid #f2f3f7;font-size:15px;cursor:pointer}
.shop-opt input{flex:none;width:20px;height:20px;margin:0;accent-color:var(--blue);cursor:pointer}
.shop-opt-name{flex:1;min-width:0}
.shop-opt-price{color:var(--muted);font-size:14px;white-space:nowrap}
.shop-opt.is-off{opacity:.45;cursor:not-allowed}
.shop-opt-qty{display:inline-flex;align-items:center;gap:4px}
.shop-opt-qty[hidden]{display:none}
.shop-mini{width:30px;height:30px;border:1px solid #cfd5df;border-radius:50%;background:#fff;color:var(--blue);font-weight:800;line-height:1}
.shop-mini:disabled{color:#c3c8d2;cursor:default}
.shop-opt-qty output{min-width:16px;text-align:center;font-size:14px;font-weight:800}
.shop-chips{display:flex;flex-wrap:wrap;gap:8px;padding-top:10px}
.shop-chip{position:relative}
.shop-chip input{position:absolute;inset:0;opacity:0;margin:0;cursor:pointer}
.shop-chip span{display:inline-block;padding:8px 14px;border:1px solid #d3d8e1;border-radius:99px;font-size:14px;font-weight:700}
.shop-chip input:checked+span{background:var(--ink);border-color:var(--ink);color:#fff}
.shop-chip input:focus-visible+span{outline:3px solid #d24c15;outline-offset:2px}
.shop-d-comment{display:block;margin:0 0 14px}
.shop-d-comment b{display:block;margin-bottom:6px;font-size:15px}
.shop-d-comment textarea{width:100%;padding:10px 12px;border:1px solid #cfd5df;border-radius:6px;font:inherit;resize:vertical}
.shop-d-alerg{margin:4px 0 16px;color:var(--muted);font-size:12.5px}
.shop-d-alerg a{color:var(--blue);text-decoration:underline}
.shop-d-foot{display:flex;align-items:center;gap:12px;padding:14px 24px;border-top:1px solid #e1e5ee;background:#fff}
.shop-add{flex:1;white-space:nowrap}

/* Código postal en el carrito (a domicilio) */
.shop-cp{display:flex;align-items:center;gap:10px;margin:6px 0 2px;font-weight:700}
.shop-cp input{width:96px;padding:8px 10px;border:1px solid #b9c6e4;border-radius:6px;background:#fff;color:var(--ink);font:inherit;font-size:15px;font-weight:700;letter-spacing:1px}
.shop-cp input:focus{outline:2px solid var(--blue);outline-offset:1px}
.shop-cp-ok{color:#135e2b;font-weight:700}
.shop-cp-no{color:#a33a14;font-weight:700}
.shop-cart-min.is-info{background:#edf1ff}

/* Tus datos (antes de pagar) */
.shop-co-mode{margin:0 0 14px;padding:10px 12px;border-radius:8px;background:#f3f6ff;font-size:14px;font-weight:700}
.shop-co-test{margin:0 0 16px;padding:10px 12px;border-radius:8px;background:var(--yellow);font-size:13px;line-height:1.5}
.shop-co-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 14px;margin-bottom:16px}
.shop-co-field{display:flex;flex-direction:column;gap:5px;font-size:13px;font-weight:700}
.shop-co-field:has([name="direccion"]),.shop-co-field:has(textarea),.shop-co-field:has([name="nombre"]){grid-column:1/-1}
.shop-co-field input,.shop-co-field select,.shop-co-field textarea{width:100%;padding:12px;border:1px solid #cfd5df;border-radius:6px;background:#fff;color:var(--ink);font:inherit;font-size:16px;font-weight:400}
.shop-co-field textarea{resize:vertical}
.shop-co-field :focus{outline:2px solid var(--blue);outline-offset:1px;border-color:var(--blue)}
.shop-co-field [aria-invalid="true"]{border-color:#c2410c;background:#fff8f6}
.shop-co-legal{margin:0 0 10px;color:var(--muted);font-size:12.5px}
.shop-co-error{margin:0 0 10px;padding:10px 12px;border-radius:8px;background:#fdecea;color:#8c1d12;font-size:14px;font-weight:700}
.shop-co-error[hidden]{display:none}

/* Resultado al volver del pago */
.shop-dialog:focus,.shop-sheet:focus{outline:none}
.shop-result{width:min(480px,calc(100% - 24px))}
.shop-r{padding:30px 28px 26px}
.shop-r h2{font-size:clamp(30px,3.4vw,40px);margin:0 0 10px}
.shop-r.is-ok h2{color:#135e2b}
.shop-r.is-ko h2{color:#a33a14}
.shop-r-text{margin:0 0 16px;font-size:16px;line-height:1.55}
.shop-r-lines{list-style:none;margin:0 0 10px;padding:10px 0;border-top:1px solid #eef0f5;border-bottom:1px solid #eef0f5;font-size:14px}
.shop-r-lines li{display:flex;justify-content:space-between;gap:12px;padding:3px 0}
.shop-r-small{color:var(--muted);font-size:13px;margin:0 0 14px}
.shop-r-btn{width:100%;margin-top:8px}
.shop-r-btn.is-ghost{background:#fff;color:var(--ink);border-color:#cfd5df}

/* Barra inferior «Ver mi pedido» y ventana del pedido (tableta y móvil) */
.shop-cartbar{position:fixed;left:12px;right:12px;bottom:max(12px,env(safe-area-inset-bottom));z-index:30;display:flex;align-items:center;gap:12px;max-width:640px;margin:0 auto;padding:14px 18px;border:0;border-radius:12px;background:var(--blue);color:#fff;font-size:15px;font-weight:800;box-shadow:0 12px 30px #064bea59}
.shop-cartbar[hidden]{display:none}
.shop-cartbar-n{display:flex;align-items:center;justify-content:center;min-width:28px;height:28px;padding:0 8px;border-radius:99px;background:#fff;color:var(--blue);font-size:14px}
.shop-cartbar-t{flex:1;text-align:left}
.shop-sheet{width:100%;max-width:560px;max-height:88dvh;margin:auto auto 0;padding:0;border:0;border-radius:18px 18px 0 0;background:#fff;color:var(--ink)}
.shop-sheet-head{position:sticky;top:0;z-index:1;display:flex;align-items:center;justify-content:space-between;padding:14px 20px 8px;background:#fff}
.shop-sheet-head h2{font-size:30px;margin:0;text-transform:uppercase}
.shop-sheet .shop-d-close{position:static;box-shadow:none;background:#f1f3f7}
.shop-sheet .shop-cart-body{padding:0 20px max(20px,env(safe-area-inset-bottom))}

.shop-toast{position:fixed;left:50%;bottom:28px;z-index:60;max-width:calc(100% - 32px);padding:12px 18px;border-radius:8px;background:var(--ink);color:#fff;font-size:14px;font-weight:700;opacity:0;pointer-events:none;transform:translate(-50%,16px);transition:opacity .25s,transform .25s}
.shop-toast.is-on{opacity:1;transform:translate(-50%,0)}

@media(min-width:1101px){.shop-cartbar{display:none!important}}
/* Pantallas muy anchas (2K): tres columnas de productos */
@media(min-width:1880px){.shop{max-width:2000px}.shop-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:1279px){
  .shop-layout{grid-template-columns:190px minmax(0,1fr) 320px;gap:26px}
  .shop-grid{grid-template-columns:minmax(0,1fr)}
}
@media(max-width:1100px){
  .shop{padding-bottom:110px}
  .shop-layout{grid-template-columns:minmax(0,1fr);gap:0}
  .shop-cart{display:none}
  /* Categorías: barra fija bajo la cabecera, con buscador y botones que se deslizan */
  .shop-cats{position:sticky;top:var(--shop-top);z-index:9;display:flex;align-items:center;gap:10px;max-height:none;overflow:visible;margin:0 calc(-1 * clamp(16px,5vw,64px)) 18px;padding:10px clamp(16px,5vw,64px);background:var(--paper);border-bottom:1px solid #e5e8ed}
  .shop-search{flex:0 0 150px;margin:0;padding:9px 14px;transition:flex-basis .25s}
  .shop-search:focus{flex-basis:55%}
  .shop-cats ul{flex:1;min-width:0;flex-direction:row;gap:6px;overflow-x:auto;scrollbar-width:none;scroll-behavior:smooth}
  .shop-cats ul::-webkit-scrollbar{display:none}
  .shop-cats a{white-space:nowrap;padding:8px 14px;border:1px solid #d3d8e1;border-radius:99px;font-size:13px}
  .shop-cats a[aria-current]{border-color:var(--ink)}
  .shop-cat{scroll-margin-top:calc(var(--shop-top) + 76px)}
  .shop-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .shop-toast{bottom:96px}
}
@media(max-width:760px){
  .page-shop{--shop-top:80px}
  .shop-intro{padding:16px 0 14px;gap:12px}
  .shop-intro h1{font-size:42px}
  .shop-mode{width:100%;flex-direction:column;gap:8px}
  .shop-mode button{flex-direction:row;flex-wrap:wrap;align-items:baseline;gap:2px 10px;min-width:0;padding:11px 14px 11px 40px}
  .shop-mode button::before{left:12px;width:16px;height:16px;margin-top:-8px}
  .shop-mode button[aria-checked="true"]::before{border-width:4.5px}
  .shop-mode b{font-size:14px}
  .shop-mode span{font-size:11.5px;line-height:1.3}
  .shop-pruebas{font-size:12.5px}
  .shop-search{flex-basis:118px}
  .shop-grid{grid-template-columns:minmax(0,1fr);gap:10px}
  .shop-cat.is-featured .shop-grid{grid-auto-flow:column;grid-auto-columns:68%;grid-template-columns:none;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none;margin:0 calc(-1 * clamp(16px,5vw,64px));padding:0 clamp(16px,5vw,64px) 4px}
  .shop-cat.is-featured .shop-card{scroll-snap-align:start}
  .shop-card{min-height:112px;padding:12px}
  .shop-card-img{width:96px;height:96px}
  .shop-card-desc{font-size:13px}
  .shop-dialog{width:100%;max-width:100%;max-height:94dvh;margin:auto 0 0;border-radius:18px 18px 0 0}
  .shop-d{max-height:94dvh}
  .shop-d-body{padding:16px 18px 4px}
  .shop-d-foot{padding:12px 18px max(12px,env(safe-area-inset-bottom))}
  .shop-qty-btn{width:40px;height:40px}
}
@media(prefers-reduced-motion:reduce){.shop-card,.shop-card-img img,.shop-toast,.shop-search{transition:none}}
@media(max-width:560px){.shop-co-fields{grid-template-columns:minmax(0,1fr)}.shop-r{padding:24px 20px 20px}.shop-result{width:100%;max-width:100%;margin:auto 0 0;border-radius:18px 18px 0 0}}
