/* RHANA mobile refinement layer. Loaded last across the storefront. */
@media (max-width: 750px) {
  html {
    scroll-padding-top: 118px;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  body.rhana-site-shell {
    min-width: 0 !important;
    overflow-x: clip;
    --rhana-section-gap: 22px;
  }

  body.rhana-site-shell.mobile-menu-open { overflow: hidden; }
  body.rhana-site-shell img,
  body.rhana-site-shell video,
  body.rhana-site-shell iframe { max-width: 100%; }

  /* Compact header with finger-friendly controls. */
  body.rhana-site-shell#start .header .header__inner {
    width: calc(100% - 28px) !important;
    grid-template-columns: minmax(102px, 1fr) auto auto !important;
    grid-template-rows: 44px 46px !important;
    gap: 8px 4px !important;
    padding: 8px 0 10px !important;
  }

  body.rhana-site-shell#start .header .header__logo {
    grid-column: 1 !important;
    grid-row: 1 !important;
    display: flex !important;
    align-items: center !important;
    width: 116px !important;
    min-width: 0 !important;
    min-height: 44px !important;
  }

  body.rhana-site-shell#start .header .header__logo .ed-header-logo {
    content: url('../images/rhana-wordmark.png');
    display: block !important;
    width: 116px !important;
    height: auto !important;
    align-self: center !important;
  }

  body.rhana-site-shell#start .header .header__logo::before {
    content: none;
  }

  body.rhana-site-shell#start .header .header__action {
    grid-column: 2 !important;
    grid-row: 1 !important;
    min-height: 44px !important;
    gap: 0 !important;
  }

  body.rhana-site-shell#start .header .header__action-right { min-height: 44px !important; }

  body.rhana-site-shell#start .header .header__cabinet,
  body.rhana-site-shell#start .header .header__basket,
  body.rhana-site-shell#start .header .burger__menu {
    box-sizing: border-box !important;
    display: flex !important;
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 10px !important;
    border: 0 !important;
    background-color: transparent !important;
  }

  body.rhana-site-shell#start .header .header__cabinet::before {
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
  }

  body.rhana-site-shell#start .header .header__basket > div {
    width: 28px !important;
    height: 28px !important;
  }

  body.rhana-site-shell#start .header .burger__menu {
    grid-column: 3 !important;
    grid-row: 1 !important;
    flex-direction: column !important;
    gap: 5px !important;
  }

  body.rhana-site-shell#start .header .box__search {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    height: 46px !important;
    margin: 0 !important;
  }

  body.rhana-site-shell#start .header .box__search .search__input {
    height: 44px !important;
    padding-left: 14px !important;
    padding-right: 48px !important;
    font-size: 16px !important;
  }

  body.rhana-site-shell#start .header .box__search .search__btn {
    right: 3px !important;
    width: 44px !important;
    height: 44px !important;
  }

  body.rhana-site-shell .menu__mobile { overscroll-behavior: contain; }
  body.rhana-site-shell .menu__logo img {
    content: url('../images/rhana-wordmark.png');
    width: 116px !important;
    height: auto !important;
  }
  body.rhana-site-shell .menu__close {
    width: 44px !important;
    height: 44px !important;
    padding: 0 !important;
  }

  body.rhana-site-shell .menu__close-item {
    left: 10px !important;
    top: 21px !important;
    width: 24px !important;
  }

  body.rhana-site-shell .mobile__menu-li a {
    display: flex !important;
    min-height: 50px !important;
    align-items: center !important;
    padding: 11px 0 !important;
  }

  /* Editorial utility cards: compact rhythm without empty mobile panels. */
  body.rhana-site-shell .eu-card {
    min-height: 0 !important;
    padding: 22px !important;
  }

  body.rhana-site-shell .eu-card > span {
    margin-bottom: 28px !important;
  }

  body.rhana-site-shell .eu-card h3 {
    margin: 0 0 8px !important;
  }

  /* Keep forms readable and prevent iOS auto-zoom. */
  body.rhana-site-shell input:not([type='checkbox']):not([type='radio']),
  body.rhana-site-shell select,
  body.rhana-site-shell textarea { font-size: 16px !important; }

  body.rhana-site-shell button,
  body.rhana-site-shell .btn,
  body.rhana-site-shell input[type='submit'] { touch-action: manipulation; }

  /* Homepage art direction with a legible mobile type scale. */
  body.rhana-editorial .ed-hero {
    height: 350px !important;
    min-height: 350px !important;
    max-height: 350px !important;
  }

  body.rhana-editorial .ed-hero .ed-hero-copy {
    justify-content: center !important;
    padding-top: 24px !important;
    padding-bottom: 20px !important;
  }

  body.rhana-editorial .ed-hero .ed-hero-brand {
    min-height: 14px !important;
    margin: 0 0 12px !important;
    font-size: 10px !important;
  }

  body.rhana-editorial .ed-hero h1 {
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 0 14px !important;
    overflow: visible !important;
    font-size: clamp(29px, 8.4vw, 36px) !important;
    line-height: 1 !important;
  }

  body.rhana-editorial .ed-hero .ed-hero-copy > p {
    display: block !important;
    height: 4.5em !important;
    min-height: 4.5em !important;
    max-height: 4.5em !important;
    max-width: 230px !important;
    overflow: hidden !important;
    font-size: 12px !important;
    line-height: 1.5 !important;
  }

  body.rhana-editorial .ed-hero .ed-hero-actions {
    width: min(220px, 100%) !important;
  }

  body.rhana-editorial .ed-hero .ed-button {
    width: 100% !important;
    min-height: 44px !important;
    padding: 10px 14px !important;
    gap: 12px !important;
    font-size: 11px !important;
    white-space: nowrap !important;
  }

  body.rhana-editorial .ed-hero .ed-button > span {
    flex-shrink: 0 !important;
  }

  body.rhana-editorial .ed-hero .ed-slide-controls button {
    width: 44px !important;
    height: 44px !important;
  }

  body.rhana-editorial .ed-values {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-auto-rows: 1fr !important;
    align-items: stretch !important;
    gap: 0 !important;
    padding: 0 14px !important;
  }

  body.rhana-editorial .ed-values > div {
    min-width: 0 !important;
    min-height: 62px !important;
    height: 100% !important;
    align-self: stretch !important;
    box-sizing: border-box !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    padding: 8px !important;
    border-right: 1px solid #dedbd7 !important;
    border-bottom: 1px solid #dedbd7 !important;
  }

  body.rhana-editorial .ed-values > div:nth-child(2n) {
    border-right: 0 !important;
  }

  body.rhana-editorial .ed-values > div:nth-child(n+3) {
    border-bottom: 0 !important;
  }

  body.rhana-editorial .ed-values > div > .ed-icon {
    width: 18px !important;
    height: 18px !important;
    flex-basis: 18px !important;
  }

  body.rhana-editorial .ed-values p {
    min-width: 0 !important;
    text-align: left !important;
    font-size: 12px !important;
    line-height: 1.15 !important;
    white-space: normal !important;
  }
  body.rhana-editorial .ed-values small {
    margin-top: 2px !important;
    font-size: 8px !important;
    line-height: 1.25 !important;
    white-space: normal !important;
  }

  body.rhana-editorial .ed-live-products .slick-track,
  body.rhana-editorial .ed-live-products .box__goods:not(.slick-initialized) {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.rhana-editorial .ed-live-products .slick-slide:nth-child(n+3),
  body.rhana-editorial .ed-live-products .box__goods:not(.slick-initialized) > .goods__item:nth-child(n+3) {
    display: none !important;
  }

  body.rhana-editorial .ed-live-products .buy__btn {
    display: flex !important;
    min-height: 44px !important;
    align-items: center !important;
    justify-content: center !important;
  }

  body.rhana-editorial .ed-catalog-heading a,
  body.rhana-editorial .hc-hero__link,
  body.rhana-editorial .hc-catalog__back {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
  }

  /* Catalog: two useful columns instead of an excessively long feed. */
  .hc-shell { width: calc(100% - 28px) !important; }
  .hc-catalog { padding: 28px 0 64px !important; }
  .hc-catalog__heading {
    gap: 16px !important;
    padding-bottom: 20px !important;
  }

  .hc-catalog__heading h1 {
    margin-top: 12px !important;
    font-size: clamp(38px, 12vw, 48px) !important;
  }

  .hc-filters { margin: 4px 0 24px !important; }
  .hc-filters__controls,
  .hc-filters--brand .hc-filters__controls {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px 14px !important;
  }

  .hc-filter,
  .hc-filters--brand .hc-filter {
    width: auto !important;
    min-height: 58px !important;
    padding: 8px 28px 8px 0 !important;
  }

  .hc-filter--sort { grid-column: 1 / -1; }
  .hc-filter > span,
  .hc-select-menu__label { font-size: 9px !important; }
  .hc-filter select,
  .hc-select-menu__value { font-size: 14px !important; }

  .hc-products {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 34px 12px !important;
    padding-top: 18px !important;
  }

  .hc-card__image { aspect-ratio: 1 / 1.08 !important; }
  .hc-card__body { padding-top: 13px !important; }
  .hc-card__brand {
    margin-bottom: 7px !important;
    font-size: 9px !important;
  }

  .hc-card h3 {
    display: -webkit-box !important;
    min-height: 5.45em !important;
    max-height: 5.45em !important;
    overflow: hidden !important;
    font-size: 14px !important;
    line-height: 1.36 !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
  }

  .hc-card__meta {
    min-height: 50px !important;
    margin-top: 12px !important;
    padding-top: 11px !important;
  }

  .hc-card__price { font-size: 15px !important; }
  .hc-card__article { display: none !important; }
  .hc-card__more {
    display: flex !important;
    min-height: 44px !important;
    align-items: center !important;
    padding-top: 8px !important;
    font-size: 12px !important;
  }

  .hc-seo { padding: 54px 0 58px !important; }

  /* Product page: bring product information and purchase action closer. */
  .rhana-product-page {
    padding-bottom: calc(96px + env(safe-area-inset-bottom)) !important;
  }

  .rhana-product-page .sectionwhite > .box__section.goods__desc:first-of-type,
  .rhana-product-page .sectionwhite > .box__section.goods__desc.nomar {
    width: auto !important;
    margin-left: 14px !important;
    margin-right: 14px !important;
  }

  .rhana-product-page .goods__wrapper { gap: 14px !important; }
  .rhana-product-page .goods__wrapper > .goods__desc-left { padding: 8px 12px !important; }
  .rhana-product-page .goods__img-center { height: clamp(228px, 72vw, 290px) !important; }
  .rhana-product-page .goods__desc-right { padding-bottom: 18px !important; }
  .rhana-product-page .goods__desc-right > .info__desc {
    margin-bottom: 7px !important;
    font-size: 9px !important;
  }

  .rhana-product-page .info__title {
    margin: 6px 0 10px !important;
    font-size: clamp(27px, 8.4vw, 34px) !important;
    line-height: 1.06 !important;
  }

  .rhana-product-page .ndesc {
    font-size: 14px !important;
    line-height: 1.55 !important;
  }

  .rhana-product-page .rp-buy-eyebrow { margin-top: 12px !important; }

  .rhana-product-page .catalog__buy {
    margin-top: 4px !important;
    padding-top: 4px !important;
  }
  .rhana-product-page .catalog__buy .product-item-detail-info-container {
    margin-bottom: 0 !important;
  }
  .rhana-product-page .goods__btn .btn,
  .rhana-product-page #keysData .favwrapper .favorite { min-height: 52px !important; }

  .rhana-product-page .box__section.box__desc,
  .rhana-product-page .rp-related {
    margin-left: 14px !important;
    margin-right: 14px !important;
  }

  /* The breadcrumb row belongs to the page surface, without a white strip. */
  .rhana-product-page .sectionwhite > .box__section.goods__desc:first-of-type {
    background: transparent !important;
  }

  /* Related products: a real one-row mobile carousel with swipe and controls. */
  .rhana-product-page .rp-related { position: relative; }
  .rhana-product-page .rp-related .box__goods {
    display: flex !important;
    flex-flow: row nowrap !important;
    gap: 12px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }
  .rhana-product-page .rp-related .box__goods::-webkit-scrollbar { display: none; }
  .rhana-product-page .rp-related .goods__item {
    flex: 0 0 calc(100vw - 64px) !important;
    width: calc(100vw - 64px) !important;
    max-width: 330px !important;
    scroll-snap-align: start;
  }
  .rhana-product-page .rp-related-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
    margin: -4px 0 13px;
    color: #77706a;
    font: 500 10px/1 Rubik, Arial, sans-serif;
    letter-spacing: .08em;
  }
  .rhana-product-page .rp-related-nav button {
    display: inline-flex;
    width: 38px;
    height: 38px;
    padding: 0;
    align-items: center;
    justify-content: center;
    border: 1px solid #c9c3bd;
    border-radius: 0;
    background: transparent;
    color: #4c4844;
    font: 400 18px/1 Arial, sans-serif;
  }
  .rhana-product-page .rp-related-nav button:disabled { opacity: .32; }
  .rhana-product-page .rp-related-nav__count { min-width: 36px; text-align: center; }

  .rhana-product-page .box__desc-up .nav-tabs {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .rhana-product-page .box__desc-up .nav-tabs::-webkit-scrollbar { display: none !important; }
  .rhana-product-page .box__desc-up .nav-tabs > div {
    flex: 0 0 auto !important;
    min-height: 48px;
    padding-top: 17px !important;
  }

  .rhana-product-page .box__desc-inner table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .rhana-product-page .b__order {
    display: grid !important;
    grid-template-columns: auto minmax(168px, 1fr) !important;
    min-height: 68px !important;
    gap: 12px !important;
    align-items: center !important;
    padding: 9px 14px calc(9px + env(safe-area-inset-bottom)) !important;
    background: #f3efeb !important;
  }

  .rhana-product-page .b__order::before { background: #f3efeb !important; }
  .rhana-product-page .b__order-price {
    display: flex !important;
    min-width: 0 !important;
    height: 46px !important;
    float: none !important;
    align-items: center !important;
  }
  .rhana-product-page .b__order .buy__price {
    width: auto !important;
    float: none !important;
    font-size: clamp(20px, 6.3vw, 26px) !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }
  .rhana-product-page .b__order #keysAppend {
    display: block !important;
    min-width: 0 !important;
    clear: none !important;
  }
  .rhana-product-page .b__order #keysData { display: block !important; }
  .rhana-product-page .b__order .goods__btn {
    display: block !important;
    margin: 0 !important;
  }
  .rhana-product-page .b__order .goods__btn + .goods__btn,
  .rhana-product-page .b__order .oneclick,
  .rhana-product-page .b__order .favwrapper,
  .rhana-product-page .b__order .rp-assurance { display: none !important; }
  .rhana-product-page .b__order #keysData > .goods__btn:first-child:has(.btn__grd:not([style*='display: none'])) + .goods__btn {
    display: none !important;
  }
  .rhana-product-page .b__order .btn__grd {
    display: flex !important;
    width: 100% !important;
    height: 46px !important;
    margin: 0 !important;
    float: none !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1px solid #343431 !important;
    border-radius: 0 !important;
    background: #343431 !important;
    color: #fff !important;
    font: 500 11px/1 Rubik, Arial, sans-serif !important;
    letter-spacing: .08em !important;
    text-transform: uppercase !important;
  }

  /* Product photography and recommendation cards use the same warm neutral
     surface instead of isolated white rectangles. */
  .rhana-product-page .sectionwhite > .box__section.goods__desc:first-of-type .goods__img_slider {
    background: #f1ede8 !important;
  }
  .rhana-product-page .sectionwhite > .box__section.goods__desc:first-of-type .goods__img-item img,
  .rhana-product-page .rp-related .goods__item-img img { mix-blend-mode: multiply; }

  /* Neutralize the legacy hover-only purchase layer that can remain stuck
     after a touch and cover the product card with a white panel. */
  .rhana-product-page .rp-related .goods__item-buy,
  .rhana-product-page .rp-related .goods__item:hover .goods__item-buy {
    display: none !important;
    background: transparent !important;
  }

  /* Old Bitrix add-to-cart popup: compact editorial treatment on phones. */
  body.rhana-site-shell .popup-window,
  body.rhana-site-shell .bx-core-popup-menu {
    border-radius: 0 !important;
  }
  body.rhana-site-shell .popup-window .btn__blue,
  body.rhana-site-shell .popup-window .buy__btn,
  body.rhana-site-shell .popup-window .btn__grd {
    min-height: 46px !important;
    margin: 0 !important;
    border: 1px solid #343431 !important;
    border-radius: 0 !important;
    background: #343431 !important;
    color: #fff !important;
    font-family: Rubik, Arial, sans-serif !important;
    font-weight: 500 !important;
  }

  /* Editorial and utility pages share one calm mobile display scale. */
  .eu-hero h1,
  .ed-info-hero h1,
  .eh-hero h1,
  .rauth-intro h1,
  .rh-basket-hero h1 {
    font-size: clamp(38px, 12vw, 48px) !important;
    line-height: 1.02 !important;
  }

  .eu-hero__copy,
  .eh-hero__copy {
    padding-left: 18px !important;
    padding-right: 18px !important;
  }

  .ed-contact-map-link,
  .ed-contact-columns nav a,
  .ed-contact-requisites > a,
  .ed-contact-question > a { min-height: 52px; }

  /* Product purchase stays in the main product summary instead of appearing later as a dock. */
  .rhana-product-page { padding-bottom: 0 !important; }
  .rhana-product-page #keysContainer {
    display: block !important;
    width: 100% !important;
    margin-top: 10px !important;
  }
  .rhana-product-page #keysContainer #keysData { display: block !important; }
  .rhana-product-page #keysContainer .goods__btn:first-child {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
  }
  .rhana-product-page #keysContainer .goods__btn:first-child .btn__grd {
    display: flex !important;
    width: 100% !important;
    height: 52px !important;
    min-height: 52px !important;
    padding: 0 18px !important;
    align-items: center !important;
    justify-content: center !important;
    border-color: #343431 !important;
    background: #343431 !important;
    color: #fff !important;
    line-height: 1 !important;
  }
  .rhana-product-page #keysContainer .oneclick,
  .rhana-product-page .b__order { display: none !important; }

  /* Footer links are dependable touch targets. */
  body.rhana-site-shell .ed-footer {
    padding: 30px 18px calc(22px + env(safe-area-inset-bottom)) !important;
    gap: 24px 16px !important;
  }

  body.rhana-site-shell .ed-footer h2 { margin-bottom: 8px !important; }
  body.rhana-site-shell .ed-footer > div > a:not(.ed-footer-wordmark) {
    display: flex !important;
    min-height: 40px !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 6px 0 !important;
  }
  body.rhana-site-shell .ed-footer-legal nav { gap: 2px !important; }
  body.rhana-site-shell .ed-footer-legal a {
    display: flex !important;
    min-height: 28px !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 2px 0 !important;
  }

  :focus-visible {
    outline: 2px solid #713642 !important;
    outline-offset: 3px !important;
  }
}

@media (max-width: 360px) {
  body.rhana-site-shell#start .header .header__logo { width: 104px !important; }
  body.rhana-editorial .ed-hero h1 { font-size: 28px !important; }
  body.rhana-editorial .ed-values > div { padding-inline: 8px !important; }
  body.rhana-editorial .ed-values p { font-size: 12px !important; }
  .hc-shell { width: calc(100% - 24px) !important; }
  .hc-products { column-gap: 10px !important; }
  .hc-card h3 { font-size: 13px !important; }
  .rhana-product-page .info__title { font-size: 27px !important; }
}

/* RHANA20 must keep the eyebrow attached to the message on every phone. */
@media (max-width: 750px) {
  body.rhana-editorial .ed-hero-promo .ed-hero-copy {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center !important;
    row-gap: 0 !important;
    padding: 20px clamp(16px, 5vw, 22px) !important;
  }
  body.rhana-editorial .ed-hero-promo .ed-hero-brand {
    margin: 0 0 12px !important;
  }
  body.rhana-editorial .ed-hero-promo h1 {
    margin: 0 0 14px !important;
  }
  body.rhana-editorial .ed-hero-promo .ed-hero-copy > p {
    margin: 0 0 14px !important;
  }
  body.rhana-editorial .ed-hero-promo .ed-hero-actions {
    margin: 0 !important;
  }
  body.rhana-editorial .ed-hero-promo .ed-slide-controls {
    margin: 12px 0 0 !important;
  }
}

/* One mobile baseline for every hero: left aligned and visually centred lower. */
@media (max-width: 750px) {
  body.rhana-editorial .ed-hero .ed-hero-copy,
  body.rhana-editorial .ed-hero-promo .ed-hero-copy {
    display: flex !important;
    box-sizing: border-box !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center !important;
    width: 100% !important;
    height: 100% !important;
    padding: 40px clamp(16px, 5vw, 22px) 8px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.rhana-site-shell *,
  body.rhana-site-shell *::before,
  body.rhana-site-shell *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
