/* ============================================================
   Tema Llueca Farmacia — hijo de classic, layout estilo Tedín
   Paleta extraída del logo Llueca:
   verde salvia #7d968c · gris pizarra #3e4a4e
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
  --ll-green: #7d968c;        /* verde salvia (fondo logo / "Llueca") */
  --ll-green-dark: #647d72;
  --ll-green-soft: #eef3f1;
  --ll-slate: #3e4a4e;        /* gris pizarra ("Farmacia") */
  --ll-dark: #20272a;         /* barra superior */
  --ll-text: #3c4650;
  --ll-muted: #8a9490;
  --ll-radius: 9px;
  --ll-shadow: 0 0 5px 0 rgba(208, 201, 214, 0.35);
}

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ll-text);
  background: #fff;
}
h1, h2, h3, h4, .h1, .h2, .h3 { font-family: 'Poppins', sans-serif; color: var(--ll-slate); }
a { color: var(--ll-green-dark); }
a:hover { color: var(--ll-slate); }
html, body { overflow-x: hidden; }

/* ---------- Barra superior oscura (aviso) ---------- */
.llueca-topbar { background: var(--ll-dark); }
.llueca-topbar p {
  margin: 0;
  padding: 0.45rem 0;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: left;
}

/* header-nav de classic: solo se usa en móvil */
.header-nav { border-bottom: none; max-height: none; }
@media (min-width: 768px) { .header-nav { display: none; } }

/* ---------- Cabecera principal ---------- */
.header-top { padding: 0.85rem 0; background: #fff; }
.llueca-header-row {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  margin: 0;
}

/* Botón MENÚ: icono arriba, texto debajo */
.llueca-menu-toggle { flex: 0 0 auto; }
.llueca-menu-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ll-slate);
  padding: 0.15rem 0.2rem;
  line-height: 1;
}
.llueca-menu-btn:hover { color: var(--ll-green-dark); }
.llueca-menu-btn .material-icons { font-size: 1.8rem; }
.llueca-menu-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  margin-top: 0.15rem;
}

/* Logo recreado (SVG + texto) */
.llueca-logo { padding: 0; flex: 0 0 auto; }
.llueca-logo h1 { margin: 0; line-height: 1; }
.llueca-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
}
.llueca-brand:hover { text-decoration: none; }
.llueca-brand-icon { width: 44px; height: 44px; color: var(--ll-green); flex: 0 0 auto; }
.llueca-brand-text { display: flex; flex-direction: column; line-height: 1.02; }
.llueca-brand-1 {
  color: var(--ll-green);
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  font-size: 1.45rem;
  letter-spacing: 0.01em;
}
.llueca-brand-2 {
  color: var(--ll-slate);
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 1.45rem;
  letter-spacing: 0.01em;
}

/* Zona derecha: buscador + iconos */
.header-top-right {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  flex: 1 1 auto;
  min-width: 0;
  padding: 0;
}
.header-top-right #search_widget { order: 1; flex: 1 1 auto; float: none; margin: 0; max-width: none; min-width: 0; }
.header-top-right #_desktop_user_info { order: 2; }
.header-top-right #_desktop_user_wishlist { order: 3; }
.header-top-right .blockcart, .header-top-right #_desktop_cart { order: 4; }

/* Buscador grande: lupa a la izquierda, sin botón */
#search_widget { min-width: 0; }
#search_widget form { position: relative; }
#search_widget form input[type="text"] {
  width: 100%;
  border: 1px solid #dfe4e2;
  border-radius: 999px;
  background: #fff;
  padding: 0.7rem 2.5rem 0.7rem 2.9rem;
  font-size: 0.92rem;
  color: var(--ll-text);
  transition: border-color 0.2s, box-shadow 0.2s;
  min-width: 0;
}
#search_widget form input[type="text"]::placeholder { color: #a7b0ac; }
#search_widget form input[type="text"]:focus {
  border-color: var(--ll-green);
  box-shadow: 0 0 0 3px rgba(125, 150, 140, 0.15);
  outline: none;
}
#search_widget form i.search {
  position: absolute;
  left: 1.05rem;
  top: 50%;
  transform: translateY(-50%);
  color: #a7b0ac;
  font-size: 1.3rem;
  pointer-events: none;
}
#search_widget form i.clear { right: 1rem; top: 50%; transform: translateY(-50%); }

/* Iconos cuenta / favoritos / carrito: solo icono */
#_desktop_user_info span.hidden-sm-down { display: none !important; }
.blockcart span.hidden-sm-down { display: none !important; }
#_desktop_user_info .material-icons,
#_desktop_user_wishlist .material-icons,
.blockcart .material-icons {
  color: var(--ll-slate);
  font-size: 1.7rem;
}
#_desktop_user_info a:hover .material-icons,
#_desktop_user_wishlist a:hover .material-icons,
.blockcart a:hover .material-icons { color: var(--ll-green-dark); }
.blockcart { background: transparent; height: auto; text-align: center; white-space: nowrap; }
.blockcart .header { margin-top: 0; }
.blockcart.inactive .cart-products-count { display: none; }
.blockcart .cart-products-count {
  background: var(--ll-green);
  color: #fff;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.12rem 0.42rem;
  position: relative;
  top: -0.75rem;
  left: -0.55rem;
}

/* ---------- Barra promo (envío gratis) ---------- */
.llueca-promobar { background: var(--ll-green); }
.llueca-promobar p {
  margin: 0;
  padding: 0.5rem 0.75rem;
  text-align: center;
  color: #fff;
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
}

/* ---------- Menú lateral (drawer) ---------- */
#_desktop_top_menu {
  position: fixed !important;
  top: 0;
  bottom: 0;
  left: 0;
  right: auto;
  width: 420px;
  max-width: 90vw;
  background: #fff;
  z-index: 1055;
  overflow-y: auto;
  transform: translateX(-110%);
  visibility: hidden;
  transition: transform 0.28s ease, visibility 0.28s;
  box-shadow: 2px 0 18px rgba(0, 0, 0, 0.12);
  margin: 0;
  padding: 0;
  float: none;
  display: flex;
  flex-direction: column;
}
body.llueca-menu-open #_desktop_top_menu {
  transform: translateX(0);
  visibility: visible;
}

.llueca-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.4rem;
  border-bottom: 1px solid #f0f2f1;
}
.llueca-drawer-brand { display: flex; align-items: center; gap: 0.5rem; color: var(--ll-green); }
.llueca-drawer-brand svg { width: 30px; height: 30px; }
.llueca-drawer-brand-text { font-size: 1.05rem; line-height: 1; }
.llueca-drawer-brand-text .g { color: var(--ll-green); font-weight: 500; }
.llueca-drawer-brand-text .s { color: var(--ll-slate); font-weight: 600; }
.llueca-drawer-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ll-slate);
  padding: 0.2rem;
  line-height: 1;
}
.llueca-drawer-close:hover { color: var(--ll-green-dark); }

.llueca-drawer-list {
  list-style: none;
  margin: 0;
  padding: 0.4rem 0;
  flex: 1 1 auto;
}
.llueca-drawer-item a {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  padding: 0.62rem 1.4rem;
  color: var(--ll-slate);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid #f3f5f4;
  text-decoration: none;
}
.llueca-drawer-item a:hover { background: var(--ll-green-soft); color: var(--ll-green-dark); }
.llueca-drawer-thumb {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--ll-green-soft);
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.llueca-drawer-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.llueca-drawer-initial { color: var(--ll-green-dark); font-weight: 700; font-size: 1rem; }
.llueca-drawer-chevron { margin-left: auto; color: #b6c0bb; font-size: 1.25rem; }

.llueca-drawer-foot {
  display: flex;
  background: var(--ll-green);
  flex: 0 0 auto;
}
.llueca-drawer-foot a {
  flex: 1;
  text-align: center;
  padding: 0.95rem 0.5rem;
  color: #fff;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
}
.llueca-drawer-foot a + a { border-left: 1px solid rgba(255, 255, 255, 0.35); }
.llueca-drawer-foot a:hover { background: var(--ll-green-dark); color: #fff; }

.llueca-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(30, 40, 45, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 1050;
}
body.llueca-menu-open .llueca-menu-overlay { opacity: 1; pointer-events: auto; }
body.llueca-menu-open { overflow: hidden; }

/* ---------- Slider full-width ---------- */
#carousel {
  position: relative;
  left: 50%;
  width: 100vw;
  margin-left: -50vw;
  max-width: 100vw;
  margin-bottom: 2.5rem;
  box-shadow: none;
}
#carousel .carousel-item img { width: 100%; height: auto; }
#carousel .direction { z-index: 20; }

/* ---------- Categorías circulares ---------- */
.llueca-circles { margin: 0 0 3rem; }
.llueca-circles ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.9rem 2.4rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.llueca-circles a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  color: var(--ll-slate);
  text-decoration: none;
}
.llueca-circle-img {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--ll-green-soft);
  box-shadow: var(--ll-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.llueca-circles a:hover .llueca-circle-img {
  transform: scale(1.06);
  box-shadow: 0 4px 16px rgba(60, 70, 80, 0.18);
}
.llueca-circle-img img { width: 100%; height: 100%; object-fit: cover; }
.llueca-circle-label {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
}
@media (max-width: 767px) {
  .llueca-circles ul { gap: 1.1rem 1.2rem; }
  .llueca-circle-img { width: 78px; height: 78px; }
  .llueca-circle-label { font-size: 0.65rem; }
}

/* ---------- Secciones de la home ---------- */
#content.page-home, .page-index #content { padding-top: 0; }
.featured-products, .page-index section { margin-bottom: 2.5rem; }
.featured-products .h2,
.featured-products h2 {
  text-align: left;
  font-weight: 700;
  font-size: 1.45rem;
  color: var(--ll-slate);
  padding-bottom: 0.4rem;
}
.featured-products .products-section-title { text-align: left; }
.featured-products .products-section-title::after {
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  background: var(--ll-green);
  border-radius: 2px;
  margin-top: 0.45rem;
}
.featured-products .all-product-link { color: var(--ll-green-dark); font-weight: 600; }

/* Tarjetas de producto */
.product-miniature .thumbnail-container {
  box-shadow: var(--ll-shadow);
  border-radius: var(--ll-radius);
  border: 1px solid #fff;
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.product-miniature .thumbnail-container:hover { box-shadow: 0 4px 16px rgba(60, 70, 80, 0.14); }
.product-miniature .product-title a { color: var(--ll-text); font-size: 0.85rem; }
.product-miniature .product-title a:hover { color: var(--ll-green-dark); }
.product-miniature .price { color: var(--ll-slate); font-weight: 700; font-size: 1.05rem; }
.product-miniature .regular-price { color: var(--ll-muted); }
.product-flag.discount, .product-flag.on-sale { background: var(--ll-green); }
.product-flag.new { background: var(--ll-slate); }

/* ---------- Botones ---------- */
.btn-primary, .btn-primary:focus {
  background-color: var(--ll-green);
  border-color: var(--ll-green);
  border-radius: 999px;
  font-weight: 600;
}
.btn-primary:hover, .btn-primary:active {
  background-color: var(--ll-green-dark) !important;
  border-color: var(--ll-green-dark) !important;
}
.btn-secondary, .btn-tertiary { border-radius: 999px; }

/* ---------- Botón flotante WhatsApp ---------- */
.llueca-whatsapp {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  z-index: 1040;
  transition: transform 0.15s ease;
}
.llueca-whatsapp:hover { transform: scale(1.08); color: #fff; }
.llueca-whatsapp svg { width: 30px; height: 30px; fill: currentColor; }

/* ---------- Footer ---------- */
.footer-container {
  background: var(--ll-slate);
  color: #c9d2ce;
  padding-top: 2.5rem;
  margin-top: 3rem;
  box-shadow: none;
  border-top: 4px solid var(--ll-green);
}
.footer-container .h3, .footer-container .h4,
.footer-container p.h4, .footer-container .footer__title { color: #fff; font-weight: 600; }
.footer-container li a, .footer-container .account-list a { color: #c9d2ce; }
.footer-container li a:hover { color: #fff; }
.footer-container .copyright, .footer-container a.copyright { color: #9fb0a8; }
.block_newsletter { background: transparent; }
.block_newsletter p { color: #c9d2ce; }
.block_newsletter form input[type="email"] { border-radius: 999px 0 0 999px; }
.block_newsletter form button { border-radius: 0 999px 999px 0; }
.block-contact { color: #c9d2ce; }
.block-contact .block-contact-title, .block-contact a { color: #fff; }

/* ---------- Ajustes móviles ---------- */
@media (max-width: 767px) {
  .llueca-topbar p { font-size: 0.62rem; text-align: center; }
  .header-top { padding-top: 0.2rem; }
  .llueca-header-row { display: block; }
  .header-top-right { display: block; padding: 0 0.5rem; }
  #search_widget { margin: 0.4rem 0 0.2rem; }
  .llueca-promobar p { font-size: 0.76rem; }
}
