/* El Surtidor — carrito/checkout Work
   Capa exclusivamente visual. */

:root{
  --sw-navy:#123957;
  --sw-navy-dark:#0b2d46;
  --sw-orange:#f36f21;
  --sw-bg:#f5f7f9;
  --sw-line:#dce4ea;
  --sw-muted:#697b89;
  --sw-white:#fff;
  --sw-radius:16px;
}

body.shop-work{
  background:var(--sw-bg);
  color:#172f41;
}

/* HEADER */

.shop-work .site-header{
  position:relative;
  top:auto;
  background:#fff;
  border-bottom:1px solid #e1e7ec;
  box-shadow:none;
}

.shop-work .nav-wrap{
  min-height:86px;
}

.shop-work .brand img{
  width:230px;
  max-height:60px;
}

.shop-work .nav-wrap nav a{
  min-height:42px;
  padding:9px 15px;
  border:1px solid var(--sw-line);
  border-radius:9px;
  background:#fff;
  box-shadow:none;
}

.shop-work .nav-wrap nav a:hover{
  background:#f7f9fb;
  transform:none;
}

/* CONTENEDOR */

.shop-work .shop-page{
  width:min(1180px,calc(100% - 40px));
  padding-top:52px;
  padding-bottom:90px;
}

.shop-work .shop-heading{
  margin-bottom:28px;
}

.shop-work .shop-heading .eyebrow{
  margin-bottom:8px;
}

.shop-work .shop-heading h1{
  color:var(--sw-navy);
  font-size:clamp(34px,4vw,48px);
  line-height:1.05;
  margin:0;
  letter-spacing:-.035em;
}

.shop-work .shop-heading h1 span{
  color:var(--sw-orange);
}

.shop-work .shop-subtitle{
  margin:12px 0 0;
  color:var(--sw-muted);
  max-width:620px;
  font-size:15px;
}

/* PASOS */

.checkout-steps{
  display:flex;
  align-items:center;
  gap:9px;
  margin:25px 0 32px;
  color:#82909b;
  font-size:12px;
  font-weight:800;
}

.checkout-step{
  display:inline-flex;
  align-items:center;
  gap:7px;
}

.checkout-step b{
  width:24px;
  height:24px;
  display:inline-grid;
  place-items:center;
  border-radius:50%;
  border:1px solid #cbd6de;
  background:#fff;
  font-size:11px;
}

.checkout-step.active{
  color:var(--sw-navy);
}

.checkout-step.active b{
  background:var(--sw-orange);
  border-color:var(--sw-orange);
  color:#fff;
}

.checkout-step-separator{
  width:28px;
  height:1px;
  background:#cbd6de;
}

/* CARRITO */

.shop-work #cartView{
  display:grid;
  grid-template-columns:minmax(0,1fr) 350px;
  gap:26px;
  align-items:start;
}

.shop-work .shop-lines{
  display:grid;
  gap:12px;
}

.shop-work .shop-line{
  display:grid;
  grid-template-columns:100px minmax(0,1fr) 82px 130px 38px;
  gap:18px;
  align-items:center;
  padding:18px;
  background:#fff;
  border:1px solid var(--sw-line);
  border-radius:var(--sw-radius);
  box-shadow:0 5px 18px rgba(18,57,87,.04);
}

.shop-work .shop-line img{
  width:92px;
  height:92px;
  padding:5px;
  object-fit:contain;
  border-radius:12px;
  background:#f7f9fb;
}

.shop-work .shop-line b{
  display:block;
  color:var(--sw-navy);
  font-size:15px;
  line-height:1.35;
  margin-bottom:5px;
}

.shop-work .shop-line small{
  color:var(--sw-muted);
  font-size:12px;
}

.shop-work .shop-line input{
  width:70px;
  height:42px;
  padding:6px 8px;
  text-align:center;
  border:1px solid #cbd6df;
  border-radius:9px;
  background:#fff;
}

.shop-work .shop-line strong{
  color:var(--sw-navy);
  text-align:right;
  font-size:16px;
}

.shop-work .shop-line button{
  width:34px;
  height:34px;
  border:1px solid #dce3e9;
  border-radius:9px;
  background:#fff;
  color:#71808d;
  cursor:pointer;
  font-size:17px;
}

.shop-work .shop-line button:hover{
  border-color:#f3c5aa;
  background:#fff6f0;
  color:#c95713;
}

.shop-work .shop-summary{
  position:sticky;
  top:24px;
  margin:0;
  max-width:none;
  padding:24px;
  border:1px solid var(--sw-line);
  border-radius:var(--sw-radius);
  box-shadow:0 7px 24px rgba(18,57,87,.06);
}

.shop-work .shop-summary:before{
  content:"Resumen de compra";
  display:block;
  color:var(--sw-navy);
  font-size:19px;
  font-weight:900;
  padding-bottom:14px;
  border-bottom:1px solid #e6ebef;
  margin-bottom:6px;
}

.shop-work .shop-summary>div{
  padding:14px 0;
}

.shop-work .shop-summary>div span{
  color:#536675;
}

.shop-work .shop-summary>div strong{
  color:var(--sw-navy);
  font-size:21px;
}

.shop-work .shop-summary p{
  padding:14px;
  border-radius:10px;
  background:#f5f8fa;
  color:#617381;
  font-size:12px;
  line-height:1.55;
}

.shop-work .shop-summary .btn{
  width:100%;
  min-height:50px;
  border-radius:9px;
  background:var(--sw-orange);
}

/* CHECKOUT */

.shop-work .checkout-grid{
  grid-template-columns:minmax(0,1.35fr) minmax(310px,.65fr);
  gap:28px;
  align-items:start;
}

.shop-work .checkout-form,
.shop-work #checkoutSummary{
  background:#fff;
  border:1px solid var(--sw-line);
  border-radius:var(--sw-radius);
  box-shadow:0 6px 22px rgba(18,57,87,.05);
}

.shop-work .checkout-form{
  padding:28px;
  gap:17px;
}

.shop-work .checkout-form>label{
  color:var(--sw-navy);
  font-size:13px;
  font-weight:800;
}

.shop-work .checkout-form input,
.shop-work .checkout-form select,
.shop-work .checkout-form textarea{
  min-height:46px;
  padding:11px 13px;
  border:1px solid #ccd7df;
  border-radius:9px;
  background:#fff;
  color:#243c4e;
  outline:none;
}

.shop-work .checkout-form textarea{
  min-height:100px;
  resize:vertical;
}

.shop-work .checkout-form input:focus,
.shop-work .checkout-form select:focus,
.shop-work .checkout-form textarea:focus{
  border-color:#7595aa;
  box-shadow:0 0 0 3px rgba(18,57,87,.07);
}

/* ENVÍO */

.shop-work .checkout-shipping-info{
  background:#f7f9fb;
  border:1px solid var(--sw-line);
  border-radius:12px;
}

/* PAGO */

.shop-work .payment-methods{
  margin:5px 0 0;
  padding:18px;
  border:1px solid var(--sw-line);
  border-radius:14px;
}

.shop-work .payment-methods legend{
  color:var(--sw-navy);
  padding:0 7px;
  font-size:15px;
  font-weight:900;
}

.shop-work .payment-option-v18{
  min-height:68px;
  margin:9px 0;
  padding:12px 14px;
  border:1px solid #dce4ea;
  border-radius:11px;
  background:#fff;
}

.shop-work .payment-option-v18:hover{
  background:#f9fbfc;
}

.shop-work .payment-option-v18:has(input:checked){
  border-color:var(--sw-navy);
  background:#f4f8fb;
  box-shadow:inset 3px 0 0 var(--sw-orange);
}

.shop-work .payment-option-v18.disabled-payment{
  background:#f8f9fa;
  opacity:.48;
}

/* PRIVACIDAD / TÉRMINOS */

.shop-work .checkout-privacy{
  background:#f5f8fb;
  border-color:#d8e4ed;
}

.shop-work .checkout-terms{
  background:#fff;
  border-color:var(--sw-line);
}

/* BOTÓN FINAL */

.shop-work #placeOrder{
  width:100%;
  min-height:54px;
  border-radius:9px;
  background:var(--sw-orange);
  font-size:15px;
  box-shadow:0 8px 18px rgba(243,111,33,.18);
}

/* RESUMEN CHECKOUT */

.shop-work #checkoutSummary{
  position:sticky;
  top:24px;
  padding:24px;
}

.shop-work #checkoutSummary h2{
  margin:0 0 13px;
  padding-bottom:14px;
  border-bottom:1px solid #e4e9ed;
  color:var(--sw-navy);
  font-size:21px;
}

.shop-work .checkout-line{
  align-items:start;
  color:#536675;
  font-size:13px;
  line-height:1.45;
  border-bottom:1px solid #edf0f2;
}

.shop-work .checkout-line b{
  color:var(--sw-navy);
  white-space:nowrap;
}

.shop-work .checkout-total{
  margin-top:8px;
  padding-top:18px;
  border-top:2px solid #e0e6eb;
  color:var(--sw-navy);
}

.shop-work .checkout-total strong{
  font-size:22px;
}

.shop-work #checkoutSummary .hint{
  margin-top:14px;
  padding:13px;
  background:#f5f8fa;
  border-radius:10px;
  color:#657784;
  font-size:12px;
}

/* MÓVIL */

@media(max-width:900px){
  .shop-work #cartView,
  .shop-work .checkout-grid{
    grid-template-columns:1fr;
  }

  .shop-work .shop-summary,
  .shop-work #checkoutSummary{
    position:static;
  }
}

@media(max-width:700px){
  .shop-work .shop-page{
    width:min(100% - 24px,1180px);
    padding-top:34px;
  }

  .shop-work .nav-wrap{
    min-height:72px;
  }

  .shop-work .brand img{
    width:190px;
  }

  .shop-work .shop-line{
    grid-template-columns:72px minmax(0,1fr) 36px;
    gap:12px;
    padding:13px;
  }

  .shop-work .shop-line img{
    width:68px;
    height:68px;
  }

  .shop-work .shop-line input{
    grid-column:2;
    width:68px;
  }

  .shop-work .shop-line strong{
    grid-column:2;
    text-align:left;
  }

  .shop-work .shop-line button{
    grid-column:3;
    grid-row:1;
  }

  .shop-work .checkout-form{
    padding:18px;
  }

  .checkout-steps{
    overflow:auto;
    white-space:nowrap;
  }
}

/* =========================================================
   CHECKOUT V2 — PASO 146
   Ajuste exclusivamente visual del entorno privado.
   ========================================================= */

.shop-work .checkout-grid{
  grid-template-columns:minmax(0,760px) minmax(320px,360px);
  gap:28px;
  align-items:start;
  justify-content:space-between;
}

.shop-work .checkout-form{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:16px 18px;
  padding:26px;
}

.shop-work .checkout-field{
  min-width:0;
}

.shop-work .checkout-field-full,
.shop-work .checkout-shipping-info,
.shop-work .checkout-form>label,
.shop-work .checkout-form>fieldset,
.shop-work .checkout-privacy,
.shop-work .checkout-terms,
.shop-work .checkout-form>#placeOrder,
.shop-work .checkout-form>.hint{
  grid-column:1 / -1;
}

.shop-work .checkout-field label{
  display:grid;
  gap:6px;
  color:var(--sw-navy);
  font-size:13px;
  font-weight:800;
}

.shop-work .checkout-field input,
.shop-work .checkout-field select{
  width:100%;
  min-height:46px;
}

.shop-work .checkout-shipping-info{
  margin-top:2px;
  padding:18px 20px;
}

.shop-work .checkout-shipping-info>p{
  margin:8px 0;
}

.shop-work .outside-zmg-box{
  margin-top:14px;
}

.shop-work #checkoutSummary{
  position:sticky;
  top:104px;
  padding:24px;
  min-width:0;
}

.shop-work #checkoutSummary::before{
  content:"Resumen de compra";
  display:block;
  color:var(--sw-navy);
  font-size:19px;
  line-height:1.2;
  font-weight:900;
  padding-bottom:14px;
  margin-bottom:6px;
  border-bottom:1px solid var(--sw-line);
}

.shop-work .payment-methods{
  margin-top:2px;
  padding:16px!important;
}

.shop-work .payment-option{
  min-height:64px;
  margin:8px 0!important;
  padding:10px 12px!important;
}

.shop-work .checkout-privacy{
  margin-top:0;
}

.shop-work .checkout-terms{
  margin-top:0;
}

.shop-work #placeOrder{
  width:100%;
  min-height:54px;
  font-size:16px;
}

.shop-work .checkout-form>.hint{
  margin:0;
  text-align:center;
}

@media(max-width:900px){
  .shop-work .checkout-grid{
    grid-template-columns:1fr;
  }

  .shop-work #checkoutSummary{
    position:static;
    grid-row:1;
  }
}

@media(max-width:700px){
  .shop-work .checkout-form{
    grid-template-columns:1fr;
    padding:18px;
    gap:14px;
  }

  .shop-work .checkout-field,
  .shop-work .checkout-field-full,
  .shop-work .checkout-shipping-info,
  .shop-work .checkout-form>label,
  .shop-work .checkout-form>fieldset,
  .shop-work .checkout-privacy,
  .shop-work .checkout-terms,
  .shop-work .checkout-form>#placeOrder,
  .shop-work .checkout-form>.hint{
    grid-column:1;
  }

  .shop-work #checkoutSummary{
    padding:18px;
  }
}

/* =========================================================
   CHECKOUT POLISH — PASO 147
   Solo presentación.
   ========================================================= */

.shop-work .checkout-heading-row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:24px;
}

.shop-work .checkout-heading-row .shop-heading{
  margin-bottom:0;
}

.shop-work .checkout-back-cart{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:40px;
  margin-top:4px;
  padding:8px 14px;
  border:1px solid var(--sw-line);
  border-radius:9px;
  background:#fff;
  color:var(--sw-navy);
  text-decoration:none;
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
}

.shop-work .checkout-back-cart:hover{
  border-color:#b8c8d3;
  background:#f9fbfc;
}

/* El JS actual genera su propio H2 "Resumen".
   Conservamos el nodo para no tocar checkout.js,
   pero evitamos el título visual duplicado. */

.shop-work #checkoutSummary > h2{
  display:none;
}

/* Si existen muchos productos, el listado queda contenido
   y el subtotal permanece fuera del área desplazable. */

.shop-work #checkoutSummary{
  max-height:calc(100vh - 135px);
  overflow:hidden;
}

.shop-work #checkoutSummary .checkout-lines{
  max-height:340px;
  overflow-y:auto;
  overscroll-behavior:contain;
  padding-right:6px;
  margin-right:-6px;
  scrollbar-width:thin;
}

.shop-work #checkoutSummary .checkout-lines::-webkit-scrollbar{
  width:6px;
}

.shop-work #checkoutSummary .checkout-lines::-webkit-scrollbar-thumb{
  background:#cbd6de;
  border-radius:999px;
}

/* Productos más compactos */

.shop-work .checkout-line{
  padding:10px 0;
  gap:12px;
}

.shop-work .checkout-line span{
  line-height:1.35;
}

.shop-work .checkout-total{
  background:#fff;
  margin-top:4px;
  padding-top:16px;
}

/* Entrega más compacta */

.shop-work .checkout-shipping-info{
  padding:15px 17px;
}

.shop-work .checkout-shipping-info p{
  margin:6px 0;
  line-height:1.45;
}

.shop-work .outside-zmg-box{
  margin-top:11px;
  padding:13px 14px;
}

.shop-work .outside-zmg-box p{
  margin:5px 0;
}

/* Métodos de pago */

.shop-work .payment-option-v18{
  min-height:70px;
  padding:12px 14px!important;
}

.shop-work .payment-logo{
  min-width:92px;
  min-height:40px;
  display:flex;
  align-items:center;
  justify-content:center;
}

.shop-work .payment-logo img{
  max-width:78px;
  max-height:30px;
  object-fit:contain;
}

.shop-work .payment-copy strong{
  font-size:13px;
}

.shop-work .payment-copy small{
  margin-top:3px;
  font-size:11px;
}

/* En pantallas altas permitimos algo más de catálogo */

@media(min-height:900px){
  .shop-work #checkoutSummary .checkout-lines{
    max-height:430px;
  }
}

@media(max-width:900px){
  .shop-work #checkoutSummary{
    max-height:none;
    overflow:visible;
  }

  .shop-work #checkoutSummary .checkout-lines{
    max-height:none;
    overflow:visible;
    padding-right:0;
    margin-right:0;
  }
}

@media(max-width:700px){
  .shop-work .checkout-heading-row{
    display:block;
  }

  .shop-work .checkout-back-cart{
    margin-top:14px;
  }
}
