/* ==========================================================================
   DekoShop — /shop/products/{name} listing (all_products.blade.php)
   Everything is scoped under .ap-page so Bootstrap 4 and the shop's other
   stylesheets cannot leak in, and nothing here leaks out.
   ========================================================================== */

.ap-page {
    --ap-blue: #1d5cf2;
    --ap-blue-dark: #1449c9;
    --ap-blue-soft: #eaf1ff;
    --ap-navy: #0f1a3d;
    --ap-text: #1f2937;
    --ap-muted: #6b7280;
    --ap-border: #e7ebf3;
    --ap-bg: #f6f8fc;
    --ap-red: #ef4444;
    --ap-red-soft: #fdecec;
    --ap-star: #f5a524;
    --ap-radius: 14px;
    --ap-shadow: 0 1px 2px rgba(15, 26, 61, .04), 0 4px 14px rgba(15, 26, 61, .05);

    background: var(--ap-bg);
    color: var(--ap-text);
    font-family: 'Inter', 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: 14px;
    line-height: 1.45;
    padding: 24px 0 48px;
}
.ap-page *, .ap-page *::before, .ap-page *::after { box-sizing: border-box; }
.ap-page h1, .ap-page h2, .ap-page h3, .ap-page p { margin: 0; }
.ap-page a { text-decoration: none; }
.ap-page button { font-family: inherit; }
.ap-page label { margin: 0; }

/* Width and side padding come from the site's `container px-xl-5` — the same
   box as the header — so the page edges line up with the logo and Cart button. */
.ap-layout { display: grid; grid-template-columns: clamp(250px, 18%, 290px) minmax(0, 1fr); gap: 24px; align-items: start; }
.ap-layout.is-full { grid-template-columns: minmax(0, 1fr); }   /* collection page: no left column */
/* Cards per row: 6 on wide screens, 5 from 1400px (4 below, then the
   responsive rules at the end). A collection page has no left column, so it
   already fits 6 from 1400px. */
@media (min-width: 1400px) {
    .ap-grid:not(.is-list) { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .ap-layout.is-full .ap-grid:not(.is-list) { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (min-width: 1600px) { .ap-grid:not(.is-list) { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.ap-main { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.ap-muted { color: var(--ap-muted); font-size: 13px; padding: 8px 4px; }

/* ---------- Buttons / links ---------- */
.ap-btn-primary {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--ap-blue); color: #fff !important;
    font-weight: 600; font-size: 14px; border-radius: 8px;
    padding: 11px 20px; border: 0; white-space: nowrap;
    box-shadow: 0 6px 14px rgba(29, 92, 242, .25);
    transition: background .15s ease, transform .15s ease;
}
.ap-btn-primary:hover { background: var(--ap-blue-dark); transform: translateY(-1px); }
.ap-btn-primary i { font-size: 12px; }
.ap-link {
    background: none; border: 0; padding: 0; cursor: pointer;
    color: var(--ap-blue); font-size: 12.5px; font-weight: 600;
}
.ap-link:hover { text-decoration: underline; }

/* ---------- Sidebar panels ---------- */
.ap-sidebar { display: flex; flex-direction: column; gap: 16px; }
.ap-sidebar-mobile-head { display: none; }
.ap-panel {
    background: #fff; border: 1px solid var(--ap-border); border-radius: var(--ap-radius);
    box-shadow: var(--ap-shadow); padding: 16px 14px;
}
.ap-panel-title {
    display: flex; align-items: center; gap: 9px;
    font-size: 15px; font-weight: 700; color: var(--ap-navy);
    padding: 0 4px 10px;
}
.ap-panel-title i { color: var(--ap-blue); font-size: 14px; }

.ap-cat-list { list-style: none; margin: 0; padding: 0; }
.ap-cat-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 6px; border-radius: 8px;
    color: var(--ap-text) !important; font-size: 13.5px; font-weight: 500;
    transition: background .15s ease, color .15s ease;
}
.ap-cat-item:hover { background: var(--ap-blue-soft); color: var(--ap-blue) !important; }
.ap-cat-icon { width: 18px; text-align: center; color: #475569; font-size: 13px; }
.ap-cat-item:hover .ap-cat-icon { color: var(--ap-blue); }
.ap-cat-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-cat-chevron { font-size: 10px; color: #9aa3b5; }
.ap-pill {
    font-size: 9.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
    border-radius: 999px; padding: 2px 7px; line-height: 1.4;
}
.ap-pill.is-hot { background: var(--ap-red); color: #fff; }
.ap-pill.is-new { background: var(--ap-blue); color: #fff; text-transform: none; }

/* ---------- Filter panel ---------- */
.ap-filter-head { display: flex; align-items: center; justify-content: space-between; padding-right: 4px; }
.ap-filter-head .ap-panel-title { padding-bottom: 6px; }
.ap-fgroup { border-top: 1px solid var(--ap-border); padding: 12px 4px; }
.ap-fgroup:last-child { padding-bottom: 2px; }
.ap-fgroup-head {
    width: 100%; display: flex; align-items: center; justify-content: space-between;
    background: none; border: 0; padding: 0; cursor: pointer;
    font-size: 14px; font-weight: 700; color: var(--ap-navy);
}
.ap-fgroup-head i { font-size: 11px; color: var(--ap-muted); transition: transform .2s ease; }
.ap-fgroup-body { padding-top: 10px; }
.ap-fgroup.is-collapsed .ap-fgroup-body { display: none; }
.ap-fgroup.is-collapsed .ap-fgroup-head i { transform: rotate(180deg); }

.ap-range-label { font-size: 12.5px; color: var(--ap-muted); margin-bottom: 10px !important; }
.ap-range { position: relative; height: 20px; margin: 0 4px 12px; }
.ap-range-track {
    position: absolute; left: 0; right: 0; top: 50%; height: 4px; margin-top: -2px;
    background: #dfe5ef; border-radius: 4px;
}
.ap-range-fill { position: absolute; top: 0; bottom: 0; background: var(--ap-blue); border-radius: 4px; }
.ap-range input[type=range] {
    position: absolute; left: 0; top: 0; width: 100%; height: 20px; margin: 0;
    -webkit-appearance: none; appearance: none; background: none; pointer-events: none;
}
.ap-range input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none; pointer-events: auto; cursor: pointer;
    width: 16px; height: 16px; border-radius: 50%;
    background: var(--ap-blue); border: 3px solid #fff; box-shadow: 0 0 0 1px var(--ap-blue), 0 2px 5px rgba(15, 26, 61, .25);
}
.ap-range input[type=range]::-moz-range-thumb {
    pointer-events: auto; cursor: pointer;
    width: 12px; height: 12px; border-radius: 50%;
    background: var(--ap-blue); border: 3px solid #fff; box-shadow: 0 0 0 1px var(--ap-blue);
}
.ap-range input[type=range]::-moz-range-track { background: none; }
.ap-range input[type=range]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px rgba(29, 92, 242, .35); }
.ap-range-inputs { display: flex; align-items: center; gap: 8px; }
.ap-range-dash { color: var(--ap-muted); }
.ap-money {
    flex: 1; display: flex; align-items: center; gap: 2px;
    border: 1px solid var(--ap-border); border-radius: 8px; padding: 0 10px; height: 36px; background: #fff;
}
.ap-money span { color: var(--ap-muted); font-size: 13px; }
.ap-money input {
    width: 100%; min-width: 0; border: 0; outline: 0; background: none;
    font-size: 13px; color: var(--ap-text); -moz-appearance: textfield;
}
.ap-money input::-webkit-outer-spin-button, .ap-money input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ap-money:focus-within { border-color: var(--ap-blue); box-shadow: 0 0 0 3px rgba(29, 92, 242, .12); }

.ap-check {
    display: flex !important; align-items: center; gap: 10px; cursor: pointer;
    padding: 5px 0; font-size: 13.5px; color: var(--ap-text);
}
.ap-check input {
    width: 16px; height: 16px; margin: 0; flex-shrink: 0;
    accent-color: var(--ap-blue); cursor: pointer;
}
.ap-check em { font-style: normal; color: var(--ap-muted); }
.ap-more { display: inline-block; margin-top: 8px; }
[data-more-group]:not(.is-expanded) .is-extra { display: none !important; }

.ap-swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.ap-swatch {
    width: 24px; height: 24px; border-radius: 50%; padding: 0; cursor: pointer;
    border: 1px solid rgba(15, 26, 61, .15);
    box-shadow: inset 0 0 0 2px #fff;
    transition: transform .12s ease, box-shadow .12s ease;
}
.ap-swatch:hover { transform: scale(1.08); }
.ap-swatch.is-on { box-shadow: inset 0 0 0 2px #fff, 0 0 0 2px var(--ap-blue); }

/* ---------- Hero ---------- */
.ap-hero {
    position: relative; overflow: hidden;
    display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center;
    min-height: 260px; border-radius: 18px;
    background: linear-gradient(110deg, #eef4ff 0%, #f5f8ff 45%, #e4edff 100%);
    border: 1px solid #dfe8fb;
}
.ap-hero-copy { position: relative; z-index: 2; padding: 34px 20px 34px 36px; }
.ap-hero-kicker {
    display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
    color: var(--ap-blue); background: #fff; border: 1px solid #c9d8fb; border-radius: 999px; padding: 4px 12px;
}
.ap-hero h1 {
    font-size: 36px; line-height: 1.12; font-weight: 800; color: var(--ap-navy);
    letter-spacing: -.02em; margin: 14px 0 12px;
}
.ap-hero p { color: #4b5563; font-size: 15px; max-width: 420px; margin-bottom: 22px; }
.ap-hero-visual { position: relative; height: 100%; min-height: 260px; }
.ap-hero-wave {
    position: absolute; right: -60px; top: -40px; bottom: -40px; width: 88%;
    border-radius: 48% 0 0 52% / 60% 0 0 40%;
    background: linear-gradient(160deg, #3b7bff 0%, #1d5cf2 55%, #1747c0 100%);
    opacity: .95;
}
.ap-hero-wave::before {
    content: ""; position: absolute; left: -26px; top: 12%; bottom: 12%; width: 60px;
    border-radius: 50%; background: rgba(59, 123, 255, .25);
}
/* Product photos on white square tiles over the wave, each shown whole
   (contain, never cropped): one tile; two side by side; three = a big tile
   and two small ones. The box takes its width from its height, and gets
   narrower tiles on a narrow hero rather than reach the text. */
.ap-hero-photos {
    position: absolute; top: 24px; right: 8%; z-index: 1;
    height: calc(100% - 48px); aspect-ratio: 1; max-width: 84%;
    display: grid; gap: 12px;
    grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr);
}
.ap-hero-photos img {
    width: 100%; height: 100%; min-height: 0; object-fit: contain; padding: 10px;
    border-radius: 14px; background: #fff; box-shadow: 0 10px 24px rgba(15, 26, 61, .25);
}
.ap-hero-photos.is-2 { aspect-ratio: 2; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ap-hero-photos.is-3 { aspect-ratio: 1.5; grid-template-columns: 2fr 1fr; grid-template-rows: repeat(2, minmax(0, 1fr)); }
.ap-hero-photos.is-3 img:first-child { grid-row: span 2; }
.ap-hero-icons { position: absolute; inset: 0; z-index: 1; }
.ap-hero-ic {
    position: absolute; display: flex; align-items: center; justify-content: center;
    background: #fff; border-radius: 22px; color: var(--ap-navy);
    box-shadow: 0 14px 30px rgba(15, 26, 61, .22);
}
.ap-hero-ic.is-1 { width: 92px; height: 92px; left: 18%; top: 22%; font-size: 38px; transform: rotate(-8deg); }
.ap-hero-ic.is-2 { width: 78px; height: 78px; left: 34%; bottom: 14%; font-size: 30px; transform: rotate(6deg); color: #334155; }
.ap-hero-ic.is-3 { width: 108px; height: 108px; right: 24%; top: 16%; font-size: 46px; }
.ap-hero-ic.is-4 { width: 84px; height: 84px; right: 7%; bottom: 16%; font-size: 34px; transform: rotate(-6deg); color: var(--ap-blue); }

/* ---------- Collection page (/shop/collection/{slug}) ---------- */
.ap-btn-ghost {
    display: inline-flex; align-items: center; gap: 8px;
    background: #fff; color: var(--ap-blue) !important;
    font-weight: 600; font-size: 14px; border-radius: 8px;
    padding: 10px 19px; border: 1px solid #c9d8fb; white-space: nowrap;
    text-decoration: none !important; transition: background .15s ease, border-color .15s ease;
}
.ap-btn-ghost:hover { background: var(--ap-blue-soft); border-color: var(--ap-blue); }
.ap-btn-ghost i { font-size: 12px; }

.ap-crumbs {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px;
    margin-bottom: 14px; font-size: 13px; color: var(--ap-muted);
}
.ap-crumbs a { color: var(--ap-muted); text-decoration: none; }
.ap-crumbs a:hover { color: var(--ap-blue); }
.ap-crumbs i { font-size: 9px; color: #a3afc2; }
.ap-crumbs span { color: var(--ap-navy); font-weight: 600; }

/* The collection's own photo fills the right side and fades into the copy. */
.ap-hero.ap-coll-hero {
    display: block; min-height: 300px;
    background: linear-gradient(110deg, #eef4ff 0%, #f5f8ff 60%, #e9f0ff 100%);
}
.ap-coll-hero-img {
    position: absolute; top: 0; right: 0; bottom: 0; z-index: 0;
    width: 65%; height: 100%; object-fit: cover;
}
.ap-coll-hero.has-img::before {
    content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
    /* solid up to 35%, where the photo starts, so its edge never shows */
    background: linear-gradient(90deg, #eef4ff 0%, #eef4ff 35%, rgba(238, 244, 255, .9) 44%, rgba(238, 244, 255, .45) 58%, rgba(238, 244, 255, 0) 74%);
}
.ap-coll-hero.no-img::after {
    content: "\f5fd"; font-family: 'Font Awesome 6 Free'; font-weight: 900;
    position: absolute; right: 6%; top: 50%; transform: translateY(-50%);
    font-size: 150px; color: rgba(29, 92, 242, .09); pointer-events: none;
}
.ap-coll-hero-copy {
    position: relative; z-index: 2;
    display: flex; flex-direction: column; align-items: flex-start;
    max-width: 500px; min-height: 300px; justify-content: center;
    padding: 36px 36px 34px;
}
.ap-coll-hero-copy h1 { margin: 14px 0 10px; }
.ap-coll-hero-copy p { margin-bottom: 14px; }
.ap-coll-count {
    display: inline-flex; align-items: center; gap: 7px; margin-bottom: 20px;
    padding: 5px 12px; border-radius: 999px;
    background: rgba(255, 255, 255, .85); border: 1px solid #dfe8fb;
    color: var(--ap-navy); font-size: 12.5px; font-weight: 600;
}
.ap-coll-count i { color: var(--ap-blue); }
.ap-coll-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Tiles: one colour each, round icon, in a white panel. */
.ap-page.is-collection .ap-tiles {
    padding: 12px; border-radius: 18px;
    background: #fff; border: 1px solid var(--ap-border); box-shadow: var(--ap-shadow);
}
.ap-page.is-collection .ap-tile {
    --t-bg: #f4f7fb; --t-line: #e5eaf2; --t-ic: #e8edf5; --t-fg: #3b4a6b;
    gap: 12px; padding: 13px 14px; border-radius: 14px; box-shadow: none;
    background: linear-gradient(135deg, var(--t-bg) 0%, #fff 140%); border-color: var(--t-line);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.ap-page.is-collection .ap-tile:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(15, 26, 61, .07); border-color: var(--t-fg); }
.ap-page.is-collection .ap-tile-ic {
    width: 44px; height: 44px; border-radius: 50%;
    background: var(--t-ic); color: var(--t-fg); font-size: 18px;
}
.ap-page.is-collection .ap-tile-text strong { font-size: 13.5px; }
.ap-page.is-collection .ap-tile-text small { font-size: 12px; margin-top: 2px; }
.ap-page.is-collection .ap-tile.is-purple { --t-bg: #f4f0ff; --t-line: #e9e1ff; --t-ic: #e9e1ff; --t-fg: #7c3aed; }
.ap-page.is-collection .ap-tile.is-blue   { --t-bg: #eef4ff; --t-line: #dde8ff; --t-ic: #dde8ff; --t-fg: #2563eb; }
.ap-page.is-collection .ap-tile.is-green  { --t-bg: #ecfaf1; --t-line: #d3f2df; --t-ic: #d3f2df; --t-fg: #16a34a; }
.ap-page.is-collection .ap-tile.is-pink   { --t-bg: #fff0f6; --t-line: #fddcea; --t-ic: #fddcea; --t-fg: #db2777; }
.ap-page.is-collection .ap-tile.is-orange { --t-bg: #fff3ea; --t-line: #fee0cb; --t-ic: #fee0cb; --t-fg: #ea580c; }
.ap-page.is-collection .ap-tile.is-teal   { --t-bg: #ebfaf8; --t-line: #cdf1ec; --t-ic: #cdf1ec; --t-fg: #0d9488; }
.ap-page.is-collection .ap-tile.is-amber  { --t-bg: #fff8e8; --t-line: #fdeac0; --t-ic: #fdeac0; --t-fg: #d97706; }
.ap-page.is-collection .ap-tile.is-slate  { --t-bg: #f2f5f9; --t-line: #e1e7f0; --t-ic: #e1e7f0; --t-fg: #3b4a6b; }

/* Products in a white card: count in bold, sort + grid / list switch. */
.ap-page.is-collection .ap-products {
    padding: 20px 20px 22px; border-radius: 18px; margin-bottom: 24px;
    background: #fff; border: 1px solid var(--ap-border); box-shadow: var(--ap-shadow);
}
.ap-page.is-collection .ap-products-head { align-items: center; }
.ap-page.is-collection .ap-products-head h2 { font-size: 21px; }
.ap-page.is-collection .ap-products-head p { font-size: 13.5px; }
.ap-page.is-collection .ap-products-head p strong { color: var(--ap-navy); font-weight: 600; }
.ap-dotsep { margin: 0 6px; color: #b8c2d3; }
.ap-head-tools { display: flex; align-items: center; gap: 12px; }
.ap-view { display: inline-flex; gap: 6px; padding-left: 12px; border-left: 1px solid var(--ap-border); }
.ap-view button {
    display: flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: 9px; cursor: pointer;
    background: #fff; border: 1px solid var(--ap-border); color: #6b7a90; font-size: 14px;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.ap-view button:hover { color: var(--ap-blue); border-color: #c9d8fb; }
.ap-view button.is-on { background: var(--ap-blue); border-color: var(--ap-blue); color: #fff; box-shadow: 0 6px 14px rgba(29, 92, 242, .25); }

/* List view: photo on the left, details on the right. */
.ap-grid.is-list { grid-template-columns: minmax(0, 1fr); gap: 12px; }
.ap-grid.is-list .ap-card { flex-direction: row; align-items: stretch; gap: 18px; }
.ap-grid.is-list .ap-card-media { flex: 0 0 180px; }
.ap-grid.is-list .ap-card-body { padding: 4px 6px 4px 0; }
.ap-grid.is-list .ap-card-title { min-height: 0; font-size: 15px; }
.ap-grid.is-list .ap-card-actions { max-width: 340px; }
/* the same for the Shop's product card (collection pages) */
.ap-grid.is-list article.dekole-pcard.dekole-pcard--v4 { flex-direction: row; align-items: stretch; gap: 18px; }
.ap-grid.is-list article.dekole-pcard--v4 .dkpc-media { flex: 0 0 190px; height: 170px; aspect-ratio: auto; }
.ap-grid.is-list article.dekole-pcard--v4 .dkpc-body { padding: 6px 6px 4px 0; }
.ap-grid.is-list article.dekole-pcard--v4 .dekole-pcard-actions { max-width: 360px; }

/* Empty collection: a bag with sparkles. */
.ap-page.is-collection .ap-coll-empty { padding: 34px 16px 40px; border: 1.5px dashed #dbe2ee; border-radius: 14px; }
.ap-empty-art {
    position: relative; display: flex; align-items: center; justify-content: center;
    width: 84px; height: 84px; margin: 0 auto 16px; border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #f6f2ff 0%, #ebe4ff 100%);
}
.ap-empty .ap-empty-art i { margin: 0; font-size: 34px; color: #8b5cf6; }
.ap-spark { position: absolute; color: #a78bfa; line-height: 1; }
.ap-spark.is-1 { top: -6px; right: -14px; font-size: 16px; }
.ap-spark.is-2 { top: 8px; left: -26px; font-size: 9px; color: #c4b5fd; }
.ap-spark.is-3 { bottom: 4px; right: -26px; font-size: 10px; color: #c4b5fd; }
.ap-spark.is-4 { bottom: 18px; left: -40px; font-size: 7px; color: #ddd6fe; }
.ap-page.is-collection .ap-coll-empty h3 { font-size: 18px; font-weight: 800; }

.ap-colls { margin-bottom: 24px; }
.ap-colls .ap-products-head { align-items: center; }
.ap-colls-all { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; text-decoration: none !important; }
.ap-colls-all i { font-size: 11px; }
.ap-colls-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.ap-coll-card {
    display: flex; align-items: center; gap: 12px; min-width: 0;
    padding: 10px 14px 10px 10px; border-radius: var(--ap-radius);
    background: #fff; border: 1px solid var(--ap-border); box-shadow: var(--ap-shadow);
    color: var(--ap-navy); text-decoration: none !important;
    transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.ap-coll-card:hover { border-color: #c9d8fb; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(15, 26, 61, .08); }
.ap-coll-card-media {
    position: relative; flex: 0 0 64px; width: 64px; height: 64px; border-radius: 10px; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    background: var(--ap-blue-soft); color: var(--ap-blue); font-size: 22px;
}
.ap-coll-card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ap-coll-card-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
.ap-coll-card-body strong { overflow: hidden; font-size: 14px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.ap-coll-card-body small { color: var(--ap-muted); font-size: 12px; }
.ap-coll-card-go { color: #a3afc2; font-size: 12px; }
.ap-coll-card:hover .ap-coll-card-go { color: var(--ap-blue); }

/* ---------- Category tiles ---------- */
.ap-tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.ap-tile {
    display: flex; align-items: center; gap: 9px; min-width: 0;
    background: #fff; border: 1px solid var(--ap-border); border-radius: 12px;
    padding: 10px; box-shadow: var(--ap-shadow);
    transition: border-color .15s ease, transform .15s ease;
}
.ap-tile:hover { border-color: #bcd0fb; transform: translateY(-2px); }
.ap-tile-ic {
    flex-shrink: 0; width: 34px; height: 34px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    background: var(--ap-blue-soft); color: var(--ap-blue); font-size: 15px;
}
.ap-tile-text { display: flex; flex-direction: column; min-width: 0; }
.ap-tile-text strong { font-size: 12.5px; font-weight: 700; color: var(--ap-navy); line-height: 1.25; }
.ap-tile-text small { font-size: 11px; color: var(--ap-muted); line-height: 1.3; margin-top: 1px; }

/* ---------- Products ---------- */
.ap-products { scroll-margin-top: 90px; }
.ap-products-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.ap-products-head h2 { font-size: 22px; font-weight: 800; color: var(--ap-navy); letter-spacing: -.01em; }
.ap-products-head p { color: var(--ap-muted); font-size: 13px; margin-top: 2px !important; }
.ap-sort { display: flex !important; align-items: center; gap: 8px; font-size: 13px; color: var(--ap-muted); white-space: nowrap; }
.ap-sort select {
    height: 38px; border: 1px solid var(--ap-border); border-radius: 8px; background: #fff;
    padding: 0 34px 0 12px; font-size: 13px; font-weight: 600; color: var(--ap-navy); cursor: pointer;
    -webkit-appearance: none; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%236b7280' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center;
}
.ap-sort select:focus { outline: 0; border-color: var(--ap-blue); box-shadow: 0 0 0 3px rgba(29, 92, 242, .12); }

.ap-grid {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px;
    transition: opacity .15s ease;
}
.ap-grid.is-loading { opacity: .45; pointer-events: none; }

.ap-card {
    display: flex; flex-direction: column; min-width: 0;
    background: #fff; border: 1px solid var(--ap-border); border-radius: var(--ap-radius);
    box-shadow: var(--ap-shadow); padding: 10px;
    transition: box-shadow .2s ease, transform .2s ease;
}
.ap-card:hover { box-shadow: 0 12px 28px rgba(15, 26, 61, .10); transform: translateY(-2px); }
.ap-card-media { position: relative; border-radius: 10px; background: #f3f5f9; overflow: hidden; }
.ap-card-img { display: block; aspect-ratio: 1 / 1; }
.ap-card-img img { width: 100%; height: 100%; object-fit: contain; padding: 12px; mix-blend-mode: multiply; }
.ap-card-badge {
    position: absolute; top: 10px; left: 10px;
    font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
    color: #fff; border-radius: 6px; padding: 3px 8px;
}
.ap-card-badge.is-best { background: #1b2559; }
.ap-card-badge.is-hot { background: var(--ap-red); }
.ap-card-badge.is-new { background: var(--ap-blue); }
.ap-card-fav {
    position: absolute; top: 8px; right: 8px;
    width: 30px; height: 30px; border-radius: 50%; border: 0; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    background: #fff; color: #374151; font-size: 13px; box-shadow: 0 2px 8px rgba(15, 26, 61, .12);
}
.ap-card-fav:hover { color: var(--ap-red); }

.ap-card-body { display: flex; flex-direction: column; flex: 1; padding: 12px 4px 2px; }
.ap-card-title {
    color: var(--ap-navy) !important; font-size: 14px; font-weight: 700; line-height: 1.3;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    min-height: 2.6em;
}
.ap-card-title:hover { color: var(--ap-blue) !important; }
.ap-card-sub {
    color: var(--ap-muted); font-size: 12px; margin-top: 3px !important;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ap-card-rating { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.ap-stars { display: inline-flex; gap: 1px; color: var(--ap-star); font-size: 11px; }
.ap-stars .is-empty { color: #d6dbe5; }
.ap-card-rating-num { font-size: 12px; color: #4b5563; font-weight: 600; }
.ap-card-rating-num small { color: var(--ap-muted); font-weight: 500; font-size: 12px; }

.ap-card-price { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; margin-top: 8px; }
.ap-card-price strong { font-size: 17px; font-weight: 800; color: var(--ap-navy); letter-spacing: -.01em; }
.ap-card-price del { font-size: 12px; color: #9aa3b5; }
.ap-card-off {
    font-size: 10px; font-weight: 800; color: var(--ap-red); white-space: nowrap;
    background: var(--ap-red-soft); border-radius: 6px; padding: 2px 5px;
}

.ap-card-swatches { display: flex; align-items: center; gap: 6px; min-height: 14px; margin-top: 10px; }
.ap-dot { width: 13px; height: 13px; border-radius: 50%; border: 1px solid rgba(15, 26, 61, .18); box-shadow: inset 0 0 0 1.5px #fff; }
.ap-dot:first-child { box-shadow: inset 0 0 0 1.5px #fff, 0 0 0 1.5px var(--ap-navy); }
.ap-dot-more { font-size: 11px; color: var(--ap-muted); font-weight: 600; }

.ap-card-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 12px; }
.ap-btn-cart {
    flex: 1; min-width: 0; height: 38px;
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    background: var(--ap-blue); color: #fff; border: 0; border-radius: 8px; cursor: pointer;
    font-size: 13px; font-weight: 600; white-space: nowrap;
    transition: background .15s ease;
}
.ap-btn-cart:hover { background: var(--ap-blue-dark); }
.ap-btn-cart span { overflow: hidden; text-overflow: ellipsis; }
.ap-btn-fav {
    width: 38px; height: 38px; flex-shrink: 0; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    background: #fff; color: var(--ap-blue); border: 1px solid #c9d8fb; border-radius: 8px; font-size: 14px;
}
.ap-btn-fav:hover { background: var(--ap-blue-soft); }

.ap-empty {
    grid-column: 1 / -1; text-align: center; padding: 56px 16px;
    background: #fff; border: 1px dashed #cbd5e1; border-radius: var(--ap-radius);
}
.ap-empty i { font-size: 44px; color: #94a3b8; margin-bottom: 12px; }
.ap-empty h3 { font-size: 17px; font-weight: 700; color: var(--ap-navy); margin-bottom: 6px; }
.ap-empty p { color: var(--ap-muted); font-size: 13.5px; }

/* ---------- Rewards banner ---------- */
.ap-rewards {
    display: flex; align-items: center; gap: 18px;
    border-radius: 16px; padding: 20px 28px;
    background: linear-gradient(100deg, #eef4ff 0%, #f7f9ff 55%, #e6eeff 100%);
    border: 1px solid #dfe8fb;
}
.ap-rewards-ic {
    flex-shrink: 0; width: 54px; height: 54px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    background: #fff; color: var(--ap-blue); font-size: 26px;
    box-shadow: 0 6px 16px rgba(29, 92, 242, .15);
}
.ap-rewards-text { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ap-rewards-text strong { font-size: 17px; font-weight: 800; color: var(--ap-navy); }
.ap-rewards-text span { font-size: 13.5px; color: var(--ap-muted); }

/* ---------- Mobile toggle / drawer ---------- */
.ap-mobile-toggle { display: none; }
/* Above the site's sticky header and mobile bottom bar. */
.ap-backdrop { position: fixed; inset: 0; background: rgba(15, 26, 61, .45); z-index: 100000; }
body.ap-no-scroll { overflow: hidden; }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
    .ap-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ap-colls-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1199px) {
    .ap-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ap-hero h1 { font-size: 30px; }
}
@media (max-width: 991px) {
    .ap-layout { grid-template-columns: minmax(0, 1fr); }
    .ap-mobile-toggle {
        display: inline-flex; align-items: center; gap: 8px; margin-bottom: 16px;
        background: #fff; border: 1px solid var(--ap-border); border-radius: 10px;
        padding: 10px 16px; font-size: 14px; font-weight: 600; color: var(--ap-navy); cursor: pointer;
        box-shadow: var(--ap-shadow);
    }
    .ap-mobile-toggle i { color: var(--ap-blue); }
    .ap-sidebar {
        position: fixed; top: 0; left: 0; bottom: 0; z-index: 100001;
        width: min(340px, 88vw); overflow-y: auto;
        background: var(--ap-bg); padding: 16px;
        transform: translateX(-105%); transition: transform .25s ease;
    }
    .ap-sidebar.is-open { transform: translateX(0); box-shadow: 0 0 40px rgba(15, 26, 61, .3); }
    .ap-sidebar-mobile-head {
        display: flex; align-items: center; justify-content: space-between;
        font-size: 16px; color: var(--ap-navy);
    }
    .ap-sidebar-mobile-head strong { font-weight: 800; }
    .ap-sidebar-close {
        width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--ap-border);
        background: #fff; color: var(--ap-navy); cursor: pointer; font-size: 16px;
    }
    .ap-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
    .ap-page { padding-top: 16px; }
    .ap-hero { grid-template-columns: minmax(0, 1fr); min-height: 0; }
    .ap-hero-copy { padding: 26px 22px; }
    .ap-hero h1 { font-size: 26px; }
    .ap-hero-visual { display: none; }
    /* Collection: the photo becomes a strip on top instead of disappearing. */
    .ap-hero.ap-coll-hero { min-height: 0; }
    .ap-coll-hero-img { position: relative; display: block; width: 100%; height: 170px; }
    .ap-coll-hero.has-img::before { display: none; }
    .ap-coll-hero.no-img::after { font-size: 90px; top: 24px; transform: none; }
    .ap-coll-hero-copy { min-height: 0; max-width: none; padding: 20px 20px 22px; }
    .ap-colls-grid { grid-template-columns: minmax(0, 1fr); }
    .ap-colls .ap-products-head { flex-direction: row; align-items: center; text-align: left; }
    .ap-page.is-collection .ap-products { padding: 16px 14px 18px; }
    .ap-page.is-collection .ap-products-head { align-items: stretch; }
    .ap-head-tools { width: 100%; }
    .ap-head-tools .ap-sort { flex: 1; }
    .ap-grid.is-list .ap-card { gap: 12px; }
    .ap-grid.is-list .ap-card-media { flex-basis: 120px; }
    .ap-grid.is-list article.dekole-pcard--v4 .dkpc-media { flex-basis: 120px; height: 130px; }
    .ap-grid.is-list article.dekole-pcard.dekole-pcard--v4 { gap: 12px; }
    .ap-page.is-collection .ap-tiles { padding: 10px; }
    .ap-tiles { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; }
    .ap-tile { flex: 0 0 auto; scroll-snap-align: start; }
    .ap-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .ap-products-head { flex-direction: column; align-items: stretch; }
    .ap-sort select { flex: 1; }
    .ap-rewards { flex-wrap: wrap; padding: 18px; }
    .ap-rewards .ap-btn-primary { width: 100%; justify-content: center; }
}
@media (max-width: 420px) {
    .ap-card { padding: 8px; }
    .ap-card-price strong { font-size: 16px; }
    .ap-btn-cart { font-size: 12px; gap: 5px; }
    .ap-btn-cart i { display: none; }
    .ap-btn-fav { width: 34px; }
}
