/* v2-product.css — Redesign v2 (Figma GwYiEL3U7a634ABC0nE4b5, section 4706:2841) */
/*
 * Ration page template-product.php: desktop 4711:3662, mobile 4736:13190,
 * popup «Раціон додано в кошик» 4753:5308 / bottom sheet 4753:5526.
 * Shared pieces (.hh-back, .hh-link, .hh-btn-primary, .hh-extra-card, .hh-ration-card,
 * .hh-popup) come from v2-base.css; here only the page layout and scoped overrides.
 * Old main.css rules for .gallery-product-* / select2 / flatpickr inputs are neutralised
 * under .hh-product.
 */

/* ---------- Page ---------- */

.hh-product {
    padding: max(0px, calc(41px - var(--hh-wrap-extra))) 0 0;
    color: var(--hh-black);
}

.hh-product__back {
    position: relative;
    margin: -8px 0 0 -8px;
}

/* 44 px tall hit area, the link itself keeps the mockup size */
.hh-product__back::before {
    content: '';
    position: absolute;
    top: 50%;
    right: 0;
    left: 0;
    height: 44px;
    transform: translateY(-50%);
}

.hh-product__main {
    display: grid;
    grid-template-areas:
        "gallery title"
        "gallery about"
        "gallery divider"
        "gallery menu"
        "gallery order"
        "gallery .";
    grid-template-columns: minmax(0, 648fr) minmax(0, 612fr);
    grid-template-rows: auto auto auto auto auto 1fr;
    column-gap: 12.5%;
    align-items: start;
}

.hh-product__head {
    grid-area: title;
    margin-top: 44px;
}

.hh-product__title {
    margin: 0;
    font-family: 'Montserrat';
    font-size: 40px;
    font-weight: 400;
    line-height: normal;
}

/* «1500–1800 ккал на день» under the H1 */
.hh-product__kcal {
    margin: 8px 0 0;
    color: var(--hh-gray);
    font-size: 16px;
    line-height: 22px;
}

.hh-product__gallery {
    position: relative;
    grid-area: gallery;
    min-width: 0;
    -webkit-user-select: none;
    user-select: none;
}

.hh-product__about {
    grid-area: about;
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 32px;
}

.hh-product__list {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hh-product__list li {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0;
    padding: 0;
    font-size: 16px;
    line-height: 22px;
}

.hh-product__list li::before {
    display: none;
}

.hh-product__bullet {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: url('../img/v2/product-bullet.svg') center / 24px 24px no-repeat;
}

.hh-product__bullet img {
    display: block;
    width: 10px;
    height: 10px;
}

.hh-product__note-title {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 600;
}

.hh-product__note-text {
    font-size: 16px;
    line-height: 22px;
}

.hh-product__note-text p {
    margin: 0;
}

.hh-product__divider {
    grid-area: divider;
    height: 1px;
    margin-top: 32px;
    background: rgba(40, 40, 40, 0.5);
}

.hh-product__menu {
    grid-area: menu;
}

.hh-product__order {
    grid-area: order;
    margin-top: 38px;
}

/* ---------- «Меню на» + 28-day strip ---------- */

.hh-week {
    margin-top: 32px;
}

.hh-week__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0 16px;
    margin: 0 0 8px;
}

.hh-week__date {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 0;
    font-size: 16px;
    line-height: 22px;
}

/* «Неділя — вихідний кухні, доставки немає»: Sundays are not in the strip. */
.hh-week__off {
    margin: 0;
    color: var(--hh-gray);
    font-size: 13px;
    line-height: 18px;
}

.hh-week__date b {
    font-size: 18px;
    font-weight: 500;
}

.hh-week__box {
    display: flex;
    align-items: stretch;
    height: 64px;
    border: 1px solid rgba(40, 40, 40, 0.7);
    background: rgba(255, 255, 255, 0.7);
}

.hh-week__arrow {
    display: flex;
    flex: 0 0 64px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}

.hh-week__prev {
    border-right: 1px solid rgba(40, 40, 40, 0.7);
}

.hh-week__next {
    border-left: 1px solid rgba(40, 40, 40, 0.7);
}

.hh-week__next .hh-week__icon {
    transform: rotate(180deg);
}

.hh-week__icon {
    display: block;
    width: 16px;
    height: 32px;
}

.hh-week__icon--off,
.hh-week__arrow.is-disabled .hh-week__icon {
    display: none;
}

.hh-week__arrow.is-disabled {
    cursor: default;
}

.hh-week__arrow.is-disabled .hh-week__icon--off {
    display: block;
}

.hh-week__swiper {
    flex: 1 1 0;
    width: 100%;
    min-width: 0;
    max-width: 378px;
    margin: 0 auto;
}

.hh-week__day {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    width: 100%;
    height: 62px;
    margin: 0;
    padding: 9px 0 0;
    border: 0;
    background: none;
    color: var(--hh-black);
    font-family: inherit;
    font-size: 16px;
    font-weight: 400;
    line-height: 20px;
    text-align: center;
    cursor: pointer;
    transition: padding 0.2s;
}

.hh-week__day span {
    pointer-events: none;
}

/* The strip clips overflow: draw the focus ring inside the button. */
html body .hh-week__day:focus-visible {
    outline-offset: -3px;
}

.hh-week__name {
    color: rgba(40, 40, 40, 0.7);
}

.is-active .hh-week__day {
    padding-top: 3px;
    color: var(--hh-primary);
    font-weight: 700;
}

.is-active .hh-week__name {
    color: var(--hh-primary);
}

/* Sunday between delivery days: the kitchen's day off, inert («Нд · вихідний»). */
.hh-week__day--off {
    background: #F3F3F3;
    color: #AFAFAF;
    cursor: default;
}

.hh-week__day--off .hh-week__name {
    color: #AFAFAF;
}

.hh-week__off-label {
    font-size: 10px;
    line-height: 20px;
    letter-spacing: -0.01em;
}

/* 320 px: «вихідний» does not fit a fifth of the strip — «вих.» */
@media (max-width: 359px) {
    .hh-week__off-tail {
        display: none;
    }

    .hh-week__off-label::after {
        content: '.';
    }
}

.is-active .hh-week__day::after {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    margin-top: -1px;
    background: url('../img/v2/product-dot.svg') center / 8px 8px no-repeat;
}

/* ---------- КБЖВ chips ---------- */

.hh-kbzv {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 0;
    line-height: normal;
}

.hh-kbzv__item {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    padding: 5px 8px;
    background: #F4F4F4;
    color: var(--hh-gray);
    font-size: 12px;
    white-space: nowrap;
}

.hh-kbzv__item b {
    color: var(--hh-black);
    font-size: 13px;
    font-weight: 600;
}

.hh-kbzv__label {
    margin-right: 4px;
    color: var(--hh-gray);
    font-size: 13px;
}

.hh-product .product__calendar-info {
    display: flex;
    column-gap: 6px;
    margin-top: 12px;
    color: var(--hh-gray);
    font-size: 13px;
    line-height: normal;
}

.hh-product .product__calendar-info span:first-child {
    font-size: 13px;
    line-height: normal;
}

.hh-product .product__calendar-info:empty {
    display: none;
}

/* No 28-day strip (fixed-duration rations): the chips follow the divider. */
.hh-product .hh-product__menu > .product__calendar-info:first-child {
    margin-top: 32px;
}

/* ---------- Fields ---------- */

.hh-product__fields {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.hh-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.hh-field__label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 16px;
    line-height: 20px;
}

.hh-field__control {
    position: relative;
    display: flex;
    flex: 0 0 256px;
    align-items: center;
    width: 256px;
    height: 48px;
    border: 1px solid var(--hh-black);
    background: #FFFFFF;
}

.hh-field__control--select {
    border: 0;
}

.hh-field__control--date {
    cursor: pointer;
}

.hh-field__control--date img {
    position: absolute;
    top: 11px;
    right: 15px;
    display: block;
    width: 24px;
    height: 24px;
    pointer-events: none;
}

.hh-product input.hh-field__input {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0 52px 0 15px;
    border: 0;
    border-radius: 0;
    background: none;
    color: var(--hh-black);
    font-family: inherit;
    font-size: 16px;
    line-height: normal;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.hh-product input.hh-field__input:focus {
    outline: none;
}

.hh-field__control--date:focus-within {
    outline: 2px solid var(--hh-primary);
    outline-offset: 2px;
}

/* − N днів + */
.hh-days__btn {
    display: flex;
    flex: 0 0 48px;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    transition: background 0.2s;
}

.hh-days__btn:hover {
    background: var(--hh-light);
}

.hh-days__btn:disabled {
    cursor: default;
    opacity: 0.35;
}

.hh-days__btn:disabled:hover {
    background: none;
}

.hh-days__btn img {
    display: block;
    width: 16px;
    height: 16px;
    pointer-events: none;
}

.hh-days__value {
    display: flex;
    flex: 1 1 0;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 100%;
    border-right: 1px solid var(--hh-black);
    border-left: 1px solid var(--hh-black);
    font-size: 16px;
    user-select: none;
}

/* Variants (Glow day, Balance routine): select2 dressed as the field */
.hh-field__control--select .select2-container {
    width: 100% !important;
}

.hh-product .hh-field__control--select .select2 .select2-selection--single {
    display: flex;
    align-items: center;
    height: 48px;
    border: 1px solid var(--hh-black) !important;
    border-radius: 0 !important;
}

.hh-product .hh-field__control--select .select2 .select2-selection--single .select2-selection__rendered {
    width: 100%;
    padding: 0 48px 0 15px !important;
    color: var(--hh-black);
    font-size: 16px !important;
    line-height: 46px !important;
    background-position: center right 12px !important;
}

/* Hint */
.hh-tip {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
    cursor: help;
}

.hh-tip img {
    display: block;
    width: 16px;
    height: 16px;
}

.hh-tip__text {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    z-index: 20;
    width: max-content;
    max-width: 280px;
    padding: 12px 16px;
    background: var(--hh-primary);
    color: #FFFFFF;
    font-size: 13px;
    line-height: 19px;
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 4px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
    pointer-events: none;
}

.hh-tip__text::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -6px;
    border: 6px solid transparent;
    border-top-color: var(--hh-primary);
}

.hh-tip:hover .hh-tip__text,
.hh-tip:focus .hh-tip__text,
.hh-tip.is-open .hh-tip__text {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

/* ---------- Price + add ---------- */

.hh-product__buy {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 32px;
}

.hh-product__price {
    margin: 0;
    font-size: 24px;
    line-height: normal;
    white-space: nowrap;
}

.hh-product__price b {
    color: var(--hh-primary);
    font-size: 40px;
    font-weight: 600;
}

.hh-product__add {
    width: auto;
    flex-shrink: 0;
}

.hh-product__sum {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* «≈ 1 514 грн/день» under the total */
.hh-product__per-day {
    margin: 0;
    color: var(--hh-gray);
    font-size: 14px;
    line-height: 18px;
    white-space: nowrap;
}

.hh-product__per-day[hidden] {
    display: none;
}

/* «Доповнити раціон додатками ↓»: a quiet text link below the price + button */
.hh-product__anchor {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    margin-top: 16px;
    color: var(--hh-gray);
    font-size: 14px;
    line-height: 18px;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.hh-product__anchor:hover {
    color: var(--hh-primary);
}

.hh-product__anchor img {
    display: block;
    width: 14px;
    height: 14px;
    opacity: 0.7;
    transition: transform 0.2s;
}

.hh-product__anchor:hover img {
    transform: translateY(3px);
}

/* ---------- Duration quick picks 7 / 14 / 28 ---------- */

.hh-field--chips {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
}

.hh-dur {
    display: grid;
    grid-auto-columns: minmax(0, 1fr);
    grid-auto-flow: column;
    gap: 8px;
}

.hh-dur__chip {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-width: 0;
    min-height: 44px;
    margin: 0;
    padding: 8px 12px;
    border: 1px solid var(--hh-border);
    background: #FFFFFF;
    color: var(--hh-black);
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.hh-dur__chip:hover {
    border-color: var(--hh-primary);
}

.hh-dur__chip[aria-pressed="true"] {
    border-color: var(--hh-primary);
    background: var(--hh-primary);
    color: #FFFFFF;
}

.hh-dur__days {
    font-size: 16px;
    font-weight: 600;
    line-height: 20px;
}

.hh-dur__day {
    font-size: 13px;
    line-height: 16px;
}

.hh-dur__save {
    color: #2E7D4F;
    font-size: 12px;
    font-weight: 600;
    line-height: 16px;
}

.hh-dur__chip[aria-pressed="true"] .hh-dur__save {
    color: #BFE8CF;
}

/* Fixed single duration (Glow day): plain text instead of a one-option select */
.hh-field__static {
    display: flex;
    flex: 0 0 256px;
    align-items: center;
    width: 256px;
    height: 48px;
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

/* «Найближча доставка — пт, 27.11 (…)» */
.hh-field__hint {
    margin: -12px 0 0;
    color: var(--hh-gray);
    font-size: 13px;
    line-height: 18px;
}

/* «Період доставки: 27.11 – 5.12, без неділі» */
.hh-field__period[hidden] {
    display: none;
}

.hh-field__period {
    color: var(--hh-black);
}

/* Calendar: Sunday is the kitchen's day off. Greyed with a «Вихідний» tooltip;
   it cannot start a period (.hh-pick-start), inside a range it is just skipped. */
.flatpickr-day.hh-day-off,
.flatpickr-day.hh-day-off.inRange {
    color: #AFAFAF;
    text-decoration: line-through;
    text-decoration-color: rgba(175, 175, 175, 0.8);
}

.flatpickr-day.hh-day-off.inRange {
    border-color: #F3F3F3;
    background: #F3F3F3;
    box-shadow: -5px 0 0 #F3F3F3, 5px 0 0 #F3F3F3;
}

.hh-pick-start .flatpickr-day.hh-day-off {
    pointer-events: none;
    cursor: default;
}

/* «У кошику: 7 днів (27.11 – 3.12) · Змінити» */
.hh-product__in-cart {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 8px;
    margin: 20px 0 0;
    padding: 0 0 0 12px;
    border-left: 3px solid var(--hh-primary);
    font-size: 14px;
    line-height: 20px;
}

.hh-product__in-cart[hidden] {
    display: none;
}

.hh-product__in-cart-sep {
    color: var(--hh-gray);
}

.hh-product__in-cart-edit {
    position: relative;
    padding: 0;
    border: 0;
    background: none;
    color: var(--hh-primary);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

/* 44 × 44 hit area around small controls without moving them */
.hh-product__in-cart-edit::before,
.hh-tip::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: max(100%, 44px);
    height: max(100%, 44px);
    transform: translate(-50%, -50%);
}

/* ---------- Mobile sticky bar + toast ---------- */

.hh-product-bar {
    display: none;
}

.hh-product-toast {
    position: fixed;
    bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    left: 50%;
    z-index: 950;
    width: max-content;
    max-width: min(480px, calc(100vw - 32px));
    margin: 0;
    padding: 14px 18px;
    background: var(--hh-primary);
    color: #FFFFFF;
    font-size: 14px;
    line-height: 20px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 12px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
    pointer-events: none;
}

.hh-product-toast.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

html.hh-product-popup-open body {
    overflow: hidden;
}

.hh-added .hh-popup__dialog {
    overscroll-behavior: contain;
}

/* ---------- Menu gallery (template-product-slider.php) ---------- */

.hh-product .gallery-product-main {
    width: 100%;
    margin: 0;
}

.hh-dish__photo {
    position: relative;
    width: 544px;
    max-width: 100%;
    height: 544px;
    margin: 0 auto;
}

.hh-product .hh-dish__photo img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: contain;
}

.hh-dish__name {
    display: none;
}

.hh-dish__info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 544px;
    max-width: 100%;
    margin: 16px auto 0;
    padding: 0 8px;
}

.hh-dish__text {
    max-width: 420px;
    font-size: 14px;
    line-height: 20px;
}

.hh-dish__text p {
    margin: 0;
}

.hh-dish__arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 32px;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}

.hh-dish__arrow img {
    display: block;
    width: 16px;
    height: 32px;
}

.hh-dish__arrow--next img {
    transform: rotate(180deg);
}

.hh-dish__arrow.swiper-button-disabled {
    opacity: 0.3;
    cursor: default;
}

.hh-dish__arrow.swiper-button-lock,
.hh-dish__arrow--mobile {
    display: none;
}

.hh-dish-thumbs {
    position: relative;
    margin-top: 28px;
    padding: 0 48px;
}

.hh-dish-thumbs .hh-dish__arrow {
    position: absolute;
    top: 60px;
}

.hh-dish-thumbs .hh-dish__arrow--prev {
    left: 0;
}

.hh-dish-thumbs .hh-dish__arrow--next {
    right: 0;
}

.hh-product .gallery-product-thumbs {
    margin: 0;
    padding: 0;
}

.hh-dish-thumbs__slide {
    cursor: pointer;
}

.hh-dish-thumbs__img {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    padding: 8px;
}

.hh-product .hh-dish-thumbs__img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.hh-dish-thumbs__name {
    display: flex;
    justify-content: center;
    margin: 8px 0 0;
}

.hh-dish-thumbs__name span,
.hh-dish__name span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    height: 32px;
    padding: 0 10px;
    border: 1px solid transparent;
    font-size: 16px;
    line-height: 20px;
    white-space: nowrap;
}

.swiper-slide-thumb-active .hh-dish-thumbs__name span {
    border-color: var(--hh-primary);
}

/* ---------- «Доповніть раціон» ---------- */

.hh-product-extras {
    margin-top: 148px;
    color: var(--hh-black);
}

.hh-product-extras__head {
    display: flex;
    align-items: flex-end;
    gap: 24px;
    margin-bottom: 40px;
}

.hh-product-extras__titles {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.hh-product-extras__title,
.hh-product-popular__title {
    margin: 0;
    font-family: 'Montserrat';
    font-size: 40px;
    font-weight: 400;
    line-height: normal;
}

.hh-product-extras__sub {
    margin: 0;
    font-size: 16px;
    line-height: normal;
}

.hh-product-extras__all {
    margin-bottom: 2px;
}

.hh-product-extras__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 32px;
}

.hh-product-extras__btn {
    display: none;
}

/* ---------- «Популярні раціони» ---------- */

.hh-product-popular {
    margin-top: 120px;
    color: var(--hh-black);
}

.hh-product + .hh-product-popular {
    margin-top: 148px;
}

.hh-product-last {
    margin-bottom: calc(145px - var(--hh-footer-gap));
}

.hh-product-popular__title {
    margin-bottom: 48px;
}

.hh-product-popular__list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 32px;
}

.hh-all-rations {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-height: 392px;
    padding: 32px;
    background: #F4F4F4;
    color: var(--hh-black);
    text-decoration: none;
}

.hh-all-rations__tag {
    color: var(--hh-gray);
    font-size: 12px;
    font-weight: 600;
    line-height: normal;
    text-transform: uppercase;
}

.hh-all-rations__title {
    max-width: 272px;
    margin-top: 16px;
    color: var(--hh-primary);
    font-family: 'HH Cormorant', 'Cormorant', serif;
    font-size: 44px;
    font-weight: 500;
    line-height: 46px;
}

.hh-all-rations__text {
    max-width: 272px;
    margin-top: 16px;
    font-size: 14px;
    line-height: 21px;
}

.hh-all-rations__flex {
    flex: 1 0 24px;
}

.hh-all-rations__thumbs {
    display: flex;
    align-items: center;
}

.hh-all-rations__thumb {
    position: relative;
    display: block;
    width: 52px;
    height: 52px;
    margin-right: -12px;
    overflow: hidden;
    border: 2px solid #F4F4F4;
    border-radius: 50%;
    background: var(--hh-secondary);
}

.hh-all-rations__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hh-all-rations__btn {
    margin-top: 24px;
}

.hh-all-rations:hover .hh-all-rations__btn {
    background: #1C4466;
}

/* ---------- Popup «Раціон додано в кошик» ---------- */

.hh-added .hh-added__head {
    align-items: center;
    gap: 14px;
}

.hh-added__icon {
    display: block;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
}

.hh-added .hh-added__close img {
    width: 22px;
    height: 22px;
}

.hh-added__ration {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px 12px 12px;
    background: var(--hh-light);
}

.hh-added__img {
    display: block;
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    overflow: hidden;
    border-radius: 50%;
    background: var(--hh-secondary);
}

.hh-added__img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hh-added__info {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.hh-added__name {
    font-size: 18px;
    font-weight: 500;
    line-height: normal;
}

.hh-added__meta {
    color: var(--hh-gray);
    font-size: 14px;
    line-height: normal;
}

.hh-added__price {
    flex-shrink: 0;
    color: var(--hh-primary);
    font-size: 18px;
    font-weight: 600;
    line-height: normal;
    white-space: nowrap;
}

.hh-added .hh-added__text {
    max-width: none;
}

.hh-added__extras {
    display: flex;
    gap: 12px;
}

.hh-added__extras .hh-extra-card {
    flex: 1 1 0;
    min-width: 0;
}

.hh-added__go {
    text-decoration: none;
}

/* ---------- ≤1439px: narrower desktop ---------- */

@media only screen and (min-width: 768px) and (max-width: 1439px) {
    /* 1366 × 768: price + button within the first screen. The right column
       starts level with «Назад», the kcal line sits next to the title and the
       counter + date share one row. */
    .hh-product__head {
        display: flex;
        flex-wrap: wrap;
        align-items: baseline;
        gap: 4px 16px;
        margin-top: -36px;
    }

    .hh-product__title {
        font-size: 34px;
    }

    .hh-product__kcal {
        margin: 0;
        font-size: 15px;
    }

    .hh-product__about {
        gap: 12px;
        margin-top: 20px;
    }

    .hh-product__list {
        gap: 10px;
    }

    .hh-product__list li {
        font-size: 14px;
        line-height: 20px;
    }

    .hh-product__note-title,
    .hh-product__note-text {
        font-size: 14px;
        line-height: 20px;
    }

    .hh-product__divider {
        margin-top: 20px;
    }

    .hh-week {
        margin-top: 16px;
    }

    .hh-week__box {
        height: 56px;
    }

    .hh-week__day {
        height: 54px;
        padding-top: 6px;
    }

    .is-active .hh-week__day {
        padding-top: 1px;
    }

    .hh-product .product__calendar-info {
        margin-top: 8px;
    }

    .hh-product .hh-product__menu > .product__calendar-info:first-child {
        margin-top: 20px;
    }

    .hh-product__order {
        margin-top: 20px;
    }

    .hh-product__fields {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 12px 16px;
    }

    .hh-product__fields > .hh-field {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }

    .hh-product__fields > .hh-field--chips,
    .hh-product__fields > .hh-field__hint {
        grid-column: 1 / -1;
    }

    .hh-product__fields .hh-field__control,
    .hh-product__fields .hh-field__static {
        flex: 0 0 auto;
        width: 100%;
    }

    .hh-field__label {
        font-size: 15px;
    }

    .hh-field--chips {
        gap: 8px;
    }

    .hh-dur__chip {
        display: grid;
        grid-template-columns: auto auto;
        justify-content: space-between;
        align-items: baseline;
        gap: 0 8px;
        padding: 6px 10px;
    }

    .hh-dur__day {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .hh-field__control,
    .hh-field__static,
    .hh-product .hh-field__control--select .select2 .select2-selection--single {
        height: 44px;
    }

    .hh-product .hh-field__control--select .select2 .select2-selection--single .select2-selection__rendered {
        line-height: 42px !important;
    }

    .hh-field__control--date img {
        top: 9px;
    }

    .hh-field__hint {
        margin-top: -4px;
    }

    .hh-product__in-cart {
        margin-top: 16px;
    }

    .hh-product__buy {
        margin-top: 16px;
    }

    .hh-product__price b {
        font-size: 36px;
    }
}

@media only screen and (max-width: 1439px) {
    .hh-product__main {
        column-gap: 6%;
    }

    .hh-product__buy {
        flex-wrap: wrap;
    }

    .hh-product-popular__list {
        gap: 24px;
    }

    .hh-all-rations {
        padding: 24px;
    }

    .hh-all-rations__title {
        font-size: 38px;
        line-height: 42px;
    }
}

@media only screen and (max-width: 1199px) {
    .hh-product__main {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        column-gap: 40px;
    }

    .hh-field {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .hh-field__control {
        flex: 0 0 auto;
        width: 100%;
    }

    .hh-product-extras__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .hh-product-popular__list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ---------- ≤767px (mobile mockup, 375) ---------- */

@media only screen and (max-width: 767px) {
    .hh-product {
        padding-top: max(0px, calc(32px - var(--hh-wrap-extra)));
    }

    .hh-product__main {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        margin-top: 32px;
    }

    .hh-product__head {
        order: 1;
        margin: 0;
    }

    .hh-product__title {
        font-size: 32px;
    }

    .hh-product__kcal {
        margin-top: 4px;
        font-size: 14px;
        line-height: 20px;
    }

    .hh-product__menu {
        order: 2;
    }

    .hh-product__gallery {
        order: 3;
        margin-top: 40px;
    }

    .hh-product__about {
        order: 4;
        margin-top: 40px;
    }

    .hh-product__divider {
        order: 5;
        margin-top: 40px;
    }

    .hh-product__order {
        order: 6;
        margin-top: 24px;
    }

    .hh-product__list li {
        align-items: flex-start;
    }

    .hh-week {
        margin-top: 32px;
    }

    .hh-week__head {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    .hh-week__date {
        line-height: 20px;
    }

    .hh-week__off {
        font-size: 12px;
        line-height: 16px;
    }

    .hh-week__date b {
        font-size: 16px;
    }

    .hh-week__box {
        border-color: var(--hh-black);
    }

    .hh-week__arrow {
        flex-basis: 44px;
    }

    .hh-week__prev {
        border-right-color: var(--hh-black);
    }

    .hh-week__next {
        border-left-color: var(--hh-black);
    }

    .hh-week__icon {
        width: 12px;
        height: 24px;
    }

    /* 5 days in view: every day button is ≥ 44 px wide */
    .hh-week__swiper {
        max-width: none;
    }

    .hh-week__day {
        gap: 4px;
    }

    .hh-product .product__calendar-info {
        column-gap: 4px;
        margin-top: 8px;
        font-size: 12px;
    }

    .hh-product .product__calendar-info span:first-child,
    .hh-kbzv__label {
        margin-right: 4px;
        font-size: 12px;
    }

    .hh-product .product__calendar-info .hh-kbzv__item {
        padding: 5px 6px;
    }

    /* Gallery: one dish, arrows next to its name, no thumbs */
    .hh-dish__photo {
        width: 336px;
        height: 336px;
    }

    .hh-dish__name {
        display: flex;
        justify-content: center;
        margin: 24px 0 0;
    }

    .hh-dish__name span {
        border-color: var(--hh-primary);
    }

    /* !important: main.css puts .swiper-button-gallery-* at top: 382px !important */
    /* 44 × 44 tap area, the 12 × 24 chevron stays where it was */
    .hh-product .hh-dish__arrow--mobile {
        position: absolute;
        top: 354px !important;
        display: flex;
        width: 44px;
        height: 44px;
        z-index: 2;
    }

    .hh-dish__arrow--mobile.swiper-button-lock {
        display: none;
    }

    .hh-dish__arrow--mobile img {
        width: 12px;
        height: 24px;
    }

    .hh-dish__arrow--mobile.hh-dish__arrow--prev {
        left: -16px;
    }

    .hh-dish__arrow--mobile.hh-dish__arrow--next {
        right: -16px;
    }

    .hh-dish__info {
        width: 100%;
        margin-top: 24px;
        padding: 0;
    }

    .hh-dish__text {
        max-width: none;
    }

    .hh-dish-thumbs {
        display: none;
    }

    .hh-field {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .hh-field__control {
        flex: 0 0 auto;
        width: 100%;
    }

    .hh-days__btn {
        flex-basis: 64px;
    }

    .hh-tip__text {
        left: auto;
        right: -40px;
        max-width: calc(100vw - 64px);
        transform: translate(0, 4px);
    }

    .hh-tip:hover .hh-tip__text,
    .hh-tip:focus .hh-tip__text,
    .hh-tip.is-open .hh-tip__text {
        transform: none;
    }

    .hh-tip__text::after {
        left: auto;
        right: 40px;
        margin: 0 -6px 0 0;
    }

    .hh-product__buy {
        flex-direction: column;
        align-items: stretch;
        gap: 24px;
        margin-top: 24px;
    }

    .hh-product__price {
        font-size: 16px;
    }

    .hh-product__price b {
        font-size: 32px;
    }

    .hh-product__add {
        width: 100%;
    }

    .hh-product__anchor {
        display: flex;
        justify-content: center;
        margin-top: 12px;
    }

    .hh-field__static {
        flex: 0 0 auto;
        width: 100%;
        height: auto;
    }

    .hh-field__hint {
        margin-top: -8px;
    }

    .hh-dur__chip {
        padding: 8px;
    }

    .hh-dur__days {
        font-size: 15px;
    }

    .hh-dur__day {
        font-size: 12px;
    }

    /* Sticky «N днів · сума · [Додати в кошик]» (same look as the extra page bar) */
    .hh-product-bar {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 900;
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
        background: #FFFFFF;
        box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.1);
        visibility: hidden;
        transform: translateY(110%);
        transition: transform 0.25s ease-out, visibility 0s linear 0.25s;
    }

    .hh-product-bar.is-visible {
        visibility: visible;
        transform: none;
        transition: transform 0.25s ease-out, visibility 0s;
    }

    html.hh-product-bar-on body {
        padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    }

    .hh-product-bar__info {
        display: flex;
        flex: 1 1 0;
        flex-direction: column;
        min-width: 0;
        margin: 0;
        white-space: nowrap;
    }

    .hh-product-bar__days {
        color: var(--hh-gray);
        font-size: 12px;
        line-height: 16px;
    }

    .hh-product-bar__total {
        color: var(--hh-primary);
        font-size: 18px;
        font-weight: 600;
        line-height: 22px;
    }

    .hh-product-bar__btn {
        display: flex;
        flex-shrink: 0;
        align-items: center;
        justify-content: center;
        gap: 8px;
        height: 48px;
        padding: 0 16px;
        border: 0;
        background: var(--hh-primary);
        color: #FFFFFF;
        font-family: inherit;
        font-size: 14px;
        font-weight: 600;
        line-height: normal;
        text-transform: uppercase;
        cursor: pointer;
    }

    .hh-product-bar__btn.is-busy {
        opacity: 0.7;
        pointer-events: none;
    }

    .hh-product-bar__btn img {
        display: block;
        width: 16px;
        height: 16px;
    }

    html.hh-product-bar-on .hh-product-toast {
        bottom: calc(84px + env(safe-area-inset-bottom, 0px));
    }

    /* Extras */
    .hh-product-extras {
        margin-top: 64px;
    }

    .hh-product-extras__head {
        margin-bottom: 20px;
    }

    .hh-product-extras__titles {
        gap: 8px;
    }

    .hh-product-extras__title,
    .hh-product-popular__title {
        font-size: 28px;
    }

    .hh-product-extras__sub {
        font-size: 14px;
        line-height: 20px;
    }

    .hh-product-extras__all {
        display: none;
    }

    .hh-product-extras__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .hh-product-extras__grid > .hh-extra-card:nth-child(n+4) {
        display: none;
    }

    .hh-product-extras__btn {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 56px;
        margin-top: 20px;
        padding: 0 32px;
        border: 1px solid var(--hh-primary);
        background: #FFFFFF;
        color: var(--hh-primary);
        font-size: 16px;
        font-weight: 600;
        line-height: normal;
        text-transform: uppercase;
        text-decoration: none;
    }

    /* Popular rations: horizontal scroll */
    .hh-product-popular,
    .hh-product + .hh-product-popular {
        margin-top: 64px;
    }

    .hh-product-last {
        margin-bottom: calc(64px - var(--hh-footer-gap));
    }

    .hh-product-popular__title {
        margin-bottom: 24px;
        font-size: 32px;
    }

    .hh-product-popular__list {
        display: flex;
        gap: 24px;
        margin-right: -16px;
        padding-right: 16px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }

    .hh-product-popular__list::-webkit-scrollbar {
        display: none;
    }

    .hh-product-popular__item {
        flex: 0 0 280px;
        scroll-snap-align: start;
    }

    .hh-all-rations {
        min-height: 392px;
        padding: 24px;
    }

    .hh-all-rations__title {
        max-width: 232px;
        margin-top: 12px;
        font-size: 40px;
        line-height: 42px;
    }

    .hh-all-rations__text,
    .hh-all-rations__thumbs {
        display: none;
    }

    .hh-all-rations__btn {
        margin-top: 0;
    }

    /* Bottom sheet */
    .hh-added .hh-popup__title {
        font-size: 20px;
    }

    .hh-added__ration {
        gap: 16px;
    }

    .hh-added__img {
        width: 56px;
        height: 56px;
    }

    .hh-added__name {
        font-size: 16px;
    }

    .hh-added__meta {
        font-size: 12px;
    }

    .hh-added__kcal,
    .hh-added__days {
        display: block;
    }

    .hh-added__sep {
        display: none;
    }

    .hh-added__price {
        font-size: 14px;
    }

    .hh-added .hh-popup__subtitle {
        font-size: 16px;
    }

    .hh-added__extras {
        flex-direction: column;
    }
}

/* Menu gallery while another day is loading (js/getSlider.js). */
.hh-product__gallery {
    transition: opacity 0.15s ease;
}
.hh-product__gallery.is-loading {
    opacity: 0.45;
    pointer-events: none;
}

/* Hint bubble positioned by js/v2-product.js placeTip(): the arrow follows
   the icon (overrides the fixed mobile offsets above). */
.hh-tip.is-placed .hh-tip__text::after {
    left: var(--hh-tip-arrow, 50%);
    right: auto;
    margin: 0 0 0 -6px;
}

/* Mobile sticky bar with duration: [7 днів][14 днів][28 днів] on top,
   «N днів · сума · [Додати в кошик]» below. */
@media only screen and (max-width: 767px) {
    .hh-product-bar--dur {
        flex-wrap: wrap;
        row-gap: 10px;
    }
    .hh-product-bar__dur {
        display: flex;
        flex: 1 0 100%;
        border: 1px solid #D2D2D2;
    }
    .hh-product-bar__chip {
        flex: 1 1 0;
        min-height: 44px;
        padding: 0 6px;
        border: 0;
        border-left: 1px solid #D2D2D2;
        background: #FFFFFF;
        color: #282828;
        font-family: 'Montserrat', sans-serif;
        font-size: 14px;
        font-weight: 500;
        cursor: pointer;
    }
    .hh-product-bar__chip:first-child {
        border-left: 0;
    }
    .hh-product-bar__chip[aria-pressed="true"] {
        background: #0F2D47;
        color: #FFFFFF;
    }
    html.hh-product-bar-on body:has(.hh-product-bar--dur) {
        padding-bottom: calc(128px + env(safe-area-inset-bottom, 0px));
    }
    html.hh-product-bar-on body:has(.hh-product-bar--dur) .hh-product-toast {
        bottom: calc(136px + env(safe-area-inset-bottom, 0px));
    }
}
