/* Tienda, calculadora de materiales y carrito avanzado */

/* ---------- Tienda /tienda ---------- */
.section--tight { padding: clamp(28px, 4vw, 48px) 0 clamp(64px, 8vw, 110px); }
.shophero { background: radial-gradient(70% 120% at 90% 0%, rgba(44, 103, 222, .35), transparent 60%), var(--navy); color: #fff; padding: clamp(40px, 6vw, 72px) 0; }
.shophero__in { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: end; }
.shophero .lead { margin-top: 14px; }
.shophero__perks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.shophero__perks li { display: grid; padding: 14px 16px; border-radius: 12px; background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px var(--line-light); }
.shophero__perks b { font-size: 16px; }
.shophero__perks span { color: rgba(255, 255, 255, .65); font-size: 14px; }
.shop { display: grid; grid-template-columns: 250px 1fr; gap: 24px; align-items: start; margin-top: 28px; }
.shop__side { position: sticky; top: calc(var(--header-h) + 16px); display: grid; gap: 14px; background: #fff; border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow); }
.fbox { display: grid; gap: 8px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.fbox__t { font-family: var(--f-mono); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); display: flex; justify-content: space-between; }
.fbox__t output { color: var(--text); letter-spacing: 0; }
.fcats { display: grid; gap: 2px; }
.fcat { display: flex; justify-content: space-between; align-items: center; border: 0; background: none; padding: 9px 10px; border-radius: 8px; font-weight: 650; font-size: 14.5px; text-align: left; }
.fcat small { color: var(--muted); font-weight: 600; }
.fcat:hover { background: var(--concrete); }
.fcat[aria-pressed="true"] { background: var(--ink); color: #fff; }
.fcat[aria-pressed="true"] small { color: rgba(255, 255, 255, .7); }
.radio, .check2 { display: flex; gap: 10px; align-items: center; font-weight: 600; font-size: 14.5px; cursor: pointer; }
.radio input, .check2 input { width: 18px; height: 18px; accent-color: var(--red); }
.shop__apply { display: none; }
.shop__bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.shop__bar .search { flex: 1; }
.shop__bar select { height: 52px; padding: 0 14px; border-radius: 12px; border: 0; background: #fff; box-shadow: var(--shadow); font-weight: 650; }
.shop__filterbtn { display: none; }
.shop__count { color: var(--muted); font-size: 14.5px; margin: 14px 0 12px; }
.stock { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: #0F7A3A; }
.stock::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.stock--low { color: #A86A00; }
.stock--out { color: var(--red); }
a.card__art { color: inherit; }
.crumbs { display: flex; gap: 8px; flex-wrap: wrap; font-size: 14px; color: var(--muted); margin-bottom: 18px; }
.crumbs a:hover { color: var(--blue-d); text-decoration: underline; }
.related { padding-top: 0 !important; }
.related__title { font-size: clamp(28px, 3.4vw, 42px); margin-bottom: 20px; }
.nav--sub { margin: 0 auto; }

/* ---------- Calculadora de materiales ---------- */
.calc2 { display: grid; grid-template-columns: 1.1fr 1fr; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); margin-bottom: 28px; background: #fff; }
.calc2__intro { padding: clamp(20px, 3vw, 30px); background: var(--ink); color: #fff; display: grid; gap: 12px; align-content: start; }
.calc2__intro .mono { color: #7EA4F5; }
.calc2__intro h2 { font-family: var(--f-display); font-variation-settings: 'wdth' 76; font-weight: 850; text-transform: uppercase; font-size: clamp(24px, 2.6vw, 34px); }
.calc2__intro .muted { color: rgba(255, 255, 255, .65); }
.calc2__fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.calc2__intro .field { color: rgba(255, 255, 255, .7); }
.calc2__intro .field input, .calc2__intro .field select { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .16); color: #fff; }
.calc2__intro .field select option { color: var(--text); }
.calc2__checks { display: flex; gap: 18px; flex-wrap: wrap; }
.calc2__checks .check2 { color: #fff; }
.calc2__out { padding: clamp(20px, 3vw, 30px); display: grid; gap: 12px; align-content: start; }
.calc2__table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.calc2__table th { text-align: left; font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-bottom: 8px; border-bottom: 2px solid var(--ink); }
.calc2__table td { padding: 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.calc2__table td a { font-weight: 750; }
.calc2__table td a:hover { color: var(--blue-d); }
.calc2__table .r { text-align: right; white-space: nowrap; padding-left: 10px; }
.calc2__table tfoot td { border: 0; font-weight: 850; font-size: 20px; padding-top: 12px; }
.calc2__concrete { font-size: 14.5px; padding: 10px 12px; border-radius: 10px; background: #EEF3FD; }
.calc2__concrete:empty { display: none; }
.calc2__concrete a { color: var(--blue-d); font-weight: 750; }

/* ---------- Carrito: despacho gratis, cupón, sugerencias ---------- */
.drawer__n { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 7px; margin-left: 6px; border-radius: 13px; background: var(--ink); color: #fff; font-family: var(--f-body); font-size: 14px; vertical-align: middle; }
.shipbar { padding: 12px 22px 14px; background: #FFF6E0; border-bottom: 1px solid #F1DFB0; font-size: 14px; }
.shipbar p { display: flex; gap: 8px; align-items: center; }
.shipbar__track { height: 6px; border-radius: 3px; background: rgba(0, 0, 0, .08); margin-top: 8px; overflow: hidden; }
.shipbar__track span { display: block; height: 100%; width: 0; background: var(--red); border-radius: 3px; transition: width .5s var(--ease); }
.shipbar--done { background: #E4F6EA; border-color: #BFE6CB; }
.shipbar--done .shipbar__track span { background: var(--wa); }
.line__art { text-decoration: none; }
.line__art img { width: 100%; height: 100%; object-fit: cover; }
.line__warn { font-size: 12.5px; font-weight: 700; color: var(--red); }
.xsell { margin-top: 18px; padding: 14px; border-radius: 14px; background: #fff; border: 1px solid var(--line); }
.xsell .mono { color: var(--muted); margin-bottom: 8px; }
.xs { display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: center; padding: 6px 0; }
.xs + .xs { border-top: 1px dashed var(--line); }
.xs__art { width: 40px; height: 40px; border-radius: 8px; background: var(--tone, #888); display: grid; place-items: center; overflow: hidden; }
.xs__art svg { width: 62%; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.xs__art img, .xs__art canvas { width: 100%; height: 100%; object-fit: cover; }
.xs p { font-size: 13.5px; font-weight: 700; line-height: 1.25; }
.xs small { color: var(--muted); font-size: 12.5px; }
.xs__add { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; font-size: 20px; font-weight: 700; line-height: 1; }
.xs__add:hover { background: var(--red); }
.coupon { display: flex; gap: 8px; align-items: center; padding: 6px 6px 6px 12px; border-radius: 12px; border: 1.5px dashed #CFCAC2; background: #fff; }
.coupon .ic { color: var(--muted); }
.coupon input { flex: 1; min-width: 0; border: 0; height: 36px; font-size: 15px; text-transform: uppercase; background: none; }
.coupon input:focus { outline: none; }
.coupon__msg { font-size: 13px; font-weight: 700; color: var(--red); margin-top: -4px; }
.coupon__msg--ok { color: #0F7A3A; }
.total--ok { color: #0F7A3A; font-weight: 700; }

@media (max-width: 1100px) {
  .shophero__in { grid-template-columns: 1fr; }
  .shophero__perks { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 920px) {
  .shop { grid-template-columns: 1fr; }
  .shop__side { position: fixed; inset: 0 0 0 auto; width: min(340px, 90%); z-index: 95; border-radius: 0; overflow-y: auto; transform: translateX(100%); transition: transform .3s var(--ease); align-content: start; }
  .filters-open .shop__side { transform: none; box-shadow: -20px 0 60px rgba(0, 0, 0, .3); }
  .filters-open::after { content: ''; position: fixed; inset: 0; z-index: 94; background: rgba(6, 10, 18, .5); }
  .shop__apply, .shop__filterbtn { display: inline-flex; }
  .calc2 { grid-template-columns: 1fr; }
  .nav--sub { display: none; }
}
@media (max-width: 640px) {
  .shophero__perks { grid-template-columns: 1fr; }
  .shop__bar select { flex: 1; }
}
