/* =========================================================
   KIMA THEME — wc.css  (WooCommerce overrides)
   ========================================================= */

/* ── GLOBAL BUTTONS ──────────────────────────────────────── */
.woocommerce a.button, .woocommerce button.button,
.woocommerce input.button, .woocommerce #respond input#submit {
  display:inline-flex !important; align-items:center !important;
  font-family:var(--font) !important; font-weight:600 !important;
  font-size:.875rem !important; line-height:1 !important;
  background:var(--blue) !important; color:var(--white) !important;
  border:2px solid var(--blue) !important; border-radius:var(--r) !important;
  padding:.6875rem 1.375rem !important; cursor:pointer !important;
  transition:all var(--dur) var(--ease) !important;
}
.woocommerce a.button:hover, .woocommerce button.button:hover {
  background:var(--blue-d) !important; border-color:var(--blue-d) !important;
  transform:translateY(-1px) !important; box-shadow:var(--sh-blue) !important;
}
.woocommerce a.button.alt, .woocommerce button.button.alt {
  background:var(--dark) !important; border-color:var(--dark) !important;
}

/* ── SUBCATEGORY NAV ─────────────────────────────────────── */
.kima-subcat-nav {
  display:flex; flex-wrap:wrap; gap:.5rem;
  margin-bottom:1.75rem; padding-bottom:1.75rem;
  border-bottom:1px solid var(--border);
}
.kima-subcat-nav__all,
.kima-subcat-nav__item {
  display:inline-flex; align-items:center;
  font-family:var(--font); font-size:.8125rem; font-weight:600; line-height:1;
  color:var(--dark); background:var(--light);
  border:1.5px solid var(--border); border-radius:var(--r);
  padding:.4375rem .875rem; text-decoration:none;
  transition:all var(--dur) var(--ease);
  white-space:nowrap;
}
.kima-subcat-nav__all:hover,
.kima-subcat-nav__item:hover {
  border-color:var(--blue); color:var(--blue); background:rgba(0,169,228,.06);
}
.kima-subcat-nav__all.is-active,
.kima-subcat-nav__item.is-active {
  background:var(--blue); border-color:var(--blue); color:var(--white);
}

/* ── PRODUCT ARCHIVE ─────────────────────────────────────── */
.wc-main { padding-bottom:5rem; }
.woocommerce-store-notice { display:none !important; }

.woocommerce-products-header h1 {
  font-size:clamp(1.75rem,3vw,2.5rem); font-weight:800; letter-spacing:-.025em;
}

.woocommerce .woocommerce-result-count { font-size:.875rem; color:var(--grey-m); }
.woocommerce .woocommerce-ordering select {
  border:1px solid var(--border); border-radius:var(--r); padding:.5rem .875rem;
  font-family:var(--font); font-size:.875rem; color:var(--dark); background:var(--white);
}

/* Product grid */
.woocommerce ul.products {
  display:grid !important; margin:0 !important;
  grid-template-columns:repeat(3,1fr) !important; gap:1.5rem !important;
}
.woocommerce ul.products.columns-4 { grid-template-columns:repeat(3,1fr) !important; }

.woocommerce ul.products li.product {
  padding:0 !important; margin:0 !important;
  border:1px solid var(--border) !important; border-radius:var(--r-lg) !important;
  overflow:hidden !important; background:var(--white) !important;
  transition:all var(--dur) var(--ease) !important;
  display:flex !important; flex-direction:column !important;
}
.woocommerce ul.products li.product:hover {
  box-shadow:var(--sh-lg) !important;
  transform:translateY(-4px) !important;
  border-color:rgba(0,169,228,.25) !important;
}
.woocommerce ul.products li.product .woocommerce-loop-product__link { display:flex; flex-direction:column; overflow:hidden; flex:1; }
.woocommerce ul.products li.product a img {
  width:100% !important; height:220px !important; object-fit:cover !important;
  transition:transform var(--dur-s) !important; display:block !important;
}
.woocommerce ul.products li.product:hover a img { transform:scale(1.04) !important; }
.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-family:var(--font) !important; font-weight:600 !important; font-size:.9375rem !important;
  color:var(--dark) !important; line-height:1.35 !important;
  padding:1rem 1.125rem .375rem !important; margin:0 !important;
  flex:1 !important;
}
.woocommerce ul.products li.product .price {
  color:var(--blue) !important; font-weight:700 !important; font-size:1.0625rem !important;
  padding:.5rem 1.125rem .875rem !important; display:block !important; margin-top:auto !important;
}
.woocommerce ul.products li.product .price del {
  color:var(--grey-l) !important; font-size:.875rem !important;
  font-weight:400 !important; margin-right:.375rem !important;
}
.woocommerce ul.products li.product a.button {
  margin:0 1.125rem 1.125rem !important; width:calc(100% - 2.25rem) !important;
  text-align:center !important; justify-content:center !important; display:flex !important;
}
.woocommerce ul.products li.product .onsale {
  background:var(--orange) !important; top:.75rem !important; left:.75rem !important;
  border-radius:var(--r-sm) !important; font-size:.72rem !important; font-weight:700 !important;
  min-height:auto !important; min-width:auto !important; line-height:1 !important; padding:.3rem .6rem !important;
}

/* ── SINGLE PRODUCT ──────────────────────────────────────── */
.woocommerce div.product {
  display:grid; grid-template-columns:1fr 1fr; gap:3.5rem; align-items:start;
}
.woocommerce div.product div.images { border-radius:var(--r-lg); overflow:hidden; border:1px solid var(--border); }
.woocommerce div.product .product_title { font-size:clamp(1.5rem,3vw,2rem); font-weight:800; letter-spacing:-.025em; margin-bottom:.75rem; }
.woocommerce div.product p.price, .woocommerce div.product span.price {
  font-size:1.875rem; font-weight:800; color:var(--blue); font-family:var(--font-h); display:block; margin-bottom:1.25rem;
}
.woocommerce div.product form.cart .button { font-size:1rem !important; padding:.9375rem 2.5rem !important; width:100% !important; justify-content:center !important; }
.woocommerce div.product .woocommerce-tabs ul.tabs { border-bottom:2px solid var(--border); }
.woocommerce div.product .woocommerce-tabs ul.tabs li { border:none; background:none; border-radius:0; }
.woocommerce div.product .woocommerce-tabs ul.tabs li a { font-weight:600; color:var(--grey); border-bottom:2px solid transparent; margin-bottom:-2px; transition:all var(--dur); border-radius:0; background:none; }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a { color:var(--blue); border-bottom-color:var(--blue); background:none; }

/* ── CART ────────────────────────────────────────────────── */
.woocommerce table.shop_table { border:1px solid var(--border); border-radius:var(--r-lg); overflow:hidden; border-collapse:separate; border-spacing:0; }
.woocommerce table.shop_table th { background:var(--light); font-weight:600; font-size:.875rem; color:var(--grey); padding:.875rem 1.25rem; border-bottom:1px solid var(--border); }
.woocommerce table.shop_table td { padding:1rem 1.25rem; border-bottom:1px solid var(--border); vertical-align:middle; }

/* ── FICHA TÉCNICA PDF ───────────────────────────────────── */
.kima-ficha-tecnica-btn { margin-bottom: 1.25rem; }
.kima-btn-ficha {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font); font-weight: 600; font-size: .875rem;
  color: var(--blue); border: 2px solid var(--blue);
  background: transparent; border-radius: var(--r);
  padding: .5625rem 1.25rem; text-decoration: none;
  transition: all var(--dur) var(--ease);
}
.kima-btn-ficha:hover {
  background: var(--blue); color: var(--white);
  transform: translateY(-1px); box-shadow: var(--sh-blue);
}
.kima-btn-ficha svg { flex-shrink: 0; }

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 1280px) { .woocommerce ul.products { grid-template-columns:repeat(3,1fr) !important; } }
@media (max-width: 1023px) {
  .woocommerce ul.products { grid-template-columns:repeat(2,1fr) !important; }
  .woocommerce div.product { grid-template-columns:1fr; }
}
@media (max-width: 480px) { .woocommerce ul.products { grid-template-columns:repeat(2,1fr) !important; } }

/* ── CHECKOUT B2B FIELDS ─────────────────────────────────── */
.woocommerce-checkout #billing_cif_field,
.woocommerce-checkout #billing_razon_social_field {
  margin-top: .75rem;
}
.woocommerce-checkout #billing_cif_field label,
.woocommerce-checkout #billing_razon_social_field label {
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.5;
  font-family: var(--font);
}
.woocommerce-checkout #billing_cif_field label::after,
.woocommerce-checkout #billing_razon_social_field label::after {
  content: ' (opcional)';
  font-size: .75rem;
  color: var(--grey);
  font-weight: 400;
}
.woocommerce-checkout #billing_cif_field input,
.woocommerce-checkout #billing_razon_social_field input {
  font-size: .9375rem;
  font-weight: 400;
  line-height: 1.5;
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  padding: .625rem .875rem;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.woocommerce-checkout #billing_cif_field input:focus,
.woocommerce-checkout #billing_razon_social_field input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 169, 228, .15);
}
.woocommerce-checkout #billing_cif_field.woocommerce-invalid input,
.woocommerce-checkout #billing_razon_social_field.woocommerce-invalid input {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, .1);
}
