:root{
  --navy:#0f2b46;
  --navy-2:#173f60;
  --coral:#ff7a68;
  --coral-dark:#b23a2b;
  --coral-soft:#fff1ee;
  --ink:#182430;
  --muted:#5b6a77;
  --line:#dde4ea;
  --bg:#f5f7f9;
  --card:#fff;
  --radius:12px;
  --shadow:0 1px 2px rgba(15,43,70,.05), 0 10px 26px -22px rgba(15,43,70,.5);
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  font-size:15.5px;
  line-height:1.5;
  color:var(--ink);
  background:var(--bg);
  -webkit-font-smoothing:antialiased;
}
img{max-width:100%;display:block}
button,input,select{font:inherit;color:inherit}
h1{font-size:clamp(1.6rem,1.2rem + 1.4vw,2.2rem);line-height:1.15;letter-spacing:-.02em;margin:0 0 .5rem}
h2{font-size:clamp(1.18rem,1.05rem + .35vw,1.4rem);line-height:1.25;margin:0 0 .4rem;letter-spacing:-.01em}
p{margin:0 0 .7rem}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
:focus-visible{outline:2px solid var(--coral-dark);outline-offset:2px;border-radius:6px}

/* Barra */
.topbar{
  position:sticky;top:0;z-index:40;
  display:flex;align-items:center;gap:10px;
  height:58px;padding:0 12px;
  background:rgba(255,255,255,.96);
  border-bottom:1px solid var(--line);
  backdrop-filter:blur(10px);
}
.brand{display:flex;align-items:center;gap:8px;text-decoration:none;min-width:0;font-weight:700;font-size:.9rem;color:var(--navy)}
.brand-mark{width:34px;height:34px;flex:0 0 auto}
.brand-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:none}
.search{position:relative;flex:1 1 auto;min-width:0;display:flex;align-items:center}
.search svg{position:absolute;left:10px;width:16px;height:16px;fill:none;stroke:#7e8b97;stroke-width:2;stroke-linecap:round;pointer-events:none}
.search input{
  width:100%;height:40px;padding:0 10px 0 32px;
  border:1px solid var(--line);border-radius:10px;background:#f8fafb;
  font-size:.88rem;
}
.search input::placeholder{color:#8b96a1}
.search input:focus{background:#fff}
.topnav{display:none}
.cart-btn{
  display:inline-flex;align-items:center;justify-content:center;gap:6px;
  height:42px;min-width:44px;padding:0 10px;
  border:1px solid var(--line);border-radius:10px;background:#fff;
  cursor:pointer;font-weight:600;font-size:.86rem;flex:0 0 auto;
}
.cart-btn svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.cart-label{display:none}
.cart-count{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:20px;height:20px;padding:0 5px;border-radius:999px;
  background:var(--navy);color:#fff;font-size:.72rem;font-weight:700;
}

/* Hero */
.hero{padding:16px 14px 6px;max-width:1180px;margin:0 auto}
.hero-grid{display:grid;gap:16px}
.kicker{
  display:inline-flex;align-items:center;gap:6px;
  margin:0 0 8px;padding:4px 9px;border-radius:999px;
  background:#eaf1f7;color:var(--navy);
  font-size:.72rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase;
}
.lead{color:var(--muted);font-size:.95rem;max-width:46ch}
.hero-actions{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 14px}
.facts{list-style:none;display:flex;flex-wrap:wrap;gap:6px;margin:0;padding:0}
.fact{
  display:inline-flex;align-items:center;gap:6px;
  padding:6px 9px;border:1px solid var(--line);border-radius:999px;
  background:#fff;font-size:.76rem;color:#3f4d5a;
}
.fact svg{width:14px;height:14px;flex:0 0 auto;fill:none;stroke:var(--navy-2);stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.hero-media{position:relative;border:1px solid var(--line);border-radius:14px;overflow:hidden;background:#e8eef3;box-shadow:var(--shadow)}
.hero-media img{width:100%;height:175px;object-fit:cover}
.hero-tag{
  position:absolute;left:10px;right:10px;bottom:10px;margin:0;
  padding:7px 10px;border-radius:9px;background:rgba(255,255,255,.94);
  font-size:.76rem;color:#3f4d5a;box-shadow:0 1px 3px rgba(0,0,0,.12);
}
.hero-tag strong{color:var(--coral-dark)}

/* Botones */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:6px;
  min-height:42px;padding:0 14px;border-radius:10px;
  border:1px solid transparent;font-size:.88rem;font-weight:650;
  text-decoration:none;cursor:pointer;transition:background .15s,border-color .15s,transform .06s;
}
.btn:active{transform:translateY(1px)}
.btn-solid{background:#cf4736;border-color:#cf4736;color:#fff}
.btn-solid:hover{background:var(--coral-dark);border-color:var(--coral-dark)}
.btn-line{background:#fff;border-color:#c9d3dc;color:var(--navy)}
.btn-line:hover{border-color:#8fa1b1;background:#f9fbfc}
.btn-block{width:100%}
.btn[disabled]{opacity:.55;cursor:not-allowed;background:#e9edf1;border-color:#dde4ea;color:#76828e}
.icon-btn{
  display:inline-flex;align-items:center;justify-content:center;
  width:42px;height:42px;border:1px solid var(--line);border-radius:10px;background:#fff;cursor:pointer;color:var(--navy);
}
.icon-btn svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round}

/* Pesca del día */
.daily{background:#ecf2f7;border-top:1px solid #dbe5ed;border-bottom:1px solid #dbe5ed;padding:14px 0 16px;margin-top:6px}
.daily-inner{max-width:1180px;margin:0 auto;padding:0 14px}
.daily-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;flex-wrap:wrap}
.daily-kicker{margin:0 0 3px;font-size:.7rem;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:var(--coral-dark)}
.daily-head h2{margin:0;color:var(--navy)}
.daily-date{margin:0;font-size:.8rem;font-weight:650;color:#506476}
.delivery{
  display:inline-flex;align-items:center;gap:8px;flex-wrap:wrap;
  margin:10px 0 14px;padding:7px 11px;border-radius:9px;
  background:#fff;border:1px solid #d6e2ec;border-left:3px solid var(--coral);
  font-size:.82rem;font-weight:650;color:var(--navy);
}
.delivery::before{content:"";width:7px;height:7px;border-radius:50%;background:var(--coral);flex:0 0 auto}
.daily-track{display:flex;gap:10px;overflow-x:auto;scroll-snap-type:x mandatory;padding-bottom:6px;scrollbar-width:thin}
.daily-card{
  flex:0 0 78%;min-width:230px;max-width:320px;scroll-snap-align:start;
  display:grid;grid-template-columns:58px 1fr;gap:9px;
  background:#fff;border:1px solid #d9e3eb;border-radius:12px;padding:9px;box-shadow:var(--shadow);
}
.daily-thumb{width:58px;height:58px;border-radius:9px;overflow:hidden;background:#eef3f7;display:flex;align-items:center;justify-content:center}
.daily-thumb img{width:100%;height:100%;object-fit:cover}
.daily-thumb svg{width:34px;height:34px;fill:none;stroke:#8ba0b1;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.daily-info{display:flex;flex-direction:column;min-width:0}
.daily-info h3{font-size:.84rem;line-height:1.25;margin:0 0 2px;font-weight:650;color:var(--navy)}
.daily-price{font-size:.88rem;font-weight:750;margin:0 0 1px;color:var(--navy)}
.daily-price span{font-size:.68rem;font-weight:500;color:var(--muted)}
.daily-info .btn{min-height:42px;margin-top:auto;padding:0 9px;font-size:.74rem;justify-content:center}

/* Catálogo */
.catalog{max-width:1180px;margin:0 auto;padding:16px 14px 30px}
.catalog-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:10px}
.catalog-head h2{margin:0;color:var(--navy)}
.results{margin:2px 0 0;font-size:.8rem;color:var(--muted)}
.sort{display:flex;align-items:center;gap:7px;font-size:.82rem;color:var(--muted)}
.sort label{font-weight:600;color:#3f4d5a}
.sort select{height:38px;padding:0 8px;border:1px solid var(--line);border-radius:9px;background:#fff;font-size:.84rem}
.chips{display:flex;gap:7px;overflow-x:auto;padding:2px 1px 8px;scrollbar-width:thin;scroll-snap-type:x proximity}
.chip{
  flex:0 0 auto;height:42px;padding:0 13px;border-radius:999px;
  border:1px solid #cfdae3;background:#fff;color:#44525f;
  font-size:.82rem;font-weight:600;cursor:pointer;white-space:nowrap;scroll-snap-align:start;
}
.chip:hover{border-color:#93a7b8}
.chip.active{background:var(--navy);border-color:var(--navy);color:#fff}

.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:6px}
.card{display:flex;flex-direction:column;background:var(--card);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow)}
.thumb{position:relative;background:#eef3f7;aspect-ratio:4/3;display:flex;align-items:center;justify-content:center;overflow:hidden}
.thumb img{width:100%;height:100%;object-fit:cover}
.thumb > svg{width:52%;height:52%;max-width:92px;fill:none;stroke:#93a7b6;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.badge{
  position:absolute;top:7px;left:7px;padding:3px 7px;border-radius:6px;
  font-size:.66rem;font-weight:700;letter-spacing:.02em;background:#fff6e8;color:#8a5a00;border:1px solid #f0dca8;
}
.badge.out{background:#fdecec;color:#a12a2a;border-color:#f3c7c7}
.card-body{display:flex;flex-direction:column;flex:1;padding:9px 10px 10px}
.card-cat{font-size:.66rem;text-transform:uppercase;letter-spacing:.05em;color:#7d8a95;font-weight:700;margin:0 0 3px}
.card h3{font-size:.85rem;line-height:1.3;margin:0 0 5px;font-weight:650;color:#16222d}
.price{margin:0 0 2px;font-size:1rem;font-weight:750;letter-spacing:-.01em;color:var(--navy)}
.price .unit{font-size:.7rem;font-weight:500;color:var(--muted);letter-spacing:0}
.stock{font-size:.7rem;margin:0 0 7px;color:#6b7a86}
.stock.low{color:#a35a00;font-weight:600}
.stock.out{color:#a12a2a;font-weight:600}
.card-actions{display:flex;flex-direction:column;gap:6px;margin-top:auto;padding-top:4px}
.card-actions .btn{min-height:42px;padding:0 8px;font-size:.82rem}
.card-actions .btn-cart{background:#cf4736;border-color:#cf4736;color:#fff}
.card-actions .btn-cart:hover{background:var(--coral-dark)}
.card-actions .btn-cart[disabled]{background:#e9edf1;border-color:#dde4ea;color:#76828e}
.empty{margin:18px 0 0;padding:16px;border:1px dashed #c9d6e0;border-radius:12px;color:var(--muted);font-size:.9rem;text-align:center}

/* Reparto */
.reparto{max-width:1180px;margin:0 auto;padding:10px 14px 34px}
.reparto-inner{display:grid;gap:24px}
.info-list{list-style:none;margin:8px 0 10px;padding:0;border-top:1px solid var(--line)}
.info-list li{display:flex;justify-content:space-between;gap:12px;padding:7px 0;border-bottom:1px solid var(--line);font-size:.86rem}
.info-list li span{color:var(--muted)}
.info-list li strong{font-weight:650;color:#22303c}
.muted{color:var(--muted)}
.small{font-size:.8rem}

/* Footer */
.site-footer{padding:18px 14px 26px;border-top:1px solid var(--line);background:#fff;text-align:center;font-size:.78rem;color:var(--muted)}
.site-footer p{margin:0 0 4px}
.credit a{color:#3f4d5a;text-decoration:underline;text-underline-offset:2px}

/* Drawer */
.overlay{position:fixed;inset:0;background:rgba(12,29,45,.48);z-index:50;opacity:0;pointer-events:none;transition:opacity .2s}
.overlay.show{opacity:1;pointer-events:auto}
.drawer{
  position:fixed;top:0;right:0;bottom:0;z-index:60;
  width:100%;max-width:430px;background:#fff;
  display:flex;flex-direction:column;
  transform:translateX(102%);transition:transform .25s ease;
  box-shadow:-18px 0 40px -30px rgba(0,0,0,.5);
}
.drawer.open{transform:none}
.drawer-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 14px;border-bottom:1px solid var(--line)}
.drawer-head h2{margin:0;font-size:1.1rem;color:var(--navy)}
.drawer-body{flex:1;overflow-y:auto;padding:12px 14px 20px}
.delivery-mini{margin:0 0 12px;padding:6px 9px;border-radius:8px;background:#eef3f7;font-size:.74rem;font-weight:650;color:#33485a}
.cart-list{list-style:none;margin:0;padding:0;display:grid;gap:10px}
.cart-item{display:grid;grid-template-columns:52px 1fr auto;gap:9px;padding-bottom:10px;border-bottom:1px solid #e8eef3}
.cart-item img,.cart-item .mini{width:52px;height:52px;border-radius:9px;background:#eef3f7;object-fit:cover;display:flex;align-items:center;justify-content:center}
.cart-item .mini svg{width:30px;height:30px;fill:none;stroke:#93a7b6;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round}
.ci-name{font-size:.83rem;font-weight:650;line-height:1.3;margin:0 0 2px;color:#16222d}
.ci-meta{font-size:.75rem;color:var(--muted);margin:0}
.qty{display:flex;align-items:center;gap:2px;border:1px solid var(--line);border-radius:8px;padding:1px;height:44px;margin-top:5px;width:max-content}
.qty button{width:42px;height:42px;border:0;background:transparent;cursor:pointer;font-size:1rem;line-height:1;border-radius:6px;color:#34434f}
.qty button:hover{background:#eef3f7}
.qty span{min-width:44px;text-align:center;font-size:.8rem;font-weight:650}
.ci-side{display:flex;flex-direction:column;align-items:flex-end;gap:4px}
.ci-price{font-size:.82rem;font-weight:700;white-space:nowrap;color:var(--navy)}
.ci-remove{border:0;background:none;padding:0;font-size:.7rem;color:#8a96a1;text-decoration:underline;cursor:pointer}
.cart-empty{color:var(--muted);font-size:.88rem;text-align:center;padding:26px 8px;margin:0}
.cart-summary{display:grid;gap:2px;margin-top:14px}
.cart-summary .row{display:flex;justify-content:space-between;gap:12px;padding:5px 0;font-size:.86rem;color:#44525f}
.cart-summary .row.total{border-top:1px solid var(--line);margin-top:4px;padding-top:9px;font-size:1.02rem;font-weight:750;color:var(--navy)}
.cart-summary .row.discount{color:#1f7a45;font-weight:600}
.field{display:grid;gap:5px;margin-top:12px}
.field label,.field legend{font-size:.8rem;font-weight:650;color:#3f4d5a}
.field select{height:42px;border:1px solid var(--line);border-radius:9px;padding:0 8px;background:#fff;font-size:.86rem;width:100%}
.payments{border:0;padding:0;margin:12px 0 0;display:grid;gap:5px}
.payments legend{padding:0;margin-bottom:3px}
.pay{display:flex;align-items:center;gap:8px;padding:7px 9px;border:1px solid var(--line);border-radius:9px;font-size:.84rem;cursor:pointer}
.pay:has(input:checked){border-color:#cf4736;background:var(--coral-soft)}
.pay input{accent-color:#cf4736;width:16px;height:16px;margin:0}
.pay em{font-style:normal;color:#1f7a45;font-weight:700;font-size:.74rem}
.cart-summary > .btn{margin-top:12px}
.fine{font-size:.72rem;color:#8b96a1;text-align:center;margin:6px 0 0}

/* Modales */
.modal{position:fixed;inset:0;z-index:70;display:none;align-items:center;justify-content:center;padding:14px;background:rgba(12,29,45,.55)}
.modal.open{display:flex}
.modal-card{width:100%;max-width:520px;max-height:90vh;overflow-y:auto;background:#fff;border-radius:14px;padding:16px;box-shadow:0 24px 60px -30px rgba(0,0,0,.6)}
.modal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:6px}
.modal-head h2{margin:0;font-size:1.12rem;color:var(--navy)}
.modal-sub{margin:0 0 12px;font-size:.85rem;color:var(--muted)}
.msg{
  margin:0 0 12px;padding:11px;border:1px solid var(--line);border-radius:10px;
  background:#f7fafc;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
  font-size:.78rem;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere;max-height:46vh;overflow-y:auto;
}
.modal-actions{display:flex;gap:8px;justify-content:flex-end}

.toast{
  position:fixed;left:50%;bottom:18px;z-index:80;transform:translate(-50%,14px);
  background:var(--navy);color:#fff;padding:9px 14px;border-radius:999px;
  font-size:.82rem;font-weight:600;opacity:0;pointer-events:none;transition:opacity .18s,transform .18s;
  max-width:calc(100% - 28px);text-align:center;
}
.toast.show{opacity:1;transform:translate(-50%,0)}

@media (min-width:560px){
  .topbar{padding:0 18px;gap:14px}
  .cart-btn{height:40px}
  .icon-btn{width:38px;height:38px}
  .brand-name{display:block}
  .cart-label{display:inline}
  .search{max-width:360px}
  .hero{padding:22px 18px 6px}
  .hero-media img{height:200px}
  .chip{height:36px;padding:0 12px}
  .qty{height:32px}
  .qty button{width:28px;height:28px}
  .qty span{min-width:38px}
  .card-actions{flex-direction:row}
  .card-actions .btn{flex:1 1 auto}
  .daily-card{flex:1 1 0;max-width:none}
  .daily-info .btn{min-height:32px}
}
@media (min-width:800px){
  .topnav{display:flex;gap:16px;margin-left:auto;font-size:.86rem;font-weight:600}
  .topnav a{text-decoration:none;color:#44525f}
  .topnav a:hover{color:var(--coral-dark)}
  .hero-grid{grid-template-columns:1.05fr .95fr;align-items:center;gap:30px}
  .hero-media img{height:245px}
  .grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
  .thumb > svg{width:44%;height:44%}
  .daily{padding:22px 0}
  .daily-track{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));overflow:visible}
  .reparto-inner{grid-template-columns:1fr 1fr;gap:40px}
}
@media (min-width:1000px){
  .grid{grid-template-columns:repeat(4,minmax(0,1fr))}
  .hero{padding-top:24px}
  .hero-media img{height:265px}
  .card h3{font-size:.9rem}
  .daily-info h3{font-size:.88rem}
}
@media (max-width:559px){
  .chips{
    -webkit-mask-image:linear-gradient(to right,#000 0,#000 calc(100% - 28px),transparent 100%);
    mask-image:linear-gradient(to right,#000 0,#000 calc(100% - 28px),transparent 100%);
  }
}
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *{transition:none!important}
}

/* Productos sin foto: recuadro bajo con el ícono, para no alargar la grilla */
.thumb:not(:has(img)){aspect-ratio:auto;height:110px}
.thumb:not(:has(img)) svg{width:44px;height:44px}
@media (max-width:640px){.thumb:not(:has(img)){height:76px}.thumb:not(:has(img)) svg{width:34px;height:34px}}
.card .btn{white-space:nowrap}
