/*
Theme Name:   ParafarmaciaVIP Theme
Theme URI:    https://parafarmaciavip.com
Description:  Child theme de GeneratePress para ParafarmaciaVIP. Estilo verde salud + ámbar, tipografía Playfair Display + Inter.
Author:       dosm.es
Author URI:   https://dosm.es
Template:     generatepress
Version:      1.0.0
License:      GNU General Public License v2 or later
License URI:  http://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  parafarmaciavip-theme
*/

/* ============================================================
   VARIABLES GLOBALES
   ============================================================ */
:root {
  --pfv-green:       #2a6e5e;
  --pfv-green-dark:  #1a4a3e;
  --pfv-green-light: #e8f5f0;
  --pfv-green-mid:   #c5e4d8;
  --pfv-amber:       #e8a04a;
  --pfv-amber-light: #fef3e2;
  --pfv-cream:       #faf8f4;
  --pfv-text-dark:   #1a2e28;
  --pfv-text-mid:    #3d5a52;
  --pfv-text-muted:  #7a9e94;
  --pfv-border:      #ddeee8;
  --pfv-radius:      8px;
  --pfv-radius-md:   14px;
  --pfv-radius-lg:   22px;
  --pfv-shadow-sm:   0 1px 4px rgba(42,110,94,.08);
  --pfv-shadow-md:   0 4px 20px rgba(42,110,94,.12);
}

/* ============================================================
   BASE — Tipografía y colores globales
   ============================================================ */

body {
  font-family: 'Inter', sans-serif !important;
  background-color: var(--pfv-cream) !important;
  color: var(--pfv-text-dark) !important;
  font-size: 15px !important;
  line-height: 1.6 !important;
}

h1, h2, h3, h4, h5, h6,
.entry-title,
.page-title,
.woocommerce-loop-product__title,
.product_title {
  font-family: 'Playfair Display', serif !important;
  color: var(--pfv-text-dark) !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
}

a {
  color: var(--pfv-green) !important;
  transition: color 0.2s !important;
}
a:hover { color: var(--pfv-green-dark) !important; }

p { color: var(--pfv-text-mid); line-height: 1.7; }

/* ============================================================
   HEADER / NAV
   ============================================================ */

.site-header,
#masthead {
  background-color: rgba(250, 248, 244, 0.95) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border-bottom: 1px solid var(--pfv-border) !important;
  box-shadow: none !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 100 !important;
}

.site-title a,
.site-title {
  font-family: 'Playfair Display', serif !important;
  font-size: 22px !important;
  color: var(--pfv-text-dark) !important;
  font-weight: 600 !important;
  letter-spacing: -0.3px !important;
  text-decoration: none !important;
}

/* Clase para el VIP en ámbar: añadir <span class="logo-vip">VIP</span>
   en Apariencia → Personalizar → Identidad del sitio → Título */
.logo-vip { color: var(--pfv-amber) !important; }

.main-navigation a,
.nav-primary a {
  font-family: 'Inter', sans-serif !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  color: var(--pfv-text-mid) !important;
  text-decoration: none !important;
}
.main-navigation a:hover,
.nav-primary a:hover,
.main-navigation .current-menu-item > a {
  color: var(--pfv-green) !important;
}

/* Buscador en nav */
.search-form input[type="search"] {
  border-radius: 24px !important;
  border: 1px solid var(--pfv-green-mid) !important;
  background: var(--pfv-green-light) !important;
  padding: 8px 18px !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 13px !important;
  color: var(--pfv-text-mid) !important;
}
.search-form input[type="search"]:focus {
  border-color: var(--pfv-green) !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(42,110,94,.12) !important;
}

/* ============================================================
   BOTONES GLOBALES
   ============================================================ */

.button,
button:not(.menu-toggle):not(.search-submit),
input[type="submit"],
.wp-block-button__link,
.added_to_cart,
.checkout-button,
.wc-forward {
  background-color: var(--pfv-green) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: var(--pfv-radius) !important;
  font-family: 'Inter', sans-serif !important;
  font-weight: 500 !important;
  font-size: 14px !important;
  padding: 11px 24px !important;
  cursor: pointer !important;
  transition: background-color 0.2s, transform 0.15s !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  text-decoration: none !important;
  display: inline-block !important;
}

.button:hover,
button:not(.menu-toggle):not(.search-submit):hover,
input[type="submit"]:hover,
.wp-block-button__link:hover {
  background-color: var(--pfv-green-dark) !important;
  color: #ffffff !important;
  transform: translateY(-1px) !important;
}

/* Botón outline / alternativo */
.button.alt,
.woocommerce #respond input#submit.alt,
.woocommerce a.button.alt,
.woocommerce button.button.alt {
  background-color: transparent !important;
  color: var(--pfv-green) !important;
  border: 1.5px solid var(--pfv-green) !important;
}
.button.alt:hover { background-color: var(--pfv-green-light) !important; }

/* Botón ámbar para CTAs especiales — añadir clase pfv-btn-amber en Elementor */
.pfv-btn-amber .elementor-button,
.elementor-widget-button.pfv-btn-amber .elementor-button {
  background-color: var(--pfv-amber) !important;
  color: #fff !important;
  border-radius: var(--pfv-radius) !important;
  font-weight: 600 !important;
}
.pfv-btn-amber .elementor-button:hover,
.elementor-widget-button.pfv-btn-amber .elementor-button:hover {
  background-color: #d08030 !important;
  transform: translateY(-1px) !important;
}

/* ============================================================
   FORMULARIOS
   ============================================================ */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="url"],
textarea,
select,
.woocommerce-input-wrapper input,
.woocommerce form .input-text {
  border: 1px solid var(--pfv-border) !important;
  border-radius: var(--pfv-radius) !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 14px !important;
  padding: 10px 14px !important;
  color: var(--pfv-text-dark) !important;
  background: #fff !important;
  transition: border-color 0.2s, box-shadow 0.2s !important;
  width: 100% !important;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
  border-color: var(--pfv-green) !important;
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(42, 110, 94, 0.12) !important;
}

/* ============================================================
   WOOCOMMERCE — BADGES Y ETIQUETAS
   ============================================================ */

.woocommerce span.onsale {
  background-color: var(--pfv-amber) !important;
  color: #fff !important;
  border-radius: 10px !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  min-width: auto !important;
  padding: 3px 10px !important;
  top: 12px !important;
  left: 12px !important;
  right: auto !important;
  line-height: 1.4 !important;
  letter-spacing: .3px !important;
}

/* ============================================================
   WOOCOMMERCE — GRID DE PRODUCTOS
   ============================================================ */

.woocommerce ul.products,
.woocommerce-page ul.products {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 20px !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

/* ============================================================
   WOOCOMMERCE — TARJETA DE PRODUCTO
   ============================================================ */

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
  background: #ffffff !important;
  border: 1px solid var(--pfv-border) !important;
  border-radius: var(--pfv-radius-md) !important;
  overflow: hidden !important;
  padding: 0 !important;
  margin: 0 !important;
  transition: transform 0.2s, box-shadow 0.2s !important;
  box-shadow: none !important;
  float: none !important;
  width: auto !important;
}

.woocommerce ul.products li.product:hover {
  transform: translateY(-4px) !important;
  box-shadow: var(--pfv-shadow-md) !important;
}

/* Imagen */
.woocommerce ul.products li.product a img,
.woocommerce ul.products li.product .woocommerce-loop-product__link img {
  border-radius: 0 !important;
  background: var(--pfv-green-light) !important;
  padding: 16px !important;
  width: 100% !important;
  height: 180px !important;
  object-fit: contain !important;
  display: block !important;
  margin: 0 !important;
}

/* Nombre */
.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-family: 'Inter', sans-serif !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: var(--pfv-text-dark) !important;
  padding: 12px 14px 6px !important;
  line-height: 1.45 !important;
  margin: 0 !important;
}

/* Precio */
.woocommerce ul.products li.product .price {
  color: var(--pfv-green) !important;
  font-size: 17px !important;
  font-weight: 600 !important;
  font-family: 'Inter', sans-serif !important;
  padding: 4px 14px 8px !important;
  display: block !important;
}

.woocommerce ul.products li.product .price del {
  color: var(--pfv-text-muted) !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  margin-left: 6px !important;
  opacity: 1 !important;
}

.woocommerce ul.products li.product .price ins {
  text-decoration: none !important;
  font-weight: 600 !important;
  background: none !important;
}

/* Botón añadir al carrito */
.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product .add_to_cart_button,
.woocommerce ul.products li.product .product_type_simple {
  margin: 4px 14px 14px !important;
  width: calc(100% - 28px) !important;
  text-align: center !important;
  display: block !important;
  font-size: 13px !important;
  padding: 9px 14px !important;
  background-color: var(--pfv-green) !important;
  color: #fff !important;
  border-radius: var(--pfv-radius) !important;
  border: none !important;
}

.woocommerce ul.products li.product .button:hover,
.woocommerce ul.products li.product .add_to_cart_button:hover {
  background-color: var(--pfv-green-dark) !important;
  transform: none !important;
}

/* ============================================================
   WOOCOMMERCE — PRODUCTO INDIVIDUAL
   ============================================================ */

.woocommerce div.product .product_title {
  font-family: 'Playfair Display', serif !important;
  font-size: 32px !important;
  color: var(--pfv-text-dark) !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  margin-bottom: 16px !important;
}

.woocommerce div.product p.price,
.woocommerce div.product span.price {
  color: var(--pfv-green) !important;
  font-size: 28px !important;
  font-weight: 600 !important;
  font-family: 'Inter', sans-serif !important;
}

.woocommerce div.product p.price del,
.woocommerce div.product span.price del {
  color: var(--pfv-text-muted) !important;
  font-size: 18px !important;
  opacity: 1 !important;
}

.woocommerce div.product .single_add_to_cart_button,
.woocommerce #respond input#submit,
.woocommerce a.button.single_add_to_cart_button {
  background-color: var(--pfv-green) !important;
  border-radius: var(--pfv-radius) !important;
  font-size: 15px !important;
  padding: 14px 32px !important;
  font-weight: 500 !important;
}

.woocommerce div.product .single_add_to_cart_button:hover {
  background-color: var(--pfv-green-dark) !important;
}

/* Tabs del producto */
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a,
.woocommerce div.product .woocommerce-tabs ul.tabs li a:hover {
  color: var(--pfv-green) !important;
  border-bottom-color: var(--pfv-green) !important;
}

/* ============================================================
   WOOCOMMERCE — CARRITO
   ============================================================ */

.woocommerce-cart table.cart {
  border-radius: var(--pfv-radius-md) !important;
  border: 1px solid var(--pfv-border) !important;
  overflow: hidden !important;
  border-collapse: separate !important;
}

.woocommerce-cart table.cart th {
  background: var(--pfv-green-light) !important;
  color: var(--pfv-green-dark) !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: .8px !important;
  padding: 14px 16px !important;
}

.woocommerce-cart .cart_totals,
.woocommerce-cart .cart-collaterals .cart_totals {
  background: #fff !important;
  border: 1px solid var(--pfv-border) !important;
  border-radius: var(--pfv-radius-md) !important;
  padding: 24px !important;
}

.woocommerce .cart_totals h2 {
  font-family: 'Playfair Display', serif !important;
  font-size: 22px !important;
  color: var(--pfv-text-dark) !important;
  margin-bottom: 16px !important;
}

/* ============================================================
   WOOCOMMERCE — CHECKOUT
   ============================================================ */

.woocommerce-checkout .woocommerce-billing-fields h3,
.woocommerce-checkout #order_review_heading,
.woocommerce-checkout h3 {
  font-family: 'Playfair Display', serif !important;
  color: var(--pfv-text-dark) !important;
  font-size: 20px !important;
}

.woocommerce #payment #place_order,
.woocommerce-page #payment #place_order {
  background-color: var(--pfv-green) !important;
  border-radius: var(--pfv-radius) !important;
  font-size: 16px !important;
  padding: 16px 32px !important;
  width: 100% !important;
  font-weight: 600 !important;
}

.woocommerce #payment #place_order:hover {
  background-color: var(--pfv-green-dark) !important;
}

.woocommerce-checkout #order_review {
  background: #fff !important;
  border: 1px solid var(--pfv-border) !important;
  border-radius: var(--pfv-radius-md) !important;
  padding: 24px !important;
}

/* ============================================================
   WOOCOMMERCE — MENSAJES Y NOTIFICACIONES
   ============================================================ */

.woocommerce-message,
.woocommerce-info {
  border-top-color: var(--pfv-green) !important;
  background: var(--pfv-green-light) !important;
  color: var(--pfv-green-dark) !important;
}

.woocommerce-error {
  border-top-color: #c0392b !important;
}

.woocommerce-message::before,
.woocommerce-info::before {
  color: var(--pfv-green) !important;
}

/* ============================================================
   ELEMENTOR — Clases auxiliares para secciones
   ============================================================ */

/* Hero */
.pfv-hero-section,
.elementor-section.pfv-hero-section {
  background: var(--pfv-green-light) !important;
}

/* Sección oscura (trust bar, banners) */
.pfv-section-dark,
.elementor-section.pfv-section-dark {
  background: var(--pfv-text-dark) !important;
}
.pfv-section-dark *,
.elementor-section.pfv-section-dark * {
  color: rgba(255,255,255,.75) !important;
}
.pfv-section-dark h1,
.pfv-section-dark h2,
.pfv-section-dark h3,
.pfv-section-dark .elementor-heading-title {
  color: #fff !important;
}

/* Sección crema */
.pfv-section-cream,
.elementor-section.pfv-section-cream {
  background: var(--pfv-cream) !important;
}

/* Eyebrow label */
.pfv-eyebrow {
  font-family: 'Inter', sans-serif !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: 1.5px !important;
  text-transform: uppercase !important;
  color: var(--pfv-amber) !important;
  display: block !important;
  margin-bottom: 8px !important;
}

/* Tarjeta de categoría */
.pfv-cat-card {
  background: #fff !important;
  border: 1px solid var(--pfv-border) !important;
  border-radius: var(--pfv-radius-md) !important;
  padding: 22px 16px !important;
  text-align: center !important;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s !important;
  display: block !important;
  text-decoration: none !important;
}
.pfv-cat-card:hover {
  border-color: var(--pfv-green) !important;
  transform: translateY(-3px) !important;
  box-shadow: var(--pfv-shadow-md) !important;
}
.pfv-cat-icon {
  width: 56px !important;
  height: 56px !important;
  border-radius: 14px !important;
  background: var(--pfv-green-light) !important;
  margin: 0 auto 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 26px !important;
  transition: background 0.2s !important;
}
.pfv-cat-card:hover .pfv-cat-icon {
  background: var(--pfv-green-mid) !important;
}
.pfv-cat-name {
  font-size: 13px !important;
  font-weight: 500 !important;
  color: var(--pfv-text-dark) !important;
}
.pfv-cat-count {
  font-size: 11px !important;
  color: var(--pfv-text-muted) !important;
  margin-top: 3px !important;
}

/* Trust bar items */
.pfv-trust-icon {
  width: 44px !important;
  height: 44px !important;
  border-radius: 50% !important;
  background: rgba(255,255,255,.12) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 20px !important;
  margin: 0 auto 10px !important;
}

/* Banner promocional oscuro */
.pfv-promo-banner,
.elementor-section.pfv-promo-banner {
  background: linear-gradient(135deg, #1a4a3e 0%, #1a5a4a 60%, #0f3d30 100%) !important;
  border-radius: var(--pfv-radius-lg) !important;
  overflow: hidden !important;
}
.pfv-promo-banner .elementor-heading-title {
  font-family: 'Playfair Display', serif !important;
  color: #fff !important;
}

/* ============================================================
   BLOG — Tarjetas de entrada
   ============================================================ */

article.post,
.post-card {
  background: #fff !important;
  border: 1px solid var(--pfv-border) !important;
  border-radius: var(--pfv-radius-md) !important;
  overflow: hidden !important;
  transition: transform 0.2s, box-shadow 0.2s !important;
  box-shadow: none !important;
}
article.post:hover {
  transform: translateY(-4px) !important;
  box-shadow: var(--pfv-shadow-md) !important;
}

.entry-title a {
  font-family: 'Playfair Display', serif !important;
  color: var(--pfv-text-dark) !important;
  text-decoration: none !important;
  font-size: 20px !important;
  font-weight: 600 !important;
}
.entry-title a:hover { color: var(--pfv-green) !important; }

.entry-meta,
.entry-footer {
  font-size: 12px !important;
  color: var(--pfv-text-muted) !important;
}

/* Categoría del post como eyebrow */
.entry-meta .cat-links a {
  font-size: 10px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: .8px !important;
  color: var(--pfv-green) !important;
  text-decoration: none !important;
}

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer,
#colophon {
  background-color: var(--pfv-text-dark) !important;
  color: rgba(255, 255, 255, 0.65) !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 13px !important;
}

.site-footer a,
#colophon a {
  color: rgba(255, 255, 255, 0.55) !important;
  text-decoration: none !important;
  transition: color 0.2s !important;
}
.site-footer a:hover,
#colophon a:hover {
  color: #fff !important;
}

.site-footer .site-title a,
#colophon .site-title a {
  font-family: 'Playfair Display', serif !important;
  color: #fff !important;
  font-size: 20px !important;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1200px) {
  .woocommerce ul.products,
  .woocommerce-page ul.products {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

@media (max-width: 1024px) {
  .woocommerce ul.products,
  .woocommerce-page ul.products {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 768px) {
  h1, .hero-title, .elementor-heading-title.pfv-hero-title {
    font-size: 32px !important;
  }
  h2 { font-size: 24px !important; }

  .woocommerce ul.products,
  .woocommerce-page ul.products {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }

  .pfv-promo-banner,
  .elementor-section.pfv-promo-banner {
    border-radius: var(--pfv-radius-md) !important;
  }
}

@media (max-width: 480px) {
  .woocommerce ul.products,
  .woocommerce-page ul.products {
    grid-template-columns: 1fr !important;
  }
}

/* ============================================================
   UTILIDADES
   ============================================================ */

.wp-block-separator {
  border-color: var(--pfv-border) !important;
}

/* Paginación */
.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
  border-radius: var(--pfv-radius) !important;
  color: var(--pfv-green) !important;
  border-color: var(--pfv-border) !important;
}
.woocommerce nav.woocommerce-pagination ul li span.current,
.woocommerce nav.woocommerce-pagination ul li a:hover {
  background: var(--pfv-green) !important;
  color: #fff !important;
  border-color: var(--pfv-green) !important;
}

/* Rating stars */
.woocommerce .star-rating span::before,
.woocommerce .star-rating::before {
  color: var(--pfv-amber) !important;
}
