/**
 * mod_megamenu - Front-end styles
 *
 * Migrado al design system de Casa Delfín (themes/cd_theme/assets/css/variables.css).
 * El módulo se copió de otro proyecto (QuieroVinos): los nombres de clase `qv-*`
 * son herencia de ese origen, pero los tokens de color y tipografía ya son los
 * de este proyecto. No reintroducir variables `--Borgoa`, `--Negro`, `--Blanco`,
 * `--yellow_*` ni fuentes Montserrat / DM Mono / Hedvig: no existen aquí.
 */

/* --- Barra principal (Figma 2458-118166 / QuieroVinos) --- */
/* Sin `position: relative` a propósito: ver "CADENA DE ANCLAJE DEL DESPLEGABLE" abajo. */
.mod-megamenu {
  width: 100%;
}

.mod-megamenu__bar {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  height: 100%;
}

/* Replaces the `d-flex` utility the <li>s used to carry: below xl every item but
   the search widget is hidden (see the max-width: 1199.98px block), and a layered
   !important utility could not be overridden from here. */
.mod-megamenu__bar > li {
  display: flex;
}

.mod-megamenu__bar > li > a,
.mod-megamenu .main-menu__tree__link {
  color: var(--color-primary);
  font-family: var(--font-family-ui);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-regular);
  line-height: 1.3;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
  display: flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  transition: color 0.2s ease;
}


.mod-megamenu__bar > li:first-child > a {
  /*padding-left: 0;*/
  margin-left: -1.25rem;
}

.mod-megamenu__bar > li:last-child > a {
  /*padding-right: 0;*/
  margin-right: -1.25rem;
}

/* --- Item tipo logo: centrado, empuja los enlaces a izquierda y derecha --- */
.mod-megamenu__item--logo {
  margin: 0 auto;
  padding: 0 1.5rem;
}

.mod-megamenu__logo-link {
  display: flex;
  align-items: center;
  padding: 0;
  line-height: 0;
}

.mod-megamenu__logo-img {
  height: 48px;
  width: auto;
  display: block;
}

/* Cuando el logo encabeza la lista (sin enlaces a su izquierda) no añade margen extra a la izquierda */
.mod-megamenu__bar > .mod-megamenu__item--logo:first-child {
  margin-left: 0;
}

.mod-megamenu__bar > .mod-megamenu__item--logo:last-child {
  margin-right: 0;
}

.mod-megamenu__bar > li > a:hover,
.mod-megamenu .main-menu__tree__link:hover {
  color: var(--color-primary);
}

.mod-megamenu .qv-menu-chevron {
  font-size: 18px;
  transition: transform 0.2s ease;
}

.mod-megamenu .qv-has-megamenu:hover .qv-menu-chevron {
  transform: rotate(180deg);
  color: var(--color-primary);
}

.mod-megamenu__dropdown {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  /* Margen de gracia al cerrar: tolera el movimiento en diagonal hacia el
     submenú. Al abrir el retardo se anula (ver la regla de :hover). */
  transition-delay: 0.15s;
}

/* CADENA DE ANCLAJE DEL DESPLEGABLE — no tocar sin leer esto.
   .mod-megamenu__dropdown es `absolute` con left:0/right:0, así que su ancho lo
   decide el ancestro posicionado más cercano. Toda esta cadena debe ser `static`
   para que el ancla acabe siendo .header-bottom (el tema la declara
   `position: relative`), que ocupa el ancho completo de la página.
   .header-bottom__row y .header-bottom__container también deben seguir siendo
   static: viven dentro del contenedor de 1440px y recortarían el desplegable.
   Si cualquiera de estos vuelve a `relative`, el desplegable pasa a medir lo que
   ese elemento: con el <li>, unos 90px, y el grid interior queda en tiras de 10px. */
.mod-megamenu,
.mod-megamenu__row,
.mod-megamenu__item {
  position: static;
}

/* PUENTE DE HOVER.
   El <a> del menú mide ~29px (texto + padding-block de 0.25rem) y va centrado
   verticalmente en una cabecera de 105px, así que entre su borde inferior y el
   desplegable queda una franja muerta de ~38px. Al cruzarla con el ratón el <li>
   perdía :hover y el submenú se cerraba a medio camino.
   Este pseudo-elemento prolonga el área sensible del enlace hasta el desplegable.
   Va en el <a> (que ya es position: relative) y no en el <li> —que debe seguir
   siendo static por el anclaje— y se limita al ancho del enlace, de modo que no
   tapa el resto de la cabecera mientras el submenú está abierto.
   ::after está ocupado por el subrayado del tema; de ahí ::before. */
.mod-megamenu__item.qv-has-megamenu > .mod-megamenu__link::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 3rem;
}

.mod-megamenu__item a span {
  transition: all 0.2s ease;
}

/*.mod-megamenu__item:hover a span {
  padding-bottom: 5px;
  margin-top: -5px;
}*/

/* El subrayado lo pinta el ::after declarado por el tema en custom-theme.css
   (.header-bottom #top-menu > li a::after, en scaleX(0) por defecto). El item
   activo solo tiene que revelarlo, igual que hacen ahí :hover y .current.
   El selector repite el prefijo .header-bottom #top-menu del tema a propósito:
   su regla base es (1,2,2), así que una versión corta como
   .mod-megamenu__item.active > .mod-megamenu__link::after (0,2,1) pierde y el
   scaleX(0) sigue ganando. */
.header-bottom #top-menu > li.mod-megamenu__item.active > a.mod-megamenu__link::after {
  transform: scaleX(1);
}

.mod-megamenu__item.active:hover a span {
  margin-top: 0;
}

.mod-megamenu__item:hover .mod-megamenu__dropdown,
.mod-megamenu__item.qv-has-megamenu.js-megamenu-open .mod-megamenu__dropdown {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
  background-color: var(--color-bg-primary);
  border: none;
  /* El respiro horizontal lo pone el .container interno, para que coincida con
     los márgenes laterales de la cabecera. */
  padding: 15px 0;
  box-shadow: 0 10px 30px rgba(21, 16, 22, 0.1) !important;
}

/* El desplegable ocupa el ancho completo de la página, así que su .container de
   Bootstrap no debe encajonar el contenido a su max-width: se alinea con los
   márgenes laterales de .header-bottom (40px, y 1rem por debajo de 992px). */
.mod-megamenu__dropdown > .container {
  max-width: none;
  width: 100%;
  padding-left: 40px;
  padding-right: 40px;
}

@media (max-width: 991px) {
  .mod-megamenu__dropdown > .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* ========== SUBMENÚS - Figma 2329-36032 (Destilados) ========== */
.mod-megamenu__dropdown.qv-mega-menu {
  background: var(--color-bg-primary);
  border-bottom: 1px solid var(--color-border);
}

.mod-megamenu__dropdown .qv-mega-menu__inner {
  display: grid;
  gap: 24px;
  align-items: flex-start;
  padding: 0;
}

.mod-megamenu__dropdown .qv-mega-menu__column {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
}

.mod-megamenu__dropdown .qv-mega-menu__column--wide {
  min-width: 360px;
}

.mod-megamenu__dropdown .qv-mega-menu__heading {
  font-family: var(--font-family-primary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  line-height: 1.3;
  color: var(--color-primary);
  margin: 0;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-border-dark);
  display: inline-block;
  align-self: flex-start;
}

.mod-megamenu__dropdown .qv-mega-menu__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mod-megamenu__dropdown .qv-mega-menu__list li {
    transition: all 0.2s ease;
}

.mod-megamenu__dropdown .qv-mega-menu__list li:hover {
  padding-bottom: 5px;
  margin-top: -5px;
}

.mod-megamenu__dropdown .qv-mega-menu__list li a {
  text-align: left;
  font-family: var(--font-family-ui);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-regular);
  line-height: 1.3;
  text-transform: none;
  /* !important: the theme's `.header-bottom #top-menu > li a` rule (id +
     2 classes) also matches these dropdown links and would win otherwise. */
  color: var(--color-primary) !important;
}

.mod-megamenu__dropdown .qv-mega-menu__link-all a {
  font-weight: var(--font-weight-medium);
  color: var(--color-primary);
  text-decoration: underline;
}

.mod-megamenu__dropdown .qv-mega-menu__link-all a:hover {
  color: var(--color-primary-light);
}

.mod-megamenu__dropdown .qv-mega-menu__dual-list {
  display: flex;
  justify-content: flex-start;
  gap: 24px;
}

.mod-megamenu__dropdown .qv-mega-menu__dual-list .qv-mega-menu__list {
  width: 50%;
}

/* Layout con producto (estilo Destilados) */
.mod-megamenu__dropdown .qv-mega-menu__inner--with-product {
  display: flex;
  align-items: stretch;
  gap: 0;
  justify-content: space-between;
}

.mod-megamenu__dropdown .qv-mega-menu__columns-group {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  flex: 1 1 auto;
}

.mod-megamenu__dropdown .qv-mega-menu__divider {
  width: 1px;
  background-color: var(--color-border);
  align-self: stretch;
  margin: 0 32px;
  flex-shrink: 0;
}

/* Tarjeta producto destacado */
.mod-megamenu__dropdown .qv-mega-menu__featured-product {
  display: flex;
  gap: 8px;
  align-items: center;
  flex: 0 0 421px;
  max-width: 421px;
}

.mod-megamenu__dropdown .qv-mega-menu__product-image {
  position: relative;
  width: 164px;
  height: 276px;
  flex-shrink: 0;
  overflow: hidden;
}

.mod-megamenu__dropdown .qv-mega-menu__product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mod-megamenu__dropdown .qv-mega-menu__product-info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1 1 0;
  min-height: 251px;
}

.mod-megamenu__dropdown .qv-mega-menu__product-name {
  font-family: var(--font-family-primary);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-body);
  letter-spacing: var(--letter-spacing-xl);
  color: var(--color-primary);
  margin: 8px 0 0;
}

.mod-megamenu__dropdown .qv-mega-menu__product-price {
  font-family: var(--font-family-primary);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-regular);
  line-height: 1.2;
  color: var(--color-primary);
  margin-top: auto;
}

.mod-megamenu__dropdown .qv-mega-menu__product-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}

.mod-megamenu__dropdown .qv-mega-menu__product-add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 38px;
  background-color: var(--color-primary);
  color: var(--color-text-inverse) !important;
  border: none;
  border-radius: 0;
  font-family: var(--font-family-ui);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-regular);
  line-height: 1.3;
  padding: 8px 16px;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.mod-megamenu__dropdown .qv-mega-menu__product-add-btn:hover {
  background-color: var(--color-primary);
  color: var(--color-text-inverse) !important;
  opacity: 0.9;
}

.mod-megamenu__dropdown .qv-mega-menu__product-add-btn .material-icons {
  font-size: 20px;
}

.mod-megamenu__dropdown .qv-mega-menu__product-add-btn:hover .material-icons {
  color: var(--color-text-inverse) !important;
}

/* --- Grid estándar (submenús sin producto) --- */
.mod-megamenu__grid,
.mod-megamenu__grid-fallback {
  display: grid;
  gap: 24px;
  align-items: start;
}

.mod-megamenu__grid-fallback {
  width: 100%;
  padding: 0;
}

/* Tarjetas de categoría siempre en UNA sola fila, haya las que haya.
   La plantilla escribe `grid-template-columns: repeat(N, 1fr)` inline a partir de
   submenu_columns (tope 6 en processItem), así que con 7 categorías la séptima
   caía a una segunda fila. `grid-auto-flow: column` genera una columna por hijo y
   `!important` es imprescindible para pisar el estilo inline.
   minmax(0, 1fr) —y no 1fr— evita que el ancho intrínseco de las imágenes
   desborde el contenedor. */
.mod-megamenu__grid-fallback:has(> .mod-megamenu__category-wrap) {
  grid-template-columns: none !important;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
}

/* Layout Destilados: columns-group ya definido arriba */
.mod-megamenu__inner--destilados .qv-mega-menu__columns-group {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  justify-content: flex-start;
  flex: 1 1 auto;
}

/* Botón Añadir como enlace (mismo estilo que botón del diseño) */
.mod-megamenu__product-wrap a.qv-mega-menu__product-add-btn {
  display: inline-flex;
  color: inherit;
}

/* Ocultar tag y header vacíos cuando el módulo no tiene categoría/tag del producto */
.mod-megamenu__product-tag-empty {
  display: none;
}
.mod-megamenu__product-wrap .qv-mega-menu__product-header:has(.mod-megamenu__product-tag-empty) {
  display: none;
}

.mod-megamenu__element .qv-mega-menu__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mod-megamenu__links.qv-mega-menu__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mod-megamenu__product-wrap .qv-mega-menu__product-info {
  padding: 12px 0 0;
}

.mod-megamenu__product-wrap .qv-mega-menu__product-name {
  display: block;
  font-weight: 600;
}

/* --- Mobile burger trigger — matches the account/cart icons in the header --- */
.mod-megamenu__burger .header-block__action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  text-decoration: none;
}

.mod-megamenu__burger .header-block__action-btn:hover,
.mod-megamenu__burger .header-block__action-btn:focus-visible {
  color: var(--color-primary);
}

.mod-megamenu__burger .header-block__icon {
  font-size: 25px;
  line-height: 1;
}

/* Burger in brown-800, as in Figma 4628:3554 */
.mod-megamenu__burger .header-block__action-btn,
.mod-megamenu__burger .header-block__action-btn:hover,
.mod-megamenu__burger .header-block__action-btn:focus-visible {
  color: #786552;
}

.mod-megamenu__burger svg.header-block__icon {
  display: block;
}

/* --- Account link inside the mobile offcanvas (mobile only, see .d-md-none) --- */
.mod-megamenu__account-link {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mod-megamenu__account-icon {
  flex-shrink: 0;
}

/* --- Mobile offcanvas base (Bootstrap 4 theme has no .offcanvas styles) --- */
.mod-megamenu__offcanvas {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1045;
  display: flex;
  flex-direction: column;
  width: min(360px, 88vw);
  background-color: var(--color-bg-primary);
  color: var(--color-primary);
  box-shadow: 12px 0 40px rgba(21, 16, 22, 0.22);
  visibility: hidden;
  transform: translateX(-100%);
  transition: transform 0.3s ease-in-out, visibility 0.3s;
  overflow-y: auto;
}

.mod-megamenu__offcanvas.show {
  visibility: visible;
  transform: none;
}

.offcanvas-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1020;
  width: 100vw;
  height: 100vh;
  background-color: var(--color-purple-900);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.offcanvas-backdrop.show {
  opacity: 0.55;
}

/* --- Mobile offcanvas & navigation --- */
.mod-megamenu__offcanvas-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 88px;
  padding: 0 16px;
  border-bottom: 1px solid var(--color-border);
}

.mod-megamenu__offcanvas-header a img {
  height: 32px;
  width: auto;
}

.mod-megamenu__offcanvas-header .btn-close {
  flex-shrink: 0;
  width: 25px;
  height: 25px;
  padding: 0;
  opacity: 1;
  background-size: 14px 14px;
}

.mod-megamenu__offcanvas-header .btn-close:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.mod-megamenu__back-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-family-ui);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-regular);
  color: var(--color-primary);
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
}

.mod-megamenu__back-btn .material-icons {
  font-size: 22px;
}

.mod-megamenu__mobile {
  position: relative;
  overflow: hidden;
  padding: 0;
}

.mod-megamenu__mobile-nav {
  transition: transform 0.3s ease, opacity 0.25s ease;
}

.mod-megamenu__mobile-nav.is-hidden {
  transform: translateX(-100%);
  opacity: 0;
  pointer-events: none;
  position: absolute;
  width: 100%;
}

.mod-megamenu__mobile-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mod-megamenu__mobile-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid var(--color-border-light);
}

.mod-megamenu__mobile-item:last-child {
  border-bottom: 0;
}

.mod-megamenu__mobile-link {
  flex: 1;
  display: block;
  padding: 15px 0;
  font-family: var(--font-family-ui);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-regular);
  line-height: 1.3;
  color: var(--color-primary);
  text-decoration: none;
}

.mod-megamenu__mobile-link:hover,
.mod-megamenu__mobile-link:active {
  color: var(--color-primary);
  opacity: 0.7;
}

.mod-megamenu__mobile-item.active > .mod-megamenu__mobile-link {
  font-weight: var(--font-weight-medium);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.mod-megamenu__link-highlight {
  font-weight: var(--font-weight-medium);
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.mod-megamenu__mobile-toggle {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 44px;
  flex-shrink: 0;
  color: var(--color-primary);
}

.mod-megamenu__mobile-toggle .material-icons {
  font-size: 22px;
}

/* Child nav: off-screen right by default, slides in */
.mod-megamenu__child-nav {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  min-height: 100%;
  /* Was `var(--yellow_400)` — a variable that is defined nowhere, so the
     declaration was invalid and the child panel rendered with no background
     on top of the parent list. */
  background: var(--color-bg-primary);
  z-index: 10;
  transform: translateX(100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s ease, opacity 0.25s ease;
}

.mod-megamenu__child-nav.is-open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
  position: relative;
}

.mod-megamenu__child-title {
  list-style: none;
  font-family: var(--font-family-primary);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-medium);
  line-height: var(--line-height-body);
  letter-spacing: var(--letter-spacing-xl);
  color: var(--color-primary);
  padding: 8px 16px 16px;
  margin: 0;
}

.mod-megamenu__section-title {
  list-style: none;
  font-family: var(--font-family-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-primary);
  padding: 16px 0 8px;
  border-bottom: 1px solid var(--color-border-dark);
  margin: 8px 0 0 16px;
  display: inline-block;
}

/* --- Offcanvas language selector ---
   The offcanvas trigger is `d-xl-none`, so it is reachable up to 1199.98px:
   the selectors have to be visible over that whole range, not just below 768px. */
.mod-megamenu__offcanvas-selectors {
  display: none;
}

@media (max-width: 1199.98px) {
  .mod-megamenu__offcanvas-selectors {
    display: flex;
    gap: 12px;
    padding: 16px 16px 8px;
  }

  .mod-megamenu__offcanvas-selectors .language-selector__wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .mod-megamenu__offcanvas-selectors .language-selector__label {
    font-family: var(--font-family-ui);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-regular);
    line-height: 1.3;
    color: var(--color-text-secondary);
  }

  .mod-megamenu__offcanvas-selectors select {
    width: auto;
    min-width: 96px;
    height: 32px;
    padding: 4px 26px 4px 10px;
    border-radius: 4px;
    border: 1px solid var(--color-border) !important;
    background-color: var(--color-bg-primary) !important;
    font-family: var(--font-family-ui);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-regular);
    color: var(--color-primary);
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='5' viewBox='0 0 9 5'%3E%3Cpath d='M1 1L4.5 4L8 1' stroke='%23322634' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 10px center !important;
    background-size: 9px 5px !important;
  }
}

/* ========== Barra de módulos integrada (idioma / buscador / usuario / carrito) ==========
   NOTA: .mod-megamenu__row NO puede ser `position: relative`. Rompía el anclaje del
   desplegable (ver "CADENA DE ANCLAJE DEL DESPLEGABLE" arriba). Los widgets de la barra
   que se posicionan (buscador, selector de idioma) se anclan a su propio wrapper, no
   a esta fila, así que no lo necesitan. */

/* ========== Logo centrado en la página (independiente de los elementos a cada lado) ========== */
/* El <li> del logo actúa como espaciador flexible: empuja el grupo de la izquierda
   hacia la izquierda y el de la derecha hacia la derecha. */
.mod-megamenu__item--logo-centered {
  margin: 0;
  flex: 1 1 auto;
  position: static; /* el ancla del logo absoluto es .mod-megamenu__row, no el <li> */
}

/* Cuando hay un logo centrado, el contenedor de referencia debe ser TODA la fila
   de la cabecera (.header-bottom__row, ancho completo de página, que incluye el menú
   y los 4 módulos de la barra), no solo la columna del megamenú. Para ello
   neutralizamos el posicionamiento de los wrappers intermedios del megamenú, de modo
   que el ancla del logo absoluto pase a ser .header-bottom__row (position: relative). */
.mod-megamenu--centered-logo,
.mod-megamenu--centered-logo .mod-megamenu__row {
  position: static;
}

/* El logo se fija al centro exacto de la fila de cabecera (centro de la página),
   contando el menú y los 4 módulos del final, independientemente de su ancho. */
.mod-megamenu__item--logo-centered .mod-megamenu__logo-link {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
}

/* Wrapper of the module/social items in the bar (widget, shop button or icon) */
.mod-megamenu__toolbar-item {
  display: flex;
  align-items: center;
}

.mod-megamenu__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  text-decoration: none;
}

.mod-megamenu__social-link .mm-social-icon {
  display: block;
  width: 20px;
  height: 20px;
}

@media (min-width: 1200px) {
  .mod-megamenu__desktop {
    flex-grow: 1;
  }
}

/* Below xl only the search item survives in the bar: its template carries the
   mobile trigger + offcanvas. Account and cart already have their own mobile
   instances in the theme header, and the language selector and the social icons
   live in the mobile menu offcanvas, so hide everything else to avoid duplicates. */
@media (max-width: 1199.98px) {
  .mod-megamenu__desktop {
    flex: 0 0 auto;
  }

  .mod-megamenu__bar > li:not(.mod-megamenu__item--module-search) {
    display: none;
  }

  /* Keep the burger leftmost — the toolbar precedes it in the markup. */
  .mod-megamenu__burger {
    order: -1;
  }
}

/* Mobile header (Figma 4628:3615): burger · logo ········ search.
   The toolbar precedes burger and logo in the markup, so it is ordered last and
   pushed to the right edge. */
@media (max-width: 767.98px) {
  /* Centred on the whole header: the megamenu wrappers are unpositioned, so the
     anchor is the full-width, position:relative .header-bottom (custom-theme.css). */
  .mod-megamenu__mobile-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    z-index: 1;
  }

  /* 184px as in Figma; shrinks on narrow phones (< 376px) so it never runs
     into the burger or the search/cart icons (96px reserved per side). */
  .mod-megamenu__mobile-logo img {
    display: block;
    width: min(184px, calc(100vw - 192px));
    height: auto;
    aspect-ratio: 184 / 46;
    object-fit: contain;
  }

  .mod-megamenu__desktop {
    order: 1;
    margin-left: auto;
  }
}


/* Hereda el color claro de la barra para iconos/textos de los widgets */
.mod-megamenu__toolbar-item,
.mod-megamenu__toolbar-item a,
.mod-megamenu__toolbar-item .material-icons,
.mod-megamenu__toolbar-item svg {
  color: var(--color-primary);
}

.mod-megamenu__toolbar-item svg {
  stroke: currentColor;
}

/* Social icons in the mobile offcanvas: a row below the links */
.mod-megamenu__mobile-social {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 0;
  padding: 20px 16px;
  list-style: none;
}

.mod-megamenu__mobile-social .mod-megamenu__social-link {
  color: var(--color-primary);
}

/* Botón "Tienda online" (item tipo módulo) */
.mod-megamenu__shop-btn {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding: 0.5rem 1.1rem;
  background-color: var(--color-primary);
  border: 1px solid var(--color-primary);
  border-radius: 0;
  color: var(--color-text-inverse) !important;
  font-family: var(--font-family-ui);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-regular);
  line-height: 1.3;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

/* Matches `.cd-shop-btn` in the theme — the hover previously set the text to
   --color-primary over a background that never changed (var(--Blanco) is
   undefined), so the label went purple-on-purple and vanished. */
.mod-megamenu__shop-btn:hover,
.mod-megamenu__shop-btn:focus-visible {
  color: var(--color-text-inverse) !important;
  background-color: var(--color-primary);
  opacity: 0.9;
  text-decoration: none;
}







@media (max-width: 767px) {
  .mod-megamenu {
    width: auto;
  }

  .mod-megamenu > .container {
    padding: 0;
  }
}

/* --- Elemento tipo categoría: tarjeta con imagen y título superpuesto --- */
.mod-megamenu__category-wrap {
  min-width: 0;
  max-width: 100%;
}
 
.mod-megamenu__category {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 4px;
  background-color: var(--color-bg-primary);
  border: 1px solid var(--color-border);
  text-decoration: none;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.mod-megamenu__category:hover,
.mod-megamenu__category:focus-visible {
  text-decoration: none;
}

.mod-megamenu__category-image {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.mod-megamenu__category:hover .mod-megamenu__category-image,
.mod-megamenu__category:focus-visible .mod-megamenu__category-image {
  transform: scale(1.04);
  opacity: 0.92;
}

/* Degradado sutil para que el texto blanco se lea también sobre fotos claras */
.mod-megamenu__category::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 55%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0));
  pointer-events: none;
}

.mod-megamenu__category-title {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 1;
  color: var(--color-text-inverse);
  font-family: var(--font-family-ui);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  line-height: 1.3;
}

@media (max-width: 1199px) {
  .mod-megamenu__category-title {
    font-size: var(--font-size-sm);
  }
}

/* ========== SUBMENÚ TIPO COLUMNA (submenu_type = column) ==========
   Excepción deliberada a la CADENA DE ANCLAJE: solo estos <li> pasan a
   `relative`, de modo que su desplegable se ancla al propio item en lugar de a
   .header-bottom, y se fija un ancho explícito para no heredar los ~90px del <li>.
   El tipo `full` (por defecto) no se ve afectado.
   Desbordamiento: el desplegable crece hacia la derecha desde el borde izquierdo
   del item; en los últimos items de la barra podría salirse del viewport. No hay
   forma fiable de detectarlo solo con CSS, así que si ocurre usa `full` en ese
   item o ajusta --mod-megamenu-column-width. */
@media (min-width: 1200px) {
  .mod-megamenu__item--submenu-column {
    --mod-megamenu-column-width: 280px;
    position: relative;
  }

  .mod-megamenu__item--submenu-column > .mod-megamenu__dropdown--column {
    left: 0;
    right: auto;
    width: var(--mod-megamenu-column-width);
  }

  .mod-megamenu__item--submenu-column > .mod-megamenu__dropdown--column > .container {
    padding-left: 24px;
    padding-right: 24px;
  }

  /* Una sola columna: !important para pisar cualquier estilo inline y la regla de
     categorías en fila (.mod-megamenu__grid-fallback:has(...)). */
  .mod-megamenu__item--submenu-column > .mod-megamenu__dropdown--column .qv-mega-menu__inner,
  .mod-megamenu__item--submenu-column > .mod-megamenu__dropdown--column .mod-megamenu__grid-fallback {
    display: grid;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-auto-flow: row;
    grid-auto-columns: auto;
  }

  .mod-megamenu__item--submenu-column > .mod-megamenu__dropdown--column .mod-megamenu__grid-fallback > * {
    grid-column: 1 / -1 !important;
    min-width: 0;
  }

  .mod-megamenu__item--submenu-column > .mod-megamenu__dropdown--column .qv-mega-menu__column--wide {
    min-width: 0;
  }

  .mod-megamenu__item--submenu-column > .mod-megamenu__dropdown--column .qv-mega-menu__list {
    column-count: auto !important;
  }

  .mod-megamenu__item--submenu-column > .mod-megamenu__dropdown--column .qv-mega-menu__dual-list {
    flex-direction: column;
    gap: 16px;
  }

  .mod-megamenu__item--submenu-column > .mod-megamenu__dropdown--column .qv-mega-menu__dual-list .qv-mega-menu__list {
    width: 100%;
  }

  /* El divisor vertical pasa a ser una línea horizontal entre elementos apilados */
  .mod-megamenu__item--submenu-column > .mod-megamenu__dropdown--column .qv-mega-menu__divider {
    width: auto;
    height: 1px;
    margin: 0;
  }

  .mod-megamenu__item--submenu-column > .mod-megamenu__dropdown--column .qv-mega-menu__featured-product,
  .mod-megamenu__item--submenu-column > .mod-megamenu__dropdown--column .mod-megamenu__category-wrap,
  .mod-megamenu__item--submenu-column > .mod-megamenu__dropdown--column .mod-megamenu__banner-wrap,
  .mod-megamenu__item--submenu-column > .mod-megamenu__dropdown--column .mod-megamenu__html {
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
  }

  .mod-megamenu__item--submenu-column > .mod-megamenu__dropdown--column .qv-mega-menu__product-image {
    width: 100%;
    height: auto;
    aspect-ratio: 164 / 276;
  }

  .mod-megamenu__item--submenu-column > .mod-megamenu__dropdown--column .qv-mega-menu__product-info {
    min-height: 0;
  }
}

/* ========== LA JOYA DESKTOP HEADER (clone of thisislajoya.com) ==========
   Mirrors the Squarespace header of www.thisislajoya.com so moving between
   both sites shows no jump. Values come from its compiled site.css:
   - full-width bar (header-width-full): no max-width, 3vw side padding
     (--pagePadding) around a 63px logo. Its header is transparent over the
     Jara page background, hence Jara here;
   - vertical padding is 16px, as in Figma "Menú" 4652:14392 (gap between the
     announcement bar and the logo), instead of the reference's .1vw;
   - layout nav-right: logo ··· links (1.6vw from logo, 1.7vw between them);
   - links: Drago Light, line-height 1.3. Squarespace sets html{font-size:20px},
     so its min(1rem - .12vw, .9rem) is written here in px: 18px at 1440px;
   - actions: 20x20 icons, 1.6vw before the first one, 1.7vw between them.
   Scoped to xl so the existing tablet/mobile header is untouched. */
@media (min-width: 1200px) {
  .mod-megamenu {
    --lj-header-gutter: 3vw;
    --lj-header-nav-gap: 1.7vw;
    --lj-header-nav-offset: 1.6vw;
    --lj-header-logo-height: 63px;
    --lj-header-icon-size: 20px;
    --lj-header-font-size: min(calc(20px - 0.12vw), 18px);
    /* Reference language picker: 20px globe + 8px + "Español" (3.15em) +
       chevron (0.35em + 1em) -> 109px at 18px, scales with the nav font */
    --lj-header-pair-width: calc(28px + 4.5 * var(--lj-header-font-size));

    background-color: var(--lj-color-jara);
  }

  .mod-megamenu > .container {
    max-width: none;
    padding-inline: var(--lj-header-gutter);
    padding-block: 16px;
  }

  /* The logo item does not stretch the row by itself (h-100 chain), so the
     row reserves the logo height explicitly. */
  .mod-megamenu__row {
    min-height: var(--lj-header-logo-height);
  }

  /* --- Nav links --- */
  .mod-megamenu__bar {
    justify-content: flex-start;
    gap: var(--lj-header-nav-gap);
  }

  .mod-megamenu__bar > li > a,
  .mod-megamenu .main-menu__tree__link,
  .mod-megamenu__bar > li:first-child > a,
  .mod-megamenu__bar > li:last-child > a {
    height: 44px;
    margin: 0;
    padding: 0;
    color: var(--lj-color-black);
    font-family: var(--lj-font-display);
    font-size: var(--lj-header-font-size);
    font-weight: 300;
    line-height: 1.3;
    letter-spacing: 0;
  }

  .mod-megamenu__bar > li > a:hover,
  .mod-megamenu .main-menu__tree__link:hover {
    color: var(--lj-color-black);
  }

  /* Active item: underlined, as on thisislajoya.com (no hover animation there) */
  .mod-megamenu__bar > li.active > .mod-megamenu__link {
    text-decoration: underline;
    text-underline-position: from-font;
  }

  /* --- Logo: leading item, pushes the links to the right --- */
  .mod-megamenu__bar > .mod-megamenu__item--logo:not(.mod-megamenu__item--logo-centered):first-child {
    margin: 0 auto 0 0;
    padding: 0 var(--lj-header-nav-offset) 0 0;
  }

  /* height: auto undoes the 44px link height, which also matches the logo link
     because the logo is the bar's first <li>. */
  .mod-megamenu__item--logo:not(.mod-megamenu__item--logo-centered) .mod-megamenu__logo-link {
    display: block;
    height: auto;
    line-height: 0;
  }

  .mod-megamenu__item--logo:not(.mod-megamenu__item--logo-centered) .mod-megamenu__logo-img {
    display: block;
    width: auto;
    height: var(--lj-header-logo-height);
    max-width: 100%;
    object-fit: contain;
  }

  /* --- Actions: icon items (modules, social) mixed with the links ---
     Every item, text or icon, is separated by the same bar gap. */
  .mod-megamenu__toolbar-item,
  .mod-megamenu__toolbar-item a,
  .mod-megamenu__toolbar-item .material-icons {
    color: var(--lj-color-black);
  }

  .mod-megamenu__social-link {
    width: var(--lj-header-icon-size);
    height: 44px;
  }

  /* Width follows the 20px icon so the visual spacing matches the reference;
     the 44px height keeps a comfortable vertical hit area. */
  .mod-megamenu__toolbar-item .header-block__action-btn {
    position: relative;
    justify-content: center;
    width: auto;
    min-width: var(--lj-header-icon-size);
    height: 44px;
    padding: 0;
    border-radius: 0;
    color: var(--lj-color-black);
  }

  /* Icon-only buttons: visually hide the "Sign in" / customer name / "Cart"
     labels and the dropdown caret. `display: none` cannot be used: the labels
     carry layered `d-*-inline !important` utilities, which beat unlayered
     !important rules. */
  .mod-megamenu__toolbar-item .header-block__title {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .mod-megamenu__toolbar-item--user .dropdown-toggle::after {
    display: none;
  }

  /* The widgets print account_circle / shopping_cart glyphs; the design uses
     the `person` and `local_mall` ligatures of the same Material Icons font. */
  .mod-megamenu__toolbar-item--user .header-block__icon,
  .mod-megamenu__toolbar-item--cart .header-block__icon {
    width: var(--lj-header-icon-size);
    height: var(--lj-header-icon-size);
    font-size: 0;
    color: var(--lj-color-black);
  }

  .mod-megamenu__toolbar-item--user .header-block__icon::before,
  .mod-megamenu__toolbar-item--cart .header-block__icon::before {
    display: block;
    font-size: var(--lj-header-icon-size);
    line-height: 1;
  }

  .mod-megamenu__toolbar-item--user .header-block__icon::before {
    content: 'person';
  }

  /* Cart uses the custom SVG (--lj-icon-cart, defined in the theme) as a mask */
  .mod-megamenu__toolbar-item--cart .header-block__icon::before {
    content: '';
    width: var(--lj-header-icon-size);
    height: var(--lj-header-icon-size);
    background-color: currentColor;
    -webkit-mask: var(--lj-icon-cart) center / contain no-repeat;
    mask: var(--lj-icon-cart) center / contain no-repeat;
  }

  /* Cart count: not in the design; kept as a small corner badge, hidden when empty */
  .mod-megamenu__toolbar-item .header-block__badge {
    position: absolute;
    top: 4px;
    right: -10px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    font-size: 10px;
    background: var(--lj-color-black);
    color: var(--lj-color-jara);
  }

  .mod-megamenu__toolbar-item .cart-preview.inactive .header-block__badge {
    display: none;
  }

  /* Language: native <select> restyled as "Español" + arrow_drop_down */
  .mod-megamenu__toolbar-item--lang .ps-languageselector {
    position: relative;
    display: flex;
    align-items: center;
    height: 44px;
  }

  .mod-megamenu__toolbar-item--lang .form-select {
    width: auto;
    height: 44px;
    padding: 0 24px 0 0;
    border: 0;
    border-radius: 0;
    background: transparent none;
    box-shadow: none;
    color: var(--lj-color-black);
    font-family: var(--lj-font-display);
    font-size: var(--lj-header-font-size);
    font-weight: 300;
    line-height: 1.3;
    cursor: pointer;
  }

  .mod-megamenu__toolbar-item--lang .form-select:focus-visible {
    outline: 2px solid var(--lj-color-black);
    outline-offset: 2px;
  }

  .mod-megamenu__toolbar-item--lang .ps-languageselector::after {
    content: 'arrow_drop_down';
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    font-family: 'Material Icons';
    font-feature-settings: 'liga';
    font-size: 24px;
    font-style: normal;
    font-weight: 400;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    white-space: nowrap;
    color: var(--lj-color-black);
    pointer-events: none;
    -webkit-font-smoothing: antialiased;
  }
}

/* ========== ETIQUETA STICKY (cuenta / carrito / buscador / idioma) ==========
   Prototype: prototypes/etiqueta-cuenta-carrito.html. A clothing label sewn to the
   right edge of the screen; each strip button lifts the flap open towards the left.
   It renders inside the sticky Hummingbird header (z-index 1021, its own stacking
   context), so it stays above the page and below Bootstrap modals/offcanvas. */
.lj-tag {
  /* Desktop header is ~66px tall: the label hangs 30px below it */
  --lj-tag-width: 56px;
  --lj-tag-top: 96px;
  --lj-tag-radius: 6px;
  --lj-tag-bg: var(--lj-color-oliva, #111010);
  --lj-tag-ink: var(--lj-color-jara, #FFC758);
  --lj-tag-text: var(--lj-color-encalado, #FBFBFB);
  --lj-tag-stitch: rgba(255, 199, 88, .55);
  --lj-tag-panel-width: min(340px, calc(100vw - var(--lj-tag-width) - 16px));
  --lj-tag-lift-duration: 420ms;
  --lj-tag-lift-ease: cubic-bezier(.2, .8, .2, 1);

  position: fixed;
  top: var(--lj-tag-top);
  right: 0;
  z-index: 1030;
  display: flex;
  align-items: flex-start;
  font-family: var(--lj-font-display, serif);
  font-weight: 300;
}

/* Sewn strip: the part that stays attached to the screen edge */
.lj-tag__strip {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  width: var(--lj-tag-width);
  padding: 10px 10px 10px 0;
  border-radius: var(--lj-tag-radius) 0 0 var(--lj-tag-radius);
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 3px),
    var(--lj-tag-bg);
  box-shadow: -2px 3px 10px rgba(17, 16, 16, .18);
  transition: border-radius var(--lj-tag-lift-duration) var(--lj-tag-lift-ease), box-shadow var(--lj-tag-lift-duration) var(--lj-tag-lift-ease);
}

/* Stitching along the sewn (right) edge */
.lj-tag__strip::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 5px;
  bottom: 6px;
  border-right: 1.5px dashed var(--lj-tag-stitch);
  pointer-events: none;
}

.lj-tag__btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 48px;
  margin: 0;
  padding: 0 0 0 10px;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--lj-tag-ink);
  cursor: pointer;
}

/* Stitched divider between buttons */
.lj-tag__btn + .lj-tag__btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 18px;
  right: 8px;
  border-top: 1.5px dashed var(--lj-tag-stitch);
}

.lj-tag__btn svg { width: 22px; height: 22px; fill: currentColor; transition: transform .2s ease; }
.lj-tag__btn:hover svg { transform: scale(1.1); }

.lj-tag__btn:focus-visible {
  outline: 2px solid var(--lj-tag-ink);
  outline-offset: -4px;
  border-radius: 4px;
}

.lj-tag__btn[aria-expanded="true"] { color: var(--lj-tag-text); }

/* Social and "Tienda online" items are plain links in the strip (no flap) */
a.lj-tag__btn,
a.lj-tag__btn:hover { color: var(--lj-tag-ink); text-decoration: none; }
.lj-tag a.lj-tag__btn:focus-visible { outline-offset: -4px; }
.lj-tag__btn svg.mm-social-icon { fill: none; }

.lj-tag__badge {
  position: absolute;
  top: 7px;
  right: 6px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--lj-tag-ink);
  color: var(--lj-tag-bg);
  font: 500 10px/16px var(--lj-font-display, serif);
  text-align: center;
}

.lj-tag__badge[hidden] { display: none; }

/* Flap: hinged on the strip's left edge, lifts open towards the left */
.lj-tag__flap {
  position: absolute;
  top: 0;
  right: calc(var(--lj-tag-width) - 1px);
  z-index: 1;
  width: var(--lj-tag-panel-width);
  min-height: 100%;
  max-height: calc(100vh - var(--lj-tag-top) - 16px);
  max-height: calc(100dvh - var(--lj-tag-top) - 16px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 24px 24px 24px 28px;
  border-radius: var(--lj-tag-radius) 0 0 var(--lj-tag-radius);
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 3px),
    var(--lj-tag-bg);
  color: var(--lj-tag-text);
  box-shadow: -10px 14px 30px rgba(17, 16, 16, .28);
  transform-origin: right center;
  transform: perspective(1200px) rotateY(-92deg);
  opacity: 0;
  visibility: hidden;
  transition:
    transform var(--lj-tag-lift-duration) var(--lj-tag-lift-ease),
    opacity calc(var(--lj-tag-lift-duration) * .6) ease,
    visibility 0s linear var(--lj-tag-lift-duration);
}

.lj-tag.is-open .lj-tag__flap {
  transform: perspective(1200px) rotateY(0);
  opacity: 1;
  visibility: visible;
  transition:
    transform var(--lj-tag-lift-duration) var(--lj-tag-lift-ease),
    opacity calc(var(--lj-tag-lift-duration) * .6) ease,
    visibility 0s;
}

/* While open, strip and flap read as one wider label */
.lj-tag.is-open .lj-tag__strip {
  border-radius: 0;
  box-shadow: none;
}

.lj-tag__panel[hidden],
.lj-tag [hidden] { display: none; }

.lj-tag__title {
  margin: 0 0 18px;
  color: var(--lj-tag-ink);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.3;
  text-transform: uppercase;
}

.lj-tag__links { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0; list-style: none; }

.lj-tag__links a {
  color: inherit;
  font-size: 18px;
  line-height: 1.3;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.lj-tag__links a:hover,
.lj-tag__links a:focus-visible,
.lj-tag__links a[aria-current] { color: var(--lj-tag-ink); }

.lj-tag a:focus-visible,
.lj-tag input:focus-visible {
  outline: 2px solid var(--lj-tag-ink);
  outline-offset: 2px;
}

/* Mini cart */
.lj-tag__cart-line {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px dashed var(--lj-tag-stitch);
  font-size: 16px;
  line-height: 1.3;
}

.lj-tag__cart-thumb {
  display: block;
  width: 56px;
  height: 56px;
  object-fit: cover;
  background: var(--lj-color-joya, #FFA300);
}

.lj-tag__cart-qty { display: block; opacity: .7; font-size: 14px; }

.lj-tag__cart-empty {
  margin: 0 0 20px;
  font-size: 16px;
  line-height: 1.3;
}

.lj-tag__cart-total {
  display: flex;
  justify-content: space-between;
  margin: 16px 0 20px;
  font-size: 18px;
}

.lj-tag__cta {
  display: block;
  width: 100%;
  padding: 16px 20px;
  border: 0;
  border-radius: 0;
  background: var(--lj-tag-ink);
  color: var(--lj-tag-bg);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
}

.lj-tag__cta:hover,
.lj-tag__cta:focus-visible { color: var(--lj-tag-bg); text-decoration: none; }

.lj-tag__cta + .lj-tag__cta { margin-top: 8px; }

.lj-tag__cta--ghost,
.lj-tag__cta--ghost:hover,
.lj-tag__cta--ghost:focus-visible {
  background: transparent;
  color: var(--lj-tag-ink);
  box-shadow: inset 0 0 0 1px var(--lj-tag-ink);
}

/* Search panel */
.lj-tag__search { display: flex; flex-direction: column; gap: 12px; margin: 0; }

.lj-tag__search-input {
  width: 100%;
  padding: 12px 0;
  border: 0;
  border-bottom: 1px dashed var(--lj-tag-stitch);
  border-radius: 0;
  background: transparent;
  color: var(--lj-tag-text);
  font-family: inherit;
  font-size: 18px;
  line-height: 1.3;
}

.lj-tag__search-input::placeholder { color: var(--lj-tag-text); opacity: .6; }

@media (max-width: 767.98px) {
  .lj-tag { --lj-tag-width: 48px; --lj-tag-top: 84px; }
}

@media (prefers-reduced-motion: reduce) {
  .lj-tag__strip,
  .lj-tag__btn svg,
  .lj-tag__flap,
  .lj-tag.is-open .lj-tag__flap { transition: none; transform: none; }
}
