/* ==========================================================================
   CH4X4 — Design tokens (light theme, naranja de marca)
   ========================================================================== */
:root{
  --ch-white:#ffffff;
  --ch-bg-alt:#f6f5f2;
  --ch-surface:#f1efea;
  --ch-surface-2:#e9e6de;
  --ch-border:#e4e1d8;
  --ch-charcoal:#1c1a17;
  --ch-text:#211f1c;
  --ch-text-muted:#6b675e;
  --ch-text-faint:#948f83;
  --ch-orange:#e8432b;
  --ch-orange-deep:#c7351f;
  --ch-orange-text:#ffffff;
  --ch-success:#2f7d4f;
  --ch-danger:#c7351f;

  --ch-font-display:'Oswald','Arial Narrow',sans-serif;
  --ch-font-body:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;

  --ch-radius:3px;
  --ch-radius-lg:8px;
  --ch-container:1280px;
  --ch-shadow-card:0 1px 2px rgba(28,26,23,.04), 0 8px 24px rgba(28,26,23,.08);
  --ch-shadow-lift:0 4px 8px rgba(28,26,23,.06), 0 16px 32px rgba(28,26,23,.12);
}

/* ==========================================================================
   Base
   ========================================================================== */
html{ scroll-behavior:smooth; }
body{
  background:var(--ch-white) !important;
  color:var(--ch-text) !important;
  font-family:var(--ch-font-body);
  -webkit-font-smoothing:antialiased;
}
body.woocommerce-page,
#page, #content, .content-wrap{ background:var(--ch-white); }

::selection{ background:var(--ch-orange); color:var(--ch-white); }

h1,h2,h3,h4,h5,h6,
.entry-title, .page-title, .woocommerce-products-header__title,
.wp-block-heading{
  font-family:var(--ch-font-display) !important;
  text-transform:uppercase;
  letter-spacing:.02em;
  font-weight:700 !important;
  color:var(--ch-charcoal) !important;
  text-wrap:balance;
}
a{ color:var(--ch-orange); text-decoration:none; }
a:hover{ color:var(--ch-orange-deep); }
p{ color:var(--ch-text-muted); line-height:1.65; }

hr{ border-color:var(--ch-border); }

/* ==========================================================================
   Header / navegación
   ========================================================================== */
#masthead, .nv-navigation, .header-menu-wrap, .site-header{
  background:var(--ch-white) !important;
  border-bottom:1px solid var(--ch-border) !important;
}
.header-menu-item > a,
.nv-nav-item > a,
#site-navigation a{
  color:var(--ch-charcoal) !important;
  font-family:var(--ch-font-display);
  font-size:.875rem;
  letter-spacing:.06em;
  text-transform:uppercase;
  font-weight:600;
}
.header-menu-item > a:hover,
.nv-nav-item > a:hover{ color:var(--ch-orange) !important; }

.sub-menu, .nv-submenu, .dropdown-nav{
  background:var(--ch-white) !important;
  border:1px solid var(--ch-border) !important;
  box-shadow:var(--ch-shadow-card);
}
.sub-menu a, .nv-submenu a{ color:var(--ch-text-muted) !important; }
.sub-menu a:hover, .nv-submenu a:hover{ color:var(--ch-orange) !important; }

/* logo / site title fallback if text-based */
.site-title a, .site-title a:visited{ color:var(--ch-charcoal) !important; font-family:var(--ch-font-display); }

/* mobile hamburger */
.nv-nav-header .nv-icon, .hamburger, .menu-toggle{ color:var(--ch-charcoal) !important; }

/* cart icon badge */
.nv-icon-cart .cart-items-count, .cart-count-bubble{
  background:var(--ch-orange) !important;
  color:var(--ch-white) !important;
}

/* ==========================================================================
   Botones / CTAs
   ========================================================================== */
.button, .wp-block-button__link,
a.button, button.button,
.woocommerce a.button, .woocommerce button.button,
.single_add_to_cart_button, #place_order,
.wc-proceed-to-checkout a.checkout-button{
  background:var(--ch-orange) !important;
  color:var(--ch-orange-text) !important;
  border:none !important;
  border-radius:var(--ch-radius) !important;
  font-family:var(--ch-font-display);
  font-weight:700;
  letter-spacing:.05em;
  text-transform:uppercase;
  padding:.9em 1.6em !important;
  transition:background .15s ease, transform .1s ease, box-shadow .15s ease;
}
.button:hover, .wp-block-button__link:hover,
a.button:hover, button.button:hover,
.woocommerce a.button:hover, .woocommerce button.button:hover,
.single_add_to_cart_button:hover, #place_order:hover{
  background:var(--ch-orange-deep) !important;
  color:var(--ch-white) !important;
  transform:translateY(-1px);
  box-shadow:var(--ch-shadow-card);
}
.button.loading{ opacity:.7; }

.is-style-outline .wp-block-button__link,
.button.alt.outline{
  background:transparent !important;
  color:var(--ch-charcoal) !important;
  border:1.5px solid var(--ch-charcoal) !important;
}
.is-style-outline .wp-block-button__link:hover{
  background:var(--ch-charcoal) !important;
  color:var(--ch-white) !important;
  border-color:var(--ch-charcoal) !important;
}

/* ==========================================================================
   Category / shop archive header (donde vive la descripcion nueva)
   ========================================================================== */
.woocommerce-products-header{
  padding:2.5rem 0 1.5rem;
  border-bottom:2px solid var(--ch-orange);
  margin-bottom:2rem;
  text-align:center !important;
}
.woocommerce-products-header__title{
  font-size:clamp(1.75rem,4vw,2.75rem) !important;
  margin-bottom:.75rem;
  text-align:center !important;
}
.term-description, .woocommerce-products-header + .term-description{
  color:var(--ch-text-muted);
  max-width:72ch;
  margin-left:auto !important;
  margin-right:auto !important;
  text-align:justify !important;
  text-align-last:center !important;
  font-size:1.0625rem;
  line-height:1.7;
}

/* Título de página estándar de Neve (Policies, About, blog, etc.) — no
   afecta la ficha de producto, que no usa este wrapper. */
.nv-page-title-wrap,
.nv-page-title-wrap .nv-page-title,
.nv-page-title-wrap h1{
  text-align:center !important;
}
.woocommerce-breadcrumb{
  color:var(--ch-text-faint) !important;
  font-size:.8125rem;
  text-transform:uppercase;
  letter-spacing:.05em;
}
.woocommerce-breadcrumb a{ color:var(--ch-text-muted) !important; }

/* ==========================================================================
   Grid de productos (shop, categoria, related, upsells)
   ========================================================================== */
.woocommerce ul.products{ gap:1.5rem; }
.woocommerce ul.products li.product,
.wc-block-grid__product{
  background:var(--ch-white);
  border:1px solid var(--ch-border);
  border-radius:var(--ch-radius-lg);
  padding:1rem 1rem 1.25rem;
  transition:transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.woocommerce ul.products li.product:hover{
  transform:translateY(-3px);
  border-color:var(--ch-orange);
  box-shadow:var(--ch-shadow-card);
}
.woocommerce ul.products li.product img{
  border-radius:var(--ch-radius);
  background:var(--ch-bg-alt);
  aspect-ratio:1/1;
  object-fit:cover;
}
.woocommerce ul.products li.product .woocommerce-loop-product__title{
  color:var(--ch-charcoal) !important;
  font-family:var(--ch-font-display);
  font-size:1rem;
  text-transform:none;
  letter-spacing:0;
  font-weight:600 !important;
  margin:.75rem 0 .35rem;
}
.woocommerce ul.products li.product .price{
  color:var(--ch-orange) !important;
  font-family:var(--ch-font-body);
  font-weight:700;
  font-variant-numeric:tabular-nums;
}
.woocommerce ul.products li.product .price del{ color:var(--ch-text-faint) !important; opacity:.7; }
.woocommerce ul.products li.product .price ins{ text-decoration:none; }

.woocommerce span.onsale{
  background:var(--ch-orange) !important;
  color:var(--ch-white) !important;
  font-family:var(--ch-font-display);
  font-weight:700;
  border-radius:100px;
  text-transform:uppercase;
  font-size:.6875rem;
  letter-spacing:.04em;
}

.woocommerce ul.products li.product .button{
  width:100%;
  text-align:center;
  margin-top:.5rem;
  font-size:.8125rem !important;
  padding:.75em 1em !important;
}

/* stock status */
.stock.in-stock{ color:var(--ch-success) !important; font-size:.8125rem; }
.stock.out-of-stock{ color:var(--ch-danger) !important; font-size:.8125rem; }

/* ==========================================================================
   Filtros facetados (sidebar shop)
   ========================================================================== */
.widget_layered_nav, .widget_layered_nav_filters{
  background:var(--ch-white);
  border:1px solid var(--ch-border);
  border-radius:var(--ch-radius-lg);
  padding:1.25rem;
  margin-bottom:1.25rem;
}
.widget_layered_nav .widget-title, .widget_layered_nav_filters .widget-title,
.widget-title{
  font-family:var(--ch-font-display);
  font-size:.8125rem;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:var(--ch-orange) !important;
  margin-bottom:.75rem;
}
.woocommerce-widget-layered-nav-list{ display:flex; flex-direction:column; gap:.4rem; }
.woocommerce-widget-layered-nav-list__item a{
  color:var(--ch-text-muted) !important;
  font-size:.875rem;
}
.woocommerce-widget-layered-nav-list__item a:hover{ color:var(--ch-orange) !important; }
.woocommerce-widget-layered-nav-list__item--chosen a{ color:var(--ch-orange) !important; font-weight:600; }
.woocommerce-widget-layered-nav-list__item-count{ color:var(--ch-text-faint) !important; font-variant-numeric:tabular-nums; }

/* ==========================================================================
   Árbol de categorías colapsable (widget_ch4x4_category_tree, solo /shop/)
   ========================================================================== */
.widget_ch4x4_category_tree{
  background:var(--ch-white);
  border:1px solid var(--ch-border);
  border-radius:var(--ch-radius-lg);
  padding:1.25rem;
  margin-bottom:1.25rem;
}
.ch4x4-category-tree{ font-size:.875rem; }
.ch4x4-cat-tree-level{ list-style:none; margin:0; padding:0; }
.ch4x4-cat-tree-level .ch4x4-cat-tree-level{ padding-left:1rem; margin-top:.4rem; }
.ch4x4-cat-tree-item{ margin-bottom:.4rem; }
.ch4x4-cat-tree-item > a{ color:var(--ch-text-muted) !important; }
.ch4x4-cat-tree-item > a:hover{ color:var(--ch-orange) !important; }
.ch4x4-cat-tree-item.has-children > details > summary{
  cursor:pointer;
  list-style:none;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.5rem;
}
.ch4x4-cat-tree-item.has-children > details > summary::-webkit-details-marker{ display:none; }
.ch4x4-cat-tree-item.has-children > details > summary::after{
  content:"";
  width:.4rem; height:.4rem;
  border-right:2px solid var(--ch-text-faint);
  border-bottom:2px solid var(--ch-text-faint);
  transform:rotate(-45deg);
  transition:transform .15s ease;
  flex-shrink:0;
  margin-left:auto;
}
.ch4x4-cat-tree-item.has-children > details[open] > summary::after{ transform:rotate(45deg); }
.ch4x4-cat-tree-count{ color:var(--ch-text-faint) !important; font-variant-numeric:tabular-nums; font-size:.8125rem; }

/* ==========================================================================
   Single product
   ========================================================================== */
.single-product div.product{ color:var(--ch-text); }
.single-product .product_title{ font-size:clamp(1.5rem,3.5vw,2.25rem) !important; }
.single-product .woocommerce-Price-amount{
  color:var(--ch-orange) !important;
  font-family:var(--ch-font-body);
  font-weight:700;
  font-size:1.5rem;
}
.single-product .woocommerce-product-details__short-description{ color:var(--ch-text-muted); }
.single-product table.variations select,
.single-product .quantity input.qty{
  background:var(--ch-white) !important;
  border:1px solid var(--ch-border) !important;
  color:var(--ch-text) !important;
  border-radius:var(--ch-radius) !important;
}
.single-product .woocommerce-tabs{ border-top:1px solid var(--ch-border); margin-top:2rem; }
.single-product .woocommerce-tabs ul.tabs li a{
  font-family:var(--ch-font-display);
  text-transform:uppercase;
  letter-spacing:.04em;
  color:var(--ch-text-muted);
}
.single-product .woocommerce-tabs ul.tabs li.active a{ color:var(--ch-orange); }
.single-product .images .flex-control-thumbs img{ border:1px solid var(--ch-border); border-radius:var(--ch-radius); }
.single-product .images .flex-control-thumbs img.flex-active{ border-color:var(--ch-orange); }

/* ==========================================================================
   Carrito / checkout — que se sienta simple y de confianza
   ========================================================================== */
.woocommerce-cart table.shop_table, .woocommerce-checkout table.shop_table{
  background:var(--ch-white);
  border:1px solid var(--ch-border);
  border-radius:var(--ch-radius-lg);
  color:var(--ch-text);
}
.woocommerce-cart table.shop_table th,
.woocommerce-checkout table.shop_table th{
  font-family:var(--ch-font-display);
  text-transform:uppercase;
  letter-spacing:.04em;
  font-size:.75rem;
  color:var(--ch-text-muted);
  border-bottom:1px solid var(--ch-border) !important;
}
.woocommerce-cart table.shop_table td, .woocommerce-checkout table.shop_table td{
  border-bottom:1px solid var(--ch-border) !important;
}
.woocommerce-checkout #payment,
.woocommerce-checkout-review-order,
.cart-collaterals .cart_totals{
  background:var(--ch-bg-alt) !important;
  border:1px solid var(--ch-border) !important;
  border-radius:var(--ch-radius-lg) !important;
}
.woocommerce-checkout #payment ul.payment_methods,
.woocommerce-checkout #payment div.payment_box{
  background:var(--ch-white) !important;
  border-top:1px solid var(--ch-border) !important;
}
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row select,
.woocommerce form .form-row textarea{
  background:var(--ch-white) !important;
  border:1px solid var(--ch-border) !important;
  color:var(--ch-text) !important;
  border-radius:var(--ch-radius) !important;
}
.woocommerce form .form-row label{ color:var(--ch-text-muted) !important; }
.woocommerce-checkout .woocommerce-form__label-for-checkbox{ color:var(--ch-text-muted) !important; }

/* orden claro y sticky del resumen en checkout ayuda a "facil de comprar" */
@media (min-width:783px){
  .woocommerce-checkout-review-order{ position:sticky; top:110px; align-self:flex-start; }
}

.woocommerce-message, .woocommerce-info{
  background:var(--ch-bg-alt) !important;
  border-left:3px solid var(--ch-orange) !important;
  color:var(--ch-text) !important;
}
.woocommerce-error{
  background:var(--ch-bg-alt) !important;
  border-left:3px solid var(--ch-danger) !important;
  color:var(--ch-text) !important;
}

/* ==========================================================================
   Footer — se queda oscuro a propósito, ancla visual sobre fondo claro
   ========================================================================== */
#colophon, .footer-widgets, .nv-footer{
  background:var(--ch-charcoal) !important;
  border-top:1px solid var(--ch-charcoal);
  color:#c9c5ba !important;
}
#colophon a, .footer-widgets a{ color:#c9c5ba !important; }
#colophon a:hover, .footer-widgets a:hover{ color:var(--ch-orange) !important; }
#colophon .widget-title{ color:var(--ch-white) !important; font-family:var(--ch-font-display); text-transform:uppercase; letter-spacing:.05em; }
#colophon h1, #colophon h2, #colophon h3, #colophon h4{ color:var(--ch-white) !important; }

/* ==========================================================================
   Utilidades para los patrones custom (hero, trust-bar, grids, home)
   ========================================================================== */
.ch4x4-eyebrow{
  display:inline-block;
  font-family:var(--ch-font-display);
  font-size:.75rem;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--ch-orange);
  margin-bottom:.5rem;
}
.ch4x4-surface{ background:var(--ch-white); border:1px solid var(--ch-border); border-radius:var(--ch-radius-lg); }
.ch4x4-bg-alt{ background:var(--ch-bg-alt); }
.ch4x4-card-link{ transition:transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.ch4x4-card-link:hover{ transform:translateY(-3px); box-shadow:var(--ch-shadow-card); }

.ch4x4-trust-bar{
  background:var(--ch-charcoal);
  border-top:1px solid var(--ch-charcoal);
  border-bottom:1px solid var(--ch-charcoal);
}
.ch4x4-trust-item{ display:flex; align-items:center; gap:.6rem; }
.ch4x4-trust-item .num{
  font-family:var(--ch-font-display);
  color:var(--ch-orange);
  font-size:1.5rem;
  font-weight:700;
  font-variant-numeric:tabular-nums;
}
.ch4x4-trust-item .label{ color:#c9c5ba; font-size:.8125rem; text-transform:uppercase; letter-spacing:.04em; }

.ch4x4-vehicle-tile{
  position:relative;
  aspect-ratio:4/3;
  border-radius:var(--ch-radius-lg);
  overflow:hidden;
  background:linear-gradient(180deg, transparent 45%, rgba(28,26,23,.88) 100%), var(--ch-charcoal);
  display:flex; align-items:flex-end; padding:1.25rem;
  border:1px solid var(--ch-border);
}
.ch4x4-vehicle-tile:hover{ border-color:var(--ch-orange); }
.ch4x4-vehicle-tile .name{
  font-family:var(--ch-font-display);
  color:var(--ch-white) !important;
  text-transform:uppercase;
  font-size:1.1rem;
  letter-spacing:.02em;
}
.ch4x4-vehicle-tile .count{ color:var(--ch-orange) !important; font-size:.8125rem; }

/* generator / design-your-own CTA block */
.ch4x4-generator{
  background:var(--ch-charcoal);
  border-radius:var(--ch-radius-lg);
}
.ch4x4-generator .ch4x4-eyebrow{ color:var(--ch-orange); }
.ch4x4-generator h2, .ch4x4-generator .wp-block-heading{ color:var(--ch-white) !important; }
.ch4x4-generator p{ color:#c9c5ba; }

/* ==========================================================================
   Home — hero
   ========================================================================== */
.ch4x4-hero{ background:var(--ch-white); }
.ch4x4-hero-copy .wp-block-heading{ color:var(--ch-charcoal) !important; }
.ch4x4-hero-copy p{ color:var(--ch-text-muted); }

.ch4x4-hero-gallery{
  position:relative;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:1rem;
}
.ch4x4-hero-gallery figure{
  margin:0;
  background:var(--ch-white);
  border:1px solid var(--ch-border);
  border-radius:var(--ch-radius-lg);
  overflow:hidden;
  box-shadow:var(--ch-shadow-lift);
  transition:transform .25s ease;
}
.ch4x4-hero-gallery figure:hover{ transform:translateY(-4px); }
.ch4x4-hero-gallery figure img{ display:block; width:100%; height:100%; object-fit:contain; background:var(--ch-white); padding:1.25rem; }
.ch4x4-hero-gallery .tile-tall{ grid-row:span 2; }
.ch4x4-hero-gallery .tile-badge{
  position:absolute;
  bottom:-.9rem;
  left:50%;
  transform:translateX(-50%);
  background:var(--ch-orange);
  color:var(--ch-white);
  font-family:var(--ch-font-display);
  font-size:.75rem;
  letter-spacing:.08em;
  text-transform:uppercase;
  padding:.5rem 1.1rem;
  border-radius:100px;
  white-space:nowrap;
  box-shadow:var(--ch-shadow-card);
  z-index:2;
}

/* ==========================================================================
   Home — best sellers (product-collection block re-skin)
   ========================================================================== */
.ch4x4-best-sellers .wp-block-woocommerce-product-collection{ margin-top:.5rem; }
.ch4x4-best-sellers .wc-block-product-template li,
.ch4x4-best-sellers .wc-block-grid__product{
  background:var(--ch-white);
  border:1px solid var(--ch-border);
  border-radius:var(--ch-radius-lg);
  padding:1.25rem;
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.ch4x4-best-sellers .wc-block-product-template li:hover{
  transform:translateY(-3px);
  border-color:var(--ch-orange);
  box-shadow:var(--ch-shadow-card);
}
.ch4x4-best-sellers img{ border-radius:var(--ch-radius); background:var(--ch-bg-alt); }
.ch4x4-best-sellers .wc-block-components-product-title,
.ch4x4-best-sellers h2,h3{ font-family:var(--ch-font-display) !important; text-transform:none !important; letter-spacing:0 !important; }
.ch4x4-best-sellers .wc-block-components-product-price{ color:var(--ch-orange) !important; font-weight:700; }
.ch4x4-best-sellers .wp-block-button__link{ width:100%; text-align:center; }

/* ==========================================================================
   Home — promo banner (naranja de fondo, la única sección "loud")
   ========================================================================== */
.ch4x4-promo{
  background:var(--ch-orange);
  border-radius:var(--ch-radius-lg);
  color:var(--ch-white);
}
.ch4x4-promo .ch4x4-eyebrow{ color:var(--ch-charcoal); }
.ch4x4-promo h2, .ch4x4-promo p{ color:var(--ch-white) !important; }
.ch4x4-promo .wp-block-button__link{
  background:var(--ch-white) !important;
  color:var(--ch-orange-deep) !important;
}
.ch4x4-promo .wp-block-button__link:hover{
  background:var(--ch-charcoal) !important;
  color:var(--ch-white) !important;
}

/* ==========================================================================
   Responsive tweaks
   ========================================================================== */
@media (max-width:781px){
  .ch4x4-hero-gallery{ max-width:420px; margin:2rem auto 0; }
}
@media (max-width:600px){
  .woocommerce ul.products{ grid-template-columns:repeat(2,1fr) !important; }
  .woocommerce-products-header__title{ font-size:1.5rem !important; }
  .ch4x4-hero-gallery{ grid-template-columns:1fr 1fr; max-width:320px; }
}
