/*
 Theme Name:   Woodmart Child
 Description:  Woodmart Child Theme
 Author:       XTemos
 Author URI:   http://xtemos.com
 Template:     woodmart
 Version:      1.0.0
*/

/* ===== KUALITEK CUSTOM STYLES ===== */

/* Hide green announcement/top bar */
.whb-top-bar { display: none !important; }

/* Header background - dark navy */
.whb-general-header,
.whb-header-bottom,
.whb-header { background-color: #1d2432 !important; }

/* Nav links white */
.whb-general-header a,
.whb-header-bottom a,
.whb-header .whb-nav > li > a,
.navigation-style-default > li > a { color: #ffffff !important; }

/* Nav hover / active - red */
.whb-header .whb-nav > li > a:hover,
.whb-header .whb-nav > li.current-menu-item > a,
.whb-header-bottom a:hover { color: #de002e !important; }

/* Header icons (cart, search, wishlist) white */
.whb-header .whb-header-cell a,
.whb-header .whb-tools-container a,
.whb-general-header .whb-header-cell a { color: #ffffff !important; }

/* Cart count badge */
.whb-header .wd-header-cart .count { background-color: #de002e !important; }

/* Hide sidebar and title on homepage */
body.home .sidebar,
body.home #secondary,
body.home .widget-area { display: none !important; }

body.home #primary,
body.home .content-area { width: 100% !important; max-width: 100% !important; float: none !important; }

body.home .page-title,
body.home .entry-header,
body.home h1.entry-title { display: none !important; }

/* Breadcrumbs hidden on home */
body.home .wd-breadcrumbs,
body.home nav.woocommerce-breadcrumb { display: none !important; }

/* Product cards hover effect */
.product-grid-item { transition: transform 0.2s ease, box-shadow 0.2s ease !important; }
.product-grid-item:hover { transform: translateY(-4px) !important; box-shadow: 0 8px 24px rgba(0,0,0,0.14) !important; }

/* WooCommerce buttons - red */
.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product a.add_to_cart_button,
.woocommerce .button.alt,
.woocommerce button.button { background-color: #de002e !important; color: #ffffff !important; }

.woocommerce ul.products li.product .button:hover,
.woocommerce .button.alt:hover { background-color: #b30025 !important; }

/* Product category cards */
.product-category a img { transition: transform 0.3s ease !important; }
.product-category:hover a img { transform: scale(1.05) !important; }


/* ═══════════════════════════════════════════════════════════
   KUALITEK – Sidebar de filtros de tienda
   Almacenado en woodmart-child/style.css → nunca se pierde
   ═══════════════════════════════════════════════════════════ */

/* Layout: sidebar izquierdo + productos */
.kualitek-shop-layout {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  width: 100%;
}

.kualitek-filters-sidebar {
  flex: 0 0 260px;
  min-width: 220px;
  max-width: 280px;
  background: #ffffff;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  position: sticky;
  top: 100px;
}

.kualitek-products-main {
  flex: 1 1 0;
  min-width: 0;
}

/* Cabecera del sidebar */
.kualitek-filter-header {
  background: #1d2432;
  color: #ffffff;
  font-family: inherit;
  font-weight: 700;
  font-size: 15px;
  padding: 14px 18px;
  letter-spacing: 0.03em;
}
.kualitek-filter-icon { margin-right: 8px; }

/* Títulos de cada sección de filtro */
.kualitek-filter-title {
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #1d2432 !important;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 !important;
  padding: 12px 18px 8px !important;
  border-bottom: 1px solid #f0f0f0;
}

/* Cuerpo de cada widget */
.kualitek-filter-widget {
  border-bottom: 1px solid #f0f0f0;
}
.kualitek-filter-widget:last-child { border-bottom: none; }

/* Lista de opciones (layered nav) */
.kualitek-filters-sidebar .woocommerce-widget-layered-nav-list {
  list-style: none;
  margin: 0;
  padding: 8px 0;
}
.kualitek-filters-sidebar .woocommerce-widget-layered-nav-list__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 18px;
  font-size: 13px;
  transition: background 0.15s;
}
.kualitek-filters-sidebar .woocommerce-widget-layered-nav-list__item:hover {
  background: #f9f9f9;
}
.kualitek-filters-sidebar .woocommerce-widget-layered-nav-list__item a {
  color: #333 !important;
  text-decoration: none;
  flex: 1;
}
.kualitek-filters-sidebar .woocommerce-widget-layered-nav-list__item a:hover {
  color: #de002e !important;
}
.kualitek-filters-sidebar .woocommerce-widget-layered-nav-list__item--chosen > a {
  color: #de002e !important;
  font-weight: 600;
}
.kualitek-filters-sidebar .woocommerce-widget-layered-nav-list__item--chosen > a::before {
  content: '✓ ';
  font-weight: 700;
}

/* Count badge */
.kualitek-filters-sidebar .woocommerce-widget-layered-nav-list__item .woocommerce-widget-layered-nav-list__count,
.kualitek-filters-sidebar .woocommerce-widget-layered-nav-list__item .count {
  color: #999;
  font-size: 12px;
  background: #f4f4f4;
  border-radius: 10px;
  padding: 1px 7px;
  min-width: 24px;
  text-align: center;
}

/* Filtro de precio */
.kualitek-filters-sidebar .price_slider_wrapper { padding: 8px 18px 14px; }
.kualitek-filters-sidebar .price_slider_amount { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.kualitek-filters-sidebar .price_slider_amount .button {
  background: #de002e !important;
  color: #fff !important;
  border: none !important;
  border-radius: 4px;
  font-size: 12px !important;
  padding: 5px 14px !important;
  cursor: pointer;
  transition: background 0.2s;
}
.kualitek-filters-sidebar .price_slider_amount .button:hover {
  background: #b30025 !important;
}
.kualitek-filters-sidebar .ui-slider-range { background: #de002e !important; }
.kualitek-filters-sidebar .ui-slider-handle {
  border-color: #de002e !important;
  background: #de002e !important;
}

/* Filtro activo – chip de reset */
.kualitek-filters-sidebar .chosen-filters { padding: 8px 18px; }
.kualitek-filters-sidebar .chosen-filters a { color: #de002e; font-size: 12px; }

/* "Activos" link de borrar todos */
.kualitek-filters-sidebar .wc-layered-nav-term a.woocommerce-widget-layered-nav__rsd { color: #de002e; }

/* Responsive: sidebar va arriba en móvil */
@media (max-width: 768px) {
  .kualitek-shop-layout { flex-direction: column; }
  .kualitek-filters-sidebar {
    position: static;
    flex: none;
    width: 100%;
    max-width: 100%;
  }
}




/* ─── Kualitek: CSS Grid layout + Accordion filters ──────────────────────── */

/* Grid layout wrapper */
.wd-content-area.kualitek-layout-active {
    display: grid !important;
    grid-template-columns: 260px 1fr;
    column-gap: 28px;
    align-items: start;
}
.wd-content-area.kualitek-layout-active > * {
    grid-column: 2;
    min-width: 0;
}
.wd-content-area.kualitek-layout-active > .kualitek-filters-sidebar {
    grid-column: 1;
    grid-row: 1 / span 100;
    position: sticky;
    top: 100px;
    align-self: start;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    scrollbar-width: thin;
}

/* Sidebar shell */
.kualitek-filters-sidebar {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    overflow: hidden;
}
.kualitek-filter-header {
    background: #1d2432;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    padding: 13px 16px;
    letter-spacing: .5px;
}

/* Each filter widget */
.kualitek-widget {
    border-bottom: 1px solid #efefef;
}
.kualitek-widget:last-child { border-bottom: none; }

/* Title row — acts as accordion trigger */
.kualitek-filter-title {
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #1d2432 !important;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: 12px 16px !important;
    margin: 0 !important;
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    background: #fff;
}
.kualitek-filter-title:hover { background: #f8f8f8; }

/* Arrow indicator */
.kf-arrow {
    font-size: 10px;
    color: #888;
    transition: transform .2s ease;
    display: inline-block;
    flex-shrink: 0;
}
.kf-closed .kf-arrow {
    transform: rotate(-90deg);
}

/* Accordion body */
.kf-body {
    padding: 4px 16px 12px;
    overflow: hidden;
}
.kf-body ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.kf-body ul li {
    padding: 4px 0;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.kf-body ul li a {
    color: #333;
    text-decoration: none;
}
.kf-body ul li a:hover { color: #de002e; }
.kf-body ul li .count {
    color: #999;
    font-size: 11px;
    margin-left: 4px;
}
.kf-body ul li.chosen a { color: #de002e; font-weight: 600; }

/* Price filter */
.kf-body .price_slider_wrapper { padding-top: 4px; }
.kf-body .price_slider { margin-bottom: 12px; }
.kf-body .price_slider_amount { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.kf-body .price_slider_amount button {
    background: #de002e;
    color: #fff;
    border: none;
    padding: 6px 14px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}
.kf-body .price_slider_amount .price_label { font-size: 12px; color: #555; }
.ui-slider-range { background: #de002e !important; }
.ui-slider-handle { border-color: #de002e !important; }

/* Active filter chip */
.woocommerce-active-filters { padding: 8px 16px; font-size: 12px; }

/* Mobile */
@media (max-width: 900px) {
    .wd-content-area.kualitek-layout-active {
        display: block !important;
    }
    .kualitek-filters-sidebar {
        width: 100%;
        position: static;
        max-height: none;
        margin-bottom: 20px;
    }
}


/* ── Price slider fix (jQuery UI track invisible by default) ── */
.price_slider.ui-slider {
    height: 6px !important;
    position: relative !important;
    border-radius: 3px !important;
    background: #e0e0e0 !important;
    margin: 10px 8px 20px !important;
}
.price_slider .ui-slider-range {
    height: 100% !important;
    position: absolute !important;
    background: #de002e !important;
    border-radius: 3px !important;
}
.price_slider .ui-slider-handle {
    position: absolute !important;
    width: 16px !important;
    height: 16px !important;
    border-radius: 50% !important;
    background: #de002e !important;
    border: 2px solid #fff !important;
    box-shadow: 0 1px 4px rgba(0,0,0,.25) !important;
    top: -5px !important;
    margin-left: -8px !important;
    cursor: pointer !important;
    z-index: 2 !important;
}
.price_slider_wrapper .price_slider_amount {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    margin-top: 4px;
}
.price_slider_wrapper .price_slider_amount .button {
    background: #de002e !important;
    color: #fff !important;
    border: none !important;
    padding: 6px 14px !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    font-size: 12px !important;
}


/* ── Hide "Caliente" featured badge; show % discount badge ── */
.featured.product-label { display: none !important; }

.kualitek-pct-badge,
span.onsale {
    background: #de002e !important;
    color: #fff !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    border-radius: 4px !important;
    padding: 4px 8px !important;
    min-height: unset !important;
    min-width: unset !important;
    line-height: 1.2 !important;
}
