/* =====================================================
   Home page: "Honey stage" (template-parts/product-section.php)
   A spotlight jar on a glowing honey hexagon, a honeycomb picker,
   Himalayan ridges and floating bees, on a soft sky-blue stage.
   ===================================================== */
.hbk-stage {
    --ink: #3b2412;
    --ink-soft: rgba(59, 36, 18, .78);
    --honey: #EEC643;
    --amber: #f2a93b;
    --gold: #a9701c;
    --sky: #2b6f93;
    --sky-soft: rgba(126, 186, 220, .5);
    --sky-deep: #123a52;
    --line: rgba(30, 62, 84, .18);
    --hex: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
    position: relative;
    isolation: isolate;
    margin: 46px 0 90px;
    padding: 60px 60px 130px;
    border-radius: 32px;
    overflow: hidden;
    color: var(--ink);
    background:
        radial-gradient(60% 70% at 18% 45%, rgba(90, 150, 190, .18) 0%, rgba(90, 150, 190, 0) 70%),
        radial-gradient(40% 50% at 90% 10%, rgba(160, 205, 230, .35) 0%, rgba(160, 205, 230, 0) 70%),
        linear-gradient(160deg, #fdfeff 0%, #f3f8fb 55%, #e7eff5 100%);
    box-shadow: 0 30px 60px rgba(30, 62, 84, .12), inset 0 0 0 1px rgba(30, 62, 84, .07);
}

/* Honeycomb texture */
.hbk-stage::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: .5;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'%3E%3Cpath d='M28 0 L56 16 L56 48 L28 64 L0 48 L0 16 Z M28 64 L28 97' fill='none' stroke='%234a86ad' stroke-opacity='.13' stroke-width='1'/%3E%3C/svg%3E");
    background-size: 56px 97px;
    -webkit-mask-image: radial-gradient(80% 90% at 60% 40%, #000 0%, transparent 85%);
            mask-image: radial-gradient(80% 90% at 60% 40%, #000 0%, transparent 85%);
}

/* ---------- Scenery ---------- */
.hbk-stage__scenery {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.hbk-stage__glow {
    position: absolute;
    top: 50%;
    left: 22%;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(242, 180, 70, .42) 0%, rgba(242, 180, 70, 0) 65%);
    transform: translate(-50%, -55%);
    animation: hbk-breathe 6s ease-in-out infinite;
}

.hbk-stage__ridges {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 170px;
}

.hbk-stage__ridges .r1 { fill: #d3d8dd; }
.hbk-stage__ridges .r2 { fill: #b8bfc6; }
.hbk-stage__ridges .snow { fill: rgba(255, 255, 255, .85); }

.hbk-stage__bee {
    position: absolute;
    width: 46px;
    height: auto;
    filter: drop-shadow(0 6px 10px rgba(30, 62, 84, .22));
}

.hbk-stage__bee.b1 {
    top: 12%;
    left: 40%;
    animation: hbk-fly-1 14s ease-in-out infinite;
}

.hbk-stage__bee.b2 {
    bottom: 26%;
    right: 6%;
    width: 36px;
    animation: hbk-fly-2 17s ease-in-out infinite;
}

/* ---------- Layout ---------- */
.hbk-stage__inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr) auto;
    align-items: center;
    gap: 44px;
}

/* ---------- Spotlight jar ---------- */
.hbk-spot__visual {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 1 / 1.05;
}

.hbk-spot__hex {
    position: absolute;
    width: 74%;
    aspect-ratio: 1 / 1.1547;
    clip-path: var(--hex);
    /* Warm honey-lit comb instead of the old sky-blue face. Kept light so the
       amber jar still reads against it. */
    background: radial-gradient(circle at 35% 28%, #fffdf7 0%, #fdf2d2 40%, #f8e0a8 76%, #ecc27a 100%);
    animation: hbk-breathe 6s ease-in-out infinite;
}

/* Rotating honey-gold outline hexagon */
.hbk-spot__hex--ring {
    width: 92%;
    background: conic-gradient(from 0deg, rgba(201, 138, 32, 0) 0deg, rgba(201, 138, 32, .55) 60deg, rgba(201, 138, 32, 0) 140deg, rgba(201, 138, 32, 0) 200deg, rgba(238, 198, 67, .95) 260deg, rgba(201, 138, 32, 0) 330deg);
    animation: hbk-spin 18s linear infinite;
    opacity: .9;
}

/* Masks the ring down to a thin stroke. Warm cream so the halo between the
   outline and the hexagon never picks up the old blue. */
.hbk-spot__hex--ring::after {
    content: "";
    position: absolute;
    inset: 2.5px;
    clip-path: var(--hex);
    background: #fdf4dd;
}

.hbk-spot__jarlink {
    position: relative;
    z-index: 2;
    display: block;
    width: 58%;
}

.hbk-spot__jar {
    display: block;
    width: 100%;
    height: auto;
    transform: translateY(-4%);
    filter: drop-shadow(0 22px 26px rgba(120, 74, 18, .3));
    animation: hbk-float 5s ease-in-out infinite;
    transition: opacity .3s ease, transform .45s cubic-bezier(.22, 1, .36, 1);
}

.hbk-spot__shadow {
    position: absolute;
    z-index: 1;
    bottom: 9%;
    left: 50%;
    width: 46%;
    height: 22px;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(120, 74, 18, .18), rgba(120, 74, 18, 0));
    transform: translateX(-50%);
    animation: hbk-shadow 5s ease-in-out infinite;
}

.hbk-spot__sale {
    position: absolute;
    z-index: 3;
    top: 10%;
    right: 6%;
    display: grid;
    place-items: center;
    width: 74px;
    height: 74px;
    border-radius: 50%;
    background: #d92d4b;
    color: #fff;
    font: 700 13px/1.1 "Poppins", sans-serif;
    text-align: center;
    text-transform: uppercase;
    transform: rotate(-12deg);
    box-shadow: 0 10px 20px rgba(217, 45, 75, .3);
}

.hbk-spot__sale[hidden] {
    display: none;
}

/* ---------- Spotlight details ---------- */
.hbk-spot__info > * {
    transition: opacity .3s ease, transform .4s cubic-bezier(.22, 1, .36, 1);
}

.hbk-spot__kicker {
    margin: 0 0 10px;
    color: var(--gold);
    font: 600 12px/1 "Poppins", sans-serif;
    letter-spacing: .2em;
    text-transform: uppercase;
}

.hbk-spot__name {
    margin: 0 0 12px;
    font: 700 clamp(30px, 3.2vw, 44px)/1.08 "Poppins", sans-serif;
    letter-spacing: -.01em;
}

.hbk-spot__name a {
    color: var(--ink);
    text-decoration: none;
}

.hbk-spot__name a:hover {
    color: var(--gold);
    text-decoration: none;
}

.hbk-spot__size {
    display: inline-block;
    margin-bottom: 16px;
    padding: 6px 12px;
    border: 1.5px solid rgba(74, 134, 173, .45);
    border-radius: 999px;
    color: var(--sky);
    font: 600 13px/1 "Poppins", sans-serif;
}

.hbk-spot__tagline {
    max-width: 380px;
    margin: 0 0 20px;
    color: var(--ink-soft);
    font-size: 17px;
    line-height: 1.6;
}

.hbk-spot__price {
    margin-bottom: 24px;
    color: var(--gold);
    font: 700 36px/1 "Poppins", sans-serif;
}

.hbk-spot__price del {
    margin-right: 10px;
    color: rgba(59, 36, 18, .45);
    font-size: 20px;
    font-weight: 500;
}

.hbk-spot__price ins {
    text-decoration: none;
}

.hbk-spot__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 22px;
}

.hbk-stage .hbk-spot__cart {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 15px 28px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #ffedb0 0%, var(--honey) 55%, var(--amber) 100%);
    color: var(--ink);
    font: 700 15px/1 "Poppins", sans-serif;
    text-decoration: none;
    box-shadow: 0 12px 26px rgba(200, 135, 31, .35), inset 0 1px 0 rgba(255, 255, 255, .6);
    transition: transform .2s ease, box-shadow .2s ease;
}

.hbk-stage .hbk-spot__cart:hover {
    color: var(--ink);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(200, 135, 31, .45), inset 0 1px 0 rgba(255, 255, 255, .6);
}

.hbk-stage .hbk-spot__cart.loading {
    opacity: .7;
    pointer-events: none;
}

.hbk-stage .hbk-spot__cart.added span::after {
    content: " ✓";
}

.hbk-stage .hbk-spot__cart.is-out {
    background: transparent;
    color: var(--ink);
    box-shadow: inset 0 0 0 1.5px rgba(59, 36, 18, .4);
}

.hbk-spot__more {
    color: var(--ink);
    font: 600 15px/1 "Poppins", sans-serif;
    text-decoration: none;
    border-bottom: 1.5px solid var(--line);
    padding-bottom: 3px;
}

.hbk-spot__more:hover {
    color: var(--gold);
    border-color: var(--gold);
    text-decoration: none;
}

/* Theme decorations on .add_to_cart_button / .button: not here */
.hbk-stage .hbk-spot__cart::before,
.hbk-stage .hbk-spot__cart:hover::before,
.hbk-stage .hbk-spot__cart::after,
.hbk-stage .hbk-spot__cart:hover::after {
    content: none !important;
    display: none !important;
}

.hbk-stage .added_to_cart {
    display: none !important;
}

/* Swap animation */
.hbk-stage.is-swapping .hbk-spot__jar {
    opacity: 0;
    transform: translateY(14%) scale(.9);
}

.hbk-stage.is-swapping .hbk-spot__info > * {
    opacity: 0;
    transform: translateY(10px);
}

/* ---------- Honeycomb picker ---------- */
.hbk-comb {
    --hw: 104px;
    --hh: calc(var(--hw) * 1.1547);
    --hg: 8px;
    text-align: center;
}

.hbk-comb__cells {
    position: relative;
    width: calc(var(--hw) * 3 + var(--hg) * 2);
    height: calc(var(--hh) + (var(--rows) - 1) * (var(--hh) * .75 + var(--hg)));
    margin: 0 auto;
}

.hbk-comb__cell {
    position: absolute;
    left: calc(var(--x) * (var(--hw) + var(--hg)));
    top: calc(var(--y) * (var(--hh) * .75 + var(--hg)));
    width: var(--hw);
    height: var(--hh);
    margin: 0;
    padding: 0;
    border: 0;
    clip-path: var(--hex);
    background: var(--sky-soft);
    cursor: pointer;
    transition: transform .25s cubic-bezier(.22, 1, .36, 1), background .25s ease;
}

.hbk-comb__fill {
    position: absolute;
    inset: 2.5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    clip-path: var(--hex);
    background: radial-gradient(circle at 50% 35%, #fbffff 0%, #e8f2f9 80%);
    transition: background .25s ease;
}

.hbk-comb__fill img {
    width: 50%;
    height: 50%;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(30, 62, 84, .2));
    transition: transform .3s cubic-bezier(.22, 1, .36, 1);
}

.hbk-comb__label {
    color: var(--sky);
    font: 700 11px/1 "Poppins", sans-serif;
    letter-spacing: .04em;
}

.hbk-comb__cell:hover {
    transform: scale(1.07);
    background: rgba(74, 134, 173, .85);
}

.hbk-comb__cell:hover img {
    transform: scale(1.08) rotate(-4deg);
}

.hbk-comb__cell.is-active {
    background: linear-gradient(160deg, #f0f9fd, #a9d2e8 50%, #6fa8c8);
}

.hbk-comb__cell.is-active .hbk-comb__fill {
    background: radial-gradient(circle at 50% 30%, #eaf6fd 0%, #b3d8ec 60%, #85bad6 100%);
}

.hbk-comb__cell.is-active .hbk-comb__label {
    color: var(--sky-deep);
}

.hbk-comb__cell:focus-visible {
    outline: none;
    background: var(--sky);
    transform: scale(1.07);
}

.hbk-comb__hint {
    margin: 18px 0 8px;
    color: rgba(30, 62, 84, .6);
    font-size: 14px;
    font-style: italic;
}

.hbk-comb__all {
    color: var(--sky);
    font: 600 15px/1 "Poppins", sans-serif;
    text-decoration: none;
    border-bottom: 1.5px solid rgba(74, 134, 173, .45);
    padding-bottom: 3px;
}

.hbk-comb__all:hover {
    color: var(--ink);
    border-color: var(--ink);
    text-decoration: none;
}

.hbk-stage a:focus-visible,
.hbk-stage .hbk-spot__cart:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 3px;
}

/* ---------- Keyframes ---------- */
@keyframes hbk-float {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -12px; }
}

@keyframes hbk-shadow {
    0%, 100% { opacity: 1; width: 46%; }
    50% { opacity: .65; width: 38%; }
}

@keyframes hbk-breathe {
    0%, 100% { scale: 1; }
    50% { scale: 1.04; }
}

@keyframes hbk-spin {
    to { rotate: 360deg; }
}

@keyframes hbk-fly-1 {
    0%   { transform: translate(0, 0) rotate(-6deg); }
    25%  { transform: translate(120px, -30px) rotate(8deg); }
    50%  { transform: translate(260px, 20px) rotate(-4deg) scaleX(-1); }
    75%  { transform: translate(110px, 50px) rotate(6deg) scaleX(-1); }
    100% { transform: translate(0, 0) rotate(-6deg); }
}

@keyframes hbk-fly-2 {
    0%   { transform: translate(0, 0) scaleX(-1) rotate(4deg); }
    30%  { transform: translate(-160px, -60px) scaleX(-1) rotate(-6deg); }
    60%  { transform: translate(-60px, -130px) rotate(5deg); }
    100% { transform: translate(0, 0) scaleX(-1) rotate(4deg); }
}

/* ---------- Responsive ---------- */
@media (max-width: 1199px) {
    .hbk-stage {
        padding: 48px 40px 120px;
    }
    .hbk-stage__inner {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 30px 36px;
    }
    .hbk-comb {
        grid-column: 1 / -1;
        --hw: 92px;
    }
    .hbk-stage__glow {
        left: 25%;
        top: 34%;
    }
}

@media (max-width: 767px) {
    .hbk-stage {
        margin: 30px -5px 60px;
        padding: 30px 20px 110px;
        border-radius: 24px;
    }
    .hbk-stage__inner {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    .hbk-spot__visual {
        width: min(100%, 300px);
        margin: 0 auto;
    }
    .hbk-spot__info {
        text-align: center;
    }
    .hbk-spot__tagline {
        margin-left: auto;
        margin-right: auto;
        font-size: 16px;
    }
    .hbk-spot__price {
        font-size: 30px;
    }
    .hbk-spot__actions {
        justify-content: center;
    }
    .hbk-spot__sale {
        width: 62px;
        height: 62px;
        font-size: 11px;
    }
    .hbk-comb {
        --hw: 72px;
        --hg: 6px;
        margin-top: 10px;
    }
    .hbk-comb__label {
        font-size: 10px;
    }
    .hbk-stage__glow {
        width: 360px;
        height: 360px;
        left: 50%;
        top: 20%;
    }
    .hbk-stage__bee.b1 {
        left: 62%;
        top: 4%;
    }
    .hbk-stage__ridges {
        height: 110px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hbk-stage *,
    .hbk-stage *::before,
    .hbk-stage *::after {
        animation: none !important;
        transition: none !important;
    }
}

/* =====================================================
   Refinements
   ===================================================== */

/* Break out of the narrow content column for more presence */
.hbk-stage {
    left: 50%;
    width: min(1240px, calc(100vw - 48px));
    transform: translateX(-50%);
}

.hbk-stage__inner {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) auto;
    gap: 40px;
}

/* Ring behind, golden hexagon in front of it, jar on top */
.hbk-spot__hex--ring { z-index: 0; }
.hbk-spot__hex:not(.hbk-spot__hex--ring) { z-index: 1; }
.hbk-spot__shadow { z-index: 2; }
.hbk-spot__jarlink { z-index: 3; width: 60%; }
.hbk-spot__sale { z-index: 4; }

/* Readable mountain ranges so the snow caps sit on visible peaks */
.hbk-stage__ridges .r1 { fill: #cdd3d9; }
.hbk-stage__ridges .r2 { fill: #b2bac2; }
.hbk-stage__ridges .snow { fill: rgba(255, 255, 255, .9); }

/* Second bee: top-right corner, clear of the honeycomb text */
.hbk-stage__bee.b2 {
    top: 8%;
    right: 4%;
    bottom: auto;
}

@media (max-width: 767px) {
    .hbk-stage {
        width: calc(100vw - 20px);
        margin-left: 0;
        margin-right: 0;
    }
}

/* Bigger jar that breaks out of the top of the hexagon */
.hbk-spot__jarlink { width: 70%; }
.hbk-spot__jar { transform: translateY(-9%); }
.hbk-stage.is-swapping .hbk-spot__jar { transform: translateY(6%) scale(.88); }

.hbk-stage__bee.b2 { top: 20%; right: 3%; }

/* Re-apply the responsive grid after the refinements above */
@media (max-width: 1199px) {
    .hbk-stage__inner {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }
}

@media (max-width: 767px) {
    .hbk-stage__inner {
        grid-template-columns: 1fr;
    }
    .hbk-spot__jarlink { width: 64%; }
    .hbk-stage__bee.b2 { display: none; }
    .hbk-stage__bee.b1 { width: 34px; top: 2%; left: 74%; }
    .hbk-spot__name { font-size: 32px; }
}
