/* Site header, "Línea": a thin wine strip and one paper bar.
   Content lives in Elementor widgets (menu, cart, login); this file owns layout and finish. */
.ryl-header {
  --ryl-ink: #282522;
  --ryl-muted: #655e58;
  --ryl-wine: #8f2c27;
  --ryl-wine-deep: #6f211d;
  --ryl-wine-night: #3d1412;
  --ryl-paper: #fffdfa;
  --ryl-line: #dfd9d3;
  --ryl-display: "Market Deco", Poppins, sans-serif;
  --ryl-body: Poppins, system-ui, sans-serif;
  --ryl-ease: cubic-bezier(.16, 1, .3, 1);
  --ryl-gutter: clamp(16px, 3vw, 40px);
  --ryl-max: 1360px;
  --ryl-bar-h: 84px;
}
/* Pages sized against the old 230px header now get the space back */
body:has(.ryl-header-bar) { --ryl-header-h: 124px; }

.elementor .elementor-element.e-con.ryl-header {
  --padding-top: 0px; --padding-bottom: 0px;
  --padding-left: max(var(--ryl-gutter), calc((100% - var(--ryl-max)) / 2));
  --padding-right: max(var(--ryl-gutter), calc((100% - var(--ryl-max)) / 2));
  --margin-top: 0px; --margin-bottom: 0px;
  --gap: 0px 24px; --row-gap: 0px; --column-gap: 24px;
  --width: 100%; --content-width: 100%; --min-height: 0px;
  --flex-wrap: nowrap;
  max-width: none;
}
.ryl-header .elementor-widget:not(:last-child) { margin-block-end: 0; }
.ryl-header a:focus-visible,
.ryl-header [role="button"]:focus-visible { outline: 2px solid var(--ryl-wine); outline-offset: 3px; border-radius: 4px; }

/* Strip */
.elementor .elementor-element.e-con.ryl-header-strip {
  --display: flex; --flex-direction: row; --align-items: center; --justify-content: space-between;
  min-height: 38px;
  background: var(--ryl-wine);
  color: #fff;
  font-family: var(--ryl-body);
  font-size: 13px;
  line-height: 1.3;
}
.ryl-header-strip > .elementor-widget { width: auto; max-width: 100%; }
.ryl-header-strip .elementor-widget-text-editor { color: #fff; font-family: var(--ryl-body); font-size: 13px; }
.ryl-header-strip .elementor-widget-text-editor p { margin: 0; }
.ryl-header-strip .elementor-icon-list-items { display: flex; gap: 26px; margin: 0; padding: 0; list-style: none; }
.ryl-header-strip .elementor-icon-list-item { margin: 0; padding: 0; }
.ryl-header-strip .elementor-icon-list-item::after { display: none; }
.ryl-header-strip .elementor-icon-list-item a { display: inline-flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; }
.ryl-header-strip .elementor-icon-list-item a:hover .elementor-icon-list-text { text-decoration: underline; text-underline-offset: 3px; }
.ryl-header-strip .elementor-icon-list-icon { display: inline-flex; }
.ryl-header-strip .elementor-icon-list-icon :is(svg, i) { width: 15px; height: 15px; font-size: 15px; fill: #fff; color: #fff; }
.ryl-header-strip .elementor-icon-list-text { padding: 0; color: #fff; font-family: var(--ryl-body); font-size: 13px; }
.ryl-header-strip a:focus-visible { outline-color: #fff; }

/* Bar */
.elementor .elementor-element.e-con.ryl-header-bar {
  --display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "logo nav tools";
  align-items: center;
  min-height: var(--ryl-bar-h);
  z-index: 60;
  border-bottom: 1px solid var(--ryl-line);
  /* Solid on purpose: a backdrop filter would trap the cart panel inside the bar */
  background: var(--ryl-paper);
  color: var(--ryl-ink);
  transition: min-height 300ms var(--ryl-ease), box-shadow 300ms var(--ryl-ease);
}
.elementor .elementor-element.e-con.ryl-header-bar.elementor-sticky--effects { --ryl-bar-h: 66px; box-shadow: 0 10px 30px -18px rgba(40, 37, 34, .45); }
.ryl-header-bar > .elementor-widget { width: auto; max-width: 100%; }
.ryl-header__logo { grid-area: logo; }
.ryl-header__logo a { display: block; }
.ryl-header__logo img { display: block; width: auto; max-width: none; height: 72px; border-radius: 0; transition: height 300ms var(--ryl-ease); }
.ryl-header-bar.elementor-sticky--effects .ryl-header__logo img { height: 56px; }

.ryl-header-bar > .ryl-header__nav { grid-area: nav; position: static; width: 100%; }
.ryl-header__nav > .elementor-widget-container { position: static; }
.ryl-header__nav .elementor-nav-menu--main .elementor-nav-menu { display: flex; justify-content: center; gap: clamp(14px, 2vw, 34px); }
.ryl-header__nav .elementor-nav-menu--main .elementor-item {
  position: relative;
  padding: 10px 0;
  color: var(--ryl-ink);
  fill: var(--ryl-ink);
  font-family: var(--ryl-display);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: .06em;
  text-transform: none;
  white-space: nowrap;
  /* The underline is a background, not a transformed layer: a transform here re-rasterises the text and makes it shake */
  background: linear-gradient(currentColor, currentColor) no-repeat left bottom 4px / 0 1px;
  transition: color 200ms var(--ryl-ease), background-size 300ms var(--ryl-ease);
}
.ryl-header__nav .elementor-nav-menu--main .elementor-item::before,
.ryl-header__nav .elementor-nav-menu--main .elementor-item::after { display: none; }
.ryl-header__nav .elementor-nav-menu--main .elementor-item:hover,
.ryl-header__nav .elementor-nav-menu--main .elementor-item:focus,
.ryl-header__nav .elementor-nav-menu--main .elementor-item.highlighted,
.ryl-header__nav .elementor-nav-menu--main .elementor-item.elementor-item-active { color: var(--ryl-wine); fill: var(--ryl-wine); background-color: transparent; background-size: 100% 1px; }
/* Elementor restores its own padding on the hovered link, which widens it and pushes the others */
.ryl-header__nav .elementor-nav-menu--main .elementor-nav-menu a.elementor-item:is(:hover, :focus, .highlighted, .elementor-item-active) { padding: 10px 0; line-height: 1.2; }

/* Account and cart */
.elementor .elementor-element.e-con.ryl-header__tools {
  grid-area: tools;
  --display: flex; --flex-direction: row; --align-items: center; --justify-content: flex-end;
  --padding-left: 0px; --padding-right: 0px;
  --gap: 0px 10px; --column-gap: 10px;
  width: auto;
}
.ryl-header__tools > .elementor-widget { width: auto; max-width: none; }
.ryl-header__account a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 46px;
  min-height: 46px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--ryl-ink);
  font-family: var(--ryl-body);
  font-size: 14px;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 200ms var(--ryl-ease), color 200ms var(--ryl-ease);
}
.ryl-header__account a::before {
  content: "";
  flex: none;
  width: 20px;
  height: 20px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8.2' r='3.7'/%3E%3Cpath d='M4.5 20c1.2-3.9 4-5.8 7.5-5.8s6.3 1.9 7.5 5.8'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8.2' r='3.7'/%3E%3Cpath d='M4.5 20c1.2-3.9 4-5.8 7.5-5.8s6.3 1.9 7.5 5.8'/%3E%3C/svg%3E") center / contain no-repeat;
}
.ryl-header__account a:hover { background: var(--ryl-ink); color: #fff; }
.ryl-header__cart .elementor-menu-cart__toggle .elementor-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 46px;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid var(--ryl-wine);
  border-radius: 999px;
  background: var(--ryl-wine);
  color: #fff;
  fill: #fff;
  font-family: var(--ryl-body);
  font-size: 14px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  box-shadow: none;
  transition: background-color 200ms var(--ryl-ease), border-color 200ms var(--ryl-ease);
}
.ryl-header__cart .elementor-menu-cart__toggle .elementor-button:hover { border-color: var(--ryl-wine-deep); background: var(--ryl-wine-deep); color: #fff; }
.ryl-header__cart .elementor-menu-cart__toggle .elementor-button-text { color: inherit; }
.ryl-header__cart .elementor-menu-cart__toggle .elementor-button-icon { color: #fff; fill: #fff; font-size: 18px; }
.ryl-header__cart .elementor-menu-cart__toggle .elementor-button-icon svg { width: 18px; height: 18px; fill: #fff; }

/* Burger and full-height menu */
.ryl-header__nav .elementor-menu-toggle { display: none; }

@media (max-width: 1024px) {
  .ryl-header { --ryl-bar-h: 64px; }
  body:has(.ryl-header-bar) { --ryl-header-h: 97px; }
  .elementor .elementor-element.e-con.ryl-header-strip { --justify-content: center; min-height: 32px; font-size: 12px; text-align: center; }
  .ryl-header-strip .elementor-widget-text-editor { font-size: 12px; }
  .ryl-header-strip .elementor-widget-icon-list { display: none; }
  .elementor .elementor-element.e-con.ryl-header-bar { grid-template-columns: 46px minmax(0, 1fr) auto; grid-template-areas: "nav logo tools"; --gap: 0px 8px; --column-gap: 8px; }
  .elementor .elementor-element.e-con.ryl-header-bar.elementor-sticky--effects { --ryl-bar-h: 60px; }
  .ryl-header__logo { justify-self: center; }
  .ryl-header__logo img { height: 54px; }
  .ryl-header-bar.elementor-sticky--effects .ryl-header__logo img { height: 50px; }
  .ryl-header__nav .elementor-nav-menu--main { display: none; }
  .ryl-header__nav .elementor-menu-toggle { display: grid; place-items: center; width: 46px; height: 46px; margin: 0; padding: 0; border-radius: 50%; background: none; color: var(--ryl-ink); cursor: pointer; }
  .ryl-header__nav .elementor-menu-toggle :is(svg, i) { width: 24px; height: 24px; font-size: 24px; fill: currentColor; color: currentColor; }
  .ryl-header__nav .elementor-menu-toggle:hover { background: rgba(40, 37, 34, .08); }
  .ryl-header__nav nav.elementor-nav-menu--dropdown.elementor-nav-menu__container {
    position: absolute;
    top: 100% !important;
    left: 0 !important;
    width: 100% !important;
    max-height: none;
    height: calc(100dvh - var(--ryl-bar-h));
    margin: 0;
    padding: 12px var(--ryl-gutter) 40px;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--ryl-wine-night);
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform 420ms var(--ryl-ease), visibility 0s 420ms;
  }
  .ryl-header__nav .elementor-menu-toggle.elementor-active + nav.elementor-nav-menu--dropdown.elementor-nav-menu__container { transform: none; visibility: visible; transition: transform 420ms var(--ryl-ease); }
  .ryl-header__nav .elementor-nav-menu--dropdown .elementor-nav-menu { display: block; }
  .ryl-header__nav .elementor-nav-menu--dropdown .elementor-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 60px;
    padding: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .14);
    background: none;
    color: #fff;
    font-family: var(--ryl-display);
    font-size: 24px;
    font-weight: 400;
    letter-spacing: .04em;
    text-transform: none;
  }
  .ryl-header__nav .elementor-nav-menu--dropdown .elementor-item::after {
    content: "";
    flex: none;
    /* RYL-054: los punteros de Elementor también usan ::after (absoluto a la izquierda y oculto salvo el activo) */
    position: static !important;
    inset: auto !important;
    opacity: 1 !important;
    transform: none !important;
    margin: 0 0 0 16px;
    width: 20px;
    height: 20px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h15m-6-6 6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h15m-6-6 6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
  }
  .ryl-header__nav .elementor-nav-menu--dropdown .elementor-item:hover,
  .ryl-header__nav .elementor-nav-menu--dropdown .elementor-item.elementor-item-active { background: none; color: #f3c9c4; }
  .ryl-header__nav .elementor-nav-menu--dropdown a:focus-visible { outline-color: #fff; }
  .elementor .elementor-element.e-con.ryl-header__tools { --gap: 0px 4px; --column-gap: 4px; }
  .ryl-header__account a { padding: 0; font-size: 0; gap: 0; }
  .ryl-header__cart .elementor-menu-cart__toggle .elementor-button { padding: 0; border-color: transparent; background: none; color: var(--ryl-wine); fill: var(--ryl-wine); }
  .ryl-header__cart .elementor-menu-cart__toggle .elementor-button:hover { background: rgba(143, 44, 39, .1); border-color: transparent; color: var(--ryl-wine); }
  .ryl-header__cart .elementor-menu-cart__toggle .elementor-button-text { display: none; }
  .ryl-header__cart .elementor-menu-cart__toggle .elementor-button-icon,
  .ryl-header__cart .elementor-menu-cart__toggle .elementor-button-icon svg { color: var(--ryl-wine); fill: var(--ryl-wine); }
}
@media (prefers-reduced-motion: reduce) {
  .ryl-header *, .ryl-header *::before, .ryl-header *::after { transition-duration: .01ms !important; }
}
.ryl-header__nav .elementor-nav-menu--main .elementor-nav-menu { flex-wrap: nowrap; }
/* Small laptops: the menu keeps one line, the account shows its icon only */
@media (min-width: 1025px) and (max-width: 1240px) {
  .ryl-header__nav .elementor-nav-menu--main .elementor-nav-menu { gap: 16px; }
  .ryl-header__nav .elementor-nav-menu--main .elementor-item { font-size: 14px; letter-spacing: .04em; }
  .ryl-header__logo img { height: 64px; }
  .ryl-header__account a { padding: 0; font-size: 0; gap: 0; }
  .elementor .elementor-element.e-con.ryl-header { --gap: 0px 16px; --column-gap: 16px; }
}
@media (max-width: 360px) {
  .ryl-header__logo img,
  .ryl-header-bar.elementor-sticky--effects .ryl-header__logo img { height: 42px; }
  .elementor .elementor-element.e-con.ryl-header-strip { font-size: 11px; }
  .ryl-header-strip .elementor-widget-text-editor { font-size: 11px; }
}

/* The site forces black bold prices everywhere; inside the cart button the amount follows the button */
.ryl-header__cart .elementor-menu-cart__toggle .elementor-button :is(.amount, bdi, .woocommerce-Price-amount, .woocommerce-Price-currencySymbol) { color: inherit !important; font-weight: inherit !important; }

/* Toda la web: el kit de Elementor fija los enlaces a 16 px aunque el texto sea más pequeño.
   Dentro de un texto corrido, el enlace mide lo mismo que el texto que lo rodea. */
[class*="elementor-kit-"] :is(p, label, small, summary, td, figcaption, blockquote) a:not(.button, .elementor-button, [class*="btn"]) { font-size: inherit; }

/* RYL-057 · Reseñas Woo (pie de página). En móvil el plugin usa grid-template-columns: 1fr y el
   carrusel ensancha la columna a ~4000 px: el resumen «Excelente» queda fuera de pantalla y deja un
   hueco blanco. Se deja aquí porque este archivo cambia de versión al editarlo; el plugin fija ?ver=. */
@media (max-width: 600px) {
  .mrg-reviews-widget .mrg-spotlight-shell { grid-template-columns: minmax(0, 1fr); }
  .mrg-reviews-widget .mrg-spotlight-shell > * { min-width: 0; }
}
