/* ═══════════════════════════════════════════════════════════════════════
   vinoreahome — barra superior, cabecera, megamenú de texto, rejilla de
   destacados y filas de producto de la home. Diseño: mockup "Home Vinorea".
   Colores: usa --bs-primary del tema (#ad1457) y el gris oscuro #2b2b2b.
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  --vnh-dark: #2b2b2b;
  --vnh-grey: #515151;
  --vnh-line: #e7e7e7;
  --vnh-accent: var(--bs-primary, #ad1457);
}

/* ── Barra superior (header-top del tema) ─────────────────────────────── */
.header-top {
  background: var(--vnh-dark);
  color: #fff;
  font-size: 12px;
}
.header-top .row { min-height: 36px; align-items: center; }
.header-top a { color: #fff; }
.header-top a:hover { color: #fff; text-decoration: underline; }
.vnh-topbar__left { display: flex; align-items: center; gap: 14px; }
.vnh-topbar__blog {
  background: var(--vnh-accent);
  color: #fff !important;
  font-family: Montserrat, "Open Sans", sans-serif;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 3px;
  text-decoration: none !important;
}
.vnh-topbar__claim { opacity: .85; }
.header-top__right { display: flex; justify-content: flex-end; align-items: center; gap: 18px; }
.vnh-topbar__wishlist { display: inline-flex; align-items: center; gap: 6px; }
/* Selectores de idioma/moneda si quedaran en la barra */
.header-top .header-block { color: #fff; }

/* ── Cabecera principal: buscador | logo centrado | cuenta + carrito ─── */
.header-bottom { border-bottom: 1px solid var(--vnh-line); }
.header-bottom__row { position: relative; min-height: 88px; }
.header-bottom__logo img.logo { max-height: 64px; width: auto; }

@media (min-width: 1200px) {
  .header-bottom__row { min-height: 104px; }
  .header-bottom__logo img.logo { max-height: 84px; }
  #_desktop_ps_customersignin, #_desktop_ps_shoppingcart { display: flex; align-items: center; padding-left: 20px; }
}

/* Reglas que pelean con utilidades del tema (.d-xl-block, .ms-auto, .order-2, .col-xl…).
   El tema declara esas utilidades dentro de @layer; un !important de fuera de capa pierde
   frente a uno de capa, así que estas reglas van en la PRIMERA capa declarada por el tema
   ("vendors"), cuyos !important prevalecen sobre los de todas las demás capas. */
@layer vendors {
  @media (min-width: 1200px) {
    /* El menú del tema no se usa en escritorio: lo sustituye .vnh-menu */
    .ps-mainmenu--desktop .ps-mainmenu__desktop { display: none !important; }
    .ps-mainmenu--desktop { flex: 0 0 auto !important; width: auto !important; }
    /* Fila: asistente/buscador a la izquierda · logo centrado · cuenta y carrito a la derecha */
    .header-bottom__row { position: relative !important; flex-wrap: nowrap !important; }
    .header-bottom__logo {
      position: absolute !important;
      left: 50% !important;
      top: 50% !important;
      transform: translate(-50%, -50%) !important;
      margin: 0 !important;
      width: auto !important;
    }
    #wwa-trigger-wrap { order: 0 !important; margin-left: 0 !important; margin-right: auto !important; width: auto !important; flex: 0 0 auto !important; }
    #_desktop_ps_customersignin, #_desktop_ps_shoppingcart { width: auto !important; flex: 0 0 auto !important; }
    #_desktop_ps_customersignin { order: 5 !important; }
    #_desktop_ps_shoppingcart { order: 6 !important; }
  }
}

/* ── Megamenú de texto (escritorio) ───────────────────────────────────── */
.vnh-menu {
  position: relative;
  background: #fff;
  border-bottom: 1px solid var(--vnh-line);
  z-index: 1030;
}
.vnh-menu__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
}
.vnh-menu__item { position: static; display: flex; align-items: center; }
.vnh-menu__link {
  display: inline-block;
  padding: 15px 14px;
  font-family: Montserrat, "Open Sans", sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--vnh-dark);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.vnh-menu__item:hover > .vnh-menu__link,
.vnh-menu__item.is-open > .vnh-menu__link,
.vnh-menu__item.is-current > .vnh-menu__link {
  color: var(--vnh-accent);
  border-bottom-color: var(--vnh-accent);
}
.vnh-menu__toggle {
  border: 0;
  background: transparent;
  padding: 10px 8px 10px 0;
  margin-left: -10px;
  color: var(--vnh-dark);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}
.vnh-menu__item:hover > .vnh-menu__toggle,
.vnh-menu__item.is-open > .vnh-menu__toggle { color: var(--vnh-accent); }
.vnh-menu__toggle svg { transition: transform .2s; }
.vnh-menu__item.is-open > .vnh-menu__toggle svg { transform: rotate(180deg); }

.vnh-menu__panel {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: #fff;
  border-bottom: 1px solid var(--vnh-line);
  box-shadow: 0 16px 32px rgba(0, 0, 0, .10);
  padding: 28px 0 26px;
}
.vnh-menu__item:hover > .vnh-menu__panel,
.vnh-menu__item.is-open > .vnh-menu__panel,
.vnh-menu__item:focus-within > .vnh-menu__panel { display: block; }

.vnh-menu__columns { display: grid; gap: 28px; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.vnh-menu__columns--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 520px; }
.vnh-menu__columns--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 780px; }
.vnh-menu__columns--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.vnh-menu__col-title {
  font-family: Montserrat, "Open Sans", sans-serif;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--vnh-dark);
  margin-bottom: 10px;
}
.vnh-menu__col-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.vnh-menu__col-list a { color: var(--vnh-grey); font-size: 13px; text-decoration: none; }
.vnh-menu__col-list a:hover { color: var(--vnh-accent); text-decoration: underline; }
.vnh-menu__more {
  display: inline-block;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--vnh-accent);
  text-decoration: none;
}
.vnh-menu__more:hover { text-decoration: underline; }

/* ── Títulos de sección (Montserrat, mayúsculas, centrados) ────────────── */
.vnh-section-title,
.module-products .section-title {
  text-align: center;
  font-family: Montserrat, "Open Sans", sans-serif;
  font-weight: 500;
  font-size: clamp(22px, 2.4vw, 31px);
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--vnh-dark);
  margin: 0 0 1.5rem;
}
.vnh-section-title a,
.vnh-section-title__link { color: inherit; text-decoration: none; }
.vnh-section-title a:hover { color: var(--vnh-accent); }
.vnh-section-title--accent { margin-bottom: .4rem; }
.vnh-section-intro { text-align: center; color: var(--vnh-grey); max-width: 760px; margin: 0 auto 1.75rem; font-size: 15px; }

/* ── Rejilla gráfica de destacados ────────────────────────────────────── */
.vnh-tiles { padding: 3rem 0 .5rem; }
.vnh-tiles__grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 768px) { .vnh-tiles__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.vnh-tile {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 6px;
  background: #3a1020;
  background-image: linear-gradient(160deg, #5a1a36 0%, #2b2b2b 100%);
  color: #fff;
  text-decoration: none;
}
.vnh-tile__photo { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.vnh-tile:hover .vnh-tile__photo { transform: scale(1.04); }
/* Baldosa sin foto propia: botella real del catálogo. Las fotos de producto llevan fondo
   blanco, así que la baldosa usa un fondo claro y mezcla "multiply" (el blanco desaparece). */
.vnh-tile--bottle {
  background: #efe6ea;
  background-image: linear-gradient(160deg, #f7f1f4 0%, #e3d3da 100%);
}
.vnh-tile__bottle {
  position: absolute;
  left: 50%;
  top: 6%;
  height: 76%;
  width: auto;
  max-width: 72%;
  transform: translateX(-50%);
  object-fit: contain;
  mix-blend-mode: multiply;
  transition: transform .35s ease;
}
.vnh-tile--bottle .vnh-tile__shade {
  background: linear-gradient(180deg, rgba(43, 43, 43, 0) 50%, rgba(43, 43, 43, .82) 100%);
}
.vnh-tile:hover .vnh-tile__bottle { transform: translateX(-50%) scale(1.04); }
.vnh-tile__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, .74) 100%);
}
.vnh-tile__kind {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(255, 255, 255, .93);
  color: var(--vnh-dark);
  font-family: Montserrat, "Open Sans", sans-serif;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: .12em;
  padding: 4px 8px;
  border-radius: 2px;
}
.vnh-tile__title {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  font-family: Montserrat, "Open Sans", sans-serif;
  font-weight: 600;
  font-size: clamp(15px, 1.5vw, 20px);
  line-height: 1.2;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .4);
}
.vnh-tile__sub { display: block; font-family: "Open Sans", sans-serif; font-weight: 400; font-size: 12px; opacity: .9; margin-top: 3px; }
.vnh-tile:hover .vnh-tile__title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* ── Filas de producto ────────────────────────────────────────────────── */
.vinoreahome-row { padding: 2.25rem 0 .25rem; }
.vinoreahome-row .module-products__buttons { margin-block-start: 1.25rem; }
.vnh-row__all { font-family: Montserrat, "Open Sans", sans-serif; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; font-size: 12px; }

/* En móvil/tablet: carrusel con scroll horizontal y encaje, como el mockup */
@media (max-width: 991.98px) {
  .vinoreahome-row .products {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
    scrollbar-width: none;
  }
  .vinoreahome-row .products::-webkit-scrollbar { display: none; }
  .vinoreahome-row .products > * { flex: 0 0 72%; max-width: 280px; scroll-snap-align: start; }
  /* 06-11-2026: pista de que se puede seguir deslizando: degradado en el borde derecho y flechas (front.js) */
  .vinoreahome-row .module-products__list { position: relative; }
  .vinoreahome-row .module-products__list::after { content: ""; position: absolute; top: 0; right: 0; bottom: 8px; width: 64px; background: linear-gradient(to right, rgba(255,255,255,0), #fff 80%); pointer-events: none; transition: opacity .25s; }
  .vinoreahome-row .module-products__list.vnh-scroll--end::after { opacity: 0; }
  .vnh-scroll__btn { position: absolute; top: 34%; z-index: 3; width: 42px; height: 42px; border-radius: 50%; border: 1px solid #e6dfe2; background: #fff; color: #a4123f; box-shadow: 0 2px 8px rgba(0,0,0,.2); display: flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; transition: opacity .25s; }
  .vnh-scroll__btn .material-icons { font-size: 28px; }
  .vnh-scroll__btn--next { right: 2px; }
  .vnh-scroll__btn--prev { left: 2px; }
  .vnh-scroll--end .vnh-scroll__btn--next, .vnh-scroll--start .vnh-scroll__btn--prev { opacity: 0; pointer-events: none; }
}
@media (min-width: 992px) { .vnh-scroll__btn { display: none; } }
@media (max-width: 575.98px) {
  .vnh-tiles { padding-top: 2rem; }
  .vnh-tiles__grid { gap: 12px; }
}

/* ── Franja de confianza (bajo las filas): 4 columnas, icono grande arriba y texto debajo ── */
.vnh-trust { margin: 3rem 0 1.5rem; }
.vnh-trust__list {
  list-style: none; margin: 0; padding: 2.25rem 0 2rem;
  border-top: 1px solid #e6dfe2; border-bottom: 1px solid #e6dfe2;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem 2rem;
}
.vnh-trust__item { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; min-width: 0; padding: 0 .5rem; }
.vnh-trust__icon { color: #ad1457; display: inline-flex; }
.vnh-trust__icon .vnh-ico { width: 72px; height: 72px; stroke-width: 1.3; }
.vnh-trust__body { display: flex; flex-direction: column; gap: 5px; min-width: 0; max-width: 300px; }
.vnh-trust__title { font-family: Montserrat, "Open Sans", sans-serif; font-weight: 700; font-size: 16px; color: #1a1a1a; line-height: 1.25; }
.vnh-trust__text { font-family: "Open Sans", sans-serif; font-size: 13.5px; color: #666; line-height: 1.5; }
@media (max-width: 991.98px) {
  .vnh-trust__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.75rem 1.25rem; }
  .vnh-trust__icon .vnh-ico { width: 60px; height: 60px; }
}
@media (max-width: 575.98px) {
  .vnh-trust { margin-top: 2rem; }
  .vnh-trust__list { padding: 1.5rem 0; gap: 1.5rem .75rem; }
  .vnh-trust__icon .vnh-ico { width: 52px; height: 52px; }
  .vnh-trust__title { font-size: 14.5px; }
  .vnh-trust__text { font-size: 12.5px; }
}
