/* =========================================================
   LUMENTA — reskin de WooCommerce
   Viste las plantillas nativas de WooCommerce (o sus overrides
   en woocommerce/) con el sistema de diseño de assets/css/styles.css.
   No se tocan los templates de WooCommerce salvo archive-product.php
   y content-product.php (ver carpeta /woocommerce).
   ========================================================= */

/* ---------- grilla de productos (ul.products) ---------- */
ul.products{
  display: grid !important;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  list-style: none;
  margin: 0 !important;
  padding: 0;
}
ul.products li.product{ margin:0 !important; width:auto !important; }
@media (max-width: 1080px){ ul.products{ grid-template-columns: repeat(3,1fr); } }
@media (max-width: 780px){ ul.products{ grid-template-columns: repeat(2,1fr); } }
@media (max-width: 480px){ ul.products{ grid-template-columns: 1fr; } }

/* Botón "agregar al carrito" en la grilla — círculo, como el diseño original */
.product-card .add_to_cart_button,
.product-card .added_to_cart{
  width:38px; height:38px; border-radius:50%;
  background: var(--surface-2); border:1px solid var(--line); color:var(--text) !important;
  display:flex; align-items:center; justify-content:center;
  font-size:0; line-height:0; text-indent:-9999px; position:relative;
  transition: background .2s ease, border-color .2s ease;
}
.product-card .add_to_cart_button::after{
  content:""; position:absolute; inset:0; margin:auto; width:16px; height:16px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 5v14M5 12h14' stroke='black' stroke-width='2' fill='none' stroke-linecap='round'/></svg>") center / contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 5v14M5 12h14' stroke='black' stroke-width='2' fill='none' stroke-linecap='round'/></svg>") center / contain no-repeat;
}
.product-card .add_to_cart_button:hover{ border-color: var(--warm); background: rgba(255,178,94,.12); }
.product-card .added_to_cart{ font-size:11px; text-indent:0; width:auto; padding:0 12px; border-radius:100px; }
.product-card .price{ font-family: var(--font-display); font-weight:700; font-size:18px; color:var(--text); }
.product-card .price del{ color: var(--muted); font-weight:400; font-size:13px; opacity:.7; }
.product-card .price ins{ text-decoration:none; }
.product-card .star-rating{ display:none; }

/* Miniatura por defecto de WooCommerce dentro de .product-media */
.product-media img{
  position:absolute !important; inset:0; z-index:2; width:100%; height:100%; object-fit:cover;
}

/* ---------- resultado + orden (archive-product.php) ---------- */
.shop-toolbar{ display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap; margin-bottom:20px; }
.woocommerce-result-count{ font-size:13.5px; color:var(--muted); margin:0; }
.woocommerce-ordering{ margin:0; }
.woocommerce-ordering select{
  background: var(--surface); border:1px solid var(--line); color:var(--text);
  padding: 9px 14px; border-radius: 100px; font-size: 13px;
}

/* ---------- widgets de filtro en la sidebar de la tienda ---------- */
.filters-widget{ margin-bottom: 10px; }
.filters-widget h4{ font-size: 12px; text-transform:uppercase; letter-spacing:.08em; color: var(--muted); margin: 18px 0 10px; }
.filters-widget:first-child h4{ margin-top:0; }
.filters-widget ul{ list-style:none; margin:0; padding:0; }
.filters-widget ul li{ padding: 6px 0; font-size: 13.5px; }
.filters-widget ul li a{ color: var(--text); opacity:.85; }
.filters-widget ul li a:hover{ opacity:1; color: var(--warm); }
.filters-widget .wc-layered-nav-term.chosen a{ color: var(--warm); }
.price_slider{ margin-bottom: 16px !important; }
.price_slider_amount{ font-family: var(--font-mono); font-size:12.5px; color: var(--muted); }
.price_slider_amount .button{
  float:right; background: var(--surface-2); border:1px solid var(--line); color:var(--text);
  border-radius:100px; padding:6px 14px; font-size:12px;
}
.ui-slider{ background: var(--line); height:4px; border-radius:4px; position:relative; }
.ui-slider .ui-slider-range{ background: var(--warm); position:absolute; height:100%; border-radius:4px; }
.ui-slider .ui-slider-handle{
  width:16px; height:16px; border-radius:50%; background: var(--warm);
  position:absolute; top:50%; transform:translate(-50%,-50%); cursor:pointer; border:2px solid var(--ink);
}

/* ---------- página de producto individual ---------- */
.single-product .page-header{ display:none; }
div.product{ display:grid; grid-template-columns: 1fr 1fr; gap:56px; padding: 50px 0 90px; max-width: var(--container); margin:0 auto; padding-left:24px; padding-right:24px; }
div.product .woocommerce-product-gallery{
  background: var(--surface); border:1px solid var(--line); border-radius: var(--radius);
  overflow:hidden;
  height:auto !important;
  display:block !important;
}
div.product .woocommerce-product-gallery .flex-viewport,
div.product .woocommerce-product-gallery__wrapper{
  height:auto !important;
}
div.product .woocommerce-product-gallery__image,
div.product .woocommerce-product-gallery__image img{
  height:auto !important;
  width:100% !important;
  display:block !important;
}
div.product .summary{ max-width:none; }
div.product .product_title{ font-family: var(--font-display); font-size: clamp(24px,3vw,32px); margin-bottom:12px; }
div.product .price{ font-family: var(--font-display); font-size: 28px; font-weight:700; margin-bottom:20px; display:block; }
div.product .price del{ color:var(--muted); font-size:16px; margin-right:8px; }
div.product .woocommerce-product-details__short-description{ color: var(--muted); font-size:14.5px; margin-bottom:24px; }
div.product .woocommerce-product-attributes{ width:100%; border-collapse:collapse; margin-bottom:28px; }
div.product .woocommerce-product-attributes th, div.product .woocommerce-product-attributes td{
  text-align:left; padding:8px 0; border-bottom:1px dashed var(--line); font-size:13.5px;
}
div.product .woocommerce-product-attributes th{ color:var(--muted); font-weight:400; width:40%; }
div.product form.cart{ display:flex; align-items:center; gap:16px; flex-wrap:wrap; margin-bottom:20px; }
div.product .quantity{ display:flex; }
div.product .quantity input.qty{
  width:70px; text-align:center; background:var(--surface-2); border:1px solid var(--line); color:var(--text);
  border-radius:100px; padding:12px; font-family: var(--font-mono);
}
div.product .single_add_to_cart_button{
  background: linear-gradient(135deg, var(--warm), #ff9a3d) !important;
  color:#1a1206 !important; border:none; border-radius:100px; padding:13px 28px; font-weight:600;
}
div.product table.variations{ margin-bottom:16px; width:100%; }
div.product table.variations select{
  width:100%; background: var(--surface-2); border:1px solid var(--line); color:var(--text);
  padding:10px 14px; border-radius: var(--radius-sm);
}
div.product .woocommerce-variation-price .price{ font-size:22px; }
div.product .stock{ font-family: var(--font-mono); font-size:13px; color: var(--muted); }
div.product .stock.out-of-stock{ color: var(--danger); }
.woocommerce-tabs{ max-width: var(--container); margin: 0 auto 60px; padding: 0 24px; }
.woocommerce-tabs ul.tabs{ display:flex; gap:24px; border-bottom:1px solid var(--line); margin-bottom:24px; list-style:none; padding:0; }
.woocommerce-tabs ul.tabs li{ padding-bottom:12px; font-size:13.5px; color:var(--muted); cursor:pointer; }
.woocommerce-tabs ul.tabs li.active{ color:var(--warm); border-bottom:2px solid var(--warm); }
.related.products{ max-width: var(--container); margin: 0 auto 90px; padding: 0 24px; }
.related.products > h2{ font-family: var(--font-display); font-size: clamp(22px,3vw,28px); margin-bottom:24px; }
@media (max-width: 880px){ div.product{ grid-template-columns:1fr; gap:28px; } }

/* ---------- carrito ---------- */
.woocommerce-cart .wrap, .woocommerce-checkout .wrap{ padding: 46px 24px 90px; max-width: var(--container); margin:0 auto; }
table.shop_table{ width:100%; border-collapse:collapse; margin-bottom:24px; }
table.shop_table th{ text-align:left; font-family: var(--font-mono); font-size:11.5px; text-transform:uppercase; letter-spacing:.05em; color:var(--muted); padding:10px 8px; border-bottom:1px solid var(--line); }
table.shop_table td{ padding:16px 8px; border-bottom:1px solid var(--line); font-size:14px; }
table.shop_table .product-thumbnail img{ width:64px; border-radius: var(--radius-sm); border:1px solid var(--line); }
table.shop_table td.actions .button{
  background: linear-gradient(135deg, var(--warm), #ff9a3d); color:#1a1206; border:none;
  border-radius:100px; padding:12px 24px; font-weight:600;
}
.woocommerce-cart-form .quantity input.qty{
  width:60px; text-align:center; background:var(--surface-2); border:1px solid var(--line); color:var(--text);
  border-radius:100px; padding:8px;
}
.cart-collaterals .cart_totals{
  background: var(--surface); border:1px solid var(--line); border-radius: var(--radius); padding:24px; max-width:400px; margin-left:auto;
}
.cart_totals h2{ font-size:16px; margin-bottom:16px; }
.cart_totals table{ width:100%; }
.cart_totals table td, .cart_totals table th{ border:none; padding:8px 0; font-size:13.5px; }
.cart_totals .order-total .woocommerce-Price-amount{ font-family: var(--font-mono); font-weight:700; font-size:16px; }
.wc-proceed-to-checkout .checkout-button{
  display:block; text-align:center; width:100%; background: linear-gradient(135deg, var(--warm), #ff9a3d) !important;
  color:#1a1206 !important; border-radius:100px; padding:14px; font-weight:700; margin-top:12px;
}
.woocommerce-shipping-calculator .button{
  background: var(--surface-2); border:1px solid var(--line); color:var(--text); border-radius:100px; padding:10px 18px;
}

/* ---------- checkout ---------- */
.woocommerce-checkout form .form-row input.input-text,
.woocommerce-checkout form .form-row select,
.woocommerce-checkout form .form-row textarea{
  width:100%; background: var(--surface-2); border:1px solid var(--line); color:var(--text);
  padding:12px 14px; border-radius: var(--radius-sm); font-size:14.5px;
}
.woocommerce-checkout #order_review{
  background: var(--surface); border:1px solid var(--line); border-radius: var(--radius); padding:24px;
}
.woocommerce-checkout .payment_methods{ list-style:none; padding:0; }
.woocommerce-checkout .payment_methods li{ border:1px solid var(--line); border-radius: var(--radius-sm); padding:14px; margin-bottom:10px; }
#place_order{
  width:100%; background: linear-gradient(135deg, var(--warm), #ff9a3d) !important; color:#1a1206 !important;
  border:none; border-radius:100px; padding:14px; font-weight:700; font-size:15px;
}

/* ---------- notices / mensajes ---------- */
.woocommerce-message, .woocommerce-info, .woocommerce-error, .woocommerce-noreviews{
  background: var(--surface); border:1px solid var(--line); border-left:3px solid var(--warm);
  border-radius: var(--radius-sm); padding: 14px 18px; list-style:none; margin: 0 24px 24px; font-size:14px;
}
.woocommerce-error{ border-left-color: var(--danger); }

/* ---------- mi cuenta ---------- */
.woocommerce-account .wrap{ max-width: var(--container); margin:0 auto; padding: 46px 24px 90px; }
.woocommerce-MyAccount-navigation ul{ list-style:none; padding:0; }
.woocommerce-MyAccount-navigation li{ margin-bottom:8px; }
.woocommerce-MyAccount-navigation li a{ color:var(--muted); }
.woocommerce-MyAccount-navigation li.is-active a{ color: var(--warm); }
