/* ==========================================================
   HUANCA · SELECTOR DE SABORES 3D
   Background, text and cup change with each flavour.
   ========================================================== */

.hs-sabores {
    --hs-bg: #e6c261;
    --hs-ink: #1d2a1a;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    overflow: clip; /* hidden still lets focus/scrollTo shift the content sideways */
    margin: 0 0 clamp(28px, 4vw, 56px);
    padding: clamp(28px, 5vw, 72px) 0 clamp(18px, 3vw, 34px);
    background: var(--hs-bg);
    color: var(--hs-ink);
    transition: background-color .9s cubic-bezier(.65, 0, .35, 1), color .6s ease;
}

/* Soft light blobs that drift and give depth */
.hs-sabores__glow {
    position: absolute;
    inset: -20%;
    z-index: -1;
    background:
        radial-gradient(40% 45% at 72% 42%, rgba(255, 255, 255, .45), transparent 70%),
        radial-gradient(30% 35% at 15% 85%, rgba(255, 255, 255, .22), transparent 70%),
        radial-gradient(35% 40% at 95% 100%, rgba(0, 0, 0, .10), transparent 70%);
    animation: hs-drift 18s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes hs-drift {
    to { transform: translate3d(-4%, 3%, 0) rotate(6deg); }
}

.hs-sabores__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    align-items: center;
    gap: clamp(16px, 4vw, 64px);
}

/* ---------- Copy ---------- */
.hs-sabores__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
    opacity: .78;
}

.hs-sabores__eyebrow::before {
    content: "";
    width: 26px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
}

.hs-sabores__tabs {
    display: inline-flex;
    gap: 4px;
    margin: 18px 0 0;
    padding: 4px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--hs-ink) 10%, transparent);
}

.hs-sabores__tabs button {
    min-height: 38px;
    padding: 0 16px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background .25s ease, color .25s ease, box-shadow .25s ease;
}

.hs-sabores__tabs button.is-active {
    background: var(--hs-ink);
    color: var(--hs-bg);
    box-shadow: 0 6px 16px rgba(0, 0, 0, .12);
}

.hs-sabores__name {
    min-height: 2em;
    margin: 16px 0 10px;
    font-size: clamp(38px, 5.4vw, 78px);
    font-weight: 850;
    line-height: 1;
    letter-spacing: -.035em;
    color: inherit;
    perspective: 600px;
}

.hs-sabores__name .hs-char {
    display: inline-block;
    transform-origin: 50% 100%;
    will-change: transform, opacity;
}

.hs-sabores__tagline {
    max-width: 30ch;
    margin: 0 0 16px;
    font-size: clamp(16px, 1.6vw, 20px);
    line-height: 1.45;
    opacity: .88;
}

.hs-sabores__notes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 24px;
    padding: 0;
    list-style: none;
}

.hs-sabores__notes li {
    padding: 7px 13px;
    border: 1px solid color-mix(in srgb, var(--hs-ink) 22%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, #fff 22%, transparent);
    backdrop-filter: blur(6px);
    font-size: 13px;
    font-weight: 650;
}

.hs-sabores__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 18px;
}

.hs-sabores__price {
    font-size: 24px;
    font-weight: 800;
}

.hs-sabores__price del { opacity: .55; font-size: .7em; font-weight: 600; margin-right: 6px; }
.hs-sabores__price ins { text-decoration: none; }

.hs-sabores .hs-sabores__buy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 26px;
    border: 0;
    border-radius: 999px;
    background: var(--hs-ink);
    color: var(--hs-bg);
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 12px 26px rgba(0, 0, 0, .16);
    transition: transform .2s ease, box-shadow .2s ease, background .6s ease, color .6s ease;
}

.hs-sabores [hidden] { display: none !important; }

.hs-sabores .hs-sabores__buy:hover { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(0, 0, 0, .2); color: var(--hs-bg); }
.hs-sabores .hs-sabores__buy.loading { opacity: .7; pointer-events: none; }
.hs-sabores .hs-sabores__buy.added::after { content: " ✓"; }
.hs-sabores .added_to_cart { display: none !important; }

.hs-sabores__more {
    color: inherit;
    font-size: 15px;
    font-weight: 750;
    text-decoration: none;
    border-bottom: 2px solid color-mix(in srgb, var(--hs-ink) 35%, transparent);
    padding-bottom: 2px;
}

.hs-sabores__more:hover { color: inherit; border-bottom-color: currentColor; }

/* ---------- 3D stage ---------- */
.hs-sabores__stage {
    position: relative;
    display: grid;
    place-items: center;
    min-height: clamp(300px, 42vw, 560px);
    perspective: 1100px;
}

.hs-sabores__ghost {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 0;
    width: max-content;
    font-size: clamp(56px, 9vw, 140px);
    font-weight: 900;
    opacity: .9;
    line-height: 1;
    letter-spacing: -.04em;
    text-transform: uppercase;
    white-space: nowrap;
    color: transparent;
    -webkit-text-stroke: 2px color-mix(in srgb, var(--hs-ink) 22%, transparent);
    transform: translate(-50%, -50%);
    pointer-events: none;
    user-select: none;
}

.hs-sabores__ring {
    position: absolute;
    z-index: 0;
    width: min(88%, 520px);
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .55), rgba(255, 255, 255, .08) 60%, transparent 70%);
    border: 1px solid rgba(255, 255, 255, .45);
    box-shadow: inset 0 0 60px rgba(255, 255, 255, .25);
}

.hs-sabores__card {
    position: relative;
    z-index: 2;
    width: min(86%, 500px);
    aspect-ratio: 1;
    border-radius: 34px;
    overflow: hidden;
    transform-style: preserve-3d;
    transform: rotateX(var(--hs-rx, 0deg)) rotateY(var(--hs-ry, 0deg)) translateZ(0);
    transition: transform .25s ease-out;
    box-shadow:
        0 40px 80px -30px rgba(0, 0, 0, .35),
        0 12px 24px -10px rgba(0, 0, 0, .2);
    will-change: transform;
    animation: hs-float 6s ease-in-out infinite;
}

.hs-sabores__card::after {
    /* glossy light sweep that follows the tilt */
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .28) 46%, transparent 62%);
    transform: translateX(var(--hs-shine, -30%));
    mix-blend-mode: soft-light;
    pointer-events: none;
}

.hs-sabores__card img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
}

@keyframes hs-float {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -12px; }
}

.hs-sabores__shadow {
    position: absolute;
    bottom: 2%;
    z-index: 1;
    width: 46%;
    height: 22px;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(0, 0, 0, .28), transparent);
    filter: blur(4px);
    animation: hs-shadow 6s ease-in-out infinite;
}

@keyframes hs-shadow {
    0%, 100% { transform: scale(1); opacity: .85; }
    50% { transform: scale(.86); opacity: .6; }
}

/* Floating herbs around the cup (cut-outs made with Flow) */
.hs-sabores__herb {
    position: absolute;
    z-index: 3;
    width: clamp(70px, 9vw, 130px);
    height: auto;
    filter: drop-shadow(0 14px 18px rgba(0, 0, 0, .22));
    pointer-events: none;
    animation: hs-herb-float 7s ease-in-out infinite;
    will-change: transform;
}

.hs-sabores__herb--1 { top: 4%; left: 2%; animation-duration: 7.5s; }
.hs-sabores__herb--2 { top: 18%; right: 0; z-index: 1; width: clamp(56px, 7vw, 100px); filter: blur(1.5px) drop-shadow(0 10px 14px rgba(0, 0, 0, .18)); animation-duration: 9s; animation-delay: -3s; }
.hs-sabores__herb--3 { bottom: 6%; left: 10%; width: clamp(60px, 7.5vw, 110px); animation-duration: 8s; animation-delay: -5s; }

@keyframes hs-herb-float {
    0%, 100% { translate: 0 0; rotate: -8deg; }
    33% { translate: 8px -16px; rotate: 10deg; }
    66% { translate: -6px -6px; rotate: -2deg; }
}

/* ---------- Home hero variant ---------- */
.hs-sabores--hero {
    margin-bottom: 0;
    padding-top: clamp(24px, 4vw, 56px);
}

@media (min-width: 900px) {
    .hs-sabores--hero .hs-sabores__inner { min-height: min(68vh, 640px); }
}

/* ---------- Picker ---------- */
.hs-sabores__picker {
    display: flex;
    gap: 10px;
    margin-top: clamp(18px, 3vw, 30px);
    padding-bottom: 6px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.hs-sabores__picker::-webkit-scrollbar { display: none; }

.hs-sabores__pick {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 60px;
    padding: 6px 16px 6px 6px;
    border: 1px solid color-mix(in srgb, var(--hs-ink) 16%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, #fff 26%, transparent);
    backdrop-filter: blur(8px);
    color: inherit;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    scroll-snap-align: start;
    transition: transform .25s ease, background .25s ease, box-shadow .25s ease, opacity .25s ease;
}

.hs-sabores__pick:hover { transform: translateY(-2px); }

.hs-sabores__pick.is-active {
    background: var(--hs-ink);
    color: var(--hs-bg);
    box-shadow: 0 10px 22px rgba(0, 0, 0, .16);
}

.hs-sabores__pick[hidden] { display: none; }

.hs-sabores__pick-img {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    overflow: hidden;
    border-radius: 50%;
    background: var(--hs-dot);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .7);
}

.hs-sabores__pick-img img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.5); }

.hs-sabores__pick:focus-visible,
.hs-sabores__tabs button:focus-visible,
.hs-sabores__buy:focus-visible,
.hs-sabores__more:focus-visible {
    outline: 3px solid var(--hs-ink);
    outline-offset: 3px;
}

/* Progress bar of the autoplay on the active pick */
.hs-sabores__pick.is-active { position: relative; overflow: hidden; }
.hs-sabores__pick.is-active::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 100%;
    background: var(--hs-bg);
    opacity: .7;
    transform-origin: left;
    transform: scaleX(0);
}
.hs-sabores.is-playing .hs-sabores__pick.is-active::after { animation: hs-progress var(--hs-delay, 5.5s) linear forwards; }
@keyframes hs-progress { to { transform: scaleX(1); } }

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
    .hs-sabores { padding-top: 22px; }
    .hs-sabores__inner { grid-template-columns: 1fr; gap: 4px; }
    .hs-sabores__stage { order: -1; min-height: 0; padding: 6px 0 2px; }
    .hs-sabores__card { width: 78vw; max-width: 380px; border-radius: 26px; }
    .hs-sabores__ring { width: 84vw; max-width: 410px; }
    .hs-sabores__copy { text-align: left; }
    .hs-sabores__name { margin-top: 10px; }
    .hs-sabores__tabs { margin-top: 12px; }
    .hs-sabores__pick { min-height: 52px; font-size: 13px; }
    .hs-sabores__pick-img { width: 40px; height: 40px; flex-basis: 40px; }
    .hs-sabores__herb { width: 64px; }
    .hs-sabores__herb--2 { width: 50px; right: 2%; }
    .hs-sabores__herb--3 { width: 56px; left: 4%; }
    .hs-sabores__actions { gap: 10px 14px; }
    .hs-sabores .hs-sabores__buy { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
    .hs-sabores, .hs-sabores__card, .hs-sabores__glow, .hs-sabores__shadow, .hs-sabores__pick, .hs-sabores__herb { animation: none !important; transition: none !important; }
    .hs-sabores.is-playing .hs-sabores__pick.is-active::after { animation: none; }
}
