/* ═══════════════════════════════════════════════════════════════════════
   MyPixia site header (fragments/navbar.html, behaviour in mpx-nav.js)
   - one bar: logo, search, Products / Deals / Design / Help, Account,
     Start designing, cart
   - Products mega menu: departments rail, categories, products, promo
   - phones and tablets (< 992px): drawer with drill-down views
   Every class is prefixed mpx- so the React bundle's CSS cannot collide.
════════════════════════════════════════════════════════════════════════ */

:root {
    --mpx-ink: #1a1a2e;
    --mpx-ink-2: #23233b;
    --mpx-accent: #f88300;
    --mpx-accent-hover: #ff9a2e;
    --mpx-accent-text: #a64b00;   /* orange that passes 4.5:1 on white */
    --mpx-text: #1a1a2e;
    --mpx-muted: #5d6075;
    --mpx-line: #e8e9ef;
    --mpx-surface: #f5f6f8;
    --mpx-radius: 12px;
    --mpx-shadow: 0 18px 48px rgba(16, 18, 40, 0.18), 0 0 0 1px rgba(16, 18, 40, 0.06);
    --mpx-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
    --mpx-bar-h: 64px;
}

/* ── Announcement line ───────────────────────────────────────────────── */
.mpx-promo-strip {
    background: #11111f;
    color: rgba(255, 255, 255, 0.86);
    text-align: center;
    font-size: 0.78rem;
    line-height: 1.3;
    padding: 6px 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.01em;
}

#mpx-promo-text {
    display: inline-block;
    transition: opacity 0.4s ease;
}

/* ── Bar ──────────────────────────────────────────────────────────────── */
.mpx-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: var(--mpx-ink);
    color: #fff;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06), 0 2px 10px rgba(0, 0, 0, 0.12);
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.mpx-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: var(--mpx-bar-h);
    padding: 0 24px;
    max-width: 1600px;
    margin: 0 auto;
}

.mpx-header a,
.mpx-drawer a,
.mpx-header button,
.mpx-drawer button {
    -webkit-tap-highlight-color: transparent;
}

.mpx-logo {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    border-radius: 6px;
}

.mpx-logo img {
    height: 30px;
    width: auto;
    display: block;
}

.mpx-i {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    display: inline-block;
    vertical-align: middle;
}

.mpx-i-lg {
    width: 22px;
    height: 22px;
}

.mpx-icon-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #fff;
    padding: 0;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.15s ease;
}

.mpx-icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.mpx-burger {
    display: none;
    margin-left: -8px;
}

/* Visible focus everywhere in the header and drawer. */
.mpx-header :focus-visible,
.mpx-drawer :focus-visible {
    outline: 2px solid var(--mpx-accent);
    outline-offset: 2px;
}

/* ── Search (look inside the header; base rules in common.css) ───────── */
.mpx-header-search.mypixia-search-bar {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 640px;
    margin: 0;
}

.mpx-header .mypixia-search-group > .btn,
.mpx-header .mypixia-search-group > .form-control {
    height: 42px;
    border: 0;
}

.mpx-header .mypixia-search-category-btn {
    border-radius: 10px 0 0 10px !important;
    background-color: #eef0f3;
    color: var(--mpx-ink);
    font-size: 0.85rem;
    font-weight: 500;
    max-width: 170px;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 12px;
}

.mpx-header .mypixia-search-category-btn:hover {
    background-color: #e3e6eb;
}

.mpx-header .mypixia-search-input {
    border-radius: 0 !important;
    font-size: 0.95rem;
    color: var(--mpx-ink);
}

.mpx-header .mypixia-search-submit-btn {
    border-radius: 0 10px 10px 0 !important;
    background-color: var(--mpx-accent);
    color: var(--mpx-ink);
    padding: 0 16px;
}

.mpx-header .mypixia-search-submit-btn:hover,
.mpx-header .mypixia-search-submit-btn:focus-visible {
    background-color: var(--mpx-accent-hover);
    color: var(--mpx-ink);
}

.mpx-header .mypixia-search-group > .form-control:focus {
    box-shadow: inset 0 0 0 2px var(--mpx-accent);
}

.mpx-header .mypixia-search-suggestions {
    border-radius: 0 0 10px 10px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
    color: var(--mpx-ink);
}

.mpx-header .mypixia-category-menu {
    border: 0;
    border-radius: 10px;
    box-shadow: var(--mpx-shadow);
    padding: 6px;
    font-size: 0.9rem;
}

.mpx-header .mypixia-category-menu .dropdown-header {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--mpx-muted);
    padding: 10px 12px 4px;
}

.mpx-header .mypixia-category-menu .dropdown-item {
    border-radius: 6px;
    padding: 6px 12px;
    color: var(--mpx-ink);
}

.mpx-header .mypixia-category-menu .dropdown-item:hover {
    background: var(--mpx-surface);
}

.mpx-header .mypixia-category-menu .dropdown-item.active {
    background: #fff1e0;
    color: var(--mpx-ink);
    font-weight: 600;
}

/* ── Main menu triggers ──────────────────────────────────────────────── */
.mpx-nav {
    flex: 0 0 auto;
}

.mpx-nav-list {
    display: flex;
    align-items: center;
    gap: 2px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.mpx-nav-item {
    position: relative;
}

/* The Products item anchors its menu to the whole header, not itself. */
.mpx-nav-item[data-menu="products"] {
    position: static;
}

.mpx-nav-trigger,
.mpx-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 40px;
    padding: 0 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: rgba(255, 255, 255, 0.92);
    font: inherit;
    font-size: 0.94rem;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.mpx-nav-trigger:hover,
.mpx-nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.mpx-nav-trigger[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.mpx-caret {
    width: 14px;
    height: 14px;
    opacity: 0.75;
    transition: transform 0.2s var(--mpx-ease);
}

.mpx-nav-trigger[aria-expanded="true"] .mpx-caret {
    transform: rotate(180deg);
}

/* ── Right-hand actions ──────────────────────────────────────────────── */
.mpx-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
}

.mpx-account-trigger {
    gap: 6px;
    padding: 0 10px;
}

.mpx-cta {
    display: inline-flex;
    align-items: center;
    height: 40px;
    padding: 0 18px;
    margin: 0 4px;
    border-radius: 999px;
    background: var(--mpx-accent);
    color: var(--mpx-ink) !important;
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.15s ease;
}

.mpx-cta:hover {
    background: var(--mpx-accent-hover);
}

.mpx-cart-badge {
    position: absolute;
    top: 2px;
    right: 0;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--mpx-accent);
    color: var(--mpx-ink);
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 0 0 2px var(--mpx-ink);
}

.mpx-cart-badge.is-empty {
    display: none;
}

/* ── Small popovers: Design, Help, Account ───────────────────────────── */
.mpx-pop {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    z-index: 1040;
    min-width: 248px;
    max-width: calc(100vw - 24px);
    padding: 8px;
    background: #fff;
    color: var(--mpx-text);
    border-radius: var(--mpx-radius);
    box-shadow: var(--mpx-shadow);
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.14s ease, transform 0.18s var(--mpx-ease);
}

/* Invisible bridge across the 10px gap, so moving the pointer from the
   trigger into the panel never leaves the menu. */
.mpx-pop::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -12px;
    height: 12px;
}

.mpx-pop.is-open {
    opacity: 1;
    transform: none;
}

.mpx-pop[hidden] {
    display: none;
}

/* Account sits at the right edge, so its menu opens leftwards. */
.mpx-pop--account {
    right: 0;
    left: auto;
}

.mpx-account .mpx-pop--account {
    width: 288px;
    padding: 12px;
}

.mpx-pop--design {
    width: max-content;
    max-width: min(620px, calc(100vw - 24px));
    padding: 12px;
}

.mpx-pop-cols {
    display: flex;
    gap: 12px;
}

.mpx-pop-col {
    width: 280px;
}

.mpx-continue {
    border-left: 1px solid var(--mpx-line);
    padding-left: 12px;
}

.mpx-continue[hidden] {
    display: none;
}

.mpx-eyebrow {
    display: block;
    margin: 4px 8px 8px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--mpx-muted);
}

.mpx-pop-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px;
    border-radius: 10px;
    color: var(--mpx-text);
    text-decoration: none;
}

.mpx-pop-row:hover {
    background: var(--mpx-surface);
    color: var(--mpx-text);
}

.mpx-pop-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #fff1e0;
    color: var(--mpx-accent-text);
    flex: 0 0 auto;
}

.mpx-pop-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.mpx-pop-text strong {
    font-size: 0.92rem;
    font-weight: 600;
}

.mpx-pop-text small {
    font-size: 0.8rem;
    color: var(--mpx-muted);
    line-height: 1.35;
}

.mpx-pop-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 8px;
    color: var(--mpx-text);
    font-size: 0.92rem;
    text-decoration: none;
    white-space: nowrap;
}

.mpx-pop-link .mpx-i {
    color: var(--mpx-muted);
}

.mpx-pop-link:hover {
    background: var(--mpx-surface);
    color: var(--mpx-text);
}

.mpx-pop-sep {
    margin: 6px 4px;
    border: 0;
    border-top: 1px solid var(--mpx-line);
    opacity: 1;
}

.mpx-pop-title {
    margin: 2px 8px 4px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--mpx-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mpx-pop-sub {
    margin: 0 8px 12px;
    font-size: 0.84rem;
    color: var(--mpx-muted);
    line-height: 1.4;
}

.mpx-pop-buttons {
    display: grid;
    gap: 8px;
    padding: 0 4px 4px;
}

.mpx-continue-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 10px;
    color: var(--mpx-text);
    text-decoration: none;
    font-size: 0.88rem;
}

.mpx-continue-item:hover {
    background: var(--mpx-surface);
    color: var(--mpx-text);
}

.mpx-continue-item img,
.mpx-continue-thumb {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: contain;
    background: var(--mpx-surface);
    flex: 0 0 auto;
}

.mpx-continue-thumb {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--mpx-muted);
}

.mpx-continue-item span {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Buttons ─────────────────────────────────────────────────────────── */
.mpx-hbtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 42px;
    padding: 0 18px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.mpx-hbtn--primary {
    background: var(--mpx-accent);
    color: var(--mpx-ink) !important;
}

.mpx-hbtn--primary:hover {
    background: var(--mpx-accent-hover);
}

.mpx-hbtn--ghost,
.mpx-hbtn--ghost-dark {
    background: #fff;
    color: var(--mpx-ink) !important;
    border-color: #d5d7e0;
}

.mpx-hbtn--ghost:hover,
.mpx-hbtn--ghost-dark:hover {
    border-color: var(--mpx-ink);
}

.mpx-hbtn--dark {
    background: var(--mpx-ink);
    color: #fff !important;
}

.mpx-hbtn--dark:hover {
    background: var(--mpx-ink-2);
}

.mpx-hbtn--block {
    display: flex;
    width: 100%;
}

/* ── Products mega menu ──────────────────────────────────────────────── */
.mpx-mega {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1040;
    background: #fff;
    color: var(--mpx-text);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 24px 48px rgba(16, 18, 40, 0.2);
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.16s ease, transform 0.2s var(--mpx-ease);
}

.mpx-mega.is-open {
    opacity: 1;
    transform: none;
}

.mpx-mega[hidden] {
    display: none;
}

.mpx-mega-inner {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr) 248px;
    max-width: 1320px;
    margin: 0 auto;
    min-height: 380px;
    max-height: calc(100vh - 120px);
}

.mpx-mega-rail {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 16px 10px;
    background: var(--mpx-surface);
    border-right: 1px solid var(--mpx-line);
    overflow-y: auto;
}

.mpx-rail-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 40px;
    padding: 8px 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #2c2e44;
    font: inherit;
    font-size: 0.92rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.12s ease, color 0.12s ease;
}

.mpx-rail-item .mpx-rail-label {
    flex: 1 1 auto;
    min-width: 0;
}

.mpx-rail-item .mpx-rail-chev {
    width: 16px;
    height: 16px;
    opacity: 0;
    color: var(--mpx-muted);
    transition: opacity 0.12s ease;
}

.mpx-rail-item:hover {
    background: rgba(26, 26, 46, 0.05);
}

.mpx-rail-item[aria-selected="true"] {
    background: #fff;
    color: var(--mpx-ink);
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(16, 18, 40, 0.08), 0 0 0 1px rgba(16, 18, 40, 0.04);
}

.mpx-rail-item[aria-selected="true"] .mpx-rail-chev {
    opacity: 1;
}

.mpx-rail-item--deals {
    color: var(--mpx-accent-text);
}

.mpx-rail-item--deals[aria-selected="true"] {
    color: var(--mpx-accent-text);
}

.mpx-rail-sep {
    height: 1px;
    margin: 8px 12px;
    background: var(--mpx-line);
    flex: 0 0 auto;
}

.mpx-rail-all {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--mpx-ink);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}

.mpx-rail-all:hover {
    background: rgba(26, 26, 46, 0.05);
    color: var(--mpx-ink);
}

.mpx-mega-body {
    padding: 22px 28px 24px;
    overflow-y: auto;
    min-width: 0;
}

.mpx-mega-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.mpx-mega-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--mpx-ink);
    letter-spacing: -0.01em;
}

.mpx-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--mpx-accent-text);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.mpx-link .mpx-i {
    width: 15px;
    height: 15px;
    transition: transform 0.15s ease;
}

.mpx-link:hover {
    color: var(--mpx-accent-text);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.mpx-link:hover .mpx-i {
    transform: translateX(2px);
}

.mpx-mega-cols {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.mpx-mega-cols--single {
    grid-template-columns: minmax(0, 1fr);
}

.mpx-cat-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.mpx-cat-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    color: #2c2e44;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background-color 0.12s ease;
}

.mpx-cat-link:hover,
.mpx-cat-link.is-previewed {
    background: var(--mpx-surface);
    color: var(--mpx-ink);
}

.mpx-cat-link.is-previewed {
    font-weight: 600;
}

.mpx-cat-count {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--mpx-muted);
    font-variant-numeric: tabular-nums;
}

.mpx-products-label {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 10px;
}

.mpx-products-label .mpx-eyebrow {
    margin: 0;
}

.mpx-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.mpx-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    color: var(--mpx-text);
    text-decoration: none;
}

.mpx-card:hover {
    color: var(--mpx-text);
}

.mpx-card-img {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 10px;
    background: var(--mpx-surface);
    overflow: hidden;
}

.mpx-card-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8%;
    mix-blend-mode: multiply;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.3s var(--mpx-ease);
}

.mpx-card-img img.is-loaded {
    opacity: 1;
}

.mpx-card:hover .mpx-card-img img {
    transform: scale(1.04);
}

.mpx-card-img.is-broken::after {
    content: "";
    position: absolute;
    inset: 32%;
    background: center / contain no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a0a3b5' stroke-width='1.5'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Ccircle cx='9' cy='10' r='2'/%3E%3Cpath d='m21 17-5-5-9 8'/%3E%3C/svg%3E");
}

.mpx-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 3px 8px;
    border-radius: 999px;
    background: var(--mpx-ink);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.mpx-card-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.84rem;
    font-weight: 500;
    line-height: 1.3;
    min-height: 2.6em;
}

.mpx-card:hover .mpx-card-name {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.mpx-card-price {
    font-size: 0.84rem;
    color: var(--mpx-muted);
}

.mpx-card-price b {
    color: var(--mpx-ink);
    font-weight: 600;
}

.mpx-mega-empty {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 24px 0;
    color: var(--mpx-muted);
    font-size: 0.92rem;
}

.mpx-mega-promo {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 8px;
    margin: 16px;
    padding: 22px;
    border-radius: 14px;
    background:
        radial-gradient(120% 80% at 100% 0%, rgba(248, 131, 0, 0.35), transparent 60%),
        var(--mpx-ink);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.86rem;
    line-height: 1.45;
    text-decoration: none;
}

.mpx-mega-promo:hover {
    color: rgba(255, 255, 255, 0.9);
}

.mpx-mega-promo .mpx-eyebrow {
    margin: 0;
    color: #ffb35c;
}

.mpx-mega-promo strong {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.mpx-mega-promo .mpx-hbtn {
    margin-top: 8px;
    align-self: flex-start;
}

/* ── Page dimmer behind the mega menu ────────────────────────────────── */
.mpx-scrim {
    position: fixed;
    inset: 0;
    z-index: 1025;
    background: rgba(16, 18, 40, 0.38);
    opacity: 0;
    transition: opacity 0.18s ease;
}

.mpx-scrim.is-open {
    opacity: 1;
}

.mpx-scrim[hidden] {
    display: none;
}

/* ── Loading placeholders ────────────────────────────────────────────── */
.mpx-skel {
    border-radius: 8px;
    background: linear-gradient(90deg, #eceef2 0%, #f6f7f9 50%, #eceef2 100%);
    background-size: 200% 100%;
    animation: mpxShimmer 1.4s ease-in-out infinite;
}

.mpx-skel--rail {
    height: 36px;
    margin: 2px 4px;
}

.mpx-skel--card {
    aspect-ratio: 1 / 1;
}

.mpx-skel--row {
    height: 40px;
    margin: 6px 16px;
}

.mpx-mega-grid--loading {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    padding-top: 44px;
}

@keyframes mpxShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── Phone drawer ────────────────────────────────────────────────────── */
.mpx-drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1060;
    display: flex;
    flex-direction: column;
    width: min(88vw, 380px);
    background: #fff;
    color: var(--mpx-text);
    box-shadow: 0 0 48px rgba(0, 0, 0, 0.25);
    transform: translateX(-100%);
    transition: transform 0.28s var(--mpx-ease);
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.mpx-drawer.is-open {
    transform: none;
}

.mpx-drawer[hidden] {
    display: none;
}

.mpx-drawer-scrim {
    position: fixed;
    inset: 0;
    z-index: 1055;
    background: rgba(10, 10, 20, 0.5);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.mpx-drawer-scrim.is-open {
    opacity: 1;
}

.mpx-drawer-scrim[hidden] {
    display: none;
}

.mpx-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    padding: 0 8px 0 16px;
    background: var(--mpx-ink);
    flex: 0 0 auto;
}

.mpx-drawer-head .mpx-logo img {
    height: 26px;
}

.mpx-drawer-views {
    position: relative;
    flex: 1 1 auto;
    overflow: hidden;
}

.mpx-view {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    background: #fff;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.26s var(--mpx-ease), visibility 0s linear 0.26s;
}

.mpx-view.is-active {
    transform: none;
    visibility: visible;
    transition: transform 0.26s var(--mpx-ease), visibility 0s;
}

.mpx-view.is-behind {
    transform: translateX(-28%);
}

.mpx-view-scroll {
    flex: 1 1 auto;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 16px 0 32px;
}

.mpx-view-scroll > .mpx-hbtn--block {
    margin: 0 16px;
    width: auto;
}

.mpx-drawer-heading {
    margin: 22px 16px 6px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--mpx-muted);
}

.mpx-drawer-list {
    display: flex;
    flex-direction: column;
}

.mpx-drawer-list .mpx-pop-buttons {
    grid-template-columns: 1fr 1fr;
    padding: 4px 16px;
}

.mpx-drawer-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 50px;
    padding: 0 16px;
    border: 0;
    border-bottom: 1px solid #f0f1f4;
    background: #fff;
    color: var(--mpx-text);
    font: inherit;
    font-size: 0.97rem;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.mpx-drawer-row:active,
.mpx-drawer-row:hover {
    background: var(--mpx-surface);
    color: var(--mpx-text);
}

.mpx-drawer-row > span {
    flex: 1 1 auto;
    min-width: 0;
}

.mpx-drawer-row > .mpx-cat-count {
    flex: 0 0 auto;
}

.mpx-drawer-row > .mpx-i {
    color: var(--mpx-muted);
}

.mpx-drawer-row .mpx-row-chev {
    color: #a0a3b5;
}

.mpx-drawer-row--deals,
.mpx-drawer-row--deals > .mpx-i {
    color: var(--mpx-accent-text);
    font-weight: 600;
}

.mpx-view-top {
    display: flex;
    align-items: center;
    gap: 4px;
    min-height: 52px;
    padding: 0 8px;
    border-bottom: 1px solid var(--mpx-line);
    flex: 0 0 auto;
}

.mpx-back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 40px;
    padding: 0 10px 0 4px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--mpx-ink);
    font: inherit;
    font-size: 0.92rem;
    font-weight: 500;
    cursor: pointer;
}

.mpx-back:hover {
    background: var(--mpx-surface);
}

.mpx-view-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin: 4px 16px 10px;
}

.mpx-view-title h2 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--mpx-ink);
    letter-spacing: -0.01em;
}

.mpx-view .mpx-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 0 16px;
}

.mpx-drawer-continue-item {
    padding-left: 16px;
}

/* Lock page scroll while the drawer is open. */
html.mpx-lock,
html.mpx-lock body {
    overflow: hidden;
}

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 1279.98px) {
    .mpx-mega-inner {
        grid-template-columns: 220px minmax(0, 1fr);
    }

    .mpx-mega-promo {
        display: none;
    }
}

/* Small laptops: drop the search category filter and tighten the menus. */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .mpx-bar {
        gap: 10px;
        padding: 0 16px;
    }

    .mpx-header .mypixia-search-category-btn {
        display: none !important;
    }

    .mpx-header .mypixia-search-input {
        border-radius: 10px 0 0 10px !important;
    }

    .mpx-nav-trigger,
    .mpx-nav-link {
        padding: 0 9px;
    }

    .mpx-account-label {
        display: none;
    }

    .mpx-cta {
        padding: 0 14px;
    }

    .mpx-mega-cols {
        grid-template-columns: 170px minmax(0, 1fr);
        gap: 20px;
    }
}

/* Phones and tablets: logo bar with menu + cart, search on its own row,
   everything else in the drawer. */
@media (max-width: 991.98px) {
    .mpx-bar {
        flex-wrap: wrap;
        gap: 4px 8px;
        min-height: 56px;
        padding: 6px 12px 10px;
    }

    .mpx-burger {
        display: inline-flex;
    }

    .mpx-logo img {
        height: 26px;
    }

    .mpx-nav,
    .mpx-account,
    .mpx-cta,
    .mpx-mega,
    .mpx-scrim {
        display: none !important;
    }

    .mpx-actions {
        margin-left: auto;
    }

    .mpx-header-search.mypixia-search-bar {
        order: 10;
        flex-basis: 100%;
        max-width: none;
    }

    .mpx-header .mypixia-search-group > .btn,
    .mpx-header .mypixia-search-group > .form-control {
        height: 40px;
    }
}

@media (max-width: 767.98px) {
    .mpx-header .mypixia-search-category-btn {
        display: none !important;
    }

    .mpx-header .mypixia-search-input {
        border-radius: 10px 0 0 10px !important;
    }

    .mpx-promo-strip {
        font-size: 0.74rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mpx-pop,
    .mpx-mega,
    .mpx-scrim,
    .mpx-drawer,
    .mpx-drawer-scrim,
    .mpx-view,
    .mpx-card-img img,
    .mpx-caret,
    #mpx-promo-text {
        transition: none !important;
    }

    .mpx-skel {
        animation: none;
    }
}
