/*
 * Reyhoon Shop Premium v21.5.53
 * Mobile + Tablet polish / gift budget + header actions
 * Desktop is intentionally untouched: all rules are <=900px.
 */
@media (max-width:900px){
  :root{
    --rh53-green:#173f35;
    --rh53-green-2:#214f40;
    --rh53-gold:#b18a4e;
    --rh53-cream:#fbf8f1;
    --rh53-line:#e4e9e3;
    --rh53-shadow:0 12px 34px rgba(23,63,53,.09);
  }

  /* ---------- Mobile/tablet header: one coherent touch system ---------- */
  .rs-header-v6 .rh-mobile-header{
    background:rgba(255,255,255,.97)!important;
    backdrop-filter:blur(14px)!important;
    -webkit-backdrop-filter:blur(14px)!important;
    border-bottom:1px solid rgba(23,63,53,.07)!important;
  }
  .rh-mobile-header-top{
    position:relative!important;
    min-height:68px!important;
    width:calc(100% - 24px)!important;
    grid-template-columns:42px minmax(0,1fr) auto!important;
    gap:10px!important;
  }
  .rh-mobile-header-top .rs-menu-toggle{
    width:42px!important;height:42px!important;
    border:1px solid var(--rh53-line)!important;
    border-radius:14px!important;
    background:linear-gradient(145deg,#fff,#f4f7f3)!important;
    box-shadow:0 7px 18px rgba(23,63,53,.07)!important;
    transition:transform .2s ease,box-shadow .2s ease,background .2s ease!important;
  }
  .rh-mobile-header-top .rs-menu-toggle:active{transform:scale(.94)!important;box-shadow:0 3px 9px rgba(23,63,53,.06)!important;}
  .rh-mobile-header-top .rs-menu-toggle span{width:17px!important;height:2px!important;background:var(--rh53-green)!important;transition:transform .22s ease,opacity .18s ease!important;}
  .rh-mobile-brand{width:min(185px,55vw)!important;justify-self:center!important;filter:drop-shadow(0 5px 10px rgba(23,63,53,.05));}
  .rh-mobile-brand img{max-height:42px!important;}

  .rh-mobile-actions{
    gap:7px!important;
    align-items:center!important;
  }
  .rh-mobile-action{
    width:45px!important;height:45px!important;
    min-width:45px!important;
    padding:0!important;
    border:1px solid var(--rh53-line)!important;
    border-radius:14px!important;
    background:linear-gradient(145deg,#ffffff,#f7f9f6)!important;
    box-shadow:0 7px 18px rgba(23,63,53,.07)!important;
    gap:2px!important;
    overflow:visible!important;
    transition:transform .22s cubic-bezier(.22,.61,.36,1),box-shadow .22s ease,border-color .22s ease!important;
  }
  .rh-mobile-action:hover{transform:translateY(-2px)!important;box-shadow:0 11px 24px rgba(23,63,53,.11)!important;border-color:#d5dfd5!important;}
  .rh-mobile-action:active{transform:scale(.94)!important;box-shadow:0 4px 10px rgba(23,63,53,.07)!important;}
  .rh-mobile-action>span{
    width:26px!important;height:26px!important;
    border-radius:9px!important;
    background:#eef5ee!important;
    color:var(--rh53-green)!important;
    display:grid!important;place-items:center!important;
    line-height:0!important;font-size:0!important;
  }
  .rh-mobile-action>span svg{width:15px!important;height:15px!important;display:block!important;stroke:currentColor!important;fill:none!important;stroke-width:1.9!important;}
  .rh-mobile-action b{font-size:7px!important;line-height:1!important;color:#596b62!important;font-weight:850!important;}
  .rh-mobile-cart>span{background:#f7f0e3!important;color:#9a753b!important;}
  .rh-mobile-cart-count{top:-6px!important;left:-6px!important;min-width:18px!important;height:18px!important;border:2px solid #fff!important;background:var(--rh53-gold)!important;box-shadow:0 4px 10px rgba(129,94,36,.2)!important;font-size:8px!important;}

  .rh-mobile-quick{
    width:calc(100% - 24px)!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:7px!important;
    margin-bottom:9px!important;
  }
  .rh-mobile-quick-item{
    height:40px!important;
    border-radius:12px!important;
    border:1px solid #e2e9e2!important;
    background:linear-gradient(145deg,#fbfcfa,#f2f6f2)!important;
    box-shadow:0 5px 14px rgba(23,63,53,.045)!important;
    font-size:9px!important;
    transition:transform .2s ease,background .2s ease,box-shadow .2s ease!important;
  }
  .rh-mobile-quick-item:active{transform:scale(.97)!important;background:#edf4ed!important;}
  .rh-mobile-quick-item span{width:22px!important;height:22px!important;flex:0 0 22px!important;border-radius:7px!important;background:#fff!important;box-shadow:0 2px 7px rgba(23,63,53,.06)!important;}

  .rs-header-v6 .rs-header-search-row{padding:0 0 11px!important;}
  .rs-header-v6 .rs-search .rs-pro-search-row{grid-template-columns:minmax(0,1fr) 78px!important;gap:7px!important;}
  .rs-header-v6 .rs-search .rs-pro-search-shell{height:45px!important;border-radius:14px!important;background:#f5f8f4!important;box-shadow:inset 0 0 0 1px rgba(23,63,53,.02),0 5px 15px rgba(23,63,53,.035)!important;}
  .rs-header-v6 .rs-search .rs-pro-search-input{height:43px!important;font-size:11px!important;}
  .rs-header-v6 .rs-search .rs-pro-search-submit{height:45px!important;border-radius:14px!important;background:linear-gradient(135deg,#173f35,#245342)!important;box-shadow:0 8px 18px rgba(23,63,53,.16)!important;transition:transform .2s ease,box-shadow .2s ease!important;}
  .rs-header-v6 .rs-search .rs-pro-search-submit:active{transform:scale(.97)!important;box-shadow:0 4px 10px rgba(23,63,53,.12)!important;}

  /* Give anchor targets room below the sticky header. */
  #rs-gifts,#rs-featured,#rs-categories,#rs-about{scroll-margin-top:170px!important;}

  /* ---------- Gift by budget: premium mobile carousel / tablet grid ---------- */
  .rs-gifts{overflow:hidden!important;}
  .rs-gifts .rs-section-head{margin-bottom:14px!important;}
  .rs-gifts .rs-section-head h2{font-size:22px!important;line-height:1.55!important;color:var(--rh53-green)!important;}
  .rs-gifts .rs-section-head p{font-size:10px!important;color:#728078!important;}
  .rs-gifts .rs-gift-grid{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:12px!important;
    min-width:0!important;
  }
  .rs-gifts .rs-gift-card{
    width:100%!important;
    min-width:0!important;
    aspect-ratio:1/1!important;
    border-radius:20px!important;
    box-shadow:0 12px 30px rgba(23,63,53,.10)!important;
    animation:none!important;
    transition:transform .25s cubic-bezier(.22,.61,.36,1),box-shadow .25s ease!important;
  }
  .rs-gifts .rs-gift-card:active{transform:scale(.975)!important;box-shadow:0 8px 18px rgba(23,63,53,.09)!important;}
  .rs-gifts .rs-gift-card img{object-fit:cover!important;}
}

@media (min-width:561px) and (max-width:900px){
  .rh-mobile-header-top{min-height:74px!important;width:calc(100% - 32px)!important;grid-template-columns:48px minmax(0,1fr) auto!important;gap:13px!important;}
  .rh-mobile-header-top .rs-menu-toggle{width:48px!important;height:48px!important;border-radius:15px!important;}
  .rh-mobile-brand{width:min(235px,40vw)!important;}
  .rh-mobile-actions{gap:9px!important;}
  .rh-mobile-action{width:50px!important;height:50px!important;min-width:50px!important;border-radius:15px!important;}
  .rh-mobile-action>span{width:28px!important;height:28px!important;border-radius:9px!important;}
  .rh-mobile-action>span svg{width:16px!important;height:16px!important;}
  .rh-mobile-action b{font-size:7.5px!important;}
  .rh-mobile-quick{width:calc(100% - 32px)!important;gap:9px!important;margin-bottom:11px!important;}
  .rh-mobile-quick-item{height:44px!important;font-size:10px!important;border-radius:13px!important;}
  .rs-header-v6 .rs-header-search-row{padding-bottom:13px!important;}
  .rs-header-v6 .rs-search .rs-pro-search-row{grid-template-columns:minmax(0,1fr) 96px!important;gap:9px!important;}
  .rs-header-v6 .rs-search .rs-pro-search-shell,.rs-header-v6 .rs-search .rs-pro-search-submit{height:49px!important;border-radius:15px!important;}
  .rs-header-v6 .rs-search .rs-pro-search-input{height:47px!important;font-size:12px!important;}
  #rs-gifts,#rs-featured,#rs-categories,#rs-about{scroll-margin-top:190px!important;}
  .rs-gifts .rs-gift-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:13px!important;}
  .rs-gifts .rs-gift-card{border-radius:22px!important;}
}

@media (max-width:560px){
  .rh-mobile-header-top{min-height:64px!important;width:calc(100% - 16px)!important;grid-template-columns:39px minmax(0,1fr) auto!important;gap:7px!important;}
  .rh-mobile-header-top .rs-menu-toggle{width:39px!important;height:39px!important;border-radius:12px!important;}
  .rh-mobile-brand{width:min(154px,47vw)!important;}
  .rh-mobile-brand img{max-height:38px!important;}
  .rh-mobile-actions{gap:5px!important;}
  .rh-mobile-action{width:40px!important;height:40px!important;min-width:40px!important;border-radius:12px!important;}
  .rh-mobile-action>span{width:24px!important;height:24px!important;border-radius:8px!important;}
  .rh-mobile-action>span svg{width:14px!important;height:14px!important;}
  .rh-mobile-action b{font-size:6.5px!important;}
  .rh-mobile-cart-count{top:-5px!important;left:-5px!important;min-width:17px!important;height:17px!important;font-size:7px!important;}
  .rh-mobile-quick{width:calc(100% - 16px)!important;gap:5px!important;margin-bottom:8px!important;}
  .rh-mobile-quick-item{height:36px!important;border-radius:10px!important;font-size:8px!important;padding:0 4px!important;}
  .rh-mobile-quick-item span{width:20px!important;height:20px!important;flex-basis:20px!important;font-size:10px!important;}
  .rs-header-v6 .rs-header-search-inner{width:calc(100% - 16px)!important;}
  .rs-header-v6 .rs-header-search-row{padding-bottom:9px!important;}
  .rs-header-v6 .rs-search .rs-pro-search-row{grid-template-columns:minmax(0,1fr) 67px!important;gap:5px!important;}
  .rs-header-v6 .rs-search .rs-pro-search-shell,.rs-header-v6 .rs-search .rs-pro-search-submit{height:41px!important;border-radius:12px!important;}
  .rs-header-v6 .rs-search .rs-pro-search-input{height:39px!important;font-size:10px!important;padding-right:36px!important;}
  .rs-header-v6 .rs-search .rs-pro-search-submit{font-size:8px!important;}

  /* Horizontal snap cards keep the complete square artwork visible and feel native on phones. */
  .rs-gifts .rs-section-head h2{font-size:20px!important;}
  .rs-gifts .rs-section-head p{font-size:9px!important;line-height:1.9!important;}
  .rs-gifts .rs-gift-grid{
    display:flex!important;
    gap:10px!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    padding:3px 2px 13px!important;
    margin-inline:-2px!important;
    scroll-snap-type:x mandatory!important;
    scrollbar-width:none!important;
    -webkit-overflow-scrolling:touch!important;
  }
  .rs-gifts .rs-gift-grid::-webkit-scrollbar{display:none!important;}
  .rs-gifts .rs-gift-card{
    flex:0 0 min(78vw,315px)!important;
    width:min(78vw,315px)!important;
    aspect-ratio:1/1!important;
    border-radius:21px!important;
    scroll-snap-align:start!important;
  }
  .rs-gifts .rs-gift-card img{object-fit:cover!important;}
  .rs-gifts .rs-gift-card:active{transform:scale(.975)!important;}

  /* Prevent bottom navigation from obscuring CTA buttons. */
  body:not(.single-product):not(.woocommerce-cart):not(.woocommerce-checkout):not(.woocommerce-account){padding-bottom:calc(76px + env(safe-area-inset-bottom))!important;}
}

@media (prefers-reduced-motion:reduce){
  .rh-mobile-action,.rh-mobile-quick-item,.rs-header-v6 .rs-search .rs-pro-search-submit,.rs-gifts .rs-gift-card{transition:none!important;}
}

/* v21.5.92 — Mobile cart drawer + header search stabilization.
 * Scoped to tablet/phone; preserves desktop header and the existing palette.
 */
@media (max-width: 1024px) {
  .rh-cart-backdrop {
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147483000 !important;
    background: rgba(9, 24, 20, .48) !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
  .rh-cart-backdrop.is-open {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }
  .rh-cart-drawer {
    position: fixed !important;
    inset: 0 0 0 auto !important;
    width: min(430px, calc(100vw - 14px)) !important;
    max-width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    z-index: 2147483001 !important;
    transform: translate3d(110%, 0, 0) !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: transform .28s cubic-bezier(.22,.8,.24,1), visibility 0s linear .28s !important;
    contain: none !important;
    will-change: transform;
  }
  .rh-cart-drawer.is-open {
    transform: translate3d(0, 0, 0) !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transition: transform .28s cubic-bezier(.22,.8,.24,1), visibility 0s !important;
  }
  .rh-cart-panel {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
    overflow: hidden !important;
    padding-bottom: 0 !important;
  }
  .rh-cart-body {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior-y: contain !important;
    touch-action: pan-y !important;
  }
  .rh-cart-footer {
    flex-shrink: 0 !important;
    padding-bottom: calc(14px + env(safe-area-inset-bottom)) !important;
  }
  body.rh-cart-offcanvas-open {
    overflow: hidden !important;
    overscroll-behavior: none !important;
    /* Do not use touch-action:none on body: it blocks drawer-content scrolling on iOS. */
    touch-action: auto !important;
  }

  /* Search is a dedicated, full-width row immediately beneath mobile quick links. */
  .rs-header-v6 .rs-header-search-row {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 9px 0 11px !important;
    border-top: 1px solid #edf0eb !important;
    border-bottom: 1px solid #e9ece7 !important;
    background: #fff !important;
    box-shadow: 0 5px 14px rgba(23,63,53,.035) !important;
    z-index: 5 !important;
    overflow: visible !important;
  }
  .rs-header-v6 .rs-header-search-row .rs-header-search-inner {
    display: block !important;
    width: calc(100% - 20px) !important;
    max-width: 1180px !important;
    min-height: 0 !important;
    margin-inline: auto !important;
    padding: 0 !important;
  }
  .rs-header-v6 .rs-header-search-row .rs-search,
  .rs-header-v6 .rs-header-search-row .rs-pro-search-row,
  .rs-header-v6 .rs-header-search-row .rs-pro-search-shell {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
  }
  .rs-header-v6 .rs-header-search-row .rs-pro-search-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 76px !important;
    align-items: stretch !important;
    gap: 7px !important;
    margin: 0 !important;
  }
  .rs-header-v6 .rs-header-search-row .rs-pro-search-shell,
  .rs-header-v6 .rs-header-search-row .rs-pro-search-submit {
    height: 46px !important;
    min-height: 46px !important;
    border-radius: 12px !important;
  }
  .rs-header-v6 .rs-header-search-row .rs-pro-search-shell {
    position: relative !important;
    overflow: hidden !important;
    border: 1px solid #e1e7e1 !important;
    background: #f7f9f6 !important;
  }
  .rs-header-v6 .rs-header-search-row .rs-pro-search-input {
    width: 100% !important;
    height: 44px !important;
    min-width: 0 !important;
    padding-inline: 38px 12px !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
    background: transparent !important;
  }
  .rs-header-v6 .rs-header-search-row .rs-pro-search-submit {
    width: 76px !important;
    min-width: 76px !important;
    margin: 0 !important;
    padding: 0 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    font-size: 10px !important;
  }
  .rs-header-v6 .rs-header-search-row .rs-pro-search-panel {
    position: absolute !important;
    top: calc(100% + 5px) !important;
    right: 0 !important;
    left: 0 !important;
    z-index: 2147482000 !important;
    max-width: 100% !important;
  }
}
@media (max-width: 560px) {
  .rs-header-v6 .rs-header-search-row { padding: 8px 0 9px !important; }
  .rs-header-v6 .rs-header-search-row .rs-header-search-inner { width: calc(100% - 14px) !important; }
  .rs-header-v6 .rs-header-search-row .rs-pro-search-row { grid-template-columns: minmax(0, 1fr) 68px !important; gap: 5px !important; }
  .rs-header-v6 .rs-header-search-row .rs-pro-search-submit { width: 68px !important; min-width: 68px !important; font-size: 9px !important; }
  .rs-header-v6 .rs-header-search-row .rs-pro-search-shell,
  .rs-header-v6 .rs-header-search-row .rs-pro-search-submit { height: 42px !important; min-height: 42px !important; }
  .rs-header-v6 .rs-header-search-row .rs-pro-search-input { height: 40px !important; font-size: 12px !important; }
}
@media (prefers-reduced-motion: reduce) {
  .rh-cart-drawer, .rh-cart-backdrop { transition: none !important; }
}
