/*
Theme Name:   DMP Child
Theme URI:    https://distribuidoramp.cl
Description:  Tema hijo de Woodmart para Distribuidora de Materias Primas
Author:       DMP
Template:     woodmart
Version:      1.0.0
Text Domain:  woodmart-dmp-child
*/

/* ============================================================
   VARIABLES GLOBALES
   ============================================================ */
:root {
  --dmp-orange:       #FF8C00;
  --dmp-orange-light: #FFB300;
  --dmp-yellow:       #FFD000;
  --dmp-dark:         #1A0A00;
  --dmp-dark-2:       #2D1800;
  --dmp-white:        #FFFFFF;
  --dmp-bg:           #FFF8F0;
  --dmp-bg-2:         #FFF3E0;
  --dmp-border:       #FFE0B2;
  --dmp-text:         #1A0A00;
  --dmp-text-light:   #5A3A00;
  --dmp-radius:       12px;
  --dmp-radius-lg:    20px;
  --dmp-shadow:       0 4px 20px rgba(255,140,0,0.15);
  --dmp-shadow-lg:    0 8px 40px rgba(255,140,0,0.25);
  --dmp-gradient:     linear-gradient(135deg, #FF8C00, #FFD000);
  --dmp-gradient-rev: linear-gradient(135deg, #FFD000, #FF8C00);
}

/* ============================================================
   TIPOGRAFÍA GLOBAL
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap');

body,
.woodmart-font-family-body {
  font-family: 'Poppins', sans-serif !important;
  color: var(--dmp-text);
  background-color: var(--dmp-bg);
}

h1, h2, h3, h4, h5, h6,
.woodmart-font-family-headings {
  font-family: 'Poppins', sans-serif !important;
  font-weight: 800 !important;
  color: var(--dmp-dark) !important;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header,
.whb-header,
.woodmart-header {
  background: linear-gradient(90deg, #FFD000 0%, #FFB300 50%, #FF8C00 100%) !important;
  box-shadow: 0 3px 14px rgba(255,140,0,0.3) !important;
}

/* Logo */
.site-logo img,
.woodmart-logo img {
  filter: none !important;
}

/* Nav links */
.woodmart-nav > li > a,
.main-nav > li > a,
.navigation-style-default .menu > li > a {
  color: var(--dmp-dark) !important;
  font-family: 'Poppins', sans-serif !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  padding: 8px 18px !important;
  border-radius: 20px !important;
  transition: all 0.2s ease !important;
}

.woodmart-nav > li > a:hover,
.navigation-style-default .menu > li > a:hover,
.woodmart-nav > li.current-menu-item > a {
  background: var(--dmp-dark) !important;
  color: var(--dmp-yellow) !important;
}

/* Search bar */
.woodmart-search-form .search-field,
.wd-search-form input[type="text"] {
  background: rgba(255,255,255,0.45) !important;
  border: none !important;
  border-radius: 20px !important;
  color: var(--dmp-dark) !important;
  font-family: 'Poppins', sans-serif !important;
}

.woodmart-search-form .search-field::placeholder {
  color: rgba(26,10,0,0.55) !important;
}

/* Cart icon */
.woodmart-cart-btn .cart-count,
.wd-header-cart .cart-count {
  background: var(--dmp-dark) !important;
  color: var(--dmp-yellow) !important;
  font-weight: 700 !important;
}

/* ============================================================
   TOP BAR
   ============================================================ */
.woodmart-top-bar,
.wd-top-bar {
  background: var(--dmp-dark) !important;
  color: rgba(255,255,255,0.7) !important;
  font-size: 12px !important;
}

.woodmart-top-bar a,
.wd-top-bar a {
  color: var(--dmp-yellow) !important;
}

/* ============================================================
   BOTONES GLOBALES
   ============================================================ */
.button,
button,
input[type="submit"],
.wp-block-button__link,
.woodmart-btn,
.wd-btn {
  background: var(--dmp-gradient) !important;
  color: var(--dmp-dark) !important;
  border: none !important;
  border-radius: var(--dmp-radius-lg) !important;
  font-family: 'Poppins', sans-serif !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  letter-spacing: 0.3px !important;
  transition: all 0.25s ease !important;
  box-shadow: 0 4px 14px rgba(255,140,0,0.3) !important;
}

.button:hover,
button:hover,
input[type="submit"]:hover,
.woodmart-btn:hover,
.wd-btn:hover {
  background: var(--dmp-gradient-rev) !important;
  transform: translateY(-2px) !important;
  box-shadow: var(--dmp-shadow-lg) !important;
}

/* Botón secundario / outline */
.button.alt,
.woodmart-btn-secondary {
  background: transparent !important;
  border: 2px solid var(--dmp-orange) !important;
  color: var(--dmp-orange) !important;
  box-shadow: none !important;
}

.button.alt:hover {
  background: var(--dmp-gradient) !important;
  color: var(--dmp-dark) !important;
}

/* ============================================================
   HOME - HERO SLIDER
   ============================================================ */
.woodmart-slider,
.rev_slider_wrapper,
.wd-slider {
  border-radius: 0 0 var(--dmp-radius-lg) var(--dmp-radius-lg) !important;
  overflow: hidden !important;
}

/* ============================================================
   HOME - SECCIÓN DE CATEGORÍAS
   ============================================================ */
.woodmart-categories-icons .category-item,
.wd-product-cats .cat-item {
  background: var(--dmp-white) !important;
  border: 2px solid var(--dmp-border) !important;
  border-radius: var(--dmp-radius) !important;
  transition: all 0.25s ease !important;
}

.woodmart-categories-icons .category-item:hover,
.wd-product-cats .cat-item:hover {
  border-color: var(--dmp-orange) !important;
  box-shadow: var(--dmp-shadow) !important;
  transform: translateY(-4px) !important;
}

.woodmart-categories-icons .category-item .title,
.wd-product-cats .cat-item .title {
  color: var(--dmp-dark) !important;
  font-weight: 700 !important;
}

/* ============================================================
   PRODUCTOS - CARDS
   ============================================================ */
.product-grid-item,
.wd-product,
li.product {
  background: var(--dmp-white) !important;
  border: 1.5px solid var(--dmp-border) !important;
  border-radius: var(--dmp-radius) !important;
  transition: all 0.25s ease !important;
  overflow: hidden !important;
}

.product-grid-item:hover,
.wd-product:hover,
li.product:hover {
  border-color: var(--dmp-orange) !important;
  box-shadow: var(--dmp-shadow-lg) !important;
  transform: translateY(-4px) !important;
}

/* Imagen del producto */
.product-grid-item .product-image-wrap,
.wd-product .product-image-wrap {
  background: var(--dmp-bg-2) !important;
  border-radius: var(--dmp-radius) var(--dmp-radius) 0 0 !important;
  overflow: hidden !important;
}

/* Nombre del producto */
.product-grid-item h3,
.product-grid-item .woocommerce-loop-product__title,
.wd-product .product-title {
  font-family: 'Poppins', sans-serif !important;
  font-weight: 700 !important;
  font-size: 14px !important;
  color: var(--dmp-dark) !important;
}

/* Precio */
.price,
.woocommerce-Price-amount,
.product-grid-item .price {
  color: var(--dmp-orange) !important;
  font-weight: 800 !important;
  font-size: 18px !important;
}

.price del,
.price del .woocommerce-Price-amount {
  color: #999 !important;
  font-weight: 400 !important;
  font-size: 13px !important;
}

/* Badge de oferta */
.onsale,
.woodmart-label,
.wd-label {
  background: var(--dmp-gradient) !important;
  color: var(--dmp-dark) !important;
  font-family: 'Poppins', sans-serif !important;
  font-weight: 700 !important;
  border-radius: 6px !important;
  padding: 3px 10px !important;
}

/* Botón añadir al carrito en card */
.product-grid-item .add_to_cart_button,
.wd-product .add_to_cart_button,
li.product .add_to_cart_button {
  background: var(--dmp-gradient) !important;
  color: var(--dmp-dark) !important;
  border-radius: var(--dmp-radius) !important;
  font-weight: 700 !important;
  width: 100% !important;
  text-align: center !important;
}

/* ============================================================
   TIENDA - FILTROS SIDEBAR
   ============================================================ */
.woodmart-widget,
.widget,
.wd-widget {
  background: var(--dmp-white) !important;
  border: 1.5px solid var(--dmp-border) !important;
  border-radius: var(--dmp-radius) !important;
  padding: 20px !important;
  margin-bottom: 20px !important;
}

.woodmart-widget .widget-title,
.widget .widgettitle,
.wd-widget .widget-title {
  font-family: 'Poppins', sans-serif !important;
  font-weight: 800 !important;
  font-size: 15px !important;
  color: var(--dmp-dark) !important;
  padding-bottom: 10px !important;
  border-bottom: 2px solid var(--dmp-border) !important;
  margin-bottom: 14px !important;
}

/* Checkboxes de filtro */
.woocommerce-widget-layered-nav-list .woocommerce-widget-layered-nav-list__item a,
.widget_layered_nav ul li a {
  color: var(--dmp-text-light) !important;
  font-family: 'Poppins', sans-serif !important;
  font-size: 13px !important;
  transition: color 0.2s !important;
}

.woocommerce-widget-layered-nav-list .woocommerce-widget-layered-nav-list__item a:hover {
  color: var(--dmp-orange) !important;
}

/* Slider de precio */
.ui-slider-range,
.price_slider_amount .ui-slider .ui-slider-range {
  background: var(--dmp-gradient) !important;
}

.ui-slider-handle {
  background: var(--dmp-orange) !important;
  border: 3px solid var(--dmp-white) !important;
  box-shadow: 0 2px 8px rgba(255,140,0,0.4) !important;
}

/* ============================================================
   PÁGINA DE PRODUCTO INDIVIDUAL
   ============================================================ */
.single-product .product_title,
.single-product h1.product_title {
  font-size: 28px !important;
  font-weight: 800 !important;
  color: var(--dmp-dark) !important;
  line-height: 1.2 !important;
}

.single-product .price {
  font-size: 32px !important;
  font-weight: 900 !important;
  color: var(--dmp-orange) !important;
}

.single-product .woocommerce-product-details__short-description {
  color: var(--dmp-text-light) !important;
  font-size: 14px !important;
  line-height: 1.7 !important;
  border-left: 4px solid var(--dmp-orange) !important;
  padding-left: 16px !important;
  margin: 16px 0 !important;
}

/* Imagen principal producto */
.woocommerce-product-gallery {
  border-radius: var(--dmp-radius) !important;
  overflow: hidden !important;
  border: 2px solid var(--dmp-border) !important;
}

/* Thumbnails */
.woocommerce-product-gallery__wrapper .flex-control-thumbs li img {
  border-radius: 8px !important;
  border: 2px solid transparent !important;
  transition: border-color 0.2s !important;
}

.woocommerce-product-gallery__wrapper .flex-control-thumbs li img:hover,
.woocommerce-product-gallery__wrapper .flex-control-thumbs li img.flex-active {
  border-color: var(--dmp-orange) !important;
}

/* Selector de cantidad */
.quantity .qty,
.woocommerce .quantity input.qty {
  border: 2px solid var(--dmp-border) !important;
  border-radius: 10px !important;
  font-family: 'Poppins', sans-serif !important;
  font-weight: 700 !important;
  color: var(--dmp-dark) !important;
  background: var(--dmp-white) !important;
}

/* Tabs de producto */
.woocommerce-tabs .tabs li a {
  font-family: 'Poppins', sans-serif !important;
  font-weight: 600 !important;
  color: var(--dmp-text-light) !important;
  border-radius: 10px 10px 0 0 !important;
}

.woocommerce-tabs .tabs li.active a {
  color: var(--dmp-orange) !important;
  border-bottom-color: var(--dmp-orange) !important;
}

/* ============================================================
   CARRITO
   ============================================================ */
.woocommerce-cart table.cart {
  border-radius: var(--dmp-radius) !important;
  overflow: hidden !important;
  border: 1.5px solid var(--dmp-border) !important;
}

.woocommerce-cart table.cart thead th {
  background: var(--dmp-gradient) !important;
  color: var(--dmp-dark) !important;
  font-family: 'Poppins', sans-serif !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
}

.woocommerce-cart table.cart tbody td {
  background: var(--dmp-white) !important;
  border-bottom: 1px solid var(--dmp-border) !important;
  vertical-align: middle !important;
}

.woocommerce-cart table.cart tbody tr:hover td {
  background: var(--dmp-bg-2) !important;
}

/* Cart totals */
.cart_totals,
.woocommerce-cart .cart_totals {
  background: var(--dmp-white) !important;
  border: 1.5px solid var(--dmp-border) !important;
  border-radius: var(--dmp-radius) !important;
  padding: 24px !important;
}

.cart_totals h2 {
  font-family: 'Poppins', sans-serif !important;
  font-weight: 800 !important;
  font-size: 20px !important;
  color: var(--dmp-dark) !important;
  padding-bottom: 12px !important;
  border-bottom: 2px solid var(--dmp-border) !important;
  margin-bottom: 16px !important;
}

.cart_totals .order-total .woocommerce-Price-amount {
  color: var(--dmp-orange) !important;
  font-size: 24px !important;
  font-weight: 900 !important;
}

/* Cupón */
.coupon input[type="text"] {
  border: 2px solid var(--dmp-border) !important;
  border-radius: var(--dmp-radius) !important;
  font-family: 'Poppins', sans-serif !important;
}

/* ============================================================
   CHECKOUT
   ============================================================ */
.woocommerce-checkout #customer_details,
.woocommerce-checkout .woocommerce-checkout-payment {
  background: var(--dmp-white) !important;
  border: 1.5px solid var(--dmp-border) !important;
  border-radius: var(--dmp-radius) !important;
  padding: 28px !important;
}

/* Labels */
.woocommerce-checkout label,
.woocommerce form label {
  font-family: 'Poppins', sans-serif !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  color: var(--dmp-dark) !important;
  margin-bottom: 5px !important;
}

/* Inputs */
.woocommerce-checkout input[type="text"],
.woocommerce-checkout input[type="email"],
.woocommerce-checkout input[type="tel"],
.woocommerce-checkout select,
.woocommerce-checkout textarea,
.woocommerce input.input-text,
.woocommerce select {
  border: 2px solid var(--dmp-border) !important;
  border-radius: var(--dmp-radius) !important;
  font-family: 'Poppins', sans-serif !important;
  font-size: 14px !important;
  color: var(--dmp-dark) !important;
  background: var(--dmp-bg) !important;
  padding: 12px 16px !important;
  transition: border-color 0.2s !important;
}

.woocommerce input.input-text:focus,
.woocommerce select:focus {
  border-color: var(--dmp-orange) !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(255,140,0,0.15) !important;
}

/* Order summary en checkout */
#order_review,
.woocommerce-checkout-review-order {
  background: var(--dmp-white) !important;
  border: 1.5px solid var(--dmp-border) !important;
  border-radius: var(--dmp-radius) !important;
  padding: 28px !important;
}

#order_review h3,
.woocommerce-checkout-review-order h3 {
  font-family: 'Poppins', sans-serif !important;
  font-weight: 800 !important;
  color: var(--dmp-dark) !important;
  border-bottom: 2px solid var(--dmp-border) !important;
  padding-bottom: 12px !important;
  margin-bottom: 16px !important;
}

#order_review table thead th {
  background: var(--dmp-gradient) !important;
  color: var(--dmp-dark) !important;
  font-family: 'Poppins', sans-serif !important;
  font-weight: 700 !important;
}

.order-total .woocommerce-Price-amount {
  color: var(--dmp-orange) !important;
  font-weight: 900 !important;
  font-size: 22px !important;
}

/* Métodos de pago */
.wc_payment_methods li {
  border: 2px solid var(--dmp-border) !important;
  border-radius: var(--dmp-radius) !important;
  padding: 14px 18px !important;
  margin-bottom: 10px !important;
  transition: border-color 0.2s !important;
}

.wc_payment_methods li.payment_method_selected,
.wc_payment_methods li:has(input:checked) {
  border-color: var(--dmp-orange) !important;
  background: #fff9f0 !important;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer,
.woodmart-footer,
.wd-footer {
  background: var(--dmp-dark) !important;
  color: rgba(255,255,255,0.7) !important;
}

.site-footer h3,
.site-footer .widget-title,
.woodmart-footer h3,
.woodmart-footer .widgettitle {
  color: var(--dmp-yellow) !important;
  font-family: 'Poppins', sans-serif !important;
  font-weight: 700 !important;
  font-size: 15px !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
}

.site-footer a,
.woodmart-footer a {
  color: rgba(255,255,255,0.65) !important;
  transition: color 0.2s !important;
}

.site-footer a:hover,
.woodmart-footer a:hover {
  color: var(--dmp-yellow) !important;
}

.woodmart-footer-bottom,
.site-footer .footer-bottom {
  background: rgba(0,0,0,0.3) !important;
  border-top: 1px solid rgba(255,255,255,0.08) !important;
  color: rgba(255,255,255,0.4) !important;
  font-size: 12px !important;
}

/* ============================================================
   BREADCRUMBS
   ============================================================ */
.woocommerce-breadcrumb,
.breadcrumbs {
  font-family: 'Poppins', sans-serif !important;
  font-size: 13px !important;
  color: var(--dmp-text-light) !important;
}

.woocommerce-breadcrumb a {
  color: var(--dmp-orange) !important;
}

/* ============================================================
   PAGINACIÓN
   ============================================================ */
.woocommerce-pagination .page-numbers li .page-numbers,
.woocommerce nav.woocommerce-pagination ul li a {
  border: 2px solid var(--dmp-border) !important;
  border-radius: 8px !important;
  color: var(--dmp-text-light) !important;
  font-family: 'Poppins', sans-serif !important;
  font-weight: 600 !important;
  transition: all 0.2s !important;
}

.woocommerce-pagination .page-numbers li .page-numbers.current,
.woocommerce nav.woocommerce-pagination ul li span.current {
  background: var(--dmp-gradient) !important;
  border-color: transparent !important;
  color: var(--dmp-dark) !important;
}

.woocommerce nav.woocommerce-pagination ul li a:hover {
  background: var(--dmp-gradient) !important;
  border-color: transparent !important;
  color: var(--dmp-dark) !important;
}

/* ============================================================
   NOTIFICACIONES / ALERTAS
   ============================================================ */
.woocommerce-message,
.woocommerce-info {
  border-top: 4px solid var(--dmp-orange) !important;
  background: var(--dmp-bg-2) !important;
  color: var(--dmp-dark) !important;
  border-radius: 0 0 var(--dmp-radius) var(--dmp-radius) !important;
  font-family: 'Poppins', sans-serif !important;
}

.woocommerce-message::before {
  color: var(--dmp-orange) !important;
}

.woocommerce-error {
  border-top: 4px solid #e53e3e !important;
  border-radius: 0 0 var(--dmp-radius) var(--dmp-radius) !important;
}

/* ============================================================
   BADGES Y ETIQUETAS ESPECIALES
   ============================================================ */
.woodmart-label-new,
.wd-label-new {
  background: var(--dmp-dark) !important;
  color: var(--dmp-yellow) !important;
}

.woodmart-label-sale,
.wd-label-sale {
  background: var(--dmp-gradient) !important;
  color: var(--dmp-dark) !important;
}

/* ============================================================
   WISHLIST
   ============================================================ */
.woodmart-wishlist-btn,
.wd-wishlist-btn {
  color: var(--dmp-orange) !important;
}

.woodmart-wishlist-btn.active,
.wd-wishlist-btn.active {
  color: var(--dmp-orange) !important;
  fill: var(--dmp-orange) !important;
}

/* ============================================================
   QUICK VIEW
   ============================================================ */
.woodmart-quick-view-popup,
.wd-popup-product {
  border-radius: var(--dmp-radius-lg) !important;
  overflow: hidden !important;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .site-header,
  .whb-header {
    padding: 10px 16px !important;
  }

  .single-product .product_title {
    font-size: 22px !important;
  }

  .single-product .price {
    font-size: 26px !important;
  }

  .woocommerce-checkout #customer_details,
  .woocommerce-checkout .woocommerce-checkout-payment,
  #order_review {
    padding: 18px !important;
  }
}
