/* =====================================================================
   Peixateria del Delta — estructura comuna (botiga, pàgines, blog, peu).
   El disseny (colors, tipografia, capçalera i portada) és a editorial.css.
   ===================================================================== */
:root {
  --bg: #f6f0e4; --bg2: #fffdf8; --ink: #1f1b16; --muted: #6b6257; --line: #1f1b16; --soft: #e7dfd0;
  --accent: #0f5f8c; --accent-ink: #fff; --accent2: #d6452f; --wa: #1fa855;
  --head-bg: var(--bg); --head-ink: var(--ink); --foot-bg: var(--ink); --foot-ink: var(--bg);
  --font-head: Georgia, serif; --font-body: system-ui, sans-serif;
  --radius: 6px; --radius-btn: 6px; --shadow: none; --border: 1.5px solid var(--line);
  --wrap: 1140px; --cols: 3; --ph: 220px;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.6 var(--font-body); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; margin: 0 0 .5em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 18px; }
.estret { max-width: 780px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { position: absolute !important; left: -9999px; }
.btn { display: inline-block; padding: 11px 20px; border: var(--border); border-radius: var(--radius-btn); background: var(--accent); color: var(--accent-ink); font-weight: 700; text-decoration: none; cursor: pointer; text-align: center; }
.btn:hover { filter: brightness(1.08); }
.btn-sec { background: transparent; color: var(--ink); }
.btn-gran { padding: 14px 24px; font-size: 17px; }

/* =========================== BOTIGA =========================== */
.cataleg { padding: 20px 0 50px; }
#peix-nav-wrap { position: sticky; top: 76px; z-index: 50; background: var(--bg); padding: 10px 0; }
#peix-nav-wrap.is-stuck { box-shadow: 0 10px 14px -14px rgba(0,0,0,.4); }
#peix-nav-inner { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.peix-f { padding: 10px 18px; border: var(--border); border-radius: 99px; background: var(--bg2); color: var(--ink); font-weight: 700; cursor: pointer; }
.peix-f.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.peix-f-fav.active, #peix-drawer .peix-f[data-cat="FAVORITS"].active { background: #fef3c7; color: #92400e; border-color: #fbbf24; }
.peix-cerca { margin: 12px auto 22px; max-width: 640px; }
#peix-search { width: 100%; padding: 13px 16px; border: var(--border); border-radius: 99px; background: var(--bg2); font-size: 16px; }
#peix-cat-bar, #peix-cat-bar-spacer { display: none; }
@media (max-width: 640px) {
  #peix-nav-wrap { display: none; }
  #peix-cat-bar { position: fixed; z-index: 90; left: 0; right: 0; top: 76px; display: flex; align-items: center; gap: 12px; padding: 8px 14px; background: var(--bg2); border-bottom: var(--border); transform: translateY(-140%); transition: transform .25s; }
  #peix-cat-bar.visible { transform: none; }
  #peix-cat-bar button { border: var(--border); background: var(--accent); color: var(--accent-ink); border-radius: var(--radius-btn); padding: 7px 12px; font-weight: 700; }
  #peix-cat-label { font-weight: 700; }
  #peix-cat-bar-spacer.visible { display: block; height: 52px; }
}
#peix-drawer-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 400; }
#peix-drawer-overlay.obert { display: block; }
#peix-drawer { position: fixed; top: 0; bottom: 0; left: 0; width: 76%; max-width: 290px; background: var(--bg2); color: var(--ink); z-index: 401; transform: translateX(-100%); transition: transform .28s; display: flex; flex-direction: column; box-shadow: 4px 0 24px rgba(0,0,0,.22); }
#peix-drawer.obert { transform: none; }
.peix-drawer-cap { display: flex; justify-content: space-between; align-items: center; padding: 16px; border-bottom: 1px solid var(--soft); font-weight: 800; }
.peix-drawer-cap button { border: 0; background: var(--soft); width: 36px; height: 36px; border-radius: 50%; cursor: pointer; }
#peix-drawer-list { overflow-y: auto; }
#peix-drawer .peix-f { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--soft); border-left: 4px solid transparent; border-radius: 0; background: transparent; padding: 14px 18px; }
#peix-drawer .peix-f.active { border-left-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--ink); }

#peix-grid { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 22px; }
@media (max-width: 960px) { #peix-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { #peix-grid { grid-template-columns: 1fr; } }
.peix-card { display: flex; flex-direction: column; background: var(--bg2); border: var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.peix-foto { position: relative; height: var(--ph); background: var(--soft); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.peix-foto img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s; }
.peix-foto img.sense-foto { object-fit: contain; padding: 24%; opacity: .3; }
.peix-foto img.rota { width: auto; height: 140%; max-width: none; transform: rotate(90deg); }
.peix-card:hover .peix-foto img:not(.rota) { transform: scale(1.04); }
.peix-etiqueta { position: absolute; top: 12px; left: 12px; background: var(--accent2); color: #fff; padding: 5px 10px; border-radius: 4px; font: 800 12px/1 system-ui; text-transform: uppercase; letter-spacing: .05em; }
.peix-cos { padding: 18px; display: flex; flex-direction: column; flex: 1; gap: 12px; }
.peix-cap h3 { margin: 0; font-size: 21px; }
.peix-format { color: var(--muted); font-size: 14px; }
.peix-fila { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.peix-preu { font: 800 23px/1 var(--font-head); color: var(--accent); }
.peix-preu-consulta { font-size: 15px; }
.peix-unitat { color: var(--muted); font-size: 14px; }
.peix-accions { display: flex; gap: 6px; }
.peix-info-btn { border: 1px solid var(--soft); background: color-mix(in srgb, var(--accent) 10%, var(--bg2)); border-radius: 99px; padding: 6px 11px; font-size: 13px; font-weight: 700; cursor: pointer; }
.peix-fav-btn { width: 36px; height: 36px; border: 1.5px solid #fee2e2; background: var(--bg2); border-radius: 50%; cursor: pointer; font-size: 16px; line-height: 1; }
.peix-fav-btn.is-fav { background: #fef2f2; border-color: #ef4444; }
.peix-opcions { display: grid; gap: 10px; }
.peix-detalls { background: color-mix(in srgb, var(--accent) 7%, var(--bg2)); border: 1px dashed color-mix(in srgb, var(--accent) 40%, transparent); border-radius: var(--radius); padding: 10px 12px; font-size: 14px; }
.peix-detalls-tit { font-weight: 800; margin-bottom: 4px; }
.peix-detalls ul { margin: 0; padding-left: 18px; }
.peix-tria { font-size: 13px; font-weight: 700; color: var(--muted); }
.peix-camps { display: grid; gap: 10px; }
.peix-camps.dos { grid-template-columns: 1fr 1fr; }
.peix-camp label { display: block; font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.peix-camp select, .peix-camp input { width: 100%; height: 46px; padding: 0 12px; border: 2px solid color-mix(in srgb, var(--line) 25%, transparent); border-radius: var(--radius-btn); background: var(--bg2); font-size: 15px; }
.peix-camp select:disabled, .peix-camp input:disabled { opacity: .45; }
.p-presentacio-extra { display: grid; gap: 10px; }
.peix-afegir { margin-top: auto; padding: 13px; border: var(--border); border-radius: var(--radius-btn); background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 15px; cursor: pointer; transition: background .2s; }
.peix-afegir.afegit { background: #16a34a; border-color: #16a34a; color: #fff; }
.peix-avis { margin: 0; color: #b91c1c; font-weight: 700; font-size: 14px; }
.peix-shake { animation: peix-shake .4s; border-color: #ef4444 !important; box-shadow: 0 0 0 3px rgba(239,68,68,.25); }
@keyframes peix-shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
#peix-buit { text-align: center; padding: 40px 0; color: var(--muted); }

/* carret */
#peix-cart { position: fixed; z-index: 350; right: 20px; bottom: 20px; width: min(400px, calc(100vw - 24px)); max-height: calc(100vh - 140px); display: none; flex-direction: column; background: var(--bg2); color: var(--ink); border: var(--border); border-radius: calc(var(--radius) + 6px); box-shadow: 0 20px 50px rgba(0,0,0,.3); overflow: hidden; }
#peix-cart.obert { display: flex; }
.peix-cart-cap { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; background: var(--accent); color: var(--accent-ink); font-weight: 800; }
.peix-cart-cap button { border: 0; background: rgba(255,255,255,.2); color: inherit; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; }
#peix-cart-list { overflow-y: auto; flex: 1; min-height: 0; }
.peix-cart-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 16px; border-bottom: 1px solid var(--soft); font-size: 15px; }
.peix-cart-item button { flex: none; border: 0; background: #fee2e2; color: #ef4444; width: 28px; height: 28px; border-radius: 50%; cursor: pointer; font-weight: 800; }
.peix-recorda { padding: 10px 16px; font-size: 13.5px; background: color-mix(in srgb, #fbbf24 18%, var(--bg2)); }
.peix-cart-peu { padding: 12px 16px 16px; display: grid; gap: 8px; overflow-y: auto; }
.peix-btn-wa { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 13px; border: 0; border-radius: var(--radius-btn); background: var(--wa); color: #fff; font-weight: 800; font-size: 15px; cursor: pointer; }
#peix-form-toggle { padding: 8px; border: 1.5px solid var(--soft); border-radius: var(--radius-btn); background: transparent; font-weight: 600; font-size: 13.5px; cursor: pointer; }
#peix-email-form { display: grid; gap: 4px; }
#peix-email-form label { font-size: 13px; font-weight: 700; margin-top: 4px; }
#peix-email-form input, #peix-email-form textarea { width: 100%; padding: 9px 11px; border: 1.5px solid color-mix(in srgb, var(--line) 30%, transparent); border-radius: var(--radius-btn); background: var(--bg); }
#peix-form-submit { margin-top: 8px; padding: 12px; border: 0; border-radius: var(--radius-btn); background: var(--accent); color: var(--accent-ink); font-weight: 800; cursor: pointer; }
#peix-form-status { padding: 8px 10px; border-radius: 6px; font-size: 14px; margin-top: 6px; }
#peix-form-status.error { background: #fee2e2; color: #991b1b; }
#peix-form-status.ok { background: #dcfce7; color: #166534; }
.peix-nota { font-size: 12.5px; color: var(--muted); margin: 6px 0 0; }
.peix-rebuda { padding: 24px; text-align: center; }
.peix-rebuda div { font-size: 40px; }
#peix-cart-open { position: fixed; z-index: 340; right: 20px; bottom: 88px; display: flex; align-items: center; gap: 6px; padding: 14px 18px; border: var(--border); border-radius: 99px; background: var(--accent); color: var(--accent-ink); font-size: 20px; cursor: pointer; box-shadow: 0 8px 24px rgba(0,0,0,.3); }
#peix-cart-open[hidden] { display: none; }
#peix-badge { background: #fff; color: var(--accent); border-radius: 99px; min-width: 26px; height: 26px; display: grid; place-items: center; font: 800 14px/1 system-ui; padding: 0 6px; }

/* fitxa */
#peix-modal { display: none; }
#peix-modal.obert { display: block; }
.peix-modal-fons { position: fixed; inset: 0; z-index: 500; background: rgba(0,0,0,.7); display: flex; align-items: center; justify-content: center; padding: 18px; }
.peix-modal-caixa { background: var(--bg2); color: var(--ink); border-radius: calc(var(--radius) + 12px); max-width: 560px; width: 100%; max-height: 90vh; overflow-y: auto; box-shadow: 0 25px 50px rgba(0,0,0,.4); }
.peix-modal-foto { position: relative; height: 300px; background: var(--soft); }
.peix-modal-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.peix-modal-foto button { position: absolute; top: 14px; right: 14px; width: 42px; height: 42px; border: 0; border-radius: 50%; background: rgba(255,255,255,.95); color: #333; font-size: 20px; font-weight: 800; cursor: pointer; }
.peix-modal-cos { padding: 26px; }
.peix-modal-cos h2 { font-size: 30px; margin: 0 0 4px; }
#peix-modal-format { color: var(--muted); margin: 0 0 18px; }
#peix-modal-info { background: color-mix(in srgb, var(--accent) 5%, var(--bg2)); border: 1px solid var(--soft); border-radius: var(--radius); padding: 20px; line-height: 1.7; font-size: 15px; }

/* =========================== PÀGINES =========================== */
.pagina { padding: 40px 0 60px; }
.pagina-tit { font-size: clamp(32px, 5vw, 48px); font-weight: 800; }
.contingut { font-size: 17px; }
.contingut h2 { font-size: 28px; margin-top: 1.4em; }
.contingut h3, .contingut h4 { margin-top: 1.2em; }
.contingut img { border-radius: var(--radius); }
.contingut a { color: var(--accent); }
.contingut table { border-collapse: collapse; width: 100%; }
.contingut td, .contingut th { border: 1px solid var(--soft); padding: 8px; }
/* estructura de columnes heretada del WordPress */
.contingut .l-section { padding: 18px 0; }
.contingut .g-cols { display: flex; flex-wrap: wrap; gap: 28px; }
.contingut .wpb_column { flex: 1 1 100%; min-width: 0; }
@media (min-width: 760px) {
  .contingut .vc_col-sm-6 { flex: 1 1 calc(50% - 28px); }
  .contingut .vc_col-sm-4 { flex: 1 1 calc(33.33% - 28px); }
  .contingut .vc_col-sm-3 { flex: 1 1 calc(25% - 28px); }
  .contingut .vc_col-sm-8 { flex: 1 1 calc(66.66% - 28px); }
}
.contingut .w-separator { height: 20px; }
.contingut .w-video-h { position: relative; padding-bottom: 56.25%; height: 0; border-radius: var(--radius); overflow: hidden; }
.contingut .w-video-h iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.contingut .w-video-icon { display: none; }
.doc-incrustat { background: transparent !important; padding: 0 !important; }
.doc-incrustat .container { background: var(--bg2) !important; border: var(--border); border-radius: var(--radius) !important; box-shadow: var(--shadow); }

/* blog */
.blog-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin-top: 20px; }
@media (max-width: 900px) { .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .blog-grid { grid-template-columns: 1fr; } }
.post-card { display: flex; flex-direction: column; background: var(--bg2); border: var(--border); border-radius: var(--radius); overflow: hidden; text-decoration: none; box-shadow: var(--shadow); transition: transform .15s; }
.post-card:hover { transform: translateY(-3px); }
.post-card-img { aspect-ratio: 16 / 10; background: var(--soft); display: grid; place-items: center; font-size: 40px; overflow: hidden; }
.post-card-img img { width: 100%; height: 100%; object-fit: cover; }
.post-card-cos { padding: 16px; }
.post-card time { font-size: 13px; color: var(--muted); }
.post-card h3 { font-size: 20px; margin: 4px 0 6px; }
.post-card p { margin: 0; color: var(--muted); font-size: 14.5px; }
.article { padding: 34px 0 60px; }
.article-meta { color: var(--muted); font-size: 14px; }
.article-meta a { color: var(--accent); }
.article h1 { font-size: clamp(30px, 4.6vw, 46px); font-weight: 800; }
.article-img { width: 100%; max-height: 460px; object-fit: cover; border-radius: var(--radius); margin: 10px 0 24px; border: var(--border); }
.article-cta { margin: 36px 0; padding: 22px; background: var(--bg2); border: var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.rel-tit { margin-top: 20px; }

/* peu */
.peu { background: var(--foot-bg); color: var(--foot-ink); padding: 40px 0 20px; margin-top: 0; font-size: 15px; }
.peu a { color: inherit; }
.peu-in { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 24px; }
.peu-marca img { height: 48px; width: auto; background: #fff; border-radius: 8px; padding: 4px 8px; }
.peu-links { display: flex; flex-direction: column; gap: 6px; }
.xarxes { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.peu-baix { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 26px; padding-top: 16px; border-top: 1px solid color-mix(in srgb, var(--foot-ink) 25%, transparent); font-size: 13px; opacity: .85; }
@media (max-width: 760px) { .peu-in { grid-template-columns: 1fr; } }

/* WhatsApp flotant i galetes */
.wa-flotant { position: fixed; z-index: 330; right: 20px; bottom: 20px; width: 56px; height: 56px; border-radius: 50%; background: var(--wa); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 22px rgba(0,0,0,.3); }
.wa-flotant svg { width: 30px; height: 30px; }
.galetes { position: fixed; z-index: 360; left: 16px; bottom: 16px; max-width: 420px; background: var(--bg2); color: var(--ink); border: var(--border); border-radius: var(--radius); padding: 16px; box-shadow: 0 10px 30px rgba(0,0,0,.25); font-size: 14px; }
.galetes p { margin: 0 0 10px; }
.galetes div { display: flex; gap: 8px; flex-wrap: wrap; }
