/*
 * marc.css — el vestit del MARC que no és cap opció de The7
 *
 * Germà de `botiga.css` i `pagines.css`, amb la mateixa regla: aquí només
 * hi ha el que no es pot dir amb Theme Options. Tres coses, totes del marc:
 *
 *   1. el botó «GALERIA ONLINE» — el microwidget del cistell de The7 vestit
 *      com el `.nav__botiga` del mockup (magenta, majúscules, comptador);
 *   2. el desplegable del minicistell — més gran i amb la fitxa de cada
 *      obra llegible (petició del client, 08-2026);
 *   3. el popup «Destacat d'última hora» i el xip de reobrir-lo — el
 *      marcatge el pinta `q15-marc.php` i el comportament és `marc.js`.
 *
 * El desplega `bash motor/3-sembra/vesteix-marc.sh` al tema fill.
 *
 * ⚠ Especificitat: el CSS dinàmic de The7 escriu el color del microwidget
 * amb cadenes de preset (`.light-preset-color.masthead:not(...):not(...)`)
 * que pesen més que qualsevol classe sola; els `!important` d'aquí sota
 * són mesurats contra aquelles regles, no preventius.
 */

.masthead .mini-widgets,
.q15-popup,
.q15-destacat-chip {
  --q15-blanc: #FFFFFF;
  --q15-negre: #141414;
  --q15-gris-text: #565656;
  --q15-gris-linia: #E6E6E3;
  --q15-gris-fons: #F6F6F4;
  --q15-gris-tint: #EFEFEC;
  --q15-accent: #00A29C;
  --q15-accent-fosc: #007F7A;
  --q15-gir: -1.4deg;
  --q15-titols: 'Archivo', system-ui, sans-serif;
  --q15-cos: 'Source Sans 3', 'Segoe UI', system-ui, sans-serif;
}

/* ══════════════════ 1 · el botó GALERIA ONLINE ══════════════════════════ */

/* `.nav__botiga` del mockup: magenta, Space Grotesk 15/700 en majúscules,
 * coixins 15x22, icona de 18px i comptador blanc quadrat de 21px. */
.masthead .mini-widgets .wc-shopping-cart {
  margin-left: 10px;
}

/*
 * V2 (client, 07-09-2026): «el picto de carrito després del text i no cal
 * pastilla». Fora el fons: text negre, el carret a la DRETA i el comptador
 * negre. La zona clicable del carret (q15-cart-carret) passa a la dreta.
 */
.masthead .mini-widgets .wc-ico-cart {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--q15-titols) !important;
  font-stretch: 87.5%;
  font-size: 14px !important;
  font-weight: 600 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  line-height: 20px !important;
  background: transparent;
  color: var(--q15-negre) !important;
  padding: 15px 0 15px 16px;
  transition: color .2s;
}

.masthead .mini-widgets .wc-ico-cart:hover {
  background: transparent;
  color: var(--q15-negre) !important;
  opacity: 1 !important;
  box-shadow: inset 0 -2px 0 var(--q15-accent);
}

/* ── Dues destinacions en un sol botó ──────────────────────────────────────
 *
 * Petició de l'Albert (17-08-2026): el carret obre la CISTELLA i el rètol
 * «Galeria online» obre la BOTIGA. Dins d'un `<a>` no n'hi pot haver un
 * altre, i el `<a class="wc-ico-cart">` no es pot convertir en `<span>`
 * perquè el JS tàctil del tema li llegeix l'`href` (vegeu la capçalera de
 * `mod-wc-mini-cart.php` del fill).
 *
 * Per això el rètol es queda com l'enllaç de sempre —ara cap a la botiga— i
 * el carret és un segon enllaç que cobreix només la seva zona. Mesurat: la
 * icona acaba als 41px de l'inici de la pastilla; 48 li deixen marge sense
 * arribar a la primera lletra (que comença als 52).
 *
 * No tapa el desplegable: al escriptori s'obre per `mouseenter` sobre
 * `.shopping-cart`, que és el pare de tots dos.
 */
.masthead .mini-widgets .q15-cart-doble,
.dt-mobile-header .q15-cart-doble {
  position: relative;
}

.q15-cart-carret {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 52px;
  z-index: 3;
  display: block;
}

/* Que el carret també respongui en passar-hi per damunt: el ratolí és
 * sobre l'enllaç de sobre, o sigui que `.wc-ico-cart:hover` no s'activa. */
.q15-cart-doble:has(.q15-cart-carret:hover) .wc-ico-cart i {
  color: var(--q15-accent) !important;
}

/* L'ordre: el text (node de text, ordre 0), el comptador (1) i el carret (2).
 * El text no és cap element i no es pot ordenar: s'ordenen els altres dos. */
.masthead .mini-widgets .wc-ico-cart i,
.masthead .mini-widgets .wc-ico-cart:hover i {
  order: 2;
  font-size: 19px;
  color: var(--q15-negre) !important;
}

.masthead .mini-widgets .wc-ico-cart .counter {
  order: 1;
}

/* El comptador: quadrat blanc amb el número magenta, com `.comptador`.
 * Es neutralitza la geometria de bombolla del tema (posició absoluta i
 * rodona segons l'estil triat a Theme Options). */
.masthead .mini-widgets .wc-ico-cart .counter {
  position: static !important;
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  margin: 0;
  border-radius: 0 !important;
  background: var(--q15-negre) !important;
  background-image: none !important;
  color: var(--q15-blanc) !important;
  font-family: var(--q15-titols);
  font-size: 12px !important;
  font-weight: 700;
  line-height: 1 !important;
}

/* La fletxeta lateral del `rectangular-counter-style` no és del mockup. */
.masthead .mini-widgets .wc-ico-cart .counter::before {
  display: none !important;
}

/* El mateix botó DINS del menú mòbil de The7 (el desplegable), on el tema
 * el deixava com un enllaç petit amb el comptador a 8px — mesurat a 390px. */
.dt-mobile-header .wc-ico-cart {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--q15-titols, 'Archivo', sans-serif) !important;
  font-stretch: 87.5%;
  font-size: 14px !important;
  font-weight: 600 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  background: #FFFFFF;
  color: #141414 !important;
  border: 1px solid #141414;
  padding: 12px 18px;
  margin: 14px 0 0;
}

.dt-mobile-header .wc-ico-cart i {
  order: 2;
  color: #141414 !important;
}

.dt-mobile-header .wc-ico-cart .counter {
  order: 1;
}

.dt-mobile-header .wc-ico-cart .counter {
  position: static !important;
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 0 !important;
  background: #141414 !important;
  color: #FFFFFF !important;
  font-size: 12px !important;
  line-height: 1 !important;
}

.dt-mobile-header .wc-ico-cart .counter::before {
  display: none !important;
}

/* El desplegable del minicistell no té lloc al menú mòbil: la feina la fa
 * la pàgina del cistell. */
.dt-mobile-header .shopping-cart-wrap {
  display: none !important;
}

/* ══════════════════ 2 · el minicistell desplegable ══════════════════════ */

/*
 * L'amplada (420px) i el fons blanc venen de Theme Options
 * (`-sub_cart-bg-width` i `-sub_cart-bg-color`); aquí hi va la resta:
 * respiració, lletra i la fitxa de cada obra amb la miniatura gran.
 */
.masthead .shopping-cart-wrap .shopping-cart-inner {
  padding: 26px 26px 22px;
  border-top: 2px solid var(--q15-accent);
  box-shadow: 0 18px 44px rgba(20, 20, 20, .16);
  font-family: var(--q15-cos);
  font-size: 15.5px;
}

/* Els botons surten DUES vegades a la plantilla de The7 (a dalt i a sota,
 * `mod-wc-mini-cart.php:109 i 158`). Al mockup la crida va després del
 * contingut: es deixa només la de sota, que porta el subtotal al damunt. */
.masthead .shopping-cart-wrap .buttons.top-position {
  display: none;
}

/* — cada obra del cistell — */
.masthead .shopping-cart-wrap .cart_list li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  margin: 0;
  border-bottom: 1px solid var(--q15-gris-linia);
  position: relative;
}

.masthead .shopping-cart-wrap .cart_list li > a:not(.remove) {
  flex: 0 0 auto;
}

.masthead .shopping-cart-wrap .cart_list img {
  width: 72px !important;
  height: 72px;
  object-fit: contain;
  background: var(--q15-gris-fons);
  padding: 4px;
  float: none !important;
  margin: 0 !important;
}

.masthead .shopping-cart-wrap .cart_list li > span {
  flex: 1 1 auto;
  min-width: 0;
}

/* El títol de l'obra, en la lletra de titols. */
.masthead .shopping-cart-wrap .cart_list li > span > a {
  font-family: var(--q15-titols);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--q15-negre) !important;
  display: block;
  margin-bottom: 4px;
}

.masthead .shopping-cart-wrap .cart_list li > span > a:hover {
  color: var(--q15-negre) !important;
  box-shadow: inset 0 -2px 0 var(--q15-accent);
}

/* quantitat × preu */
.masthead .shopping-cart-wrap .cart_list .price-wrap,
.masthead .shopping-cart-wrap .cart_list .quantity {
  font-family: var(--q15-cos);
  font-size: 15px;
  color: var(--q15-gris-text);
}

/* la creueta de treure */
.masthead .shopping-cart-wrap .cart_list a.remove {
  position: absolute;
  top: 14px;
  right: 0;
  left: auto;
  width: 22px;
  height: 22px;
  line-height: 20px;
  text-align: center;
  font-size: 16px;
  color: var(--q15-gris-text) !important;
  border: 1px solid var(--q15-gris-linia);
  border-radius: 0;
  background: var(--q15-blanc);
}

.masthead .shopping-cart-wrap .cart_list a.remove:hover {
  background: var(--q15-negre);
  border-color: var(--q15-negre);
  color: var(--q15-blanc) !important;
}

/* el cistell buit, sense filet de sota */
.masthead .shopping-cart-wrap .cart_list.empty li {
  border-bottom: 0;
  padding: 4px 0 10px;
  color: var(--q15-gris-text);
}

/* — subtotal — */
.masthead .shopping-cart-wrap .shopping-cart-bottom .total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--q15-titols);
  font-size: 17px;
  color: var(--q15-negre);
  padding: 16px 0 14px;
  margin: 0;
}

.masthead .shopping-cart-wrap .shopping-cart-bottom .total .amount {
  font-weight: 700;
  font-size: 19px;
}

/* — els dos botons, com el sistema del mockup: primari negre ple i
 *   secundari de filet negre, quadrats i de bloc — */
.masthead .shopping-cart-wrap .shopping-cart-bottom .buttons {
  display: flex;
  gap: 10px;
  margin: 0;
}

.masthead .shopping-cart-wrap .shopping-cart-bottom .buttons .button {
  flex: 1 1 50%;
  display: inline-block;
  text-align: center;
  font-family: var(--q15-titols) !important;
  font-size: 13.5px !important;
  font-weight: 700 !important;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.3 !important;
  padding: 13px 10px !important;
  border-radius: 0 !important;
  transition: background-color .2s, color .2s;
}

/* V2: els dos iguals, blancs amb filet prim; negre en passar-hi. */
.masthead .shopping-cart-wrap .shopping-cart-bottom .buttons .view-cart,
.masthead .shopping-cart-wrap .shopping-cart-bottom .buttons .checkout {
  background: var(--q15-blanc) !important;
  color: var(--q15-negre) !important;
  border: 1px solid var(--q15-negre) !important;
}

.masthead .shopping-cart-wrap .shopping-cart-bottom .buttons .view-cart:hover,
.masthead .shopping-cart-wrap .shopping-cart-bottom .buttons .checkout:hover {
  background: var(--q15-negre) !important;
  color: var(--q15-blanc) !important;
}

/* ══════════════════ 3 · popup «Destacat d'última hora» ══════════════════ */

/*
 * Portat del mockup (v2, amb l'OK del client; el CSS ja era al sistema v3).
 * Mateixa geometria: caixa de 1000px en dues columnes 45/55, filet magenta
 * a dalt, botó de tancar quadrat, i el xip fix per reobrir-lo.
 */
.q15-popup {
  position: fixed;
  inset: 0;
  z-index: 9150;
  display: grid;
  place-items: center;
  padding: 24px;
}

.q15-popup[hidden] { display: none; }

.q15-popup__overlay {
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 20, 0.82);
}

/*
 * V2 (client, 07-09-2026): la imatge en proporció A4 i sencera, cap cantell
 * arrodonit, el filet del color de la casa. L'alçada de la caixa la dona la
 * columna de la imatge (A4 sobre el 40 % de 1000px = 400×566), i el text
 * s'hi ajusta amb desplaçament si cal.
 */
.q15-popup__caixa {
  position: relative;
  width: min(1000px, 100%);
  max-height: min(90vh, 720px);
  background: var(--q15-blanc);
  display: grid;
  grid-template-columns: 40fr 60fr;
  overflow: hidden;
  animation: q15-popup-entra .35s ease both;
  border: 1px solid var(--q15-negre);
  border-top: 2px solid var(--q15-accent);
  border-radius: 0;
}

@keyframes q15-popup-entra {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

.q15-popup__media {
  min-height: 0;
  aspect-ratio: 210 / 297;
  background: var(--q15-gris-fons);
}

.q15-popup__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  border-radius: 0;
}

.q15-popup__cos {
  padding: clamp(28px, 4vw, 52px);
  padding-top: clamp(46px, 5vw, 60px);
  overflow-y: auto;
  font-family: var(--q15-cos);
}

/* l'etiqueta «Destacat d'última hora»: a la v2 no cal (client, 07-09). */
.q15-popup__etiqueta {
  display: none;
}

.q15-popup__titol {
  font-family: var(--q15-titols);
  font-size: clamp(30px, 3.4vw, 46px) !important;
  font-weight: 700;
  line-height: 1.02;
  color: var(--q15-negre);
  margin: 0 0 8px;
  text-transform: none;
}

.q15-popup__sub {
  font-size: 17px;
  color: var(--q15-gris-text);
  margin: 0 0 20px;
}

.q15-popup__crida {
  font-size: 18.5px;
  line-height: 1.5;
  color: var(--q15-negre);
  margin: 0 0 14px;
}

.q15-popup__crida strong {
  font-family: var(--q15-titols);
  color: var(--q15-negre);
}

.q15-popup__data {
  font-size: 16px;
  color: var(--q15-gris-text);
  margin: 0 0 26px;
}

.q15-popup__accions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* V2: els botons de la casa, tots iguals — blanc, filet prim, majúscules. */
.q15-popup__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--q15-titols);
  font-stretch: 87.5%;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.2;
  padding: 13px 24px;
  border: 1px solid var(--q15-negre);
  border-radius: 0;
  background: var(--q15-blanc);
  color: var(--q15-negre) !important;
  cursor: pointer;
  transition: background-color .2s, color .2s;
  text-decoration: none;
}

.q15-popup__btn:hover {
  background: var(--q15-negre);
  color: var(--q15-blanc) !important;
  text-decoration: none;
}

/*
 * V2: tancar és «simplement una X que canvia de forma al rollover» (client,
 * 07-09-2026). Un quadrat de 44px amb la creu; en passar-hi, la creu gira
 * 90 graus i el quadrat es pinta del color de la casa amb la creu negra.
 */
.q15-popup__tancar {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: var(--q15-blanc);
  border: 1px solid var(--q15-negre);
  border-radius: 0;
  color: var(--q15-negre);
  cursor: pointer;
  transition: background-color .25s, border-color .25s;
}

.q15-popup__tancar span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.q15-popup__tancar:hover,
.q15-popup__tancar:focus-visible {
  background: var(--q15-accent);
  border-color: var(--q15-accent);
  color: var(--q15-negre);
}

.q15-popup__tancar svg {
  width: 18px;
  height: 18px;
  transition: transform .35s cubic-bezier(.22, .61, .36, 1);
}

.q15-popup__tancar:hover svg,
.q15-popup__tancar:focus-visible svg {
  transform: rotate(90deg) scale(1.15);
}

/* — el xip fix de reobrir — */
.q15-destacat-chip {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9090;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 20px;
  border: 1px solid var(--q15-negre);
  border-radius: 0;
  background: var(--q15-accent);
  color: var(--q15-negre);
  font-family: var(--q15-titols);
  font-stretch: 87.5%;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transform: rotate(var(--q15-gir));
  box-shadow: none;
}

.q15-destacat-chip[hidden] { display: none; }

.q15-destacat-chip:hover {
  background: var(--q15-negre);
  color: var(--q15-blanc);
  transform: rotate(0deg);
}

.q15-destacat-chip__punt {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

/* al mòbil, la caixa passa a una columna i la foto fa de capçalera */
@media (max-width: 760px) {
  .q15-popup__caixa {
    grid-template-columns: 1fr;
    max-height: 92vh;
    overflow-y: auto;
  }
  .q15-popup__media { max-height: 240px; }
}

@media (prefers-reduced-motion: reduce) {
  .q15-popup__caixa { animation: none; }
}

/* ══════════════════ 4 · la banda de rètols del hero ═════════════════════ */

/*
 * El `.slide__cap` del mockup: requadre blanc translúcid a tota l'amplada,
 * a baix del slider, amb l'etiqueta, el títol i l'artista de la diapositiva
 * en curs — i el call to action que va demanar l'Albert (12-08). El marcatge
 * el pinta q15-marc.php i marc.js el mou dins de #main-slideshow.
 */
#main-slideshow {
  position: relative;
}

.q15-hero-cap {
  --q15-blanc: #FFFFFF;
  --q15-negre: #141414;
  --q15-gris-text: #565656;
  --q15-gris-tint: #EFEFEC;
  --q15-accent: #00A29C;
  --q15-titols: 'Archivo', system-ui, sans-serif;
  --q15-cos: 'Source Sans 3', 'Segoe UI', system-ui, sans-serif;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
}

.q15-hero-cap[hidden] { display: none; }

/*
 * V2 (client, 07-09-2026): la banda és una FILA amb el rètol de la
 * diapositiva a l'esquerra (títol + NOM DE L'ARTISTA en majúscules; fora el
 * descriptiu «Dibuix editorial» i fora el «Veure les exposicions») i els tres
 * botons d'accés —EXPOSICIONS · ARTISTES · OBRES— a la dreta. El marcatge el
 * pinta q15-marc.php §4; els botons són compartits per totes les diapositives.
 */
.q15-hero-cap__fila {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  padding: 20px clamp(20px, 3.5vw, 50px) 22px;
  border-top: 2px solid var(--q15-accent);
}

.q15-hero-cap__slides {
  min-width: 0;
  flex: 1 1 auto;
}

.q15-hero-cap__slide {
  display: block;
  color: var(--q15-negre);
  text-decoration: none;
}

.q15-hero-cap__slide[hidden] { display: none; }

.q15-hero-cap__slide:hover {
  text-decoration: none;
}

.q15-hero-cap__slide:hover .q15-hero-cap__titol {
  box-shadow: inset 0 -2px 0 var(--q15-accent);
}

.q15-hero-cap__slide.is-entrant {
  animation: q15-cap-entra .5s ease both;
}

@keyframes q15-cap-entra {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

.q15-hero-cap__text {
  display: block;
  min-width: 0;
}

/* ⚠ El !important és contra la tipografia de títol de Theme Options
 * (`general-page-title-typography`: 68px), que guanya una classe sola. */
.q15-hero-cap__titol {
  display: inline;
  font-family: var(--q15-titols) !important;
  font-stretch: 75%;
  font-size: clamp(26px, 3vw, 42px) !important;
  font-weight: 700;
  line-height: 1.02 !important;
  letter-spacing: -0.01em;
  color: var(--q15-negre);
  margin: 0 !important;
  padding: 0;
  text-transform: none;
  transition: box-shadow .2s;
}

/* El NOM en majúscules, la frase (el títol) en minúscules: client, 07-09. */
.q15-hero-cap__artista {
  display: block;
  font-family: var(--q15-titols);
  font-stretch: 87.5%;
  font-size: clamp(13px, 1.2vw, 15px);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--q15-negre);
  margin: 8px 0 0;
}

/* Els tres botons d'accés, els de la casa (blanc, filet prim, majúscules). */
.q15-hero-cap__accions {
  flex: 0 0 auto;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.q15-hero-cap__boto {
  display: inline-flex;
  align-items: center;
  font-family: var(--q15-titols);
  font-stretch: 87.5%;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.2;
  color: var(--q15-negre) !important;
  background: var(--q15-blanc);
  border: 1px solid var(--q15-negre);
  padding: 12px 22px;
  text-decoration: none;
  transition: background-color .2s, color .2s;
}

.q15-hero-cap__boto:hover,
.q15-hero-cap__boto:focus-visible {
  background: var(--q15-negre);
  color: var(--q15-blanc) !important;
  text-decoration: none;
}

@media (max-width: 900px) {
  /* Al mòbil i a la tauleta la banda tapava mitja foto (207 de 406px,
   * mesurat): es queda ESTÀTICA sota el slider en lloc de sobreposada. */
  .q15-hero-cap {
    position: static;
  }
  .q15-hero-cap__fila {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 18px 20px 20px;
    background: #FFFFFF;
    border-bottom: 1px solid var(--q15-gris-linia, #E6E6E3);
  }
  .q15-hero-cap__accions {
    justify-content: flex-start;
  }
  .q15-hero-cap__boto {
    font-size: 12px;
    padding: 11px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .q15-hero-cap__slide.is-entrant { animation: none; }
}
