/* Rama Rudraksha mobile-only premium header refinement — v3.4.0.
 * Only below 741px. The existing desktop/tablet visual structure is untouched.
 * Works with the existing TranslatePress-based #rrji-lang-pill, WooCommerce
 * cart preview, and RRCH slide-out menu. */
@media screen and (max-width: 740px) {
  :root { --rrch-mobile-refined-h: 64px; }
  body.rrch-custom-header-active:not(.rrch-home-overlay) {
    padding-top: var(--rrch-mobile-refined-h) !important;
  }
  #rrch-header {
    background: rgba(250, 247, 241, .965);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(170, 143, 110, .16);
  }
  #rrch-header .rrch-inner,
  body.rrch-scrolled #rrch-header .rrch-inner {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap !important;
    width: 100%;
    min-height: 64px;
    padding: 0 13px !important;
    gap: 7px !important;
  }
  body.rrch-scrolled #rrch-header .rrch-inner { min-height: 58px; }
  #rrch-header .rrch-left {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    min-width: 0;
    gap: 7px;
  }
  #rrch-header .rrch-left .rrch-menu-toggle {
    display: inline-flex !important;
    flex: 0 0 34px;
    order: -1;
    width: 34px !important;
    height: 40px !important;
  }
  #rrch-header .rrch-left .rrch-menu-toggle svg {
    width: 21px !important;
    height: 21px !important;
    stroke-width: 1.7;
  }
  #rrch-header .rrch-right {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
    gap: 5px !important;
    min-width: 0;
  }
  #rrch-header .rrch-right .rrch-search-toggle,
  #rrch-header .rrch-right .rrch-account-link,
  #rrch-header .rrch-right .rrch-wishlist-link { display: none !important; }
  #rrch-header .rrch-brand,
  body.rrch-scrolled #rrch-header .rrch-brand {
    display: inline-flex !important;
    flex: 0 1 auto;
    white-space: nowrap !important;
    width: auto;
    max-width: 100%;
    min-width: 0;
    align-items: baseline;
    gap: 3px !important;
    font: 400 clamp(16px, 5vw, 21px)/1.1 Georgia, 'Times New Roman', serif !important;
    letter-spacing: -.053em !important;
    text-decoration: none !important;
  }
  #rrch-header .rrch-brand-accent {font-style:italic!important}
  #rrch-header .rrch-right .rrch-cart-area {order: 2;flex:0 0 auto}
  #rrch-header .rrch-right .rrch-cart-toggle {
    width: 35px !important;
    height: 40px !important;
  }
  #rrch-header .rrch-cart-toggle svg { width: 19px !important;height:19px!important; }
  #rrch-header .rrch-count {
    min-width: 15px;
    height: 15px;
    line-height: 15px;
    padding: 0 3px;
    font-size: 9px;
    top: 0; right: -1px;
  }
  /* The same live TranslatePress links, just a smaller segmented control.
     'JP' is visual shorthand; the full original 日本語 text remains in the link
     for screen readers, translations, and native navigation. */
  body #rrch-header .rrch-right #rrji-lang-pill {
    --rrji-en-width: 27px;
    --rrji-ja-width: 29px;
    --rrji-edge: 2px;
    width: 62px !important;
    min-width: 62px !important;
    height: 31px !important;
    padding: 2px !important;
    margin: 0 !important;
    order: 1 !important;
    border: 1px solid rgba(144, 112, 79, .32) !important;
    background: #fffaf4 !important;
    box-shadow: none !important;
  }
  body #rrch-header #rrji-lang-pill .rrji-pill-indicator {
    background: #6d543a !important;
    box-shadow: none !important;
  }
  body #rrch-header #rrji-lang-pill a.rrji-choice {
    font: 600 10px/1 Arial, 'Yu Gothic', sans-serif !important;
    letter-spacing: .015em !important;
    padding: 0 !important;
  }
  body #rrch-header #rrji-lang-pill a.rrji-choice[lang="ja"] {
    font-size: 0 !important;
  }
  body #rrch-header #rrji-lang-pill a.rrji-choice[lang="ja"]::after {
    content: 'JP';
    font: 600 10px/1 Arial, sans-serif !important;
    letter-spacing: .015em;
    color: inherit;
  }
  #rrch-header .rrch-cart-popover {
    top: 74px;
    border-radius: 13px;
    box-shadow: 0 24px 54px rgba(40,31,22,.14);
  }
  body.rrch-scrolled #rrch-header .rrch-cart-popover {top:67px}
  body.admin-bar #rrch-header .rrch-cart-popover {top:120px}
  body.admin-bar.rrch-scrolled #rrch-header .rrch-cart-popover {top:113px}
  .rrch-mobile-panel:not([hidden]) { width:min(350px,89vw); padding: 22px 20px 30px;background:#fcf8f1; }
  .rrch-mobile-panel .rrch-mobile-title {font-size: 23px}
  .rrch-mobile-panel .rrch-mobile-nav .rrch-nav-list > li > a {padding:13px 14px!important}
  .rrch-mobile-panel .rrch-mobile-search {margin: 12px 0 15px}
  .rrch-mobile-panel .rrch-mobile-search-form {display:flex;align-items:stretch;gap:0;min-height:45px}
  .rrch-mobile-panel .rrch-mobile-search-form input[type="search"] {
    flex:1;min-width:0;padding:0 13px;background:#fffdf9;
    border:1px solid #ded1c1;border-right:0;border-radius:9px 0 0 9px;
    color:#34271e;font:400 14px/1.4 Arial,sans-serif;
  }
  .rrch-mobile-panel .rrch-mobile-search-form input[type="search"]:focus {
    outline:2px solid rgba(151,113,76,.27);outline-offset:0;
  }
  .rrch-mobile-panel .rrch-mobile-search-form button {
    flex:0 0 auto;border:1px solid #59442f;border-radius:0 9px 9px 0;
    color:#fff;background:#59442f;padding:0 13px;
    font:500 12px/1 Arial,sans-serif;cursor:pointer;
  }
}
@media screen and (max-width: 360px) {
  #rrch-header .rrch-inner,
  body.rrch-scrolled #rrch-header .rrch-inner {padding-inline: 9px !important;gap: 4px !important}
  #rrch-header .rrch-left {gap: 4px}
  #rrch-header .rrch-right {gap: 3px!important}
  #rrch-header .rrch-brand,
  body.rrch-scrolled #rrch-header .rrch-brand {font-size: clamp(15px,4.8vw,17px)!important;gap:2px!important}
  #rrch-header .rrch-left .rrch-menu-toggle {width:32px!important;flex-basis:32px}
  #rrch-header .rrch-right .rrch-cart-toggle {width:32px!important}
}
@media (max-width: 740px) and (prefers-reduced-motion: reduce) {
  #rrch-header, #rrch-header * { transition: none !important; }
}
