/* ===========================================================================
 * Redesign Phase 4 — Shop page (toolbar, filter panel, grid, product card).
 * Loaded after shop-filters.css (see inc/shop.php).
 * ======================================================================== */

/* Top bar: "Filtro (n)" + product count on the left, sorting on the right. */
.oxa-shop { display: block; }
.oxa-shop__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 28px 0 0; padding-bottom: 16px; border-bottom: 1px solid var(--oxa-border); }
.oxa-shop__bar-left { display: flex; align-items: center; gap: 20px; }
.oxa-shop .oxa-shop__filter-toggle { display: inline-flex; align-items: center; gap: 10px; padding: 11px 20px; border: 1px solid #1d1d1d; border-radius: 0; background: transparent; color: #000; font-size: 13px; font-weight: 400; line-height: 1; letter-spacing: 2.4px; text-transform: uppercase; cursor: pointer; transition: background-color var(--oxa-dur) ease, color var(--oxa-dur) ease; }
.oxa-shop .oxa-shop__filter-toggle:hover { background: #1d1d1d; color: #fff; }
.oxa-shop__filter-count { letter-spacing: 0; }
.oxa-shop__total { font-size: 14px; color: #858585; }
.oxa-shop__sort .woocommerce-ordering select { height: 42px; padding: 8px 40px 8px 14px; border: 1px solid var(--oxa-border); color: #000; font-size: 14px; }
.oxa-shop__chips { margin: 16px 0 0; }
.oxa-shop__chips:empty { display: none; }
.oxa-shop .oxa-shop__chip-title { color: #a1a1a1; font-size: 12px; font-weight: 400; letter-spacing: 1.4px; text-transform: uppercase; line-height: 28px; }
.oxa-shop .oxa-shop__chip { padding: 4px 10px; background: var(--oxa-surface); font-size: 13px; color: #000; }
@media (max-width: 767px) {
  .oxa-shop__bar { margin-top: 16px; }
  .oxa-shop__total { display: none; }
  .oxa-shop__sort .woocommerce-ordering select { max-width: 150px; font-size: 13px; padding-left: 10px; }
}

/* Filter panel: slides in from the left on every screen size, the page dims behind it. */
body .oxa-shop #secondary { width: 0; margin: 0; flex: none; }
body .oxa-shop #secondary #preact-sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 100001;
  width: 350px; max-width: 100vw; height: 100%;
  overflow: hidden; background: #fff; color: #000;
  transform: translateX(-102%); visibility: hidden;
  transition: transform 300ms ease, visibility 0s linear 300ms;
}
body .oxa-shop #secondary #preact-sidebar.w-screen { width: 350px; transform: none; visibility: visible; transition: transform 300ms ease; }
body .oxa-shop #secondary #preact-sidebar > div { height: 100%; padding: 76px 28px 96px; background: #fff; overflow-y: auto; }
body .oxa-shop #secondary #preact-sidebar > div > div,
body .oxa-shop #secondary #preact-sidebar > div > div > div { position: static; top: auto; height: auto; overflow: visible; }
#secondary .text-white { color: #000; }
#secondary .price_label span, #secondary .price_label div { color: #000; }
#secondary #preact-sidebar span.uppercase { font-size: 13px; font-weight: 400; letter-spacing: 3px; }
#secondary #preact-sidebar .sidebar-parent span { font-size: 14px; letter-spacing: 0; text-transform: none; }
#secondary #preact-sidebar .sidebar-parent > div { padding: 6px 0; }
#secondary #preact-sidebar .sidebar-parent > div:hover span { color: var(--oxa-accent); }
#secondary #preact-sidebar .flex.flex-col { border-bottom: 1px solid var(--oxa-border); padding-bottom: 8px; margin-bottom: 8px; }
.oxa-shop__backdrop { position: fixed; inset: 0; z-index: 100000; background: rgba(0, 0, 0, .45); opacity: 0; visibility: hidden; transition: opacity 300ms ease, visibility 0s linear 300ms; }
body.oxa-filters-open .oxa-shop__backdrop { opacity: 1; visibility: visible; transition: opacity 300ms ease; }
.oxa-shop .oxa-shop__close { position: fixed; top: 16px; left: calc(min(350px, 100vw) - 52px); z-index: 100002; display: none; padding: 8px; border: 0; background: none; color: #000; cursor: pointer; }
.oxa-shop .oxa-shop__apply { position: fixed; bottom: 0; left: 0; z-index: 100002; display: none; width: min(350px, 100vw); padding: 20px; border: 0; border-radius: 0; background: #1d1d1d; color: #fff; font-size: 13px; line-height: 1; letter-spacing: 2.4px; text-transform: uppercase; cursor: pointer; transition: background-color var(--oxa-dur) ease; }
.oxa-shop .oxa-shop__apply:hover { background: var(--oxa-accent); }
body.oxa-filters-open .oxa-shop__close { display: block; }
body.oxa-filters-open .oxa-shop__apply { display: block; }

/* Grid: 2 columns on phones, 3 from 768px, 4 from 1600px, 16px gutters. */
.oxa-shop ul.products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 28px; margin-top: 28px; }
.oxa-shop ul.products li.product { width: auto; margin: 0; display: flex; flex-direction: column; font-size: 14px; }
@media (min-width: 768px) { .oxa-shop ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1600px) { .oxa-shop ul.products { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* Card (also used by related products and the 404 grid). */
.oxa-product-card__box { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: var(--oxa-surface); }
ul.products li.product .oxa-product-card__imglink { position: absolute; inset: 0; display: block; transition: transform 300ms ease; }
ul.products li.product.oxa-product-card:hover .oxa-product-card__imglink { transform: scale(1.03); }
.oxa-product-card__imglink .oxa-product-card__image,
.oxa-product-card__imglink .oxa-product-card__frame { display: block; width: 100%; height: 100%; }
.oxa-product-card__imglink .oxa-product-card__image { aspect-ratio: auto; object-fit: cover; mix-blend-mode: multiply; }
ul.products li.product a.oxa-product-card__info { display: flex; flex: 1; flex-direction: column; padding-top: 14px; }
.oxa-product-card__brand { display: block; min-height: 16px; font-size: 12px; line-height: 16px; letter-spacing: 1.4px; text-transform: uppercase; color: #a1a1a1; }
.oxa-product-card__name { display: -webkit-box; margin: 4px 0 0; min-height: 2.8em; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 14px; font-weight: 400; line-height: 1.4; color: #272727; }
ul.products li.product a.oxa-product-card__info:hover .oxa-product-card__name { color: #272727; }
.oxa-product-card__price { display: block; margin: auto 0 0; padding-top: 8px; font-size: 14px; }
.oxa-product-card__price .price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin: 0; color: #858585; font-size: 14px; font-weight: 400; line-height: 1.4; }
.oxa-product-card__price .price ins { order: 1; }
.oxa-product-card__price .price del { order: 2; text-decoration: line-through; }
.oxa-product-card__price .price ins .woocommerce-Price-amount, .oxa-product-card__price .price ins .woocommerce-Price-amount bdi { color: #000; font-weight: 400; }
.oxa-product-card__price .price del .woocommerce-Price-amount, .oxa-product-card__price .price del .woocommerce-Price-amount bdi { color: #a1a1a1; }
.oxa-product-card__tag { position: absolute; top: 12px; left: 12px; z-index: 1; padding: 4px 8px; background: var(--oxa-accent); color: #fff; font-size: 12px; line-height: 1; letter-spacing: .5px; }
.oxa-product-card__stock { margin-top: 6px; font-size: 12px; color: #a1a1a1; }
.oxa-product-card__add { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 14px 12px; background: #1d1d1d; color: #fff; text-align: center; font-size: 12px; line-height: 1; letter-spacing: 2px; text-transform: uppercase; transform: translateY(101%); transition: transform 250ms ease, background-color 250ms ease; }
ul.products li.product .oxa-product-card__add { color: #fff; }
.oxa-product-card:hover .oxa-product-card__add, .oxa-product-card__add:focus-visible { transform: none; }
.oxa-product-card__add:hover { background: var(--oxa-accent); }
.oxa-product-card__add.loading { opacity: .6; }
.oxa-product-card__box .added_to_cart { display: none; }
@media (hover: none) { .oxa-product-card__add { display: none; } }
@media (prefers-reduced-motion: reduce) {
  body .oxa-shop #secondary #preact-sidebar, .oxa-shop__backdrop, .oxa-product-card__add, ul.products li.product .oxa-product-card__imglink { transition: none; }
}

/* The panel's own Filtro / clear buttons (rendered by filters.js). */
#secondary #preact-sidebar button { margin-top: 12px; padding: 14px 16px; border: 1px solid #1d1d1d; border-radius: 0; background: #1d1d1d; color: #fff; font-size: 12px; font-weight: 400; line-height: 1; letter-spacing: 2.4px; text-transform: uppercase; transition: background-color 250ms ease, border-color 250ms ease; }
#secondary #preact-sidebar button:hover:not(:disabled) { background: var(--oxa-accent); border-color: var(--oxa-accent); }
#secondary #preact-sidebar button:disabled { opacity: .35; color: #fff; }

/* A picture that failed to load: plain box with a small label (assets/js/card-crop.js adds .is-missing). */
.oxa-product-card__box.is-missing .oxa-product-card__imglink { visibility: hidden; }
.oxa-product-card__box.is-missing::after { content: "Pa foto"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 12px; letter-spacing: 1.4px; text-transform: uppercase; color: #a1a1a1; }

/* Pictures with a light grey studio background fill the whole box (box colour = picture background). */
ul.products li.product .oxa-product-card__box.is-bleed .oxa-product-card__imglink { inset: 0; }
ul.products li.product .oxa-product-card__box.is-bleed .oxa-product-card__image { object-fit: cover; mix-blend-mode: normal; }

/* Category / brand heading, Load more, clear all. */
.oxa-shop__head { margin: 36px 0 0; }
.oxa-shop__head h1 { margin: 0; font-size: 36px; font-weight: 300; line-height: 1.15; color: #000; }
@media (min-width: 768px) { .oxa-shop__head h1 { font-size: 50px; line-height: 50px; } }
.oxa-shop__desc { max-width: 720px; margin-top: 14px; font-size: 14px; line-height: 1.7; color: #272727; }
.oxa-shop__desc p { margin: 0 0 .8em; }
.oxa-shop__head + .oxa-shop__bar { margin-top: 28px; }
.oxa-shop__more { display: flex; justify-content: center; margin: 24px 0 70px; }
.oxa-shop .oxa-shop__more-btn { padding: 16px 40px; border: 1px solid #1d1d1d; border-radius: 0; background: transparent; color: #000; font-size: 13px; letter-spacing: 2.4px; text-transform: uppercase; cursor: pointer; transition: background-color var(--oxa-dur) ease, color var(--oxa-dur) ease; }
.oxa-shop .oxa-shop__more-btn:hover:not(:disabled) { background: #1d1d1d; color: #fff; }
.oxa-shop .oxa-shop__more-btn:disabled { opacity: .4; cursor: default; }
.oxa-shop .oxa-shop__clear { padding: 4px 0; border: 0; background: none; color: #000; font-size: 13px; text-decoration: underline; cursor: pointer; }
.oxa-shop .oxa-shop__chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }

/* Colour swatches: 20px round, on cards (only products sold in several colours) and in the Ngjyra filter. */
.oxa-product-card__swatches { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 10px; }
.oxa-product-card__swatches i, #secondary .oxa-sw { display: inline-block; flex: none; width: 20px; height: 20px; border: 1px solid #d9d9d9; border-radius: 50%; }
#secondary #preact-sidebar .sidebar-parent > div:has(.oxa-sw) { display: flex; align-items: center; gap: 10px; }
