/* ==========================================================================
   APLI Store - rubrique APLI (Le Coin du Chineur)
   Scoped with the "apx-" prefix: no impact on the rest of the site.
   ========================================================================== */

.apx {
    --apx-red: #d61f2f;
    --apx-red-2: #ff4b4b;
    --apx-ink: #1e2430;
    --apx-ink-soft: #5a6676;
    --apx-line: rgba(30, 36, 48, 0.12);
    --apx-card: #ffffff;
    --apx-cream: #fbf8f2;
    --apx-gold: #d8b46a;
    --apx-radius: 18px;
    --apx-shadow: 0 10px 30px rgba(30, 36, 48, 0.08);
    --apx-shadow-hover: 0 22px 48px rgba(30, 36, 48, 0.16);
    --apx-sticky-top: 96px;
    color: var(--apx-ink);
}

.apx *,
.apx *::before,
.apx *::after {
    box-sizing: border-box;
}

.apx img {
    width: auto;
    max-width: 100%;
}

.apx button {
    font-family: inherit;
}

.apx-visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ---------- Hero ---------- */
.apx-hero {
    position: relative;
    margin-top: 20px;
    border-radius: 28px;
    overflow: hidden;
    padding: clamp(22px, 4vw, 48px);
    color: #fff;
    background:
        radial-gradient(circle at 85% 15%, rgba(255, 75, 75, 0.55), transparent 42%),
        radial-gradient(circle at 10% 110%, rgba(242, 180, 65, 0.45), transparent 45%),
        linear-gradient(135deg, #1b2230 0%, #2a1f2b 55%, #3a1720 100%);
    box-shadow: 0 30px 70px rgba(27, 34, 48, 0.28);
    isolation: isolate;
}

.apx-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.12) 0.7px, transparent 0.7px);
    background-size: 5px 5px;
    opacity: 0.35;
    pointer-events: none;
    z-index: -1;
}

.apx-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: clamp(18px, 3vw, 40px);
    align-items: center;
}

.apx-hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    padding: 6px 12px 6px 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.apx-hero-kicker img {
    width: 58px;
    height: auto;
    border-radius: 999px;
    background: #fff;
    padding: 4px 8px;
}

.apx-hero h1 {
    margin: 0;
    font-size: clamp(2rem, 5.2vw, 3.6rem);
    line-height: 1.02;
    letter-spacing: -0.03em;
    font-weight: 700;
}

.apx-hero h1 em {
    font-family: 'Instrument Serif', serif;
    font-style: italic;
    font-weight: 400;
    background: linear-gradient(90deg, #ffd07a, #ff8a5c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.apx-hero-lead {
    margin: 14px 0 22px;
    max-width: 560px;
    font-size: clamp(0.95rem, 1.6vw, 1.08rem);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.82);
}

.apx-hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
    padding: 0;
    list-style: none;
}

.apx-hero-stats li {
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.9);
}

.apx-hero-stats strong {
    display: block;
    font-size: 1.15rem;
    color: #fff;
}

/* Floating product mosaic */
.apx-mosaic {
    position: relative;
    height: clamp(260px, 34vw, 380px);
}

.apx-mosaic-item {
    position: absolute;
    width: var(--s, 120px);
    aspect-ratio: 1;
    border-radius: 22px;
    background: #fff;
    padding: 10px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
    display: grid;
    place-items: center;
    animation: apx-float 7s ease-in-out infinite;
    animation-delay: var(--d, 0s);
    transition: transform 300ms ease;
}

.apx-mosaic-item img {
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: contain;
}

@keyframes apx-float {
    0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); }
    50% { transform: translateY(-14px) rotate(calc(var(--r, 0deg) * -1)); }
}

/* ---------- Search ---------- */
.apx-search {
    position: relative;
    z-index: 30;
}

.apx-search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 8px 8px 18px;
    border-radius: 999px;
    background: #fff;
    border: 2px solid transparent;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
    transition: border-color 200ms ease, box-shadow 200ms ease;
}

.apx-search-box:focus-within {
    border-color: var(--apx-red-2);
    box-shadow: 0 0 0 5px rgba(255, 75, 75, 0.18), 0 16px 40px rgba(0, 0, 0, 0.22);
}

.apx-search-box svg {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    color: var(--apx-red);
}

.apx-search-box input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    font: inherit;
    font-size: 1rem;
    color: var(--apx-ink);
    padding: 10px 0;
}

.apx-search-box input::placeholder {
    color: #8b95a3;
}

.apx-search-clear {
    border: 0;
    background: #f1f3f6;
    color: #4b5563;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
}

.apx-search-go {
    border: 0;
    border-radius: 999px;
    padding: 12px 20px;
    font-weight: 600;
    font-size: 0.92rem;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, var(--apx-red), #ff5a3c);
    box-shadow: 0 8px 18px rgba(214, 31, 47, 0.35);
}

.apx-search-kbd {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 6px;
    border: 1px solid #d5dae1;
    font-size: 0.72rem;
    color: #6b7380;
}

.apx-popular {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
    font-size: 0.8rem;
}

.apx-popular span {
    color: rgba(255, 255, 255, 0.7);
    padding: 6px 2px;
}

.apx-popular button {
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-radius: 999px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 160ms ease;
}

.apx-popular button:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Suggestions dropdown */
.apx-suggest {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 10px);
    background: #fff;
    color: var(--apx-ink);
    border-radius: 20px;
    box-shadow: 0 30px 70px rgba(18, 24, 36, 0.3);
    border: 1px solid var(--apx-line);
    overflow: hidden;
    max-height: min(70vh, 560px);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.apx-suggest[hidden] {
    display: none;
}

.apx-suggest-section {
    padding: 10px 10px 6px;
}

.apx-suggest-section + .apx-suggest-section {
    border-top: 1px solid var(--apx-line);
}

.apx-suggest-title {
    margin: 2px 8px 6px;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8a93a0;
}

.apx-suggest-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 8px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    text-align: left;
    cursor: pointer;
    color: inherit;
    font-size: 0.88rem;
}

.apx-suggest-item.is-active,
.apx-suggest-item:hover {
    background: #fff3f1;
}

.apx-suggest-item img {
    width: 46px;
    height: 46px;
    object-fit: contain;
    border-radius: 10px;
    background: #f7f7f9;
    flex: 0 0 auto;
}

.apx-suggest-item .apx-s-main {
    flex: 1 1 auto;
    min-width: 0;
}

.apx-suggest-item .apx-s-name {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.apx-suggest-item .apx-s-meta {
    display: block;
    font-size: 0.74rem;
    color: #8a93a0;
}

.apx-suggest-item .apx-s-price {
    font-weight: 700;
    white-space: nowrap;
}

.apx-suggest-cat {
    display: inline-flex;
    margin: 0 4px 6px 0;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid var(--apx-line);
    background: #fafbfc;
    font-size: 0.8rem;
    cursor: pointer;
    color: inherit;
}

.apx-suggest-cat.is-active,
.apx-suggest-cat:hover {
    border-color: var(--apx-red);
    color: var(--apx-red);
}

.apx-suggest-all {
    display: block;
    width: 100%;
    padding: 14px;
    border: 0;
    border-top: 1px solid var(--apx-line);
    background: #fafbfc;
    color: var(--apx-red);
    font-weight: 600;
    cursor: pointer;
    font-size: 0.88rem;
}

.apx-suggest-empty {
    padding: 18px;
    font-size: 0.9rem;
    color: var(--apx-ink-soft);
}

.apx-mark {
    background: linear-gradient(transparent 55%, rgba(255, 196, 0, 0.45) 55%);
    color: inherit;
    padding: 0;
}

/* ---------- Product marquee ---------- */
.apx-marquee {
    margin-top: 18px;
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.apx-marquee-track {
    display: flex;
    gap: 12px;
    width: max-content;
    animation: apx-marquee 60s linear infinite;
}

.apx-marquee:hover .apx-marquee-track {
    animation-play-state: paused;
}

.apx-marquee-item {
    width: 92px;
    height: 92px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid var(--apx-line);
    display: grid;
    place-items: center;
    padding: 8px;
    cursor: pointer;
    box-shadow: var(--apx-shadow);
}

.apx-marquee-item img {
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: contain;
}

@keyframes apx-marquee {
    to { transform: translateX(-50%); }
}

/* ---------- Section headings ---------- */
.apx-section {
    margin-top: clamp(28px, 5vw, 56px);
}

.apx-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}

.apx-eyebrow {
    margin: 0 0 4px;
    font-size: 0.74rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--apx-red);
    font-weight: 600;
}

.apx-section h2 {
    margin: 0;
    font-size: clamp(1.4rem, 3vw, 2.1rem);
    letter-spacing: -0.02em;
}

.apx-section h2 em {
    font-family: 'Instrument Serif', serif;
    font-weight: 400;
    font-style: italic;
}

.apx-section-sub {
    margin: 6px 0 0;
    color: var(--apx-ink-soft);
    font-size: 0.92rem;
}

.apx-link-btn {
    border: 1px solid var(--apx-line);
    background: #fff;
    border-radius: 999px;
    padding: 9px 16px;
    font-size: 0.84rem;
    cursor: pointer;
    white-space: nowrap;
    color: var(--apx-ink);
    transition: all 160ms ease;
}

.apx-link-btn:hover {
    border-color: var(--apx-ink);
}

/* ---------- Reassurance ---------- */
.apx-trust {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.apx-trust-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: var(--apx-shadow);
    font-size: 0.84rem;
    line-height: 1.35;
}

.apx-trust-item b {
    display: block;
    font-size: 0.9rem;
}

.apx-trust-icon {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 1.2rem;
    background: linear-gradient(135deg, #fff1ee, #ffe2dc);
}

/* ---------- Univers tiles ---------- */
.apx-univers {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.apx-univers-tile {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 10px;
    min-height: 168px;
    padding: 18px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    background: var(--tile-bg, linear-gradient(140deg, #fff, #f6f1ea));
    box-shadow: var(--apx-shadow);
    cursor: pointer;
    text-align: left;
    color: var(--apx-ink);
    overflow: hidden;
    transition: transform 240ms ease, box-shadow 240ms ease;
}

.apx-univers-tile:hover {
    transform: translateY(-4px);
    box-shadow: var(--apx-shadow-hover);
}

.apx-univers-tile h3 {
    margin: 0;
    font-size: 1.08rem;
    letter-spacing: -0.01em;
}

.apx-univers-tile p {
    margin: 4px 0 0;
    font-size: 0.8rem;
    color: var(--apx-ink-soft);
}

.apx-univers-thumbs {
    display: flex;
    align-self: center;
}

.apx-univers-thumbs span {
    width: 64px;
    height: 64px;
    margin-left: -18px;
    border-radius: 18px;
    background: #fff;
    border: 2px solid #fff;
    box-shadow: 0 8px 18px rgba(30, 36, 48, 0.14);
    display: grid;
    place-items: center;
    padding: 6px;
    transition: transform 260ms ease;
}

.apx-univers-thumbs span:nth-child(2) { transform: translateY(-10px) rotate(4deg); }
.apx-univers-thumbs span:nth-child(3) { transform: rotate(-5deg); }

.apx-univers-tile:hover .apx-univers-thumbs span:nth-child(1) { transform: translateY(-6px) rotate(-6deg); }
.apx-univers-tile:hover .apx-univers-thumbs span:nth-child(2) { transform: translateY(-16px) rotate(6deg); }
.apx-univers-tile:hover .apx-univers-thumbs span:nth-child(3) { transform: translateY(-4px) rotate(-8deg); }

.apx-univers-thumbs img {
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: contain;
}

.apx-univers-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--apx-red);
}

/* ---------- Rails (Noël, coups de coeur) ---------- */
.apx-rail-wrap {
    position: relative;
}

.apx-rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(210px, 230px);
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 4px 4px 18px;
    scrollbar-width: thin;
}

.apx-rail > * {
    scroll-snap-align: start;
}

.apx-rail-nav {
    display: flex;
    gap: 6px;
}

.apx-rail-nav button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--apx-line);
    background: #fff;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--apx-ink);
}

.apx-noel {
    position: relative;
    padding: clamp(18px, 3vw, 30px);
    border-radius: 28px;
    background:
        radial-gradient(circle at 90% 0%, rgba(216, 180, 106, 0.35), transparent 40%),
        linear-gradient(150deg, #0f3b2e 0%, #14523f 50%, #7a1824 130%);
    color: #fff;
    overflow: hidden;
}

.apx-noel .apx-eyebrow {
    color: #ffd98a;
}

.apx-noel .apx-section-sub {
    color: rgba(255, 255, 255, 0.78);
}

.apx-noel .apx-rail-nav button {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.25);
}

.apx-snow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        radial-gradient(2px 2px at 20px 30px, rgba(255, 255, 255, 0.8), transparent),
        radial-gradient(2px 2px at 80px 120px, rgba(255, 255, 255, 0.6), transparent),
        radial-gradient(1.5px 1.5px at 150px 60px, rgba(255, 255, 255, 0.7), transparent),
        radial-gradient(2px 2px at 220px 180px, rgba(255, 255, 255, 0.5), transparent);
    background-size: 260px 220px;
    animation: apx-snow 14s linear infinite;
    opacity: 0.6;
}

@keyframes apx-snow {
    to { background-position: 0 440px; }
}

/* ---------- Shop layout ---------- */
.apx-shop {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.apx-toolbar {
    position: sticky;
    top: var(--apx-sticky-top);
    z-index: 15;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    margin-bottom: 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.9);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.95);
    box-shadow: var(--apx-shadow);
}

.apx-toolbar .apx-search {
    flex: 1 1 auto;
    min-width: 0;
}

.apx-toolbar .apx-search-box {
    box-shadow: none;
    border: 1px solid var(--apx-line);
    padding: 4px 4px 4px 14px;
}

.apx-toolbar .apx-search-box:focus-within {
    border-color: var(--apx-red);
    box-shadow: 0 0 0 4px rgba(214, 31, 47, 0.1);
}

.apx-toolbar .apx-search-box input {
    padding: 8px 0;
    font-size: 0.94rem;
}

.apx-select {
    border: 1px solid var(--apx-line);
    border-radius: 999px;
    background: #fff;
    padding: 10px 34px 10px 14px;
    font: inherit;
    font-size: 0.86rem;
    color: var(--apx-ink);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%231e2430' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 9px;
}

.apx-filter-toggle {
    display: none;
    align-items: center;
    gap: 8px;
    border: 0;
    border-radius: 999px;
    padding: 11px 16px;
    background: var(--apx-ink);
    color: #fff;
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.apx-filter-toggle .apx-count-bubble {
    background: var(--apx-red-2);
    border-radius: 999px;
    min-width: 20px;
    height: 20px;
    display: inline-grid;
    place-items: center;
    font-size: 0.72rem;
    padding: 0 6px;
}

/* Sidebar filters */
.apx-filters {
    position: sticky;
    top: var(--apx-sticky-top);
    max-height: calc(100vh - var(--apx-sticky-top) - 16px);
    overflow-y: auto;
    padding: 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.95);
    box-shadow: var(--apx-shadow);
    scrollbar-width: thin;
}

.apx-filters-head {
    display: none;
}

.apx-fgroup + .apx-fgroup {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--apx-line);
}

.apx-fgroup h3 {
    margin: 0 0 10px;
    font-size: 0.74rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #8a93a0;
}

.apx-tree {
    list-style: none;
    margin: 0;
    padding: 0;
}

.apx-tree-btn {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
    font-size: 0.88rem;
    text-align: left;
    color: var(--apx-ink);
}

.apx-tree-btn:hover {
    background: #f6f3ee;
}

.apx-tree-btn.is-active {
    background: var(--apx-ink);
    color: #fff;
}

.apx-tree-btn .apx-n {
    font-size: 0.74rem;
    color: #8a93a0;
}

.apx-tree-btn.is-active .apx-n {
    color: rgba(255, 255, 255, 0.7);
}

.apx-tree-sub {
    list-style: none;
    margin: 2px 0 6px 10px;
    padding: 0 0 0 8px;
    border-left: 2px solid #f0e9df;
}

.apx-tree-sub .apx-tree-btn {
    font-size: 0.83rem;
    padding: 6px 10px;
}

.apx-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.apx-pill {
    border: 1px solid var(--apx-line);
    background: #fff;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 0.8rem;
    cursor: pointer;
    color: var(--apx-ink);
    transition: all 140ms ease;
}

.apx-pill:hover {
    border-color: var(--apx-ink);
}

.apx-pill.is-active {
    background: var(--apx-red);
    border-color: var(--apx-red);
    color: #fff;
}

.apx-pill .apx-n {
    opacity: 0.6;
    margin-left: 4px;
    font-size: 0.72rem;
}

.apx-price-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.apx-price-inputs input {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--apx-line);
    border-radius: 10px;
    padding: 8px 10px;
    font: inherit;
    font-size: 0.85rem;
}

/* Active filters + count */
.apx-results-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.apx-results-count {
    margin: 0;
    font-size: 0.9rem;
    color: var(--apx-ink-soft);
}

.apx-results-count strong {
    color: var(--apx-ink);
}

.apx-active {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.apx-active button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 0;
    border-radius: 999px;
    padding: 6px 10px 6px 12px;
    background: #1e2430;
    color: #fff;
    font-size: 0.78rem;
    cursor: pointer;
}

.apx-active button.apx-clear-all {
    background: transparent;
    color: var(--apx-red);
    text-decoration: underline;
}

.apx-didyoumean {
    margin: 0 0 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #fff7e6;
    border: 1px solid #ffe2a8;
    font-size: 0.88rem;
}

.apx-didyoumean button {
    border: 0;
    background: none;
    color: var(--apx-red);
    font-weight: 700;
    cursor: pointer;
    text-decoration: underline;
    font-size: inherit;
}

/* ---------- Product grid + cards ---------- */
.apx-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(214px, 1fr));
    gap: 16px;
}

.apx-card {
    position: relative;
    display: flex;
    flex-direction: column;
    border-radius: var(--apx-radius);
    background: var(--apx-card);
    border: 1px solid rgba(30, 36, 48, 0.06);
    box-shadow: var(--apx-shadow);
    overflow: hidden;
    transition: transform 240ms ease, box-shadow 240ms ease;
    animation: apx-card-in 420ms ease both;
    animation-delay: var(--i, 0ms);
}

@keyframes apx-card-in {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}

.apx-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--apx-shadow-hover);
}

.apx-card-media {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    padding: 0;
    overflow: hidden;
    background: radial-gradient(circle at 50% 40%, #ffffff 0%, #f6f4f0 100%);
    cursor: zoom-in;
    border: 0;
    width: 100%;
}

.apx-card-media img {
    position: absolute;
    inset: 14px;
    width: calc(100% - 28px);
    height: calc(100% - 28px);
    max-width: none;
    object-fit: contain;
    transition: transform 400ms ease, opacity 220ms ease;
    mix-blend-mode: multiply;
}

.apx-card:hover .apx-card-media img {
    transform: scale(1.06);
}

.apx-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    pointer-events: none;
}

.apx-badge {
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: #fff;
    color: var(--apx-ink);
    box-shadow: 0 4px 10px rgba(30, 36, 48, 0.1);
}

.apx-badge-noel { background: #14523f; color: #fff; }
.apx-badge-b2f { background: #ff7eb6; color: #fff; }
.apx-badge-kids { background: #ffd23f; color: #3b2b00; }
.apx-badge-low { background: var(--apx-red); color: #fff; }

.apx-quick {
    position: absolute;
    right: 10px;
    bottom: 10px;
    border: 0;
    border-radius: 999px;
    padding: 8px 12px;
    background: rgba(30, 36, 48, 0.88);
    color: #fff;
    font-size: 0.74rem;
    cursor: pointer;
    opacity: 0;
    transform: translateY(6px);
    transition: all 200ms ease;
}

.apx-card:hover .apx-quick,
.apx-card:focus-within .apx-quick {
    opacity: 1;
    transform: none;
}

.apx-card-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 14px 14px;
    flex: 1 1 auto;
}

.apx-card-brand {
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #8a93a0;
}

.apx-card-title {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.32;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.64em;
}

.apx-card-title a:hover {
    color: var(--apx-red);
}

.apx-card-variant {
    font-size: 0.78rem;
    color: var(--apx-ink-soft);
    min-height: 1.2em;
}

.apx-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 26px;
    align-items: center;
}

.apx-swatch {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(30, 36, 48, 0.22);
    cursor: pointer;
    padding: 0;
    background: var(--sw, #ddd);
    transition: transform 140ms ease, box-shadow 140ms ease;
}

.apx-swatch:hover {
    transform: scale(1.12);
}

.apx-swatch.is-active {
    box-shadow: 0 0 0 2px var(--apx-ink);
}

.apx-swatch-img {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    border: 1px solid var(--apx-line);
    background: #fff;
    padding: 2px;
    cursor: pointer;
    display: grid;
    place-items: center;
}

.apx-swatch-img img {
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: contain;
}

.apx-swatch-img.is-active {
    border-color: var(--apx-ink);
    box-shadow: 0 0 0 1px var(--apx-ink);
}

.apx-more {
    font-size: 0.74rem;
    color: var(--apx-ink-soft);
    border: 0;
    background: none;
    cursor: pointer;
    padding: 0 2px;
}

.apx-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
    padding-top: 6px;
}

.apx-price {
    font-size: 1.12rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.apx-price small {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--apx-ink-soft);
    margin-right: 3px;
}

.apx-add {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 0;
    border-radius: 999px;
    padding: 10px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #1e2430, #34405a);
    cursor: pointer;
    transition: transform 140ms ease, background 200ms ease;
    white-space: nowrap;
}

.apx-add:hover {
    background: linear-gradient(135deg, var(--apx-red), #ff5a3c);
}

.apx-add:active {
    transform: scale(0.96);
}

.apx-add svg {
    width: 16px;
    height: 16px;
}

.apx-card-form {
    margin: 0;
}

.apx-load-more {
    display: block;
    margin: 22px auto 0;
    border: 1px solid var(--apx-line);
    background: #fff;
    border-radius: 999px;
    padding: 13px 26px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--apx-shadow);
}

.apx-progress {
    margin: 14px auto 0;
    width: min(260px, 70%);
    height: 4px;
    border-radius: 99px;
    background: #ece7df;
    overflow: hidden;
}

.apx-progress span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--apx-red), #ffb23f);
    transition: width 300ms ease;
}

.apx-progress-label {
    text-align: center;
    font-size: 0.78rem;
    color: var(--apx-ink-soft);
    margin-top: 8px;
}

.apx-empty {
    padding: 40px 20px;
    text-align: center;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px dashed rgba(30, 36, 48, 0.2);
}

.apx-empty h3 {
    margin: 0 0 6px;
}

.apx-empty p {
    margin: 0 0 14px;
    color: var(--apx-ink-soft);
}

/* Skeleton while JS loads (server-rendered list stays visible without JS) */
.apx-ssr .apx-card {
    animation: none;
}

/* ---------- Quick view ---------- */
.apx-qv {
    width: min(980px, calc(100% - 32px));
    max-height: calc(100vh - 48px);
    padding: 0;
    border: 0;
    border-radius: 26px;
    box-shadow: 0 40px 120px rgba(10, 16, 28, 0.45);
    overflow: hidden;
    color: var(--apx-ink);
}

.apx-qv::backdrop {
    background: rgba(16, 22, 34, 0.55);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.apx-qv[open] {
    animation: apx-pop 260ms ease;
}

@keyframes apx-pop {
    from { opacity: 0; transform: translateY(20px) scale(0.98); }
    to { opacity: 1; transform: none; }
}

.apx-qv-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    max-height: calc(100vh - 48px);
}

.apx-qv-gallery {
    background: radial-gradient(circle at 50% 40%, #fff, #f3f0ea);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.apx-qv-main {
    flex: 1 1 auto;
    display: grid;
    place-items: center;
    min-height: 300px;
}

.apx-qv-main img {
    max-height: min(56vh, 460px);
    object-fit: contain;
    mix-blend-mode: multiply;
}

.apx-qv-thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
}

.apx-qv-thumbs button {
    width: 64px;
    height: 64px;
    flex: 0 0 auto;
    border-radius: 12px;
    border: 1px solid var(--apx-line);
    background: #fff;
    padding: 4px;
    cursor: pointer;
    display: grid;
    place-items: center;
}

.apx-qv-thumbs button.is-active {
    border-color: var(--apx-ink);
    box-shadow: 0 0 0 1px var(--apx-ink);
}

.apx-qv-thumbs img {
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: contain;
}

.apx-qv-info {
    padding: 26px 26px 22px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.apx-qv-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 0;
    background: #fff;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.14);
    cursor: pointer;
    font-size: 1.3rem;
    line-height: 1;
}

.apx-qv-title {
    margin: 0;
    font-size: clamp(1.2rem, 2.4vw, 1.6rem);
    line-height: 1.2;
    letter-spacing: -0.02em;
    padding-right: 36px;
}

.apx-qv-price {
    font-size: 1.7rem;
    font-weight: 700;
}

.apx-qv-price small {
    display: block;
    font-size: 0.76rem;
    font-weight: 500;
    color: var(--apx-success, #1b8f68);
}

.apx-qv-variants h4 {
    margin: 0 0 8px;
    font-size: 0.82rem;
    font-weight: 600;
}

.apx-qv-variants h4 span {
    font-weight: 400;
    color: var(--apx-ink-soft);
}

.apx-variant-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.apx-variant-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--apx-line);
    background: #fff;
    border-radius: 999px;
    padding: 6px 12px 6px 6px;
    font-size: 0.8rem;
    cursor: pointer;
    color: var(--apx-ink);
}

.apx-variant-chip i {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--sw, #eee);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.apx-variant-chip img {
    width: 22px;
    height: 22px;
    object-fit: contain;
}

.apx-variant-chip.is-active {
    border-color: var(--apx-ink);
    box-shadow: 0 0 0 1px var(--apx-ink);
}

.apx-qv-specs {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 6px 14px;
    margin: 0;
    font-size: 0.84rem;
}

.apx-qv-specs dt {
    color: var(--apx-ink-soft);
}

.apx-qv-specs dd {
    margin: 0;
}

.apx-qv-desc {
    font-size: 0.86rem;
    line-height: 1.6;
    color: #3a4452;
    white-space: pre-line;
    max-height: 220px;
    overflow-y: auto;
    padding-right: 6px;
}

.apx-qv-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
    padding-top: 6px;
}

.apx-qv-actions .apx-add {
    padding: 14px 22px;
    font-size: 0.92rem;
}

.apx-qv-actions form {
    margin: 0;
}

.apx-qv-note {
    font-size: 0.76rem;
    color: var(--apx-ink-soft);
}

/* ---------- Videos ---------- */
.apx-video-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.apx-videos {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(240px, 300px);
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 14px;
}

.apx-video {
    position: relative;
    scroll-snap-align: start;
    border-radius: 20px;
    overflow: hidden;
    background: #111;
    aspect-ratio: 16 / 10;
    box-shadow: var(--apx-shadow);
}

.apx-video.is-vertical {
    aspect-ratio: 9 / 14;
}

.apx-video button.apx-video-play {
    position: absolute;
    inset: 0;
    width: 100%;
    border: 0;
    padding: 0;
    background: #111;
    cursor: pointer;
}

.apx-video button.apx-video-play img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
    transition: transform 400ms ease, opacity 200ms ease;
}

.apx-video button.apx-video-play:hover img {
    transform: scale(1.04);
    opacity: 1;
}

.apx-video-icon {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 58px;
    height: 58px;
    margin: -29px 0 0 -29px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    display: grid;
    place-items: center;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
}

.apx-video-icon::before {
    content: "";
    margin-left: 4px;
    border-style: solid;
    border-width: 10px 0 10px 16px;
    border-color: transparent transparent transparent var(--apx-red);
}

.apx-video-label {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 26px 14px 12px;
    color: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
    pointer-events: none;
    text-align: left;
}

.apx-video video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}

.apx-video-unavailable {
    position: absolute;
    inset: 0;
    margin: 0;
    display: grid;
    place-items: center;
    padding: 12px;
    text-align: center;
    color: #fff;
    font-size: 0.88rem;
    font-weight: 600;
    background: linear-gradient(160deg, #2a2a2a, #131313);
}

/* ---------- Story ---------- */
.apx-story {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px;
}

.apx-story-card {
    padding: clamp(18px, 3vw, 28px);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.95);
    box-shadow: var(--apx-shadow);
    font-size: 0.92rem;
    line-height: 1.7;
}

.apx-story-card h3 {
    margin: 0 0 8px;
    font-size: 1.1rem;
}

.apx-story-card p {
    margin: 0 0 10px;
    color: #3a4452;
}

.apx-brands {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.apx-brands li {
    padding: 12px 14px;
    border-radius: 14px;
    background: #faf8f4;
    border: 1px solid #f0e9df;
}

.apx-brands strong {
    display: block;
    color: var(--apx-ink);
}

/* ---------- Toast ---------- */
.apx-toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 1000;
    transform: translateX(-50%);
    padding: 12px 18px;
    border-radius: 999px;
    background: #1e2430;
    color: #fff;
    font-size: 0.86rem;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
    .apx-shop {
        grid-template-columns: 1fr;
    }

    .apx-filter-toggle {
        display: inline-flex;
    }

    .apx-filters {
        position: fixed;
        inset: auto 0 0 0;
        top: auto;
        z-index: 1001;
        max-height: 86vh;
        border-radius: 26px 26px 0 0;
        padding: 0 18px 18px;
        background: #fff;
        transform: translateY(105%);
        transition: transform 320ms cubic-bezier(.2, .8, .2, 1);
        box-shadow: 0 -20px 60px rgba(10, 16, 28, 0.3);
    }

    .apx-filters.is-open {
        transform: none;
    }

    .apx-filters-head {
        position: sticky;
        top: 0;
        z-index: 2;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 0 12px;
        margin-bottom: 6px;
        background: #fff;
        border-bottom: 1px solid var(--apx-line);
    }

    .apx-filters-head h2 {
        margin: 0;
        font-size: 1.05rem;
    }

    .apx-filters-head::before {
        content: "";
        position: absolute;
        top: 6px;
        left: 50%;
        width: 44px;
        height: 4px;
        margin-left: -22px;
        border-radius: 99px;
        background: #d9dde3;
    }

    .apx-filters-apply {
        position: sticky;
        bottom: 0;
        display: block;
        width: 100%;
        margin-top: 16px;
        border: 0;
        border-radius: 999px;
        padding: 14px;
        background: var(--apx-red);
        color: #fff;
        font-weight: 600;
        font-size: 0.95rem;
        cursor: pointer;
    }

    .apx-scrim {
        position: fixed;
        inset: 0;
        z-index: 1000;
        background: rgba(16, 22, 34, 0.45);
    }

    .apx-trust {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1081px) {
    .apx-filters-apply,
    .apx-scrim {
        display: none !important;
    }
}

@media (max-width: 900px) {
    .apx-hero-grid {
        grid-template-columns: 1fr;
    }

    .apx-mosaic {
        display: none;
    }

    .apx-univers {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .apx-story {
        grid-template-columns: 1fr;
    }

    .apx-qv-inner {
        grid-template-columns: 1fr;
        overflow-y: auto;
    }

    .apx-qv-main {
        min-height: 220px;
    }

    .apx-qv-main img {
        max-height: 34vh;
    }

    .apx-qv-info {
        overflow: visible;
    }
}

@media (max-width: 760px) {
    .apx {
        --apx-sticky-top: 8px;
    }

    .apx-hero {
        border-radius: 22px;
        margin-top: 12px;
    }

    .apx-search-go span,
    .apx-search-kbd {
        display: none;
    }

    .apx-search-go {
        padding: 12px 14px;
    }

    .apx-toolbar {
        flex-wrap: wrap;
        border-radius: 16px;
        padding: 8px;
    }

    .apx-toolbar .apx-search {
        flex: 1 1 100%;
    }

    .apx-toolbar .apx-select {
        flex: 1 1 auto;
    }

    .apx-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .apx-card-media img {
        inset: 10px;
        width: calc(100% - 20px);
        height: calc(100% - 20px);
    }

    .apx-card-body {
        padding: 10px 10px 12px;
        gap: 5px;
    }

    .apx-card-title {
        font-size: 0.84rem;
    }

    .apx-card-foot {
        flex-direction: column;
        align-items: stretch;
    }

    .apx-add {
        justify-content: center;
        padding: 10px;
    }

    .apx-quick {
        opacity: 1;
        transform: none;
        padding: 6px 9px;
        font-size: 0.68rem;
    }

    .apx-swatch {
        width: 20px;
        height: 20px;
    }

    .apx-univers-tile {
        min-height: 130px;
        padding: 14px;
        grid-template-columns: 1fr;
    }

    .apx-univers-thumbs {
        order: -1;
        margin-left: 18px;
    }

    .apx-univers-thumbs span {
        width: 48px;
        height: 48px;
        border-radius: 14px;
    }

    .apx-rail {
        grid-auto-columns: minmax(168px, 46vw);
        gap: 10px;
    }

    .apx-rail-nav {
        display: none;
    }

    .apx-section-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .apx-trust-item {
        padding: 10px 12px;
        font-size: 0.78rem;
    }

    .apx-trust-icon {
        width: 34px;
        height: 34px;
    }

    .apx-qv {
        width: 100%;
        max-width: 100%;
        max-height: 92vh;
        margin: auto 0 0;
        border-radius: 24px 24px 0 0;
    }

    .apx-qv-inner {
        max-height: 92vh;
    }

    .apx-qv-gallery {
        padding: 16px;
    }

    .apx-qv-info {
        padding: 18px;
    }

    .apx-qv-actions {
        position: sticky;
        bottom: -18px;
        background: #fff;
        padding: 12px 0 18px;
        margin-bottom: -18px;
    }

    .apx-qv-actions form,
    .apx-qv-actions .apx-add {
        flex: 1 1 100%;
        justify-content: center;
        width: 100%;
    }

    .apx-videos {
        grid-auto-columns: minmax(200px, 62vw);
    }

    .apx-marquee-item {
        width: 72px;
        height: 72px;
    }
}

@media (max-width: 380px) {
    .apx-grid {
        gap: 8px;
    }

    .apx-price {
        font-size: 1rem;
    }

    .apx-trust {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .apx-mosaic-item,
    .apx-marquee-track,
    .apx-snow,
    .apx-card {
        animation: none !important;
    }

    .apx-card,
    .apx-univers-tile,
    .apx-card-media img {
        transition: none !important;
    }
}

