/* Phone header and menu (templates/main/_phone_menu.html). Below 992px the
   desktop header rows are hidden and this slim bar takes their place. */

/* Fixed (not sticky): a page that changes overflow -- the menu's scroll lock,
   some page layouts -- can't unstick it. #rr-phone-space holds its room. */
.rr-phone {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1030;
    background: #15161D; color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
}
.rr-phone-space { height: 104px; }
.rr-phone__bar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    padding: 6px 12px;
}
/* The logo never shrinks below a readable size: on a very narrow screen the
   cart and Menu buttons wrap onto their own line under it instead. */
.rr-phone__logo { flex: 1 0 150px; display: flex; align-items: center; }
.rr-phone__logo img { height: 38px; width: auto; max-width: 100%; }
.rr-phone__bar > :nth-child(2) { margin-left: auto; }

.rr-phone__cart, .rr-phone__toggle {
    flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    min-height: 44px; min-width: 44px; padding: 0 12px;
    border-radius: 10px; border: 1px solid rgba(255, 255, 255, .35);
    background: transparent; color: #fff; font-weight: 700; font-size: 1rem;
    text-decoration: none; cursor: pointer;
}
.rr-phone__cart:hover, .rr-phone__cart:focus, .rr-phone__toggle:hover { color: #fff; text-decoration: none; background: rgba(255, 255, 255, .08); }
.rr-phone__toggle[aria-expanded="true"] { background: #fff; color: #15161D; }
.rr-phone__cart { position: relative; }
.rr-phone__qty {
    position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px;
    border-radius: 10px; background: #D10024; color: #fff; font-size: .75rem; line-height: 20px; text-align: center;
}

.rr-phone__search {
    display: flex; padding: 0 12px 8px; max-height: 60px; overflow: hidden;
    transition: max-height .2s ease, padding .2s ease, opacity .15s ease;
}
/* Scrolling down tucks the search row away; a quick scroll up (or the top
   of the page) brings it back. */
.rr-phone--tucked .rr-phone__search { max-height: 0; padding-bottom: 0; opacity: 0; }
.rr-phone__search input {
    flex: 1; min-width: 0; height: 40px; padding: 0 12px;
    border: 0; border-radius: 10px 0 0 10px; background: #fff; color: #1a2332;
    font-size: 16px; /* 16px stops iPhones zooming in */
}
.rr-phone__search button {
    flex: none; width: 52px; height: 40px; border: 0; border-radius: 0 10px 10px 0;
    background: #D10024; color: #fff; font-size: 1.05rem;
}

/* The menu: a panel fixed under the bar (wherever the page is scrolled to),
   down to the bottom of the screen, scrolling on its own. The script sets
   its top to the bar's bottom edge. */
.rr-menu {
    position: fixed; left: 0; right: 0; top: 110px; bottom: 0; z-index: 1031;
    background: #15161D; color: #fff;
    border-top: 1px solid rgba(255, 255, 255, .12);
    padding: 4px 12px 24px;
    overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
}
.rr-menu[hidden] { display: none; }
.rr-menu__title {
    margin: 12px 0 6px; font-size: .72rem; font-weight: 700; letter-spacing: .1em;
    text-transform: uppercase; color: #9aa3b2;
}
.rr-menu__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.rr-menu__grid a {
    display: flex; align-items: center; min-height: 44px; padding: 8px 10px;
    border-radius: 8px; background: rgba(255, 255, 255, .07);
    color: #fff; font-weight: 600; font-size: .95rem; line-height: 1.2; text-decoration: none;
}
.rr-menu__list { display: flex; flex-direction: column; }
.rr-menu__list a, .rr-menu__list button {
    display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 6px 4px;
    border: 0; border-bottom: 1px solid rgba(255, 255, 255, .08); background: none;
    color: #fff; font-size: 1rem; text-align: left; text-decoration: none;
}
.rr-menu__list i { width: 18px; text-align: center; color: #9aa3b2; }
.rr-menu__grid a:hover, .rr-menu__grid a:focus { background: rgba(255, 255, 255, .15); color: #fff; }
.rr-menu__list a:hover, .rr-menu__list a:focus, .rr-menu__list button:hover { color: #fff; background: rgba(255, 255, 255, .05); }

/* With the menu open the page behind it doesn't scroll. */
@media (max-width: 991.98px) {
    html.rr-menu-open { overflow: hidden; }
    /* the desktop header rows */
    #top-header, #header { display: none !important; }
}

/* ---- The cart dropdown in the desktop header (templates/main/header.html),
   in the same look as the cart page. Opens with .dropdown.open (style.css). */
.cart-dropdown.rr-cd {
    width: 380px; max-width: calc(100vw - 24px); padding: 0; margin-top: 10px;
    background: var(--rr-card, #fff); color: var(--rr-text, #1a2332);
    border: 1px solid var(--rr-line, #e4e9f0); border-radius: 14px;
    box-shadow: 0 14px 40px rgba(0, 20, 40, .22); overflow: hidden; text-align: left;
}
.rr-cd__head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px;
    font-weight: 800; font-size: 1rem; border-bottom: 1px solid var(--rr-line, #e4e9f0); }
.rr-cd__head span { font-size: .8rem; font-weight: 700; padding: 2px 10px; border-radius: 999px;
    background: var(--rr-blue-tint, #e8f0fa); color: var(--rr-blue, #004b88); }
.rr-cd__list { list-style: none; margin: 0; padding: 4px 0; max-height: 320px; overflow-y: auto; }
.rr-cd__item { display: flex; align-items: center; gap: 12px; padding: 10px 16px; }
.rr-cd__item + .rr-cd__item { border-top: 1px solid var(--rr-line, #e4e9f0); }
.rr-cd__pic { flex: none; width: 52px; height: 52px; border-radius: 8px; background: #f2f4f7; overflow: hidden;
    display: flex; align-items: center; justify-content: center; font-weight: 800; color: #b6c0cc; font-size: .9rem; }
.rr-cd__pic img { width: 100%; height: 100%; object-fit: contain; }
.rr-cd__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; line-height: 1.3; }
.rr-cd__name { font-weight: 700; font-size: .92rem; color: var(--rr-text, #1a2332) !important; text-decoration: none;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rr-cd__name:hover { color: var(--rr-blue, #004b88) !important; }
.rr-cd__tag { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px;
    font-size: .72rem; font-weight: 700; background: var(--rr-green-tint, #e6f5ec); color: var(--rr-green, #1a7f4b); }
.rr-cd__price { font-size: .85rem; color: var(--rr-text-3, #66788d); }
.rr-cd__remove { margin: 0; flex: none; }
.rr-cd__remove button { width: 36px; height: 36px; border-radius: 8px; border: 1px solid transparent; background: transparent;
    color: #c8102e; cursor: pointer; }
.rr-cd__remove button:hover, .rr-cd__remove button:focus { background: rgba(209, 0, 36, .08); border-color: rgba(209, 0, 36, .3); }
.rr-cd__total { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 16px 0;
    border-top: 1px solid var(--rr-line, #e4e9f0); }
.rr-cd__total strong { font-size: 1.35rem; font-weight: 800; }
/* .rr-cd p: beats nicepage.css's p:not(.u-text-variant) (18px, double line height) */
.rr-cd p.rr-cd__note { margin: 2px 16px 0; font-size: .8rem; line-height: 1.4; color: var(--rr-text-3, #66788d); }
.rr-cd__btns { display: flex; gap: 8px; padding: 12px 16px 16px; }
.rr-cd__btns a { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px;
    border-radius: 10px; font-weight: 700; text-decoration: none !important; }
.rr-cd__view { border: 1px solid var(--rr-line, #d5dde7); color: var(--rr-text, #1a2332) !important; background: transparent; }
.rr-cd__view:hover { background: var(--rr-blue-tint, #e8f0fa); }
.rr-cd__go { background: #28a745; color: #fff !important; }
.rr-cd__go:hover { background: #218838; }
