/* ============================================================
   COSMEX — custom.css · UI/UX + color refinement
   Paleta base: #cd0c89 (rosa marca) + tonos derivados
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
  --cosmex-pink: #cd0c89;
  --cosmex-pink-dark: #a50a6e;
  --cosmex-pink-deep: #7c0853;
  --cosmex-pink-soft: #fdf3f8;
  --cosmex-pink-light: #ffe3f1;
  --cosmex-gold: #c9a05a;
  --cosmex-ink: #2d2a2e;
  --cosmex-gray: #6b6468;
  --cosmex-border: #f0e2ea;
  --cosmex-shadow: 0 10px 30px rgba(205, 12, 137, 0.12);
  --cosmex-shadow-lg: 0 18px 45px rgba(205, 12, 137, 0.22);
  --cosmex-radius: 14px;
}

/* ---------- Tipografía global ---------- */
body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  color: var(--cosmex-ink);
  letter-spacing: 0.01em;
}
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: 'Poppins', sans-serif !important;
  font-weight: 600;
  color: var(--cosmex-ink);
}

/* ---------- Header ---------- */
.header-top {
  background: linear-gradient(135deg, #ffffff 0%, var(--cosmex-pink-soft) 100%);
  box-shadow: 0 4px 20px rgba(205, 12, 137, 0.08);
}
.top-logo img, .logo {
  max-height: 56px;
  transition: transform .3s ease;
}
.top-logo:hover img, .logo:hover {
  transform: scale(1.04);
}
#_desktop_contact_link .contact-link, .right-nav .nav-link {
  color: var(--cosmex-pink-deep) !important;
  font-weight: 500;
  transition: color .25s ease;
}
#_desktop_contact_link .contact-link:hover, .right-nav .nav-link:hover {
  color: var(--cosmex-pink) !important;
}

/* Menú principal — estilo premium: fondo blanco, enlaces rosa, hover píldora */
#top-menu {
  background: #fff;
  border-radius: 14px;
  padding: 2px 8px;
  box-shadow: 0 6px 20px rgba(205, 12, 137, 0.10);
  border: 1px solid var(--cosmex-border);
}
#top-menu .nav-item .nav-link {
  color: var(--cosmex-pink-deep) !important;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.75rem 1rem;
  border-radius: 50px;
  letter-spacing: 0.03em;
  transition: background .25s ease, color .25s ease, transform .2s ease, box-shadow .25s ease;
}
#top-menu .nav-item .nav-link:hover {
  background: linear-gradient(135deg, var(--cosmex-pink), var(--cosmex-pink-dark));
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(205, 12, 137, 0.3);
}
#top-menu .nav-item .dropdown-menu {
  border: none;
  border-radius: 12px;
  box-shadow: 0 15px 40px rgba(45,42,46,0.15);
  padding: 8px;
}
#top-menu .dropdown-menu .nav-link {
  color: var(--cosmex-ink) !important;
  border-radius: 8px;
  transition: background .2s ease, color .2s ease, padding-left .2s ease;
}
#top-menu .dropdown-menu .nav-link:hover {
  background: var(--cosmex-pink-soft);
  color: var(--cosmex-pink) !important;
  padding-left: 1.4rem;
}

/* ---------- Botones ---------- */
.btn-primary, .btn-primary:focus {
  background: linear-gradient(135deg, var(--cosmex-pink) 0%, var(--cosmex-pink-dark) 100%) !important;
  border: none !important;
  border-radius: 50px !important;
  box-shadow: 0 6px 18px rgba(205, 12, 137, 0.28);
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.65rem 1.6rem;
  transition: transform .25s ease, box-shadow .25s ease, filter .25s ease;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(205, 12, 137, 0.4) !important;
  filter: brightness(1.06);
}
.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(205, 12, 137, 0.3) !important;
}

/* ---------- Cards de producto ---------- */
.thumbnail-container {
  border-radius: var(--cosmex-radius);
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(45,42,46,0.06);
  transition: transform .3s ease, box-shadow .3s ease;
  border: 1px solid var(--cosmex-border);
  background: #fff;
}
.thumbnail-container:hover {
  transform: translateY(-6px);
  box-shadow: var(--cosmex-shadow-lg);
  border-color: var(--cosmex-pink-light);
}
.thumbnail-container .product-title a {
  color: var(--cosmex-ink);
  font-weight: 500;
  line-height: 1.35;
  transition: color .25s ease;
}
.thumbnail-container .product-title a:hover {
  color: var(--cosmex-pink);
}
.thumbnail-container .product-price, .thumbnail-container .price {
  color: var(--cosmex-pink) !important;
  font-weight: 700;
  font-size: 1.15rem;
}
.thumbnail-container .highlighted-informations {
  border-radius: 0 0 var(--cosmex-radius) var(--cosmex-radius);
}
.thumbnail-container img {
  transition: transform .5s ease;
}
.thumbnail-container:hover img {
  transform: scale(1.06);
}

/* ---------- Slider ---------- */
.homeslider-container .caption {
  background: linear-gradient(90deg, rgba(45,42,46,0.65) 0%, rgba(45,42,46,0.15) 70%, transparent 100%);
  border-radius: var(--cosmex-radius);
  padding: 1.4rem 1.8rem;
}
.homeslider-container .caption h2,
.homeslider-container .caption h3 {
  color: #fff !important;
  text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.homeslider-container .caption .caption-description p {
  color: #fdf3f8;
}
.homeslider-container .btn {
  background: #fff;
  color: var(--cosmex-pink) !important;
  border-radius: 50px;
  font-weight: 600;
}
.homeslider-container .btn:hover {
  background: var(--cosmex-pink);
  color: #fff !important;
}

/* ---------- Banners / blockreassurance ---------- */
.blockreassurance {
  border-top: 1px solid var(--cosmex-border);
  border-bottom: 1px solid var(--cosmex-border);
  background: var(--cosmex-pink-soft);
  border-radius: var(--cosmex-radius);
  margin: 1.2rem 0;
}
.blockreassurance .block-icon {
  color: var(--cosmex-pink) !important;
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  background: var(--cosmex-pink-soft);
  border-radius: 10px;
  padding: 0.7rem 1rem;
}
.breadcrumb a {
  color: var(--cosmex-pink) !important;
}
.breadcrumb li + li::before {
  color: var(--cosmex-gray) !important;
}

/* ---------- Footer ---------- */
.footer-container {
  background: linear-gradient(135deg, #fff 0%, var(--cosmex-pink-soft) 100%);
  color: #2d2a2e !important;
  border-top: 4px solid var(--cosmex-pink);
  font-size: 0.95rem;
}
.footer-container .links .title, .footer-container h3, .footer-container .block-contact-title {
  color: var(--cosmex-pink-deep) !important;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.03em;
  margin-bottom: 0.9rem;
  text-transform: uppercase;
}
.footer-container a, .footer-container .block-contact, .footer-container .block-contact a, .footer-container p {
  color: #2d2a2e !important;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.8;
  transition: color .25s ease, padding-left .25s ease;
}
.footer-container a:hover {
  color: var(--cosmex-pink) !important;
  padding-left: 4px;
}
.footer-container .block-newsletter {
  background: #fff;
  border: 1px solid var(--cosmex-border);
  border-radius: 12px;
  padding: 1.2rem;
}
.footer-container .block-newsletter .btn {
  background: var(--cosmex-pink);
  color: #fff;
}
.footer-container .copyright, .footer-container .text-sm-center {
  color: var(--cosmex-gray) !important;
  font-size: 0.85rem;
}

/* ---------- Footer móvil (accordion): títulos span.h3 ---------- */
.footer-container .title,
.footer-container .title .h3,
.footer-container .title span.h3,
.footer-container .title.clearfix span.h3 {
  color: var(--cosmex-pink-deep) !important;
  background: transparent !important;
}
.footer-container .title {
  background: var(--cosmex-pink-light) !important;
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
  margin-bottom: 0.5rem;
}
.footer-container .title .collapse-icons i,
.footer-container .title .material-icons {
  color: var(--cosmex-pink) !important;
}
.footer-container .collapse a,
.footer-container ul#footer_sub_menu_1 a,
.footer-container ul#footer_sub_menu_2 a,
.footer-container .cms-page-link,
.footer-container .link-page,
.footer-container .link-static,
.footer-container .link-category {
  color: #2d2a2e !important;
  font-size: 0.95rem;
  font-weight: 500;
}
.footer-container .collapse a:hover,
.footer-container .cms-page-link:hover {
  color: var(--cosmex-pink) !important;
}

/* ---------- Panel menú móvil (accordion del footer en hamburguesa) ---------- */
#mobile_top_menu_wrapper .links .title,
#mobile_top_menu_wrapper .title .h3,
#mobile_top_menu_wrapper .title span.h3 {
  color: var(--cosmex-pink-deep) !important;
}
#mobile_top_menu_wrapper .title {
  background: var(--cosmex-pink-light) !important;
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
}
#mobile_top_menu_wrapper .collapse a,
#mobile_top_menu_wrapper .cms-page-link,
#mobile_top_menu_wrapper .link-page,
#mobile_top_menu_wrapper .link-static {
  color: #2d2a2e !important;
  font-weight: 600;
}
#mobile_top_menu_wrapper .collapse a:hover,
#mobile_top_menu_wrapper .cms-page-link:hover {
  color: var(--cosmex-pink) !important;
}

/* ---------- Selector de idiomas con banderas ---------- */
/* ===== MEGA MENÚ: dropdown premium en columnas ===== */
#_desktop_top_menu {
  position: relative;
}
#_desktop_top_menu .top-menu[data-depth="0"] > li {
  position: static;
}
/* Panel: centrado bajo el menú, ancho según contenido, sombra suave */
#_desktop_top_menu .popover.sub-menu {
  position: absolute !important;
  top: 100% !important;
  left: 50% !important;
  transform: translateX(-50%) translateY(14px);
  width: auto !important;
  max-width: 760px !important;
  min-width: 240px !important;
  margin-left: 0 !important;
  margin-top: 0 !important;
  background: #fff;
  border: 1px solid var(--cosmex-border) !important;
  border-radius: 16px !important;
  box-shadow: 0 20px 50px rgba(45,42,46,0.16) !important;
  z-index: 999 !important;
  padding: 16px 24px !important;
  text-align: left;
  opacity: 0;
  visibility: hidden;
  transition: opacity .28s ease, visibility .28s ease, transform .28s ease;
}
/* Puente invisible entre el menú y el panel (evita cierre al mover el ratón) */
#_desktop_top_menu .popover.sub-menu::before {
  content: '';
  position: absolute;
  top: -14px;
  left: 0;
  right: 0;
  height: 14px;
}
/* Estado hover: aparece con deslizamiento suave */
#_desktop_top_menu .top-menu[data-depth="0"] li:hover .sub-menu,
#_desktop_top_menu .top-menu[data-depth="0"] li:focus-within .sub-menu,
#_desktop_top_menu .popover.sub-menu:hover {
  visibility: visible !important;
  opacity: 1 !important;
  transform: translateX(-50%) translateY(0) !important;
}
/* Lista en columnas automáticas (2-5 según nº de hijos) */
#_desktop_top_menu .popover.sub-menu ul[data-depth="1"] {
  column-count: 3;
  column-width: 200px;
  column-gap: 30px;
  margin: 0;
  padding: 0;
  display: block;
  width: max-content;
  max-width: 100%;
}
#_desktop_top_menu .popover.sub-menu ul[data-depth="1"] > li {
  float: none !important;
  margin: 0 0 2px 0;
  display: block;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
}
/* Enlaces: fila limpia con hover píldora */
#_desktop_top_menu .popover.sub-menu ul[data-depth="1"] > li a {
  color: var(--cosmex-ink) !important;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 8px 14px;
  border-radius: 10px;
  display: block;
  white-space: nowrap;
  transition: background .2s ease, color .2s ease, padding-left .2s ease;
}
#_desktop_top_menu .popover.sub-menu ul[data-depth="1"] > li a:hover {
  background: var(--cosmex-pink-soft);
  color: var(--cosmex-pink) !important;
  padding-left: 18px;
}
/* Flecha indicadora en las categorías con submenú (desktop) */
@supports (selector(:has(*))) {
  #_desktop_top_menu .top-menu[data-depth="0"] > li:has(> .sub-menu) > a::after {
    content: ' ▾';
    font-size: 0.72em;
    opacity: 0.55;
    vertical-align: 1px;
    margin-left: 2px;
    transition: opacity .2s ease;
  }
  #_desktop_top_menu .top-menu[data-depth="0"] > li:hover:has(> .sub-menu) > a::after {
    opacity: 1;
  }
}
/* ---- Responsive: en móvil el submenu vuelve al acordeón del menú ---- */
@media (max-width: 991px) {
  #_desktop_top_menu .popover.sub-menu {
    position: static !important;
    transform: none !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    opacity: 1;
    visibility: visible;
    transition: none;
  }
  #_desktop_top_menu .popover.sub-menu ul[data-depth="1"] {
    column-width: auto;
    column-count: 1;
  }
}

/* ===== SCROLL HORIZONTAL EN MÓVIL (novedades y secciones home) ===== */
@media (max-width: 991px) {
  .page-home .featured-products .products,
  .page-home .products-slider .products {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    gap: 12px;
    padding-bottom: 12px;
    margin-left: -15px;
    margin-right: -15px;
    padding-left: 15px;
    padding-right: 15px;
  }
  .page-home .featured-products .products .js-product,
  .page-home .products-slider .products .js-product {
    flex: 0 0 48%;
    max-width: 48%;
    scroll-snap-align: start;
  }
  .page-home .featured-products .products::-webkit-scrollbar,
  .page-home .products-slider .products::-webkit-scrollbar {
    height: 6px;
  }
  .page-home .featured-products .products::-webkit-scrollbar-thumb,
  .page-home .products-slider .products::-webkit-scrollbar-thumb {
    background: var(--cosmex-pink);
    border-radius: 10px;
  }
  .page-home .featured-products .products::-webkit-scrollbar-track,
  .page-home .products-slider .products::-webkit-scrollbar-track {
    background: var(--cosmex-pink-soft);
    border-radius: 10px;
  }
}

/* ===== SECCIONES HOME: NUESTRAS MARCAS Y NUESTRAS CATEGORÍAS ===== */
.cosmex-home-section {
  margin: 3.5rem auto;
}
.cosmex-home-section h2 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.65rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--cosmex-pink-deep);
  text-align: center;
  margin-bottom: 1.75rem;
}
.cosmex-home-section h2::after {
  content: '';
  display: block;
  width: 56px;
  height: 3px;
  background: linear-gradient(90deg, var(--cosmex-pink), var(--cosmex-pink-dark));
  border-radius: 3px;
  margin: 0.6rem auto 0;
}
/* Carrusel horizontal genérico (scroll en desktop y móvil) */
.cosmex-scroll-row {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  gap: 18px;
  padding-bottom: 12px;
}
.cosmex-scroll-row::-webkit-scrollbar {
  height: 6px;
}
.cosmex-scroll-row::-webkit-scrollbar-thumb {
  background: var(--cosmex-pink);
  border-radius: 10px;
}
.cosmex-scroll-row::-webkit-scrollbar-track {
  background: var(--cosmex-pink-soft);
  border-radius: 10px;
}
/* Tarjetas de categoría */
.cosmex-cat-card {
  flex: 0 0 220px;
  scroll-snap-align: start;
  background: #fff;
  border: 1px solid var(--cosmex-border);
  border-radius: 18px;
  overflow: hidden;
  text-align: center;
  transition: transform .25s ease, box-shadow .25s ease;
}
.cosmex-cat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(205, 12, 137, 0.18);
}
.cosmex-cat-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
  background: var(--cosmex-pink-soft);
}
.cosmex-cat-card .cosmex-cat-name {
  display: block;
  padding: 0.9rem 0.75rem;
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--cosmex-pink-deep);
  text-decoration: none;
}
.cosmex-cat-card .cosmex-cat-name:hover {
  color: var(--cosmex-pink);
}
/* Tarjetas de marca */
.cosmex-brand-card {
  flex: 0 0 170px;
  scroll-snap-align: start;
  background: #fff;
  border: 1px solid var(--cosmex-border);
  border-radius: 14px;
  padding: 1.1rem 0.9rem;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 76px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.cosmex-brand-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(205, 12, 137, 0.15);
  border-color: var(--cosmex-pink);
}
.cosmex-brand-card a {
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--cosmex-ink);
  text-decoration: none;
}
.cosmex-brand-card a:hover {
  color: var(--cosmex-pink);
}

/* ===== TOP MARCAS (inspirado en hanaora.com) ===== */
.cosmex-section-sub {
  text-align: center;
  color: #777;
  font-size: 0.98rem;
  margin: -0.9rem auto 1.6rem;
  max-width: 560px;
}
.cosmex-top-brands {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  margin-bottom: 2rem;
}
.cosmex-top-brand {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--cosmex-border);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}
.cosmex-top-brand:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 32px rgba(205, 12, 137, 0.18);
  border-color: var(--cosmex-pink);
}
.cosmex-top-brand-img {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  box-sizing: border-box;
}
.cosmex-top-brand-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform .4s ease;
}
/* Los SVGs de monograma traen su propio fondo degradado: sin padding */
.cosmex-top-brand-img img[src$=".svg"] {
  padding: 0;
}
.cosmex-top-brand:hover .cosmex-top-brand-img img {
  transform: scale(1.07);
}
.cosmex-top-brand-noimg {
  font-weight: 800;
  font-size: 2.4rem;
  color: var(--cosmex-pink);
}
.cosmex-top-brand-info {
  padding: 0.7rem 0.6rem 0.8rem;
  text-align: center;
}
.cosmex-top-brand-name {
  display: block;
  font-weight: 700;
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--cosmex-pink-deep);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cosmex-top-brand-count {
  display: block;
  font-size: 0.78rem;
  color: #999;
  margin-top: 2px;
}
.cosmex-brands-footer {
  text-align: center;
  margin-top: 1.4rem;
}
.btn-brand-outline {
  display: inline-block;
  padding: 0.65rem 1.7rem;
  border: 2px solid var(--cosmex-pink);
  border-radius: 50px;
  color: var(--cosmex-pink);
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: transparent;
  text-decoration: none;
  transition: background .25s ease, color .25s ease;
}
.btn-brand-outline:hover {
  background: var(--cosmex-pink);
  color: #fff;
}
@media (max-width: 1199px) {
  .cosmex-top-brands { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 767px) {
  .cosmex-top-brands { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .cosmex-top-brand-name { font-size: 0.8rem; }
}
/* ===== PÁGINA MARCAS A-Z (inspirada en hanaora.com/marcas) ===== */
.cosmex-man-index {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 0 0 2.2rem;
  padding: 1rem 1.2rem;
  background: #fff;
  border: 1px solid var(--cosmex-border);
  border-radius: 16px;
}
.cosmex-man-index a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--cosmex-ink);
  text-decoration: none;
  transition: background .2s ease, color .2s ease;
}
.cosmex-man-index a:hover {
  background: var(--cosmex-pink);
  color: #fff;
}
.cosmex-man-letter {
  margin: 1.8rem 0 0.8rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--cosmex-pink);
  color: var(--cosmex-pink-deep);
  font-size: 1.25rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.cosmex-man-columns {
  column-count: 3;
  column-gap: 2rem;
}
.cosmex-man-brand {
  display: block;
  break-inside: avoid;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--cosmex-ink);
  text-decoration: none;
  transition: background .2s ease, color .2s ease;
}
.cosmex-man-brand:hover {
  background: #fde7f3;
  color: var(--cosmex-pink);
}
@media (max-width: 991px) {
  .cosmex-man-columns { column-count: 2; }
}
@media (max-width: 575px) {
  .cosmex-man-columns { column-count: 1; }
  .cosmex-man-index { gap: 4px; padding: 0.8rem; }
  .cosmex-man-index a { min-width: 30px; height: 30px; font-size: 0.78rem; }
}
/* ===== FLAGS DE PRODUCTO COMPACTOS (Nuevo / Fuera de stock) ===== */
.product-flags {
  position: absolute;
  top: 0.4rem;
  left: 0.4rem;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  pointer-events: none;
  width: auto;
}
.product-flags li.product-flag {
  width: fit-content;
  min-width: 0;
  min-height: 0;
  display: inline-block;
  padding: 2px 8px !important;
  margin-top: 0 !important;
  font-size: 0.62rem !important;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 6px;
  max-width: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.product-flags li.product-flag.new {
  background: var(--cosmex-pink) !important;
  color: #fff !important;
}
.product-flags li.product-flag.out_of_stock {
  background: rgba(0, 0, 0, 0.68) !important;
  color: #fff !important;
}
/* En móvil aún más discretos */
@media (max-width: 767px) {
  .product-flags li.product-flag {
    font-size: 0.52rem !important;
    padding: 1px 5px !important;
    max-width: none;
  }
  .product-flags {
    top: 0.3rem;
    left: 0.3rem;
  }
}
/* ===== SUBCATEGORÍAS SIN IMÁGENES (píldoras limpias) ===== */
#subcategories {
  margin-bottom: 24px;
  border-top: 1px solid #f6f6f6;
  padding-top: 20px;
}
#subcategories .subcategory-heading {
  margin-bottom: 16px;
  font-weight: 600;
  font-size: 1.1rem;
  color: #2d2d2d;
}
#subcategories ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 0;
}
#subcategories ul li {
  width: auto;
  min-width: 0;
  margin: 0;
  text-align: center;
}
#subcategories ul li .subcategory-name {
  display: inline-block;
  padding: 8px 18px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #2d2d2d;
  transition: all .25s ease;
}
#subcategories ul li .subcategory-name:hover {
  background: #cd0c89;
  border-color: #cd0c89;
  color: #fff;
  text-decoration: none;
}
#subcategories ul li .subcategory-image {
  display: none !important;
}
/* ===== SELECTOR DE VISTA DE PRODUCTOS (grid / lista — estilo apokin) ===== */
.cosmex-view-options {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding-left: 12px;
}
.cosmex-view-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid #e3e3e3;
  border-radius: 8px;
  background: #fff;
  color: #9b9b9b;
  cursor: pointer;
  transition: all .2s ease;
  padding: 0;
}
.cosmex-view-btn:hover {
  border-color: var(--cosmex-pink);
  color: var(--cosmex-pink);
}
.cosmex-view-btn.active {
  background: var(--cosmex-pink);
  border-color: var(--cosmex-pink);
  color: #fff;
}

/* --- Vista LISTA: cada producto en fila horizontal --- */
.products-container.list-view .js-product {
  flex: 0 0 100%;
  max-width: 100%;
}
.products-container.list-view .product-miniature {
  display: block;
}
.products-container.list-view .thumbnail-container {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 14px;
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 12px;
  margin-bottom: 12px;
}
.products-container.list-view .thumbnail-top {
  flex: 0 0 130px;
  max-width: 130px;
}
.products-container.list-view .thumbnail-top .thumbnail img {
  width: 100%;
  height: auto;
}
.products-container.list-view .product-description {
  flex: 1;
  padding: 0;
  text-align: left;
}
.products-container.list-view .product-description .product-title {
  font-size: 0.95rem;
  line-height: 1.4;
  margin-bottom: 6px;
}
.products-container.list-view .highlighted-informations {
  display: none !important;
}
/* --- En móvil la vista lista también funciona --- */
@media (max-width: 575px) {
  .products-container.list-view .thumbnail-container {
    gap: 12px;
  }
  .products-container.list-view .thumbnail-top {
    flex: 0 0 90px;
    max-width: 90px;
  }
}
/* ===== CATEGORÍAS HOME: iconos SVG en círculo rosa ===== */
.cosmex-cat-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
  background: var(--cosmex-pink-soft);
}
.cosmex-cat-icon {
  width: 100%;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cosmex-pink-soft);
  color: var(--cosmex-pink);
  transition: all .25s ease;
}
.cosmex-cat-icon svg {
  width: 72px;
  height: 72px;
  display: block;
}
.cosmex-cat-card:hover .cosmex-cat-icon {
  background: var(--cosmex-pink);
  color: #fff;
}
/* Móvil: icono más pequeño y compacto */
@media (max-width: 575px) {
  .cosmex-cat-icon {
    height: 100px;
  }
  .cosmex-cat-icon svg {
    width: 52px;
    height: 52px;
  }
  .cosmex-cat-card img {
    height: 100px;
  }
}
/* ===== SUBCATEGORÍAS: pills a la izquierda, 2 col en móvil ===== */
#subcategories ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  text-align: left;
  justify-content: flex-start;
}
#subcategories ul li {
  margin: 0;
  flex: 0 0 auto;
}
@media (max-width: 767px) {
  #subcategories ul {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    text-align: left !important;
  }
  #subcategories ul li {
    min-width: 0 !important;
    margin: 0 !important;
  }
  #subcategories ul li .subcategory-name {
    display: block !important;
    width: 100% !important;
    text-align: left !important;
    padding: 8px 12px !important;
    font-size: 0.75rem !important;
    white-space: normal !important;
    overflow-wrap: break-word !important;
  }
}
/* ===== BANNER SUPERIOR ESTILO DRUNI ===== */
.cosmex-topbar {
  background: #fdf5f8;
  color: #d01261;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 8px 12px;
  line-height: 1.4;
}
.cosmex-topbar .container {
  display: flex;
  align-items: center;
  justify-content: center;
}
/* ===== OCULTAR MENÚ LATERAL EN MÓVIL SOLO EN CATEGORÍAS ===== */
@media (max-width: 991px) {
  body.page-category #left-column {
    display: none !important;
  }
  body.page-category #content-wrapper {
    width: 100%;
  }
}
/* ===== FICHAS IGUALES EN GRID: título fijo 2 líneas + CTA anclado abajo ===== */
.products-container.grid-view .thumbnail-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  margin-bottom: 0.5rem;
}
.products-container.grid-view .product-description {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}
/* Título: máximo 2 líneas, todas las fichas con el mismo espacio */
.products-container.grid-view .product-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;   /* 2 líneas x line-height 1.35 */
  max-height: 2.7em;
  line-height: 1.35;
  margin-bottom: 6px;
}
/* Precio + CTA anclados al fondo de la ficha */
.products-container.grid-view .product-price-and-shipping {
  margin-top: auto;
  padding-top: 4px;
}
.products-container.grid-view .cosmex-qty-add {
  margin-top: 8px;
}
/* En vista lista NO aplicamos esto (layout horizontal) */
.products-container.list-view .thumbnail-container,
.products-container.list-view .product-description {
  height: auto;
}
.products-container.list-view .product-description {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.products-container.list-view .product-title {
  min-height: 0;
  max-height: none;
  display: block;
  -webkit-line-clamp: unset;
}
/* ===== GRID COMPACTO: menos espacio entre fichas ===== */
.products-container.grid-view > .js-product {
  padding-left: 6px !important;
  padding-right: 6px !important;
}
.products-container.grid-view {
  margin-left: -6px;
  margin-right: -6px;
}
.products-container.grid-view .thumbnail-container {
  margin-bottom: 0.5rem;
}
/* En móvil cerramos aún más */
@media (max-width: 767px) {
  .products-container.grid-view > .js-product {
    padding-left: 4px !important;
    padding-right: 4px !important;
  }
  .products-container.grid-view {
    margin-left: -4px;
    margin-right: -4px;
  }
}
/* ===== FICHA ESTILO DRUNI: marca + nombre + badge descuento ===== */
.cosmex-manufacturer {
  margin: 0 0 2px;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #7a7a7a;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Badge de descuento -X% estilo DRUNI (rojo, encima del precio) */
.products-container .product-miniature .discount-percentage,
.products-container .product-miniature .discount-amount {
  display: inline-block;
  background: #e31837;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 4px;
  margin-left: 0;
  vertical-align: middle;
}
.products-container .product-miniature .regular-price {
  font-size: 0.72rem;
  color: #9b9b9b;
  text-decoration: line-through;
  margin-right: 6px;
}
.products-container .product-miniature .price {
  font-size: 0.95rem;
  font-weight: 700;
}
/* ===== AÑADIR AL CARRITO RÁPIDO EN FICHAS (cantidad + botón) ===== */
.cosmex-quick-add {
  margin-top: 8px;
}
.cosmex-qty-add {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cosmex-qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid #e3e3e3;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.cosmex-qty-btn {
  width: 30px;
  height: 34px;
  border: none;
  background: transparent;
  color: #2d2d2d;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.cosmex-qty-btn:hover {
  background: #fde7f3;
  color: var(--cosmex-pink);
}
.cosmex-qty-input {
  width: 38px;
  height: 34px;
  border: none;
  border-left: 1px solid #f0f0f0;
  border-right: 1px solid #f0f0f0;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: #2d2d2d;
  -moz-appearance: textfield;
  appearance: textfield;
  padding: 0;
}
.cosmex-qty-input::-webkit-outer-spin-button,
.cosmex-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.cosmex-add-btn {
  flex: 1;
  min-width: 0;
  height: 36px;
  padding: 0 12px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0.01em;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}
.cosmex-add-btn .cosmex-cart-icon {
  flex: 0 0 auto;
}
.cosmex-add-long { display: none; }
.products-container.list-view .cosmex-add-short { display: none; }
.products-container.list-view .cosmex-add-long { display: inline; }
.cosmex-add-btn-oos {
  width: 100%;
  background: #f5f5f5;
  border-color: #e5e5e5;
  color: #9b9b9b;
  cursor: not-allowed;
}
/* En vista lista los botones quedan alineados a la derecha */
.products-container.list-view .cosmex-quick-add {
  margin-top: 4px;
}
.products-container.list-view .cosmex-qty-add {
  justify-content: flex-start;
}
.products-container.list-view .cosmex-add-btn {
  flex: 0 0 auto;
  width: auto;
  min-width: 140px;
}
/* En móvil compacto */
@media (max-width: 575px) {
  .cosmex-qty-btn { width: 26px; }
  .cosmex-qty-input { width: 32px; }
  .cosmex-add-btn { font-size: 0.65rem; padding: 0 8px; gap: 4px; }
  .cosmex-manufacturer { font-size: 0.6rem; }
}
/* En móvil las tarjetas ocupan ~60% de la pantalla */
@media (max-width: 767px) {
  .cosmex-cat-card { flex-basis: 55%; }
  .cosmex-brand-card { flex-basis: 42%; }
}

/* ---------- Selector de idiomas con banderas ---------- */
.lang-flag {
  width: 22px;
  height: auto;
  border-radius: 3px;
  margin-right: 6px;
  vertical-align: -3px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
.language-selector-wrapper .expand-more {
  display: inline-flex;
  align-items: center;
}
.language-selector-wrapper .dropdown-menu .dropdown-item {
  display: flex;
  align-items: center;
}
.language-selector-wrapper .dropdown-menu .dropdown-item .lang-flag {
  flex-shrink: 0;
}
/* Selector móvil: dropdown compacto de banderas */
#_mobile_language_selector {
  margin-right: 6px;
  display: flex;
  align-items: center;
}
#_mobile_language_selector .lang-dropdown-mobile {
  display: flex;
  align-items: center;
}
#_mobile_language_selector .lang-dropdown-mobile > button {
  display: flex;
  align-items: center;
  padding: 2px 4px;
  background: transparent;
  border: none;
}
#_mobile_language_selector .lang-dropdown-mobile .lang-flag {
  width: 20px;
  margin: 0 2px 0 0;
}
#_mobile_language_selector .lang-dropdown-mobile .expand-more {
  font-size: 16px;
  color: var(--cosmex-ink);
  line-height: 1;
}
#_mobile_language_selector .lang-dropdown-mobile .dropdown-menu {
  right: auto;
  left: auto;
  min-width: 120px;
  padding: 4px 0;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  border: 1px solid var(--cosmex-border);
}
#_mobile_language_selector .lang-dropdown-mobile .dropdown-menu .dropdown-item {
  display: flex;
  align-items: center;
  padding: 6px 12px;
  font-size: 0.9rem;
}
#_mobile_language_selector .lang-dropdown-mobile .dropdown-menu .dropdown-item .lang-flag {
  margin-right: 8px;
}
#_mobile_language_selector .language-selector select.link {
  display: none !important;
}
@media (max-width: 767px) {
  #_mobile_language_selector {
    display: flex;
    align-items: center;
  }
  .header-top #_mobile_language_selector {
    padding-top: 0;
  }
}

/* ---------- Precios / badges ---------- */
.product-price, .price, .current-price {
  color: var(--cosmex-pink) !important;
  font-weight: 700;
}
.new-badge, .badge-new {
  background: var(--cosmex-pink) !important;
  border-radius: 30px;
  font-weight: 600;
}
.discount-percentage {
  background: var(--cosmex-gold) !important;
  border-radius: 30px !important;
}

/* ---------- Inputs ---------- */
.form-control {
  border-radius: 10px !important;
  border-color: var(--cosmex-border) !important;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.form-control:focus {
  border-color: var(--cosmex-pink) !important;
  box-shadow: 0 0 0 3px rgba(205, 12, 137, 0.15) !important;
}

/* ---------- Alerts / badges info ---------- */
.alert {
  border-radius: 12px;
}

/* ---------- Enlaces generales ---------- */
a {
  transition: color .25s ease;
}
a:hover {
  color: var(--cosmex-pink);
}

/* ---------- Scrollbar sutil (webkit) ---------- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--cosmex-pink-soft); }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--cosmex-pink), var(--cosmex-pink-dark)); border-radius: 10px; }

/* ---------- Header-nav refinado ---------- */
.header-nav {
  border-bottom: 1px solid var(--cosmex-border);
  background: #fff;
}
.header-nav .nav-item a {
  color: var(--cosmex-gray);
  font-size: 0.85rem;
  font-weight: 500;
}
.header-nav .nav-item a:hover {
  color: var(--cosmex-pink);
}

/* ---------- Barra de búsqueda ---------- */
#search_widget {
  background: #fff;
  border: 2px solid var(--cosmex-border);
  border-radius: 50px;
  overflow: hidden;
  transition: border-color .25s ease, box-shadow .25s ease;
}
#search_widget:focus-within {
  border-color: var(--cosmex-pink);
  box-shadow: 0 0 0 4px rgba(205, 12, 137, 0.12);
}
#search_widget input {
  border: none !important;
  background: transparent;
}
#search_widget button {
  background: linear-gradient(135deg, var(--cosmex-pink), var(--cosmex-pink-dark));
  color: #fff;
  border-radius: 0 50px 50px 0;
}

/* ---------- Carrito ---------- */
.blockcart {
  border-radius: 12px;
}
.blockcart .cart-products-count {
  background: var(--cosmex-pink);
  color: #fff;
  border-radius: 50%;
  font-size: 0.7rem;
}

/* ---------- Newsletter ---------- */
.block_newsletter {
  background: linear-gradient(135deg, var(--cosmex-pink-soft), #fff);
  border-radius: var(--cosmex-radius);
  padding: 1.6rem;
}
.block_newsletter form input[type=email] {
  border-radius: 50px 0 0 50px !important;
  border: 2px solid var(--cosmex-border) !important;
}
.block_newsletter form input[type=email]:focus {
  border-color: var(--cosmex-pink) !important;
}
.block_newsletter form button {
  border-radius: 0 50px 50px 0 !important;
}

/* ---------- Productos destacados títulos ---------- */
.featured-products h2, .products-section-title, .page-home #content h2 {
  font-weight: 700;
  color: var(--cosmex-ink);
  position: relative;
  padding-bottom: 10px;
}
.featured-products h2::after, .products-section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--cosmex-pink), var(--cosmex-gold));
  border-radius: 3px;
}

/* ---------- Animación de entrada sutil en cards ---------- */
@keyframes cosmexFadeIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.thumbnail-container {
  animation: cosmexFadeIn .5s ease both;
}
.thumbnail-container:nth-child(2) { animation-delay: .08s; }
.thumbnail-container:nth-child(3) { animation-delay: .16s; }
.thumbnail-container:nth-child(4) { animation-delay: .24s; }

/* ---------- Paginación ---------- */
.pagination .page-link {
  border-radius: 8px !important;
  margin: 0 3px;
  color: var(--cosmex-ink);
  transition: all .25s ease;
}
.pagination .page-item.active .page-link {
  background: var(--cosmex-pink) !important;
  border-color: var(--cosmex-pink) !important;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(205, 12, 137, 0.3);
}
.pagination .page-link:hover {
  background: var(--cosmex-pink-soft);
  color: var(--cosmex-pink) !important;
}

/* ---------- Responsive: logo en móvil (discreto, sin pisar línea) ---------- */
@media (max-width: 767px) {
  .top-logo img, #_mobile_logo img, #_mobile_logo .logo, .logo {
    max-height: 44px !important;
    width: auto;
  }
  .header-top {
    padding: 0.4rem 0;
  }
  #_mobile_logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    line-height: 1;
    overflow: hidden;
  }
  .header-top #_mobile_logo, .header-top .top-logo {
    line-height: 1;
  }
  .footer-container {
    font-size: 1rem;
  }
  .footer-container a, .footer-container .block-contact, .footer-container p {
    font-size: 1rem;
  }
}
