/*
Theme Name: Farmacia Alameda (Hello Elementor Child)
Theme URI: https://farmaciaalameda.local:8890/
Description: Tema hijo de Hello Elementor para la nueva web de Farmacia Alameda (WooCommerce + Elementor Pro + kit Pharmakit).
Author: Línea y Media
Template: hello-elementor
Version: 1.0.0
Text Domain: hello-elementor-child
Requires at least: 6.0
Requires PHP: 8.0
*/

/* ---------- Páginas legales ---------- */
body.fa-legal .site-main {
	max-width: 860px;
	margin: 0 auto;
	padding: 56px 24px 96px;
}
body.fa-legal .page-header { margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid #e3edf5; }
body.fa-legal .page-header .entry-title { font-size: clamp(2rem, 4vw, 2.75rem); line-height: 1.15; margin: 0; }
body.fa-legal .page-content { font-size: 1rem; line-height: 1.75; color: #3a4654; }
body.fa-legal .page-content p { margin: 0 0 1.1em; }
body.fa-legal .page-content h2 {
	font-size: 1.35rem; line-height: 1.3; letter-spacing: .01em;
	margin: 2.4em 0 .7em; padding-top: 1.2em; border-top: 1px solid #e3edf5; color: #0f3a57;
}
body.fa-legal .page-content h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
body.fa-legal .page-content h3 { font-size: 1.05rem; line-height: 1.4; margin: 1.6em 0 .4em; color: #1670ab; }
body.fa-legal .page-content ul,
body.fa-legal .page-content ol { margin: 0 0 1.2em; padding-left: 1.4em; }
body.fa-legal .page-content li { margin-bottom: .45em; }
body.fa-legal .page-content a { color: #1670ab; text-decoration: underline; text-underline-offset: 2px; word-break: break-word; }
body.fa-legal .page-content a:hover { color: #0f3a57; }
body.fa-legal .page-content table { width: 100%; border-collapse: collapse; margin: 1.2em 0 1.8em; font-size: .94rem; display: block; overflow-x: auto; }
body.fa-legal .page-content th { background: #e8f4fc; color: #0f3a57; text-align: left; font-weight: 600; }
body.fa-legal .page-content th,
body.fa-legal .page-content td { padding: 12px 14px; border: 1px solid #d5e5f1; vertical-align: top; min-width: 150px; }
@media (max-width: 767px) {
	body.fa-legal .site-main { padding: 32px 16px 64px; }
}

/* ---------- Formularios de Elementor: casilla de aceptación legible ---------- */
.elementor-field-type-acceptance > .elementor-field-label { display: none; }
.elementor-field-type-acceptance .elementor-field-option label { color: #4b5563; font-size: .875rem; line-height: 1.5; }
.elementor-field-type-acceptance .elementor-field-option label a { color: #1670ab; text-decoration: underline; }
.elementor-field-type-acceptance .elementor-field-option { display: flex; align-items: flex-start; gap: 8px; }

/* ---------- Contraste (WCAG AA) ---------- */
.woocommerce a.remove,
.elementor-widget-woocommerce-cart a.remove,
.elementor-menu-cart__product-remove a { color: #6b7280 !important; }
.woocommerce a.remove:hover,
.elementor-widget-woocommerce-cart a.remove:hover { color: #c73434 !important; }
.woocommerce small.includes_tax,
.woocommerce .includes_tax { color: #4b5563; }

/* ---------- Contacto: mapa a toda la altura de su mitad ---------- */
.fa-map { align-self: stretch; position: relative; min-height: 420px; }
.fa-map > .elementor-widget-container { position: absolute; inset: 0; }
.fa-map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
@media (max-width: 1024px) {
	.fa-map { min-height: 360px; height: 360px; }
}

/* Campos de formulario: texto y placeholder legibles (textarea incluido) */
.elementor-widget-form .elementor-field-group .elementor-field-textual,
.elementor-widget-form .elementor-field-group textarea.elementor-field { color: #4b5563; }
.elementor-widget-form .elementor-field-group .elementor-field-textual::placeholder,
.elementor-widget-form .elementor-field-group textarea.elementor-field::placeholder { color: #6b7280; opacity: 1; }

/* ---------- Encabezados de sección (estilo A): etiqueta + título + barra ---------- */
.fa-eyebrow .elementor-heading-title {
	font-size: 13px !important; line-height: 1.3 !important; font-weight: 600 !important;
	letter-spacing: .09em !important; text-transform: uppercase !important; color: #1670ab !important;
	margin: 0 0 6px !important;
}
.fa-section-title .elementor-heading-title {
	font-size: clamp(26px, 3vw, 34px) !important; line-height: 1.15 !important;
	font-weight: 700 !important; color: #0f3a57 !important; text-transform: none !important;
}
.fa-section-title .elementor-heading-title::after {
	content: ""; display: block; width: 56px; height: 4px; border-radius: 2px;
	background: #1670ab; margin: 14px auto 0;
}
.fa-left .elementor-heading-title::after { margin-left: 0; margin-right: auto; }
.fa-section-sub .elementor-heading-title {
	font-size: 16px !important; font-weight: 400 !important; line-height: 1.5 !important;
	color: #4b5563 !important; border: 0 !important; padding-left: 0 !important;
}
.fa-section-sub { max-width: 560px; margin-left: auto; margin-right: auto; }
.fa-head-center { text-align: center; }
.fa-head-center .elementor-widget-heading { text-align: center; }
.elementor-element-554af9f5 > .elementor-widget-container { border-top: 0 !important; }
.elementor-element-183e8f1b .fa-section-title,
.elementor-element-67b4e906 .fa-section-title { margin-bottom: 24px !important; }

/* ---------- Filtro lateral de categorías de la tienda ([fa_categorias]) ---------- */
.fa-cats { padding: 4px 16px 8px; font-size: 15px; }
.fa-cats ul { list-style: none; margin: 0; padding: 0; }
.fa-cats a { text-decoration: none; }
.fa-cats__all, .fa-cats__link {
	display: block; color: #4b5563; font-weight: 500; padding: 9px 0; line-height: 1.3;
}
.fa-cats__all { border-bottom: 1px solid #e3edf5; }
.fa-cats__all:hover, .fa-cats__link:hover { color: #1670ab; }
.fa-cats__all.is-current, .fa-cats__link.is-current { color: #1670ab; font-weight: 700; }
.fa-cats__item { border-bottom: 1px solid #e3edf5; }
.fa-cats__item:last-child { border-bottom: 0; }
.fa-cats__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fa-cats__row .fa-cats__link { flex: 1; }
.fa-cats__count { color: #9aa5b1; font-weight: 400; font-size: 12px; margin-left: 4px; }
.fa-cats__toggle {
	flex: none; width: 28px; height: 28px; border: 0; background: transparent; cursor: pointer;
	position: relative; border-radius: 6px; padding: 0;
}
.fa-cats__toggle:hover { background: #e8f4fc; }
.fa-cats__toggle::before {
	content: ""; position: absolute; left: 50%; top: 50%; width: 7px; height: 7px;
	border-right: 2px solid #1670ab; border-bottom: 2px solid #1670ab;
	transform: translate(-50%, -70%) rotate(45deg); transition: transform .15s ease;
}
.fa-cats__toggle[aria-expanded="true"]::before { transform: translate(-50%, -30%) rotate(-135deg); }
.fa-cats__toggle:focus-visible, .fa-cats a:focus-visible { outline: 2px solid #1670ab; outline-offset: 2px; border-radius: 4px; }
.fa-cats__sub { margin: 0 0 8px; padding-left: 12px; border-left: 2px solid #e8f4fc; }
.fa-cats__sub[hidden] { display: none; }
.fa-cats__sub .fa-cats__link { padding: 6px 0; font-size: 14px; font-weight: 400; }
.fa-cats__sub .fa-cats__link.is-current { font-weight: 700; }
.fa-cats .fa-cats__toggle { background: transparent !important; box-shadow: none !important; min-height: 0; color: inherit; }
.fa-cats .fa-cats__toggle:hover, .fa-cats .fa-cats__toggle:focus { background: #e8f4fc !important; }

/* Todas las marcas ([fa_marcas]) */
.fa-brands { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.fa-brands li { margin: 0; }
.fa-brands__item { display: flex; align-items: center; justify-content: center; height: 110px; padding: 18px 22px; border: 1px solid #d3e8f6; border-radius: 14px; background: #fff; color: #0f3a57; font-weight: 700; font-size: 17px; text-align: center; text-decoration: none; transition: border-color .2s, box-shadow .2s, transform .2s; }
.fa-brands__item:hover, .fa-brands__item:focus-visible { border-color: #1670ab; box-shadow: 0 6px 18px rgba(22, 112, 171, .15); transform: translateY(-2px); }
.fa-brands__item img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.fa-brands__item.has-logo .fa-brands__name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 767px) { .fa-brands { grid-template-columns: repeat(2, 1fr); gap: 12px; } .fa-brands__item { height: 90px; padding: 14px; } }
@media (prefers-reduced-motion: reduce) { .fa-brands__item { transition: none; } .fa-brands__item:hover { transform: none; } }

/* Cabecera responsive (plantilla 123) */
@media (max-width: 767px) {
  .elementor-element-29e0942b { padding: 6px 12px !important; min-height: 0 !important; }
  .elementor-element-29e0942b .elementor-icon-list-items { flex-wrap: nowrap; justify-content: center; gap: 14px; }
  .elementor-element-29e0942b .elementor-icon-list-text { font-size: 12.5px !important; }
  .elementor-element-29e0942b .elementor-icon-list-icon i,
  .elementor-element-29e0942b .elementor-icon-list-icon svg { font-size: 15px !important; width: 15px !important; }

  .elementor-element-cb5be9e { padding: 8px 12px 10px !important; }
  .elementor-element-cb5be9e > .e-con-inner { display: flex !important; flex-direction: row !important; flex-wrap: wrap !important; align-items: center !important; justify-content: space-between !important; gap: 8px 6px !important; }
  /* orden: menú | logo | cuenta+carrito, buscador debajo */
  .elementor-element-cb5be9e .elementor-element-6b77e481 { order: 1 !important; width: auto !important; flex: 0 0 auto !important; padding: 0 !important; }
  .elementor-element-cb5be9e .elementor-element-135ae6f { order: 2 !important; --width: auto; flex: 1 1 0 !important; width: auto !important; min-width: 0; text-align: center; }
  .elementor-element-cb5be9e .elementor-element-135ae6f img { height: 38px !important; width: auto !important; max-width: 100%; object-fit: contain; }
  .elementor-element-cb5be9e .elementor-element-12a830ee { order: 3 !important; width: auto !important; flex: 0 0 auto !important; gap: 14px !important; justify-content: flex-end; }
  .elementor-element-cb5be9e .elementor-element-5d6c878c { order: 4 !important; width: 100% !important; flex: 0 0 100% !important; padding: 0 !important; }
  .elementor-element-6b77e481 .elementor-element-7f01a2ce { display: none; } /* «Ofertas»: ya en el menú Tienda */
  .elementor-element-6b77e481 .elementor-menu-toggle { padding: 6px; }
}
@media (min-width: 768px) and (max-width: 1024px) {
  .elementor-element-cb5be9e .elementor-element-135ae6f img { max-height: 56px; width: auto !important; }
}

/* Menú móvil lateral (ElementsKit, panel desde la izquierda) */
.fa-navmovil .elementskit-menu-hamburger { border: 0; background: transparent; padding: 8px; }
.fa-navmovil .elementskit-menu-hamburger .elementskit-menu-hamburger-icon { background: #0F3A57; height: 2px; width: 22px; border-radius: 2px; }
@media (max-width: 1024px) {
  .fa-navmovil .elementskit-menu-container { width: min(86vw, 340px); max-width: 340px; background: #fff; box-shadow: 8px 0 32px rgba(8,36,54,.18); padding: 0 0 24px; }
  .fa-navmovil .elementskit-menu-overlay { background: rgba(8,36,54,.55); }
  .fa-navmovil .elementskit-nav-identity-panel { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid #E8F4FC; }
  .fa-navmovil .elementskit-nav-logo img { max-height: 40px; width: auto; }
  .fa-navmovil .elementskit-menu-close { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border: 0 !important; border-radius: 50%; background: #E8F4FC; color: #0F3A57; font-size: 0; position: relative; }
  .fa-navmovil .elementskit-menu-close::before,
  .fa-navmovil .elementskit-menu-close::after { content: ""; position: absolute; width: 16px; height: 2px; background: #0F3A57; border-radius: 2px; transform: rotate(45deg); }
  .fa-navmovil .elementskit-menu-close::after { transform: rotate(-45deg); }
  .fa-navmovil .elementskit-navbar-nav { padding: 8px 0; margin: 0; }
  .fa-navmovil .elementskit-navbar-nav > li > a { padding: 14px 20px !important; font-size: 16px; font-weight: 600; color: #0F3A57 !important; border-bottom: 1px solid #F0F6FB; }
  .fa-navmovil .elementskit-navbar-nav > li.current-menu-item > a,
  .fa-navmovil .elementskit-navbar-nav > li > a:hover { color: #1670AB !important; background: #E8F4FC; }
  .fa-navmovil .elementskit-dropdown { background: #F7FBFE; padding: 4px 0; }
  .fa-navmovil .elementskit-dropdown li a { padding: 11px 20px 11px 34px !important; font-size: 14.5px; font-weight: 500; color: #4B5563 !important; }
  .fa-navmovil .elementskit-dropdown li a:hover { color: #1670AB !important; }
  .fa-navmovil .elementskit-submenu-indicator { border: 0 !important; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; margin-right: 8px; color: #1670AB; }
}
@media (max-width:1024px){ .fa-navmovil .elementskit-menu-container { overflow-y: auto; overscroll-behavior: contain; } }
.fa-navmovil .elementskit-menu-hamburger .elementskit-menu-hamburger-icon { background-color: #0F3A57 !important; opacity: 1 !important; }

/* Enlaces extra del menú lateral (solo móvil/tablet): cuenta, teléfono, WhatsApp */
@media (min-width: 1025px) { .fa-solo-movil { display: none !important; } }
@media (max-width: 1024px) {
  .fa-navmovil .elementskit-navbar-nav > li.fa-solo-movil > a { font-weight: 500; font-size: 15px; }
  .fa-navmovil .elementskit-navbar-nav > li.fa-solo-movil > a::before { content: ""; display: inline-block; width: 20px; height: 20px; margin-right: 12px; vertical-align: -4px; background: #1670AB; -webkit-mask: var(--fa-ico) center/contain no-repeat; mask: var(--fa-ico) center/contain no-repeat; }
  .fa-navmovil li.fa-mi-cuenta { --fa-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c0-4 4-6 8-6s8 2 8 6'/%3E%3C/svg%3E"); }
  .fa-navmovil li.fa-mi-tel { --fa-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M6.6 10.8a15 15 0 0 0 6.6 6.6l2.2-2.2a1 1 0 0 1 1-.25c1.1.37 2.3.57 3.6.57a1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.25.2 2.45.57 3.57a1 1 0 0 1-.25 1z'/%3E%3C/svg%3E"); }
  .fa-navmovil li.fa-mi-wa { --fa-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M12 2a10 10 0 0 0-8.6 15.1L2 22l5-1.3A10 10 0 1 0 12 2zm5.3 14c-.2.6-1.3 1.2-1.8 1.2-.5.1-1 .2-3.3-.7-2.8-1.1-4.5-3.9-4.7-4.1-.1-.2-1.100-1.500-1.100-2.800s.7-2 1-2.300c.2-.3.5-.3.700-.3h.5c.2 0 .4 0 .6.500l.8 2c.1.1.1.3 0 .5l-.4.600c-.1.200-.3.400-.1.700.2.300.8 1.300 1.700 2.100 1.100 1 2.100 1.300 2.400 1.500.3.100.5.100.7-.1l.9-1.100c.2-.3.4-.2.7-.1l1.900.9c.3.100.5.200.5.300.1.200.1.800-.1 1.400z'/%3E%3C/svg%3E"); }
  .fa-navmovil li.fa-mi-cuenta { margin-top: 8px; border-top: 6px solid #F0F6FB; }
}

/* Ficha de producto: migas de pan en una sola línea e imagen cuadrada (las fotos del catálogo son verticales con mucho blanco) */
.single-product .elementor-element-1df05e16 .elementor-icon-list-item,
.single-product .elementor-element-1df05e16 .elementor-icon-list-text{white-space:nowrap}
.single-product .elementor-widget-woocommerce-product-images .woocommerce-product-gallery__image{aspect-ratio:1/1;display:flex;align-items:center;justify-content:center;background:#fff}
.single-product .elementor-widget-woocommerce-product-images .woocommerce-product-gallery__image img.wp-post-image{width:100%;height:100%;object-fit:contain}
.single-product .elementor-widget-woocommerce-product-images .flex-viewport{height:auto!important}
.single-product .elementor-widget-woocommerce-product-images .woocommerce-product-gallery__image > a{display:block;width:100%;height:100%}
