/* CholloPrinting · Comercio público y accesibilidad · v1.0.8
 * Solo presentación. No modifica lógica WooCommerce, pagos, stock ni pedidos.
 */

/* Accesibilidad global: foco visible para enlaces y controles interactivos. */
.cp-visual-coherence :where(a,button,input,select,textarea,summary,[tabindex]):focus-visible{
  outline:2px solid var(--cpv-primary)!important;
  outline-offset:3px!important;
}
.cp-visual-coherence :where(a,button,input,select,textarea,summary,[tabindex]):focus:not(:focus-visible){outline:none!important}

/* WooCommerce: contenedor y jerarquía comunes. */
.cp-visual-coherence.woocommerce-page .cp-main,
.cp-visual-coherence .woocommerce-page .cp-main{
  width:min(1180px,calc(100% - 32px));
  margin:0 auto;
  padding:36px 0 56px;
}
.cp-visual-coherence.woocommerce-page .cp-main>article>h1,
.cp-visual-coherence .woocommerce-account .cp-main>article>h1{
  margin:0 0 24px!important;
  color:var(--cpv-text)!important;
  font-size:clamp(34px,5vw,48px)!important;
  line-height:1.02!important;
  letter-spacing:-.045em!important;
}
.cp-visual-coherence .woocommerce h2,
.cp-visual-coherence .woocommerce h3{
  color:var(--cpv-text)!important;
}

/* Login / Mi cuenta: una tarjeta clara y compacta. */
.cp-visual-coherence .woocommerce form.login,
.cp-visual-coherence .woocommerce form.register,
.cp-visual-coherence .woocommerce form.lost_reset_password{
  max-width:620px;
  margin:0!important;
  padding:24px!important;
  border:1px solid var(--cpv-border)!important;
  border-radius:var(--cp-ui-radius-card)!important;
  background:#fff!important;
  box-shadow:var(--cpv-shadow-sm)!important;
}
.cp-visual-coherence .woocommerce form.login .form-row,
.cp-visual-coherence .woocommerce form.register .form-row,
.cp-visual-coherence .woocommerce form.lost_reset_password .form-row{
  margin:0 0 16px!important;
}
.cp-visual-coherence .woocommerce form.login label,
.cp-visual-coherence .woocommerce form.register label,
.cp-visual-coherence .woocommerce form.lost_reset_password label{
  display:block;
  margin:0 0 7px!important;
  color:var(--cpv-body)!important;
  font-size:13px!important;
  font-weight:750!important;
}
.cp-visual-coherence .woocommerce form.login input.input-text,
.cp-visual-coherence .woocommerce form.register input.input-text,
.cp-visual-coherence .woocommerce form.lost_reset_password input.input-text{
  width:100%!important;
  min-height:48px!important;
  padding:10px 13px!important;
}
.cp-visual-coherence .woocommerce-form-login__rememberme{
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
  min-height:44px;
}
.cp-visual-coherence .woocommerce-form-login__rememberme input[type="checkbox"]{
  width:18px!important;
  height:18px!important;
  accent-color:var(--cpv-primary);
}
.cp-visual-coherence .woocommerce-form-login__submit{
  min-width:150px;
  background:var(--cpv-primary)!important;
  border-color:var(--cpv-primary)!important;
  color:#fff!important;
}
.cp-visual-coherence .woocommerce .lost_password{margin:8px 0 0!important}
.cp-visual-coherence .woocommerce .lost_password a{
  color:var(--cpv-primary)!important;
  font-weight:700!important;
}

/* Cuenta autenticada: navegación + contenido como dos superficies coherentes. */
.cp-visual-coherence .woocommerce-MyAccount-navigation{
  width:26%!important;
}
.cp-visual-coherence .woocommerce-MyAccount-navigation ul{
  margin:0!important;
  padding:8px!important;
  list-style:none!important;
  border:1px solid var(--cpv-border)!important;
  border-radius:var(--cp-ui-radius-card)!important;
  background:#fff!important;
}
.cp-visual-coherence .woocommerce-MyAccount-navigation li{margin:0!important}
.cp-visual-coherence .woocommerce-MyAccount-navigation a{
  display:flex!important;
  min-height:44px!important;
  align-items:center!important;
  padding:9px 12px!important;
  text-decoration:none!important;
  font-weight:700!important;
}
.cp-visual-coherence .woocommerce-MyAccount-content{
  width:71%!important;
  padding:22px!important;
  border:1px solid var(--cpv-border)!important;
  border-radius:var(--cp-ui-radius-card)!important;
  background:#fff!important;
}

/* Carrito clásico: tabla y resumen preparados para la apertura. */
.cp-visual-coherence .woocommerce-cart-form,
.cp-visual-coherence .cart_totals{
  border-radius:var(--cp-ui-radius-card)!important;
}
.cp-visual-coherence .woocommerce-cart-form table.shop_table{
  margin:0 0 18px!important;
}
.cp-visual-coherence .woocommerce table.shop_table{
  border-collapse:separate!important;
  border-spacing:0!important;
}
.cp-visual-coherence .woocommerce table.shop_table th{
  padding:14px 12px!important;
  background:#F8FAFC!important;
  font-size:12px!important;
  font-weight:800!important;
  letter-spacing:.02em!important;
  text-transform:uppercase!important;
}
.cp-visual-coherence .woocommerce table.shop_table td{
  padding:14px 12px!important;
  border-top:1px solid var(--cpv-border)!important;
  vertical-align:middle!important;
}
.cp-visual-coherence .woocommerce table.shop_table .product-thumbnail img{
  width:72px!important;
  height:72px!important;
  object-fit:contain!important;
  border:1px solid var(--cpv-border)!important;
  border-radius:10px!important;
  background:#fff!important;
}
.cp-visual-coherence .woocommerce table.shop_table .product-name a{
  color:var(--cpv-text)!important;
  font-weight:750!important;
  text-decoration:none!important;
}
.cp-visual-coherence .woocommerce a.remove{
  display:inline-flex!important;
  width:32px!important;
  height:32px!important;
  align-items:center!important;
  justify-content:center!important;
  border-radius:999px!important;
  color:var(--cpv-danger)!important;
  background:var(--cpv-danger-soft)!important;
}
.cp-visual-coherence .woocommerce a.remove:hover{
  color:#fff!important;
  background:var(--cpv-danger)!important;
}
.cp-visual-coherence .cart_totals{
  padding:20px!important;
  border:1px solid var(--cpv-border)!important;
  background:#fff!important;
}
.cp-visual-coherence .cart_totals h2{margin-top:0!important}
.cp-visual-coherence .wc-proceed-to-checkout{padding:14px 0 0!important}
.cp-visual-coherence .wc-proceed-to-checkout .checkout-button{
  width:100%!important;
  min-height:50px!important;
  margin:0!important;
  background:var(--cpv-primary)!important;
  border-color:var(--cpv-primary)!important;
  color:#fff!important;
}

/* Cupón: misma lógica visual que el resto de formularios. */
.cp-visual-coherence .woocommerce .coupon{
  display:flex!important;
  gap:8px!important;
  align-items:center!important;
  flex-wrap:wrap!important;
}
.cp-visual-coherence .woocommerce .coupon .input-text{
  min-width:190px!important;
  min-height:46px!important;
  margin:0!important;
}

/* Checkout preparado: dos superficies limpias, sin cambiar campos ni gateways. */
.cp-visual-coherence .woocommerce-checkout #customer_details>div,
.cp-visual-coherence .woocommerce-checkout-review-order{
  padding:22px!important;
  border:1px solid var(--cpv-border)!important;
  border-radius:var(--cp-ui-radius-card)!important;
  background:#fff!important;
  box-shadow:var(--cpv-shadow-sm)!important;
}
.cp-visual-coherence .woocommerce-checkout #customer_details h3,
.cp-visual-coherence .woocommerce-checkout #order_review_heading{
  margin:0 0 18px!important;
  color:var(--cpv-text)!important;
}
.cp-visual-coherence .woocommerce-checkout .form-row{margin-bottom:14px!important}
.cp-visual-coherence .woocommerce-checkout .form-row label{
  margin-bottom:7px!important;
  color:var(--cpv-body)!important;
  font-size:13px!important;
  font-weight:750!important;
}
.cp-visual-coherence .woocommerce-checkout .form-row input.input-text,
.cp-visual-coherence .woocommerce-checkout .form-row textarea,
.cp-visual-coherence .woocommerce-checkout .select2-selection{
  min-height:48px!important;
}
.cp-visual-coherence .woocommerce-checkout .select2-selection{
  display:flex!important;
  align-items:center!important;
  border:1px solid var(--cpv-border-strong)!important;
  border-radius:var(--cp-ui-radius-control)!important;
}
.cp-visual-coherence #payment{
  border:1px solid var(--cpv-border)!important;
  border-radius:var(--cp-ui-radius-card)!important;
  background:#F8FAFC!important;
}
.cp-visual-coherence #payment ul.payment_methods{
  padding:16px!important;
  border-bottom:1px solid var(--cpv-border)!important;
}
.cp-visual-coherence #payment div.form-row{padding:16px!important}
.cp-visual-coherence #place_order{
  width:100%!important;
  min-height:50px!important;
  background:var(--cpv-primary)!important;
  border-color:var(--cpv-primary)!important;
  color:#fff!important;
}

/* Estados Woo: estructura común y mejor lectura. */
.cp-visual-coherence :where(.woocommerce-message,.woocommerce-info,.woocommerce-error){
  margin:0 0 18px!important;
  padding:14px 16px 14px 44px!important;
  line-height:1.45!important;
}
.cp-visual-coherence .woocommerce-error li{margin:0!important;color:inherit!important}
.cp-visual-coherence .woocommerce-invalid :where(input.input-text,select,.select2-selection){
  border-color:var(--cpv-danger)!important;
  box-shadow:0 0 0 3px rgba(217,45,77,.10)!important;
}
.cp-visual-coherence .woocommerce-validated :where(input.input-text,select,.select2-selection){
  border-color:#9AD8B8!important;
}

/* Página vacía / coming soon: coherencia mientras Woo siga cerrado. */
.cp-visual-coherence .woocommerce-coming-soon-store-only{
  width:min(760px,calc(100% - 32px));
  margin:38px auto 56px!important;
  padding:28px!important;
  border:1px solid var(--cpv-border)!important;
  border-radius:var(--cp-ui-radius-section)!important;
  background:#fff!important;
  box-shadow:var(--cpv-shadow-sm)!important;
}
.cp-visual-coherence .woocommerce-coming-soon-store-only .wp-block-spacer{height:20px!important}
.cp-visual-coherence .woocommerce-coming-soon-store-only h1{
  color:var(--cpv-text)!important;
  font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
  font-size:clamp(30px,6vw,46px)!important;
  line-height:1.04!important;
  letter-spacing:-.04em!important;
}
.cp-visual-coherence .woocommerce-coming-soon-store-only p{
  color:var(--cpv-muted)!important;
  font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
  line-height:1.55!important;
}

/* Touch targets pequeños que Woo suele dejar por defecto. */
.cp-visual-coherence :where(.woocommerce a.remove,.woocommerce-pagination a,.woocommerce-pagination span,.show-password-input){
  min-width:40px;
  min-height:40px;
}

@media(max-width:760px){
  .cp-visual-coherence.woocommerce-page .cp-main,
  .cp-visual-coherence .woocommerce-page .cp-main{
    width:min(100% - 24px,1180px);
    padding:24px 0 40px;
  }
  .cp-visual-coherence.woocommerce-page .cp-main>article>h1,
  .cp-visual-coherence .woocommerce-account .cp-main>article>h1{
    margin-bottom:18px!important;
    font-size:36px!important;
  }
  .cp-visual-coherence .woocommerce form.login,
  .cp-visual-coherence .woocommerce form.register,
  .cp-visual-coherence .woocommerce form.lost_reset_password{
    max-width:none;
    padding:18px!important;
    border-radius:14px!important;
  }
  .cp-visual-coherence .woocommerce-form-login__submit{width:100%!important}
  .cp-visual-coherence .woocommerce-MyAccount-navigation,
  .cp-visual-coherence .woocommerce-MyAccount-content{
    float:none!important;
    width:100%!important;
  }
  .cp-visual-coherence .woocommerce-MyAccount-navigation{margin-bottom:14px!important}
  .cp-visual-coherence .woocommerce-MyAccount-content{padding:18px!important}

  /* En móvil el carrito deja de parecer una tabla de escritorio comprimida. */
  .cp-visual-coherence .woocommerce table.shop_table_responsive tr,
  .cp-visual-coherence .woocommerce-page table.shop_table_responsive tr{
    display:block!important;
    margin:0 0 12px!important;
    padding:12px!important;
    border:1px solid var(--cpv-border)!important;
    border-radius:14px!important;
    background:#fff!important;
  }
  .cp-visual-coherence .woocommerce table.shop_table_responsive tr td,
  .cp-visual-coherence .woocommerce-page table.shop_table_responsive tr td{
    min-height:42px!important;
    padding:9px 0!important;
    border-top:1px solid var(--cpv-border)!important;
  }
  .cp-visual-coherence .woocommerce table.shop_table_responsive tr td:first-child,
  .cp-visual-coherence .woocommerce-page table.shop_table_responsive tr td:first-child{border-top:0!important}
  .cp-visual-coherence .woocommerce table.shop_table_responsive .product-thumbnail{
    display:block!important;
    text-align:left!important;
  }
  .cp-visual-coherence .woocommerce table.shop_table_responsive .product-thumbnail:before{display:none!important}
  .cp-visual-coherence .woocommerce .coupon{display:grid!important;grid-template-columns:1fr!important}
  .cp-visual-coherence .woocommerce .coupon .input-text,
  .cp-visual-coherence .woocommerce .coupon button{width:100%!important}

  .cp-visual-coherence .woocommerce-checkout #customer_details>div,
  .cp-visual-coherence .woocommerce-checkout-review-order{padding:18px!important}
  .cp-visual-coherence .woocommerce-checkout .col2-set .col-1,
  .cp-visual-coherence .woocommerce-checkout .col2-set .col-2{
    float:none!important;
    width:100%!important;
  }
  .cp-visual-coherence .woocommerce-coming-soon-store-only{
    width:calc(100% - 24px);
    margin:24px auto 40px!important;
    padding:22px 18px!important;
    border-radius:18px!important;
  }
}

@media(prefers-reduced-motion:reduce){
  .cp-visual-coherence *{scroll-behavior:auto!important}
}

/* Keep related-product prices readable on the warm card background. */
.cp-visual-coherence .cp-woocommerce ul.products li.product .price{color:#80620e!important}
