/*
Theme Name: Piezarotaaspirador
Theme URI: https://caceresoutlet.shop
Description: Child Storefront — Piezarotaaspirador azul/rojo, buscador protagonista, hueco agentes IA.
Author: Caceres Outlet
Template: storefront
Version: 1.8.0
Text Domain: piezarotaaspirador
*/

:root {
  --pz-navy: #0b1f3a;
  --pz-blue: #0b4f8a;
  --pz-red: #c8102e;
  --pz-red-soft: #e83a4f;
  --pz-sand: #f2f5f9;
  --pz-ink: #142033;
  --pz-muted: #5a6a7a;
  --pz-card: #ffffff;
  --pz-cream: #f7f1e8;
  --pz-pattern: url("assets/piezarota-pattern.svg");
}

html { scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--pz-ink);
  background:
    radial-gradient(ellipse at top left, rgba(11, 79, 138, 0.08), transparent 45%),
    radial-gradient(ellipse at top right, rgba(200, 16, 46, 0.07), transparent 40%),
    var(--pz-sand);
}

/* Header marca + patrón watermark Piezarota */
.site-header,
.col-full.site-header-container,
.storefront-primary-navigation {
  background-color: var(--pz-navy) !important;
  background-image:
    linear-gradient(180deg, rgba(11, 31, 58, 0.88) 0%, rgba(11, 31, 58, 0.94) 100%),
    var(--pz-pattern) !important;
  background-size: auto, 200px 200px !important;
  background-repeat: repeat !important;
  background-position: center top !important;
}

.site-header {
  border-bottom: 3px solid var(--pz-red);
  padding-bottom: 0.4rem;
  position: relative;
}

/* Franja buscador navy con marca visible y texto claro */
#piezarota-ai-search,
.piezarota-ai-search {
  clear: both !important;
  float: none !important;
  display: block;
  width: 100% !important;
  max-width: none;
  margin: 0.35rem 0 1rem;
  box-sizing: border-box;
  background:
    linear-gradient(135deg, rgba(11, 79, 138, 0.55) 0%, rgba(11, 31, 58, 0.35) 55%, rgba(200, 16, 46, 0.18) 100%),
    var(--pz-pattern);
  background-size: auto, 180px 180px;
  background-repeat: repeat;
  border-radius: 12px;
  padding: 0.85rem 0.9rem 0.7rem !important;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.site-branding .site-title,
.site-branding .site-title a,
.main-navigation ul li a,
.site-header-cart .cart-contents {
  color: #fff !important;
}

.site-branding .site-title {
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.site-branding .site-description {
  color: #a8b8cc !important;
  font-size: 0.92rem;
  max-width: 28rem;
}

.main-navigation ul.menu > li > a:hover,
.main-navigation ul.nav-menu > li > a:hover {
  color: #ffb3b3 !important;
}

/* ===== BUSCADOR PROTAGONISTA + HUECO IA ===== */
/* Storefront flota branding ~74% y search ~22% a la derecha: lo anulamos */
.woocommerce-active .site-header .site-branding {
  width: 100% !important;
  float: none !important;
  margin-right: 0 !important;
  clear: both;
}

.piezarota-search-form {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
  background: #fff;
  border-radius: 10px;
  padding: 0.35rem;
  box-shadow: 0 8px 28px rgba(11, 31, 58, 0.28);
  border: 2px solid rgba(255, 255, 255, 0.35);
}

.piezarota-search-input {
  flex: 1;
  border: 0 !important;
  background: transparent !important;
  font-size: 1.12rem !important;
  padding: 0.85rem 1rem !important;
  color: var(--pz-ink) !important;
  min-width: 0;
  box-shadow: none !important;
}

.piezarota-search-input::placeholder {
  color: #7a8a9a;
}

.piezarota-search-btn {
  background: var(--pz-red) !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: 8px !important;
  font-weight: 700 !important;
  font-size: 1rem !important;
  padding: 0 1.35rem !important;
  cursor: pointer;
  white-space: nowrap;
}

.piezarota-search-btn:hover {
  background: var(--pz-red-soft) !important;
}

.piezarota-search-hint {
  margin: 0.55rem 0 0;
  font-size: 0.86rem;
  color: var(--pz-cream);
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.piezarota-search-hint a {
  color: #ffd0d0;
  text-decoration: underline;
  font-weight: 600;
}

/* Sin lateral blog en tienda/carrito/cuenta */
.piezarota-no-sidebar #secondary,
.piezarota-no-sidebar .widget-area,
.woocommerce-cart #secondary,
.woocommerce-checkout #secondary,
.woocommerce-account #secondary {
  display: none !important;
}

.piezarota-no-sidebar #primary,
.woocommerce-cart #primary,
.woocommerce-checkout #primary,
.woocommerce-account #primary {
  width: 100% !important;
  float: none !important;
  margin: 0 auto !important;
}

/* Guías útiles (home) */
.piezarota-guides {
  max-width: 1100px;
  margin: 0 auto 2rem;
  padding: 0 1rem;
}

.piezarota-guides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.piezarota-guides-grid a {
  display: block;
  background: #fff;
  border: 1px solid #d8e0ea;
  border-left: 4px solid var(--pz-red);
  border-radius: 8px;
  padding: 0.95rem 1rem;
  color: var(--pz-navy);
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(11, 31, 58, 0.05);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.piezarota-guides-grid a:hover {
  border-color: var(--pz-blue);
  transform: translateY(-1px);
}

.piezarota-guides-grid span {
  display: block;
  margin-top: 0.35rem;
  font-weight: 400;
  font-size: 0.88rem;
  color: var(--pz-muted);
  line-height: 1.35;
}

.piezarota-ai-panel {
  margin-top: 0.75rem;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px dashed rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  color: #e8eef6;
  font-size: 0.92rem;
}

.piezarota-ai-search--page .piezarota-search-form {
  box-shadow: 0 4px 16px rgba(11, 31, 58, 0.12);
  border-color: #d0dae6;
}

/* Hero home */
.piezarota-hero {
  background:
    linear-gradient(125deg, rgba(11, 31, 58, 0.92) 0%, rgba(11, 79, 138, 0.86) 48%, rgba(200, 16, 46, 0.78) 100%),
    var(--pz-pattern);
  background-size: auto, 200px 200px;
  background-repeat: repeat;
  color: #fff;
  padding: 3.4rem 1.5rem 3.6rem;
  text-align: center;
  margin: 0 0 2rem;
  border-radius: 0 0 20px 20px;
  position: relative;
  overflow: hidden;
}

.piezarota-hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -40% auto;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.12), transparent 70%);
  pointer-events: none;
}

.piezarota-hero h1 {
  font-size: clamp(1.9rem, 4.5vw, 2.85rem);
  font-weight: 800;
  margin: 0 0 0.55rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.4);
}

.piezarota-hero .piezarota-tag {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.12);
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  margin-bottom: 0.85rem;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.piezarota-hero p {
  max-width: 34rem;
  margin: 0 auto 1.45rem;
  font-size: 1.12rem;
  line-height: 1.5;
  color: #fff;
  font-weight: 500;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}

/* Botones */
.button, button.button, input[type="submit"],
.woocommerce a.button, .woocommerce button.button {
  background-color: var(--pz-red) !important;
  border-color: var(--pz-red) !important;
  color: #fff !important;
  border-radius: 5px;
}

.woocommerce a.button.alt, .woocommerce button.button.alt {
  background-color: var(--pz-blue) !important;
  border-color: var(--pz-blue) !important;
}

/* Hero CTAs: blanco fuerte (después de .button rojo, como el buscador) */
.piezarota-hero .button,
.piezarota-hero a.button {
  background: #fff !important;
  background-color: #fff !important;
  color: var(--pz-navy) !important;
  border: 2px solid rgba(255, 255, 255, 0.95) !important;
  font-weight: 800;
  padding: 0.95em 1.85em;
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(11, 31, 58, 0.32);
  text-shadow: none;
}

.piezarota-hero .button:hover,
.piezarota-hero a.button:hover {
  background: #f7fafc !important;
  background-color: #f7fafc !important;
  color: var(--pz-navy) !important;
}

.piezarota-hero a.button.alt {
  background: rgba(255, 255, 255, 0.14) !important;
  background-color: rgba(255, 255, 255, 0.14) !important;
  color: #fff !important;
  border: 2px solid #fff !important;
  margin-left: 0.5rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.piezarota-hero a.button.alt:hover {
  background: rgba(255, 255, 255, 0.24) !important;
  background-color: rgba(255, 255, 255, 0.24) !important;
  color: #fff !important;
}

.woocommerce ul.products li.product {
  background: var(--pz-card);
  border-radius: 10px;
  padding: 0.75rem !important;
  box-shadow: 0 2px 10px rgba(11, 31, 58, 0.06);
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-size: 0.95rem;
  font-weight: 600;
}

.woocommerce span.onsale { background: var(--pz-red); }

.stock.out-of-stock, .piezarota-solicitar {
  color: var(--pz-red);
  font-weight: 600;
}

.piezarota-disclaimer {
  max-width: 1100px;
  margin: 1.5rem auto 0;
  padding: 1.2rem 1.5rem 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.88rem;
  line-height: 1.45;
  color: #c5d0de;
}

.piezarota-disclaimer a { color: #ff8a8a; }
.site-info { display: none; }

.site-header {
  position: relative;
}

/* Selector idioma ES | EN (TranslatePress + tema) */
.piezarota-lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.piezarota-lang-switch--header {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  z-index: 40;
  color: #fff;
}
.piezarota-lang-switch--header a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
}
.piezarota-lang-switch--header a.is-active,
.piezarota-lang-switch--header a:hover {
  color: #fff;
  text-decoration: underline;
}
.piezarota-lang-switch--footer {
  display: flex;
  margin-top: 0.85rem;
  color: #c5d0de;
}
.piezarota-lang-switch--footer a {
  color: #ff8a8a;
  text-decoration: none;
}
.piezarota-lang-switch--footer a.is-active {
  color: #fff;
  text-decoration: underline;
}
@media (max-width: 768px) {
  .piezarota-lang-switch--header {
    top: 0.45rem;
    right: 0.6rem;
    font-size: 0.8rem;
  }
}

.piezarota-asistente-page {
  max-width: 40rem;
  margin: 1.5rem auto;
  padding: 1.5rem;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(11, 31, 58, 0.08);
}

.piezarota-asistente-stub {
  background: #f0f5fb;
  border-left: 4px solid var(--pz-blue);
  padding: 0.75rem 1rem;
  font-size: 0.92rem;
}

.piezarota-asistente-links {
  margin-top: 1.25rem;
  font-size: 0.9rem;
  color: var(--pz-muted);
}

.piezarota-df-chat-wrap {
  margin: 1rem 0 1.5rem;
  min-height: 420px;
  border: 1px solid #d7e0ea;
  border-radius: 12px;
  overflow: hidden;
  background: #f7fafc;
}

df-messenger.piezarota-df-messenger {
  z-index: 99999;
  position: fixed;
  bottom: 18px;
  right: 18px;
  --df-messenger-font-color: #142033;
  --df-messenger-font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --df-messenger-chat-background: #f2f5f9;
  --df-messenger-message-user-background: #d6e6f5;
  --df-messenger-message-bot-background: #ffffff;
  --df-messenger-button-border-color: #0b1f3a;
  --df-messenger-button-background: #c8102e;
  --df-messenger-button-font-color: #ffffff;
  --df-messenger-send-icon: #0b4f8a;
  --df-messenger-chat-bubble-background: #c8102e;
  --df-messenger-chat-bubble-icon-color: #ffffff;
  --df-messenger-chat-window-height: 520px;
}

df-messenger.piezarota-df-messenger--page {
  position: relative;
  bottom: auto;
  right: auto;
  display: block;
  width: 100%;
  height: 480px;
  z-index: 1;
}

@media (max-width: 768px) {
  df-messenger.piezarota-df-messenger--page {
    height: 70vh;
    min-height: 360px;
  }
}

@media (max-width: 768px) {
  .piezarota-search-form { flex-direction: column; }
  .piezarota-search-btn { width: 100%; padding: 0.85rem !important; }
  .piezarota-hero a.button.alt { margin-left: 0; margin-top: 0.5rem; display: inline-block; }
}

/* ===== Filtro modelo en categorías ===== */
.piezarota-cat-filter {
  position: relative;
  max-width: 640px;
  margin: 0 0 1.1rem;
  padding: 0.85rem 1rem;
  background: #f4f7fb;
  border: 1px solid #d5deea;
  border-radius: 10px;
}
.piezarota-cat-filter-label {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--pz-navy, #0b1f3a);
  margin: 0 0 0.4rem;
}
.piezarota-cat-filter-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}
.piezarota-cat-filter-input {
  flex: 1;
  min-width: 0;
  font-size: 1.05rem !important;
  padding: 0.7rem 0.85rem !important;
  border: 2px solid #0b1f3a !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: #1a2332 !important;
}
.piezarota-cat-filter-input:focus {
  outline: 2px solid #c8102e;
  outline-offset: 1px;
}
.piezarota-cat-filter-clear {
  border: 0;
  border-radius: 8px;
  background: #0b1f3a;
  color: #fff;
  font-weight: 600;
  padding: 0 0.9rem;
  cursor: pointer;
}
.piezarota-cat-filter-clear:hover {
  background: #c8102e;
}
.piezarota-cat-filter-list {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
  position: absolute;
  left: 1rem;
  right: 1rem;
  z-index: 40;
  max-height: 280px;
  overflow: auto;
  background: #fff;
  border: 1px solid #c5d0de;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(11, 31, 58, 0.12);
}
.piezarota-cat-filter-item {
  display: block;
  padding: 0.65rem 0.85rem;
  color: #0b1f3a;
  text-decoration: none;
  border-bottom: 1px solid #eef2f7;
  font-size: 0.95rem;
  line-height: 1.35;
}
.piezarota-cat-filter-item:last-child {
  border-bottom: 0;
}
.piezarota-cat-filter-item:hover,
.piezarota-cat-filter-item:focus {
  background: #eef4fb;
  color: #c8102e;
}
.piezarota-cat-filter-status {
  margin: 0.45rem 0 0;
  font-size: 0.9rem;
  color: #44566e;
  min-height: 1.2em;
}

/* ===== Lead: sin resultados ===== */
.piezarota-lead {
  max-width: 560px;
  margin: 1.25rem 0 1.5rem;
  padding: 1.1rem 1.15rem;
  background: #fff8f8;
  border: 1px solid #f0c4c9;
  border-radius: 10px;
}
.piezarota-lead-msg {
  margin: 0 0 0.85rem;
  font-size: 1.02rem;
  line-height: 1.45;
  color: #0b1f3a;
}
.piezarota-lead-form label {
  display: block;
  margin: 0 0 0.65rem;
  font-weight: 600;
  color: #0b1f3a;
  font-size: 0.95rem;
}
.piezarota-lead-form label span {
  font-weight: 400;
  color: #667788;
  font-size: 0.85rem;
}
.piezarota-lead-form input[type="text"],
.piezarota-lead-form input[type="email"],
.piezarota-lead-form input[type="tel"] {
  display: block;
  width: 100%;
  margin-top: 0.3rem;
  padding: 0.65rem 0.75rem;
  border: 2px solid #0b1f3a;
  border-radius: 8px;
  font-size: 1rem;
  box-sizing: border-box;
}
.piezarota-lead-form button[type="submit"] {
  margin-top: 0.35rem;
  background: #c8102e !important;
  color: #fff !important;
  border: 0;
  border-radius: 8px;
  padding: 0.7rem 1.1rem;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
}
.piezarota-lead-form button[type="submit"]:disabled {
  opacity: 0.6;
  cursor: wait;
}
.piezarota-lead-status {
  margin: 0.6rem 0 0;
  font-size: 0.95rem;
  color: #0b4f8a;
  min-height: 1.2em;
}
.piezarota-lead.is-sent .piezarota-lead-form {
  opacity: 0.85;
}

/* Google login */
.piezarota-google-login {
  margin-top: 1rem;
  text-align: center;
}
.piezarota-google-btn {
  display: inline-block !important;
  background: #fff !important;
  color: #0b1f3a !important;
  border: 2px solid #0b1f3a !important;
  border-radius: 8px !important;
  font-weight: 700 !important;
  padding: 0.65rem 1.1rem !important;
}
.piezarota-google-btn:hover {
  background: #0b1f3a !important;
  color: #fff !important;
}

@media (max-width: 600px) {
  .piezarota-cat-filter {
    padding: 0.75rem;
  }
  .piezarota-cat-filter-input {
    font-size: 1rem !important;
  }
}

/* ===== Categorías: padres (cuadraditos) + hijas (grid fotos) ===== */
.piezarota-home-cats,
.piezarota-shop-cats,
.piezarota-home-featured {
  max-width: 1180px;
  margin: 0 auto 1.75rem;
  padding: 0 1rem;
}

.piezarota-section-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--pz-navy);
  margin: 0 0 0.25rem;
  letter-spacing: 0.02em;
}

.piezarota-section-lead {
  margin: 0 0 0.85rem;
  color: var(--pz-muted);
  font-size: 0.95rem;
}

.piezarota-cats {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 14px rgba(11, 31, 58, 0.07);
  padding: 1.1rem 1.1rem 1.25rem;
}

.piezarota-parents {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}

.piezarota-parent {
  appearance: none;
  border: 2px solid #d5dee8;
  background: #f7fafc;
  color: var(--pz-navy);
  border-radius: 14px;
  cursor: pointer;
  padding: 1.05rem 0.55rem 0.95rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 100%;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  line-height: 1.2;
}

.piezarota-parent:hover,
.piezarota-parent:focus {
  background: #eef4fb;
  border-color: #a8bdd4;
  outline: none;
}

.piezarota-parent.is-active {
  background: var(--pz-navy);
  border-color: var(--pz-navy);
  color: #fff;
  box-shadow: 0 8px 22px rgba(11, 31, 58, 0.24);
}

.piezarota-parent-media {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 112px;
  height: 112px;
  margin-bottom: 0.55rem;
}

.piezarota-parent-media .piezarota-cat-thumb,
.piezarota-parent-media .piezarota-family-icon svg {
  width: 112px !important;
  height: 112px !important;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}

.piezarota-parent.is-active .piezarota-family-icon svg rect {
  fill: #c8102e;
}

.piezarota-parent-name {
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 100%;
  letter-spacing: 0.01em;
}

.piezarota-parent-n {
  font-size: 0.8rem;
  opacity: 0.7;
  margin-top: 0.25rem;
  font-weight: 600;
}

.piezarota-cats-prompt {
  margin: 0 0 0.35rem;
  text-align: center;
  color: var(--pz-muted);
  font-size: 0.9rem;
}

.piezarota-cats-panel {
  margin-top: 0.65rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e4ebf3;
}

.piezarota-cats-panel-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--pz-navy);
  margin: 0 0 0.55rem;
}

.piezarota-cats-grid {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.45rem;
}

.piezarota-cats-grid::before,
.piezarota-cats-grid::after {
  display: none !important;
  content: none !important;
}

.piezarota-cat-item {
  margin: 0 !important;
  padding: 0 !important;
  width: auto !important;
  float: none !important;
  list-style: none !important;
}

.piezarota-cat-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none !important;
  color: var(--pz-ink) !important;
  padding: 0.4rem 0.25rem 0.45rem;
  border-radius: 8px;
  border: 1px solid transparent;
  min-height: 100%;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.piezarota-cat-link:hover,
.piezarota-cat-link:focus {
  background: #f0f5fb;
  border-color: #cfdceb;
}

.piezarota-cat-media {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: 0.3rem;
}

.piezarota-cat-thumb {
  width: 56px !important;
  height: 56px !important;
  object-fit: cover;
  border-radius: 8px;
  display: block;
  background: #e8eef5;
}

.piezarota-cat-placeholder {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.piezarota-cat-name {
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 100%;
}

.piezarota-cat-n {
  font-size: 0.65rem;
  color: var(--pz-muted);
  margin-top: 0.12rem;
}

.piezarota-cats-more {
  display: block;
  margin: 0.65rem auto 0;
  appearance: none;
  background: transparent;
  border: 1px dashed #b8c5d6;
  color: var(--pz-blue);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.45rem 0.9rem;
  border-radius: 6px;
  cursor: pointer;
}

.piezarota-cats-more:hover {
  border-color: var(--pz-blue);
  background: #f3f8fd;
}

/* Ocultar listado nativo Woo de categorías enormes en shop/home */
.woocommerce .products .product-category,
ul.products li.product-category {
  max-width: 16.66%;
}

.piezarota-home-featured ul.products {
  margin-top: 0.5rem;
}

.piezarota-home-featured ul.products li.product {
  margin-bottom: 0.75rem !important;
}

.piezarota-hero {
  padding: 2.2rem 1.25rem 2.3rem;
  margin-bottom: 1rem;
}

@media (max-width: 980px) {
  .piezarota-parents,
  .piezarota-cats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .piezarota-parent-media,
  .piezarota-parent-media .piezarota-cat-thumb,
  .piezarota-parent-media .piezarota-family-icon svg {
    width: 88px !important;
    height: 88px !important;
  }
  .piezarota-parent {
    padding: 0.85rem 0.4rem 0.75rem;
  }
}

/* Botón Solicitar (sin stock) */
.piezarota-solicitar-wrap {
  margin: 1rem 0 0.35rem;
}
.piezarota-solicitar-wrap .piezarota-solicitar-btn,
a.button.piezarota-solicitar-btn {
  background: var(--pz-navy) !important;
  border-color: var(--pz-navy) !important;
  color: #fff !important;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.piezarota-solicitar-wrap .piezarota-solicitar-btn:hover,
a.button.piezarota-solicitar-btn:hover {
  background: var(--pz-red) !important;
  border-color: var(--pz-red) !important;
}
.piezarota-solicitar-hint {
  margin: 0 0 1rem;
  font-size: 0.92rem;
  color: var(--pz-muted);
}
.single-product .stock.out-of-stock {
  color: var(--pz-navy);
  font-weight: 600;
}

@media (max-width: 640px) {
  .piezarota-parents,
  .piezarota-cats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .piezarota-parent-media,
  .piezarota-parent-media .piezarota-cat-thumb,
  .piezarota-parent-media .piezarota-family-icon svg {
    width: 72px !important;
    height: 72px !important;
  }
  .piezarota-cat-media,
  .piezarota-cat-thumb {
    width: 48px !important;
    height: 48px !important;
  }
  .piezarota-parent {
    padding: 0.7rem 0.3rem 0.65rem;
  }
  .piezarota-parent-name {
    font-size: 0.8rem;
  }
}

/* ===== Popup bienvenida asistente IA ===== */
html.piezarota-welcome-open {
  overflow: hidden;
}

.piezarota-welcome {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(11, 31, 58, 0.55);
  opacity: 0;
  transition: opacity 0.28s ease;
}

.piezarota-welcome.is-visible {
  opacity: 1;
}

.piezarota-welcome-card {
  position: relative;
  width: min(420px, 100%);
  background:
    linear-gradient(165deg, #ffffff 0%, #f4f7fb 55%, #ffe8eb 140%);
  color: var(--pz-ink);
  border-radius: 16px;
  border: 1px solid rgba(11, 31, 58, 0.12);
  box-shadow: 0 24px 60px rgba(11, 31, 58, 0.28);
  padding: 1.5rem 1.4rem 1.35rem;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.28s ease;
}

.piezarota-welcome.is-visible .piezarota-welcome-card {
  transform: translateY(0) scale(1);
}

.piezarota-welcome-x {
  position: absolute;
  top: 0.55rem;
  right: 0.65rem;
  border: 0;
  background: transparent;
  color: var(--pz-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.2rem 0.45rem;
}

.piezarota-welcome-brand {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pz-red);
}

.piezarota-welcome-card h2 {
  margin: 0 0 0.55rem;
  font-size: 1.45rem;
  color: var(--pz-navy);
  line-height: 1.2;
}

.piezarota-welcome-lead {
  margin: 0 0 0.75rem;
  color: var(--pz-muted);
  font-size: 0.98rem;
}

.piezarota-welcome-list {
  margin: 0 0 1.15rem;
  padding-left: 1.15rem;
  color: var(--pz-ink);
  font-size: 0.95rem;
}

.piezarota-welcome-list li {
  margin: 0.25rem 0;
}

.piezarota-welcome-actions {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.piezarota-welcome-btn {
  appearance: none;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
  padding: 0.78rem 1rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease;
}

.piezarota-welcome-btn:hover {
  transform: translateY(-1px);
}

.piezarota-welcome-btn--primary {
  background: var(--pz-red);
  color: #fff;
  border-color: var(--pz-red);
}

.piezarota-welcome-btn--ghost {
  background: #fff;
  color: var(--pz-navy);
  border-color: rgba(11, 31, 58, 0.25);
}

/* ===== Chat proxy (burbuja + panel) ===== */
.pz-chat {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 99990;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

.pz-chat-fab {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 0;
  border-radius: 999px;
  background: var(--pz-red);
  color: #fff;
  font-weight: 700;
  padding: 0.75rem 1.05rem;
  box-shadow: 0 10px 28px rgba(200, 16, 46, 0.35);
  cursor: pointer;
}

.pz-chat-fab-ico {
  font-size: 1.1rem;
}

.pz-chat-panel {
  display: none;
  flex-direction: column;
  width: min(380px, calc(100vw - 28px));
  height: min(520px, calc(100vh - 110px));
  margin-bottom: 0.7rem;
  background: #f2f5f9;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #d7e0ea;
  box-shadow: 0 18px 50px rgba(11, 31, 58, 0.28);
}

.pz-chat.is-open .pz-chat-panel {
  display: flex;
}

.pz-chat-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  background: var(--pz-navy);
  color: #fff;
  padding: 0.85rem 0.95rem;
}

.pz-chat-head strong {
  display: block;
  font-size: 1rem;
}

.pz-chat-sub {
  display: block;
  font-size: 0.78rem;
  opacity: 0.85;
  margin-top: 0.15rem;
}

.pz-chat-close {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.2rem;
}

.pz-chat-log {
  flex: 1;
  overflow: auto;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.pz-chat-msg {
  max-width: 92%;
  padding: 0.65rem 0.8rem;
  border-radius: 12px;
  font-size: 0.92rem;
  line-height: 1.35;
  white-space: pre-wrap;
}

.pz-chat-msg--bot {
  align-self: flex-start;
  background: #fff;
  color: var(--pz-ink);
  border: 1px solid #e2e8f0;
}

.pz-chat-msg--user {
  align-self: flex-end;
  background: #d6e6f5;
  color: var(--pz-ink);
}

.pz-chat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.pz-chat-chip {
  border: 1px solid var(--pz-navy);
  background: #fff;
  color: var(--pz-navy);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.pz-chat-chip:hover {
  background: var(--pz-navy);
  color: #fff;
}

.pz-chat-form {
  display: flex;
  gap: 0.4rem;
  padding: 0.65rem;
  background: #fff;
  border-top: 1px solid #d7e0ea;
}

.pz-chat-input {
  flex: 1;
  border: 1px solid #c9d4e0;
  border-radius: 999px;
  padding: 0.55rem 0.85rem;
  font-size: 0.92rem;
}

.pz-chat-send {
  border: 0;
  border-radius: 999px;
  background: var(--pz-red);
  color: #fff;
  font-weight: 700;
  padding: 0.55rem 0.9rem;
  cursor: pointer;
}

/* Página /asistente/: chat embebido */
.pz-chat--page {
  position: static;
  right: auto;
  bottom: auto;
  width: 100%;
  z-index: 1;
}

.pz-chat--page .pz-chat-panel {
  display: flex !important;
  width: 100%;
  height: 480px;
  margin: 0;
  box-shadow: none;
}

.pz-chat--page .pz-chat-fab {
  display: none !important;
}

#piezarota-df-chat-host {
  margin: 1rem 0 1.5rem;
  min-height: 420px;
}

@media (max-width: 768px) {
  .pz-chat--page .pz-chat-panel {
    height: 70vh;
    min-height: 360px;
  }
  .piezarota-welcome-card h2 {
    font-size: 1.25rem;
  }
}
