/* ==========================================================================
   EUPHORIA JEWELLERY — SHOP / CATEGORY + COLLECTIONS PAGES
   Loads after home.css. In Elementor: Theme Builder › Product Archive template.
   ========================================================================== */

/* ---------- Page head ---------- */
.ej-plp__head { display: grid; gap: 18px; padding-block: 4px 22px; }
.ej-plp__intro { max-width: 760px; margin-inline: auto; text-align: center; }
.ej-plp__title { font-family: var(--ej-font); font-size: clamp(20px, 2.2vw, 26px); font-weight: 500; line-height: 1.3; color: var(--ej-ink); }
.ej-plp__count { margin-left: 4px; font-size: .62em; font-weight: 300; color: var(--ej-muted); }
.ej-plp__desc { margin-top: 6px; font-size: 12.5px; color: var(--ej-text); }

.ej-plp__cats { display: flex; gap: clamp(12px, 2.4vw, 28px); overflow-x: auto; padding: 4px 2px 6px; scrollbar-width: none; }
.ej-plp__cats::-webkit-scrollbar { display: none; }
.ej-plp__cats > :first-child { margin-left: auto; }
.ej-plp__cats > :last-child { margin-right: auto; }
.ej-catchip { width: 86px; flex: none; display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 11.5px; line-height: 1.3; color: var(--ej-text); text-align: center; }
.ej-catchip__img { width: 66px; height: 66px; display: grid; place-items: center; overflow: hidden; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px var(--ej-line); transition: box-shadow .2s, transform .3s var(--ej-ease); }
.ej-catchip__img img { width: 100%; height: 100% !important; object-fit: cover; transform: scale(1.3); }
.ej-catchip__img i { font-size: 24px; color: var(--ej-ink); }
.ej-catchip:hover .ej-catchip__img { transform: translateY(-3px); }
.ej-catchip[aria-pressed="true"] { color: var(--ej-ink); font-weight: 500; }
.ej-catchip[aria-pressed="true"] .ej-catchip__img { box-shadow: 0 0 0 2px var(--ej-gold); }

/* ---------- Layout ---------- */
.ej-plp__body { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 32px; align-items: start; padding-bottom: clamp(44px, 6vw, 76px); }
.ej-plp.is-collapsed .ej-plp__body { grid-template-columns: minmax(0, 1fr); }
.ej-plp.is-collapsed .ej-filters { display: none; }
.ej-plp__main { min-width: 0; scroll-margin-top: 170px; }

/* ---------- Filter sidebar ---------- */
.ej-filters { position: sticky; top: 172px; max-height: calc(100vh - 190px); overflow-y: auto; padding-right: 6px; scrollbar-width: thin; }
.ej-filters__head, .ej-filters__foot { display: none; }
.ej-fgroup { border-bottom: 1px solid var(--ej-line); }
.ej-fgroup:first-child { border-top: 1px solid var(--ej-line); }
.ej-fgroup > summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 14px 2px; cursor: pointer; font-size: 11.5px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--ej-ink); }
.ej-fgroup > summary::-webkit-details-marker { display: none; }
.ej-fgroup > summary i { margin-left: auto; transition: transform .25s; }
.ej-fgroup[open] > summary i { transform: rotate(180deg); }
.ej-fgroup__sel { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--ej-ink); color: #fff; font-size: 10px; letter-spacing: 0; line-height: 18px; text-align: center; }
.ej-fgroup__list { display: grid; gap: 2px; padding: 0 2px 14px; }
.ej-fgroup__list--pills { grid-template-columns: repeat(3, 1fr); gap: 6px; }

.ej-check { display: flex; align-items: center; gap: 10px; padding: 5px 0; cursor: pointer; font-size: 12.5px; color: var(--ej-text); }
.ej-check input { position: absolute; opacity: 0; pointer-events: none; }
.ej-check__box { width: 16px; height: 16px; flex: none; display: grid; place-items: center; border: 1px solid #bdbdbd; background: #fff; transition: background .15s, border-color .15s; }
.ej-check__box::after { content: ""; width: 8px; height: 4px; border-left: 1.5px solid #fff; border-bottom: 1.5px solid #fff; opacity: 0; transform: rotate(-45deg) translate(1px, -1px); }
.ej-check input:checked + .ej-check__box { background: var(--ej-ink); border-color: var(--ej-ink); }
.ej-check input:checked + .ej-check__box::after { opacity: 1; }
.ej-check input:focus-visible + .ej-check__box { outline: 2px solid var(--ej-gold); outline-offset: 2px; }
.ej-check__label { flex: 1; display: flex; align-items: center; gap: 8px; }
.ej-check:hover .ej-check__label { color: var(--ej-ink); }
.ej-check__count { font-size: 11px; color: var(--ej-muted); }
.is-disabled .ej-check { opacity: .38; cursor: default; }
.ej-dotswatch { width: 14px; height: 14px; flex: none; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.ej-dotswatch--yellow { background: radial-gradient(circle at 35% 30%, #fff4c7, #e7bd52 55%, #b98a22); }
.ej-dotswatch--white, .ej-dotswatch--silver { background: radial-gradient(circle at 35% 30%, #fff, #dde1e5 55%, #a9b0b7); }
.ej-dotswatch--rose { background: radial-gradient(circle at 35% 30%, #ffe7de, #e3a28b 55%, #b06a52); }
.ej-shapeicon { width: 18px; height: 18px; flex: none; }
.ej-shapeicon svg { width: 100%; height: 100%; }
.ej-pill-check { position: relative; }
.ej-pill-check input { position: absolute; opacity: 0; pointer-events: none; }
.ej-pill-check label { display: block; padding: 8px 4px; border: 1px solid var(--ej-line); background: #fff; cursor: pointer; font-size: 12px; color: var(--ej-text); text-align: center; transition: background .2s, border-color .2s, color .2s; }
.ej-pill-check label:hover { border-color: var(--ej-ink); }
.ej-pill-check input:checked + label { background: var(--ej-ink); border-color: var(--ej-ink); color: #fff; }
.ej-pill-check input:focus-visible + label { outline: 2px solid var(--ej-gold); outline-offset: 2px; }
.ej-pill-check input:disabled + label { opacity: .35; cursor: default; border-color: var(--ej-line); }

/* ---------- Toolbar + active chips ---------- */
.ej-plp__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding-bottom: 14px; border-bottom: 1px solid var(--ej-line); }
.ej-plp__toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ej-ink); }
.ej-plp__toggle i { font-size: 17px; }
.ej-plp__showing { font-size: 12px; color: var(--ej-muted); }
.ej-plp__bar-right { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.ej-sort { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ej-muted); }
.ej-sort select { appearance: none; -webkit-appearance: none; padding: 8px 32px 8px 12px; border: 1px solid var(--ej-line); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%231d1d1f' stroke-width='1.4'/%3E%3C/svg%3E") no-repeat right 11px center / 10px 6px; font: inherit; font-size: 12px; color: var(--ej-ink); cursor: pointer; }
.ej-density { display: flex; border: 1px solid var(--ej-line); }
.ej-density button { width: 34px; height: 32px; display: grid; place-items: center; font-size: 16px; color: var(--ej-muted); transition: background .2s, color .2s; }
.ej-density button[aria-pressed="true"] { background: var(--ej-soft); color: var(--ej-ink); }
.ej-plp__chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 14px; }
.ej-fchip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px 6px 12px; border: 1px solid #d6d6d6; border-radius: 16px; background: #fff; font-size: 11.5px; color: var(--ej-ink); transition: border-color .2s; }
.ej-fchip:hover { border-color: var(--ej-ink); }
.ej-fchip small { font-size: 11px; color: var(--ej-muted); }
.ej-fchip i { font-size: 12px; }
.ej-plp__clear { margin-left: 4px; font-size: 11.5px; color: var(--ej-ink); text-decoration: underline; text-underline-offset: 3px; }
.ej-plp__clear:hover { color: var(--ej-gold); }

/* ---------- Product grid ---------- */
.ej-plp__grid { --cols: 3; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 30px 20px; padding-top: 22px; transition: opacity .2s; }
.ej-plp__grid[data-cols="4"] { --cols: 4; }
.ej-plp.is-collapsed .ej-plp__grid { --cols: 4; }
.ej-plp.is-collapsed .ej-plp__grid[data-cols="4"] { --cols: 5; }
.ej-plp__grid.is-swapping { opacity: .25; }
.ej-plp__empty { margin-top: 22px; padding: 56px 20px; border: 1px dashed #d6d6d6; text-align: center; }
.ej-plp__empty i { font-size: 34px; color: var(--ej-gold); }
.ej-plp__empty h2 { margin-top: 10px; font-size: 16px; font-weight: 500; color: var(--ej-ink); }
.ej-plp__empty p { margin: 6px 0 18px; font-size: 12.5px; }

.ej-plp__more { display: grid; justify-items: center; gap: 12px; margin-top: 40px; text-align: center; }
.ej-plp__more p { font-size: 12px; color: var(--ej-muted); }
.ej-plp__progress { position: relative; width: 220px; height: 2px; overflow: hidden; background: var(--ej-line); }
.ej-plp__progress span { position: absolute; inset: 0 auto 0 0; background: var(--ej-ink); transition: width .4s var(--ej-ease); }

/* ---------- Mobile sort / filter bar + sort sheet ---------- */
.ej-plp__mbar { display: none; }
.ej-plp__badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--ej-gold); color: #fff; font-size: 10px; letter-spacing: 0; line-height: 18px; }
.ej-sheet { width: 100%; max-width: 100%; margin: auto 0 0; padding: 0; border: 0; background: #fff; box-shadow: 0 -10px 40px rgba(0, 0, 0, .2); }
.ej-sheet::backdrop { background: rgba(20, 19, 17, .5); }
.ej-sheet[open] { animation: ej-sheet-up .3s var(--ej-ease); }
@keyframes ej-sheet-up { from { transform: translateY(100%); } }
.ej-sheet__head { display: flex; justify-content: space-between; align-items: center; padding: 10px 10px 10px 18px; border-bottom: 1px solid var(--ej-line); font-size: 14px; font-weight: 500; color: var(--ej-ink); }
.ej-sheet__head button { width: 40px; height: 40px; display: grid; place-items: center; font-size: 20px; }
.ej-sheet__list label { display: flex; justify-content: space-between; align-items: center; padding: 15px 18px; border-bottom: 1px solid var(--ej-line); cursor: pointer; font-size: 13px; color: var(--ej-text); }
.ej-sheet__list input { width: 18px; height: 18px; accent-color: var(--ej-ink); }

/* ---------- Collections page ---------- */
.ej-coll__head { max-width: 720px; margin-inline: auto; padding-block: 6px 4px; text-align: center; }
.ej-coll__head .ej-plp__title { margin-top: 6px; }
.ej-coll__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.ej-budget { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.ej-budget__card { position: relative; display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 24px 22px 26px; border: 1px solid var(--ej-line); background: #fff; transition: border-color .25s, transform .3s var(--ej-ease), box-shadow .3s; }
.ej-budget__card:hover { border-color: var(--ej-gold); box-shadow: 0 12px 26px rgba(0, 0, 0, .06); transform: translateY(-3px); }
.ej-budget__label { font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--ej-muted); }
.ej-budget__card strong { font-family: var(--ej-font); font-size: clamp(18px, 1.6vw, 22px); font-weight: 500; line-height: 1.3; color: var(--ej-ink); }
.ej-budget__hint { padding-right: 26px; font-size: 12px; color: var(--ej-text); }
.ej-budget__card i { position: absolute; right: 20px; bottom: 24px; font-size: 18px; color: var(--ej-gold); transition: transform .25s; }
.ej-budget__card:hover i { transform: translateX(4px); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  body.ej-plp-page { padding-bottom: 50px; }
  body.ej-plp-page .ej-wa { bottom: 66px; }
  .ej-plp__body { grid-template-columns: minmax(0, 1fr); }
  .ej-plp__toggle, .ej-density { display: none; }
  .ej-plp__grid, .ej-plp__grid[data-cols="4"] { --cols: 3; }
  .ej-filters, .ej-plp.is-collapsed .ej-filters {
    position: fixed; inset: 0 auto 0 0; top: 0; z-index: 95; width: min(360px, 88vw); max-height: none; padding: 0;
    display: flex; flex-direction: column; background: #fff;
    transform: translateX(-100%); visibility: hidden; transition: transform .35s var(--ej-ease), visibility .35s;
  }
  .ej-filters.is-open { transform: none; visibility: visible; }
  .ej-filters__head { display: flex; justify-content: space-between; align-items: center; padding: 10px 10px 10px 18px; border-bottom: 1px solid var(--ej-line); font-size: 14px; font-weight: 500; color: var(--ej-ink); }
  .ej-filters__head button { width: 40px; height: 40px; display: grid; place-items: center; font-size: 20px; }
  .ej-filters__scroll { flex: 1; overflow-y: auto; padding: 0 18px; }
  .ej-filters__scroll .ej-fgroup:first-child { border-top: 0; }
  .ej-filters__foot { display: grid; grid-template-columns: 1fr 1.5fr; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--ej-line); }
  .ej-filters__foot .ej-btn { padding-inline: 10px; }
  .ej-plp__mbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 64; display: grid; grid-template-columns: 1fr 1fr; background: #fff; box-shadow: 0 -4px 18px rgba(0, 0, 0, .08); }
  .ej-plp__mbar button { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ej-ink); }
  .ej-plp__mbar button + button { border-left: 1px solid var(--ej-line); }
  .ej-plp__mbar i { font-size: 17px; }
  .ej-coll__grid, .ej-budget { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
  .ej-plp__grid, .ej-plp__grid[data-cols="4"] { --cols: 2; gap: 24px 12px; padding-top: 16px; }
  .ej-plp__bar .ej-sort { display: none; }
  .ej-catchip { width: 72px; }
  .ej-catchip__img { width: 56px; height: 56px; }
  .ej-coll__grid, .ej-budget { gap: 10px; }
  .ej-budget__card { padding: 18px 16px 20px; }
}
