/* =============================================================
   max-theme.css — Max Fashion style storefront: cream page, plain
   centred category nav with mega menus, category-tile homepage,
   edge-to-edge product grid, black footer.
   Loaded LAST (after modern-polish.css) so it overrides older sheets.
   The base rules below also apply to product.php and the-hidden.php;
   everything after them is scoped to the new header/footer markup or
   to the home / category page body classes.
   ============================================================= */

:root {
    --mx-bg:        #FCF9F6;   /* warm cream page background */
    --mx-ink:       #111111;
    --mx-muted:     #595959;
    --mx-soft:      #8A8580;   /* breadcrumbs, secondary text */
    --mx-line:      #ECE5DD;   /* hairlines / field borders */
    --mx-tan:       #E8D0B8;   /* announcement bar, subscribe button */
    --mx-brown:     #493423;   /* text on tan */
    --mx-bronze:    #B28155;   /* badges */
    --mx-sale:      #C8102E;
    --mx-blue:      #0E5478;   /* logo blue */
    --mx-red:       #E53935;
    --mx-radius:    16px;
    --mx-gutter:    52px;
    --mx-ann-h:     40px;
    --mx-head-h:    96px;
    --font-primary: 'Figtree', Arial, sans-serif;
}

/* ---------- Base ---------- */
html body {
    background: var(--mx-bg);
    color: var(--mx-ink);
    font-family: 'Figtree', Arial, sans-serif;
}
body h1, body h2, body h3, body h4, body h5, body h6,
body p, body a, body li, body span, body div, body label,
body button, body input, body select, body textarea, body th, body td {
    font-family: 'Figtree', Arial, sans-serif;
}
body i, body .fa, body .fas, body .far, body .fab, body [class^="fa-"], body [class*=" fa-"] {
    font-family: 'Font Awesome 6 Free', 'Font Awesome 6 Brands', 'FontAwesome';
}
body i.fab, body .fab { font-family: 'Font Awesome 6 Brands'; }

/* =============================================================
   ANNOUNCEMENT BAR — black strip, messages scroll in a loop
   (header.php repeats the messages and sizes the animation)
   ============================================================= */
#announcementBar.mx-ann {
    position: fixed;                     /* always visible, never hides on scroll */
    top: 0;
    left: 0;
    right: 0;
    z-index: 10001;
    height: var(--mx-ann-h);
    display: flex;
    align-items: center;
    background: #000 !important;
    overflow: hidden;
}
#announcementBar .mx-ann-track {
    display: flex;
    align-items: center;
    width: max-content;
    max-width: none;
    white-space: nowrap;
    will-change: transform;
    animation: mxAnnLoop 20s linear infinite;
}
#announcementBar:hover .mx-ann-track { animation-play-state: paused; }
@keyframes mxAnnLoop {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}
#announcementBar .ann-item {
    flex: 0 0 auto;
    width: auto;
    max-width: none;
    display: inline-flex;
    align-items: center;
    padding: 0 40px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .02em;
    text-transform: none;
    color: #fff;
    white-space: nowrap;
}
#announcementBar .ann-item::after {
    content: "\2022";                 /* dot between messages */
    margin-left: 80px;
    color: rgba(255, 255, 255, .45);
}
#announcementBar .ann-item a {
    color: #fff !important;
    border: 0 !important;
    padding: 0;
    text-decoration: none;
}
#announcementBar .ann-item a:hover { text-decoration: underline; }
@media (prefers-reduced-motion: reduce) {
    #announcementBar .mx-ann-track { animation-duration: 60s !important; }
}

/* =============================================================
   HEADER
   Fixed, same total height as before (announcement + header ≈ 136px)
   so product.php / the-hidden.php keep their existing top spacing.
   ============================================================= */
.mx-header {
    position: fixed;
    top: var(--mx-ann-h);
    left: 0;
    right: 0;
    z-index: 10000;
    background: var(--mx-bg);
    transition: top .35s ease, box-shadow .3s ease;
}
body:not(.has-ann) .mx-header { top: 0; }
/* The bar is fixed, so reserve its height at the top of the page (pages were
   laid out with the bar in the flow). header.css forces padding-top: 0 !important. */
body.has-ann { padding-top: var(--mx-ann-h) !important; }
.mx-header.scrolled { box-shadow: 0 1px 0 var(--mx-line); }
/* The Hidden's banner starts under the header (as it always has), so the
   header stays see-through there until the page is scrolled. */
.page-hidden .mx-header:not(.scrolled) { background: transparent; }

.mx-header-inner {
    height: var(--mx-head-h);
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 0 var(--mx-gutter);
}

.mx-logo { flex: 1 1 0; display: flex; align-items: center; min-width: 0; }
.mx-header .mx-logo .main-logo {
    display: block;
    height: 44px;
    width: auto;
    max-width: none;
    max-height: none;
    filter: none;
}

/* ---- Category nav ---- */
.mx-nav { flex: 0 0 auto; align-self: stretch; display: flex; }
.mx-nav-list {
    display: flex;
    gap: 48px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.mx-nav-item { display: flex; align-items: center; }   /* static, so the mega menu spans the header */
.mx-nav-link,
.mx-nav-link:visited {
    position: relative;
    padding: 6px 0;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: uppercase;
    color: var(--mx-ink);
    text-decoration: none;
}
.mx-nav-link:hover,
.mx-nav-link:focus { color: var(--mx-ink); text-decoration: none; }
.mx-nav-link::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 2px;
    background: var(--mx-ink);
    transform: scaleX(0);
    transition: transform .2s ease;
}
.mx-nav-item:hover .mx-nav-link::after,
.mx-nav-link.is-current::after { transform: scaleX(1); }

/* ---- Mega menu ---- */
.mx-mega {
    position: absolute;
    left: 0; right: 0;
    top: 100%;
    background: var(--mx-bg);
    border-top: 1px solid var(--mx-line);
    border-radius: 0 0 16px 16px;
    box-shadow: 0 30px 40px rgba(17, 17, 17, .10);
    opacity: 0;
    visibility: hidden;
    transition: opacity .18s ease, visibility .18s;
}
.mx-nav-item:hover .mx-mega,
.mx-nav-item:focus-within .mx-mega { opacity: 1; visibility: visible; }

.mx-mega-inner {
    display: flex;
    gap: 48px;
    padding: 30px var(--mx-gutter) 40px;
}
.mx-mega-shop { flex: 1 1 0; min-width: 0; }
.mx-mega-shop h4 {
    margin: 0 0 22px;
    font-size: 19px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    color: var(--mx-ink);
}
.mx-mega-links {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px 16px;
}

/* circle + label link — shared by the mega menu and the category page */
.mx-circle-link,
.mx-circle-link:visited {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    font-size: 13px;
    line-height: 1.3;
    color: var(--mx-ink);
    text-decoration: none;
}
.mx-circle-link:hover { color: var(--mx-ink); text-decoration: underline; }
.mx-circle {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #E7D9C8 center 18% / cover no-repeat;
}

.mx-mega-cards { flex: 0 0 auto; display: flex; gap: 28px; }
.mx-mega-card,
.mx-mega-card:visited {
    display: block;
    width: 180px;
    color: var(--mx-ink);
    text-decoration: none;
}
.mx-mega-card:hover { color: var(--mx-ink); text-decoration: none; }
.mx-mega-card-img {
    display: block;
    aspect-ratio: 179 / 234;
    background: #E7D9C8 center top / cover no-repeat;
}
.mx-mega-card-name {
    display: -webkit-box;
    margin-top: 10px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---- Icons ---- */
.mx-icons {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 26px;
}
.mx-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    background: none;
    border: 0;
    color: var(--mx-ink);
    cursor: pointer;
}
.mx-icon:hover { color: var(--mx-ink); opacity: .65; }
.mx-icon svg,
.mx-burger svg,
.mx-search-form svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.mx-header .cart-count {
    position: absolute;
    top: -6px;
    right: -9px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 9px;
    background: var(--mx-bronze) !important;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mx-header .customer-dropdown-menu { border: 0; border-radius: 12px; overflow: hidden; }

.mx-burger {
    display: none;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: none;
    border: 0;
    color: var(--mx-ink);
    cursor: pointer;
}

/* ---- Search panel (opened by the search icon) ---- */
.mx-header .search-overlay.mx-search {
    display: none;
    position: absolute;
    left: 0; right: 0;
    top: 100%;
    width: auto;
    max-width: none;
    overflow: visible;
    padding: 18px var(--mx-gutter) 22px;
    background: var(--mx-bg);
    border-top: 1px solid var(--mx-line);
    box-shadow: 0 20px 30px rgba(17, 17, 17, .08);
    opacity: 0;
    transition: opacity .3s ease;
    animation: none;
}
.mx-header .search-overlay.mx-search.open { width: auto; max-width: none; opacity: 1; }
.mx-search-form {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 720px;
    height: 50px;
    margin: 0 auto;
    padding: 0 18px;
    background: #fff;
    border: 1px solid var(--mx-line);
    border-radius: 999px;
}
.mx-search-form svg { flex: 0 0 auto; width: 20px; height: 20px; color: var(--mx-soft); }
.mx-header .mx-search-form .search-input {
    flex: 1;
    min-width: 0;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--mx-ink);
    font-size: 15px;
    letter-spacing: 0;
    text-transform: none;
    outline: none;
}
.mx-header .mx-search-form .search-input::placeholder {
    color: var(--mx-soft);
    font-size: 15px;
    letter-spacing: 0;
    text-transform: none;
}
.mx-search-close {
    background: none;
    border: 0;
    padding: 4px;
    color: var(--mx-soft);
    font-size: 16px;
    cursor: pointer;
}
.mx-search-close:hover { color: var(--mx-ink); }

/* ---- Drawers above the fixed header (z-index 10000) ---- */
.mobile-nav-overlay      { z-index: 10010 !important; }
.mobile-nav              { z-index: 10011 !important; }
.filter-sidebar-overlay  { z-index: 10010 !important; }
.filter-sidebar          { z-index: 10011 !important; }
.cart-overlay            { z-index: 10012 !important; }
.side-cart               { z-index: 10013 !important; }

/* ---- Mobile drawer ---- */
.mobile-nav,
#mobileNav,
.mobile-nav-header { background: var(--mx-bg); }
.mobile-nav a,
.mobile-nav h4 { color: var(--mx-ink); }
.mobile-nav-menu > li > a { font-weight: 600; text-transform: uppercase; }

/* ---- Header breakpoints ---- */
@media (max-width: 1200px) {
    .mx-nav-list { gap: 32px; }
    .mx-mega-card { width: 150px; }
}
@media (max-width: 991px) {
    :root { --mx-gutter: 16px; --mx-head-h: 62px; --mx-ann-h: 32px; }   /* same as the old mobile header */
    .mx-header-inner {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        gap: 12px;
    }
    .mx-nav { display: none; }
    .mx-burger { display: inline-flex; justify-self: start; }
    .mx-logo { justify-content: center; }
    .mx-header .mx-logo .main-logo { height: 34px; }
    .mx-icons { gap: 18px; }
    .mx-desktop-only { display: none !important; }   /* account + bag live in the mobile drawer */
    #announcementBar .ann-item { font-size: 12.5px; }
}
/* =============================================================
   CATEGORY LANDING PAGE (category.php) — full-screen photo panels
   that snap while scrolling, see-through white header, section dots
   ============================================================= */
html:has(body.page-landing) {
    scroll-snap-type: y mandatory;
    scroll-padding-top: var(--mx-ann-h);
}
.page-landing .footer-bottom { scroll-snap-align: end; }

.mx-panel {
    position: relative;
    height: calc(100vh - var(--mx-ann-h));
    height: calc(100svh - var(--mx-ann-h));
    min-height: 420px;
    overflow: hidden;
    background: #2B2622;
    scroll-snap-align: start;
}
.mx-panel-link,
.mx-panel-link:visited,
.mx-panel-link:hover {
    position: absolute;
    inset: 0;
    display: block;
    color: #fff;
    text-decoration: none;
}
.mx-panel-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center 12%;      /* keeps faces in frame on portrait product photos */
    transition: transform 1.2s cubic-bezier(.2, .7, .2, 1);
}
.mx-panel-link:hover .mx-panel-img { transform: scale(1.03); }
/* shade at the top (keeps the white header readable) and behind the text */
.mx-panel-link::before,
.mx-panel-link::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}
.mx-panel-link::before { background: linear-gradient(to bottom, rgba(0,0,0,.45) 0%, rgba(0,0,0,0) 26%); }
.mx-panel-link::after  { background: linear-gradient(to right, rgba(0,0,0,.5) 0%, rgba(0,0,0,.15) 45%, rgba(0,0,0,0) 65%); }

.mx-panel-text {
    position: absolute;
    left: max(var(--mx-gutter), 8vw);
    top: 50%;
    z-index: 2;
    max-width: 560px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transform: translateY(-35%);
}
.mx-panel-kicker {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    opacity: .9;
}
body .mx-panel-title {
    margin: 0;
    font-size: clamp(40px, 5.2vw, 76px);
    font-weight: 400;
    line-height: 1.04;
    letter-spacing: -.01em;
    text-transform: none;
    color: #fff;
}
.mx-panel-count { font-size: 15px; opacity: .85; }
.mx-panel-cta {
    align-self: flex-start;
    margin-top: 14px;
    padding-bottom: 4px;
    border-bottom: 1px solid #fff;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .02em;
}

.mx-panel-dots {
    position: fixed;
    right: 22px;
    top: 50%;
    z-index: 20;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transform: translateY(-50%);
}
.mx-panel-dots a {
    display: block;
    width: 3px;
    height: 12px;
    border-radius: 2px;
    background: rgba(255, 255, 255, .55);
    box-shadow: 0 0 4px rgba(0, 0, 0, .25);
    transition: height .25s ease, background .25s ease;
}
.mx-panel-dots a.is-active { height: 30px; background: #fff; }
.mx-panel-dots span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

/* Header over the photos: transparent and white until hovered / used */
.page-landing .mx-header:not(:hover):not(:focus-within) { background: transparent; box-shadow: none; }
.page-landing .mx-header:not(:hover):not(:focus-within) .mx-nav-link,
.page-landing .mx-header:not(:hover):not(:focus-within) .mx-icon,
.page-landing .mx-header:not(:hover):not(:focus-within) .mx-burger { color: #fff; }
.page-landing .mx-header:not(:hover):not(:focus-within) .mx-nav-link::after { background: #fff; }
.page-landing .mx-header:not(:hover):not(:focus-within) .main-logo { filter: brightness(0) invert(1); }

@media (max-width: 991px) {
    .mx-panel-text {
        top: auto;
        bottom: 56px;
        left: var(--mx-gutter);
        right: 48px;
        transform: none;
    }
    .mx-panel-link::after { background: linear-gradient(to top, rgba(0,0,0,.6) 0%, rgba(0,0,0,.15) 40%, rgba(0,0,0,0) 60%); }
    .mx-panel-dots { right: 10px; gap: 6px; }
    .mx-panel-dots a { height: 9px; }
    .mx-panel-dots a.is-active { height: 22px; }
}
@media (prefers-reduced-motion: reduce) {
    html:has(body.page-landing) { scroll-snap-type: none; }
    .mx-panel-img { transition: none; }
}

/* =============================================================
   HOMEPAGE — category tiles only (3 per row, extras centred)
   ============================================================= */
.mx-home { padding: calc(var(--mx-head-h) + 42px) var(--mx-gutter) 64px; }
.mx-tiles {
    max-width: 1248px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px 16px;
}
.mx-tile,
.mx-tile:visited {
    position: relative;
    display: block;
    flex: 0 0 calc((100% - 32px) / 3);
    aspect-ratio: 405 / 304;
    border-radius: var(--mx-radius);
    overflow: hidden;
    background: #D9D2C9;
    color: #fff;
    text-decoration: none;
    isolation: isolate;
}
.mx-tile:hover { color: #fff; text-decoration: none; }
.mx-tile-img {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center 20%;
    transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}
.mx-tile:hover .mx-tile-img { transform: scale(1.04); }
.mx-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(to top, rgba(0,0,0,.55) 0%, rgba(0,0,0,.15) 40%, rgba(0,0,0,0) 65%);
}
.mx-tile-text {
    position: absolute;
    left: 32px;
    bottom: 30px;
    z-index: 2;
    display: flex;
    flex-direction: column;
}
.mx-tile-shop {
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    line-height: 1.2;
}
.mx-tile-name {
    font-size: 32px;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.1;
}
@media (max-width: 991px) {
    .mx-home { padding-top: calc(var(--mx-head-h) + 20px); padding-bottom: 40px; }
    .mx-tiles { gap: 12px; }
    .mx-tile { flex-basis: calc((100% - 12px) / 2); }
    .mx-tile-text { left: 18px; bottom: 18px; }
    .mx-tile-shop { font-size: 13px; }
    .mx-tile-name { font-size: 24px; }
}
@media (max-width: 575px) {
    .mx-tile { flex-basis: 100%; }
}

/* =============================================================
   CATEGORY / LISTING PAGE
   ============================================================= */
.mx-plp { padding: calc(var(--mx-head-h) + 24px) 0 64px; }
.mx-plp-head { padding: 0 var(--mx-gutter); }

.mx-crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 24px;
    margin-bottom: 18px;
    font-size: 14px;
    color: var(--mx-soft);
}
.mx-crumbs a,
.mx-crumbs a:visited { color: var(--mx-soft); text-decoration: none; }
.mx-crumbs a:hover { color: var(--mx-ink); }

.mx-plp-title {
    margin: 0 0 24px;
    font-size: 40px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -.01em;
    text-transform: none;
    color: var(--mx-ink);
}

.mx-subcats {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}
.mx-subcats .mx-circle-link { font-size: 15px; }
.mx-circle-link.is-active { font-weight: 700; }
.mx-circle-link.is-active .mx-circle { box-shadow: 0 0 0 2px var(--mx-bg), 0 0 0 3px var(--mx-ink); }

.mx-filter-pills {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.mx-pill {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 38px;
    padding: 0 16px;
    background: #fff;
    border: 1px solid var(--mx-line);
    border-radius: 6px;
    font-size: 15px;
    color: var(--mx-ink);
    cursor: pointer;
}
.mx-pill i { font-size: 11px; color: var(--mx-soft); }
.mx-pill:hover { border-color: var(--mx-ink); }

.mx-plp-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}
.mx-count { font-size: 15px; font-weight: 500; color: var(--mx-muted); }
.mx-sort {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0;
    font-size: 15px;
    font-weight: 400;
    color: var(--mx-muted);
}
.mx-sort .sort-select {
    height: 38px;
    min-width: 190px;
    padding: 0 38px 0 16px;
    border: 1px solid var(--mx-line);
    border-radius: 6px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23111' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 14px center / 11px;
    -webkit-appearance: none;
            appearance: none;
    font-size: 15px;
    color: var(--mx-ink);
    box-shadow: none;
    cursor: pointer;
}
.page-category .active-filters-container { margin: 0 0 16px; }

/* ---- Product grid: edge to edge, 4 across ----
   (#productsGrid in final.css sets its own columns/gap, hence the id here) */
#productsGrid.mx-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px 4px;
    margin: 0;
    padding: 0;
}
.mx-grid > .item { min-width: 0; width: auto; margin: 0; padding: 0; float: none; }
.mx-grid > .products-loading,
.mx-grid > .no-results { grid-column: 1 / -1; }

.mx-grid .mx-card {
    position: relative;
    height: auto;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    transform: none;
}
.mx-grid .mx-card:hover { transform: none; box-shadow: none; }
.mx-card-img {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #EFE6DC;
}
.mx-grid .mx-card .product-image {
    position: absolute;
    inset: 0;
    height: auto;
    padding: 0;
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}
.mx-grid .mx-card:hover .product-image { transform: scale(1.03); }
.mx-grid .mx-card.is-out-of-stock .product-image { filter: grayscale(.35); opacity: .8; }

.mx-grid .mx-card .wishlist-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    left: auto;
    z-index: 3;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    opacity: 1;
    transform: none;
    cursor: pointer;
}
.mx-grid .mx-card .wishlist-btn:hover { background: none; transform: none; box-shadow: none; }
.mx-grid .mx-card .wishlist-btn i {
    font-size: 22px;
    color: #fff;
    text-shadow: 0 1px 6px rgba(0, 0, 0, .3);
}
.mx-grid .mx-card .wishlist-btn.active { background: none; }
.mx-grid .mx-card .wishlist-btn.active i { color: var(--mx-sale); text-shadow: none; }

.mx-card-tag {
    position: absolute;
    top: 14px;
    left: 0;
    z-index: 2;
    padding: 4px 10px;
    background: var(--mx-tan);
    color: var(--mx-brown);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
}
.mx-card-oos {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    z-index: 2;
    padding: 9px;
    background: rgba(17, 17, 17, .6);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .06em;
    text-align: center;
    text-transform: uppercase;
}

.mx-card-body,
.mx-card-body:visited {
    display: block;
    padding: 12px 8px 0;
    color: var(--mx-ink);
    text-decoration: none;
}
.mx-card-body:hover { color: var(--mx-ink); text-decoration: none; }
.mx-card-price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 8px;
    margin-bottom: 4px;
}
.mx-grid .mx-card .current-price {
    font-size: 18px;
    font-weight: 500;
    color: var(--mx-ink) !important;
}
.mx-grid .mx-card .current-price.price-discounted { color: var(--mx-sale) !important; }
.mx-grid .mx-card .old-price {
    font-size: 13px;
    color: var(--mx-soft) !important;
    text-decoration: line-through;
}
.mx-card-off { font-size: 13px; font-weight: 600; color: var(--mx-sale); }
.mx-card-name {
    display: -webkit-box;
    font-size: 15px;
    line-height: 1.35;
    color: var(--mx-muted);
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---- Card actions: Quick View on hover, bag button by the price,
        round bag button on the photo for touch screens.
        (!important on display: final.css / product-card-patch.css toggle
        these with !important at their own breakpoints) ---- */
.mx-card-media { position: relative; }

/* final.css (≤767px) turns every link in a .product-card into a 44px
   inline-flex box and modern-polish.css gives buttons a 44px min-height;
   both squash these cards on phones, so undo them here. */
.mx-grid .mx-card .mx-card-img,
.mx-grid .mx-card .mx-card-body {
    display: block;
    min-height: 0;
}
.mx-grid .mx-card .wishlist-btn,
.mx-grid .mx-card .mobile-cart-btn,
.mx-grid .mx-card .add-to-cart-btn-desktop { min-height: 0; }
.mx-grid .mx-card { min-height: 0; }   /* older sheets give cards a 400px min-height on phones */

.mx-grid .mx-card .hover-actions.desktop-only {
    position: absolute;
    top: auto;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 3;
    display: flex !important;
    gap: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity .25s ease, transform .25s ease, visibility .25s;
}
.mx-grid .mx-card:hover .hover-actions.desktop-only {
    opacity: 1;
    visibility: visible;
    transform: none;
}
.mx-grid .mx-card .quick-view-btn {
    flex: 1;
    width: auto;
    height: 42px;
    margin: 0;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(255, 255, 255, .95) !important;
    color: var(--mx-ink) !important;
    border: 0 !important;
    border-radius: 6px;
    box-shadow: none !important;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    cursor: pointer;
}
.mx-grid .mx-card .quick-view-btn:hover { background: var(--mx-ink) !important; color: #fff !important; }
.mx-grid .mx-card .quick-view-btn i { font-size: 13px; color: inherit; }

.mx-grid .mx-card .mobile-add-to-cart { display: none !important; }
.mx-grid .mx-card .mobile-cart-btn {
    position: absolute;
    right: 10px;
    bottom: 10px;
    z-index: 3;
    width: 38px;
    height: 38px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 0;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
    cursor: pointer;
}
.mx-grid .mx-card .mobile-cart-btn i { font-size: 15px; color: var(--mx-ink); }

.mx-card-foot { display: flex; align-items: flex-start; gap: 6px; }
.mx-card-foot .mx-card-body { flex: 1; min-width: 0; }
.mx-grid .mx-card .add-to-cart-btn-desktop {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    margin: 10px 8px 0 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--mx-line);
    border-radius: 50%;
    opacity: 1;
    visibility: visible;
    cursor: pointer;
}
.mx-grid .mx-card .add-to-cart-btn-desktop i { font-size: 15px; color: var(--mx-ink); }
.mx-grid .mx-card .add-to-cart-btn-desktop:hover { background: var(--mx-ink); border-color: var(--mx-ink); }
.mx-grid .mx-card .add-to-cart-btn-desktop:hover i { color: #fff; }

@media (max-width: 991px) {
    .mx-grid .mx-card .hover-actions.desktop-only { display: none !important; }
    .mx-grid .mx-card .mobile-add-to-cart { display: block !important; }
    .mx-grid .mx-card .add-to-cart-btn-desktop { display: none !important; }
}

.mx-grid .no-results {
    padding: 60px 16px;
    text-align: center;
    color: var(--mx-muted);
}
.mx-grid .no-results i { font-size: 32px; color: var(--mx-soft); margin-bottom: 14px; }
.mx-grid .no-results h3 { font-size: 22px; font-weight: 700; color: var(--mx-ink); margin: 0 0 8px; }

.mx-pagination { padding: 40px var(--mx-gutter) 0; }
.mx-pagination .pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin: 0;
}
.mx-pagination .pagination a,
.mx-pagination .pagination span {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--mx-line);
    border-radius: 6px;
    background: #fff;
    font-size: 14px;
    color: var(--mx-ink);
    text-decoration: none;
}
.mx-pagination .pagination .current { background: var(--mx-ink); border-color: var(--mx-ink); color: #fff; }
.mx-pagination .pagination .disabled { color: var(--mx-soft); }

@media (max-width: 1200px) {
    .mx-subcats,
    .mx-filter-pills { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 991px) {
    .mx-plp { padding-top: calc(var(--mx-head-h) + 16px); }
    .mx-plp-title { font-size: 28px; margin-bottom: 18px; }
    .mx-subcats {
        display: flex;
        gap: 18px;
        overflow-x: auto;
        margin-right: calc(var(--mx-gutter) * -1);
        padding-right: var(--mx-gutter);
        scrollbar-width: none;
    }
    .mx-subcats::-webkit-scrollbar { display: none; }
    .mx-subcats .mx-circle-link {
        flex: 0 0 auto;
        flex-direction: column;
        width: 72px;
        gap: 6px;
        font-size: 12px;
        text-align: center;
    }
    .mx-subcats .mx-circle { flex-basis: 60px; width: 60px; height: 60px; }
    .mx-filter-pills { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    #productsGrid.mx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 3px; }
    .mx-sort .sort-select { min-width: 0; }
    .mx-sort > span { display: none; }
    .mx-grid .mx-card .current-price { font-size: 16px; }
    .mx-card-name { font-size: 13px; }
}

/* =============================================================
   FOOTER — near-black, 4 columns (original markup, dark colours)
   ============================================================= */
.footer-bottom { background: #141414 !important; color: #b5b0aa; }  /* modern-polish.css forces a beige !important */
.footer-widget .main-logo { filter: brightness(0) invert(1); opacity: .95; }
.footer-widget p,
.footer-widget .contact-line,
.footer-widget ul li a { color: #b5b0aa; }
.footer-widget ul li a:hover { color: #fff; }
.footer-widget h3 { color: #fff !important; border-bottom-color: #2c2c2c !important; }  /* modern-polish.css forces dark ink !important */
.footer-social-link { background: #262626; border-color: #333; }
.footer-social-link i { color: #d8d3cd; }
.footer-social-link:hover { background: #fff; }
.footer-social-link:hover i { color: #111; }
.footer-widget input[type="email"] {
    background: transparent; color: #fff; border: 1px solid #3a3a3a;
}
.footer-widget input[type="email"]::placeholder { color: #8a8580; }
.footer-widget input[type="email"]:focus { border-color: #fff; }
.footer-widget button[type="submit"] {
    background: transparent; color: #fff; border: 1px solid #fff;
}
.footer-widget button[type="submit"]:hover { background: #fff; color: #111; }
.footer-bottom .copyright { color: #8a8580; border-top-color: #2c2c2c; }
.footer-bottom .copyright a { color: #fff !important; }
