/* phanta.cms Products — catalogue, product page, cart. Themes can override the --pr-* variables. */
:root {
  --pr-accent: #bdbb32;
  --pr-accent-dark: #a19f24;
  --pr-on-accent: #1d1d1b;
  --pr-ink: #2b2b2b;
  --pr-text: #555;
  --pr-muted: #8a8a8a;
  --pr-line: #e7e6df;
  --pr-soft: #f6f6f2;
  --pr-bg: #fff;
  --pr-radius: 14px;
  --pr-head: inherit;
  --pr-err: #c0392b;
}
.pr-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[data-pr-catalog] [hidden], .pr-cart [hidden], .pr-card[hidden] { display: none !important; }

/* buttons */
.pr-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em; padding: .78em 1.5em; border: 2px solid var(--pr-accent);
  border-radius: 999px; background: var(--pr-accent); color: var(--pr-on-accent); font: inherit; font-weight: 600; font-size: .95rem;
  line-height: 1.2; text-decoration: none; cursor: pointer; transition: background .2s, border-color .2s, color .2s, transform .2s;
}
.pr-btn:hover { background: var(--pr-accent-dark); border-color: var(--pr-accent-dark); color: var(--pr-on-accent); }
.pr-btn:focus-visible { outline: 3px solid var(--pr-ink); outline-offset: 2px; }
.pr-btn svg { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pr-btn--ghost { background: transparent; border-color: var(--pr-line); color: var(--pr-ink); }
.pr-btn--ghost:hover { background: var(--pr-accent); border-color: var(--pr-accent); color: var(--pr-on-accent); }
.pr-btn--big { padding: .95em 1.9em; font-size: 1rem; }
.pr-btn--small { padding: .5em 1em; font-size: .85rem; }
.pr-btn[disabled] { opacity: .6; cursor: wait; }

/* ------------------------------------------------------------ catalogue */
.pr-catalog { display: block; }
.pr-filters { position: sticky; top: var(--pr-sticky, 72px); z-index: 5; margin: 0 0 22px; padding: 14px 0 12px; background: color-mix(in srgb, var(--pr-bg) 94%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--pr-line); }
.pr-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.pr-tabs button {
  padding: .6em 1.15em; border: 0; border-radius: 999px; background: var(--pr-soft); color: var(--pr-ink); font: inherit; font-weight: 600;
  font-size: .9rem; cursor: pointer; transition: background .2s, color .2s;
}
.pr-tabs button:hover { background: #ecebe3; }
.pr-tabs button.is-active { background: var(--pr-ink); color: #fff; }
.pr-chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 8px; scrollbar-width: thin; }
.pr-chips button {
  flex: 0 0 auto; padding: .45em .95em; border: 1px solid var(--pr-line); border-radius: 999px; background: var(--pr-bg); color: var(--pr-text);
  font: inherit; font-size: .85rem; cursor: pointer; white-space: nowrap; transition: border-color .2s, background .2s, color .2s;
}
.pr-chips button small { color: var(--pr-muted); font-size: .78em; margin-left: .2em; }
.pr-chips button:hover { border-color: var(--pr-accent); color: var(--pr-ink); }
.pr-chips button.is-active { background: var(--pr-accent); border-color: var(--pr-accent); color: var(--pr-on-accent); }
.pr-chips button.is-active small { color: inherit; opacity: .7; }
.pr-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 18px; }
.pr-types { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.pr-types label { display: inline-flex; align-items: center; gap: .4em; font-size: .9rem; color: var(--pr-text); cursor: pointer; }
.pr-types input { width: 17px; height: 17px; accent-color: var(--pr-accent-dark); }
.pr-search { position: relative; flex: 0 1 300px; display: block; }
.pr-search svg { position: absolute; left: 12px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); fill: none; stroke: var(--pr-muted); stroke-width: 2; }
.pr-search input {
  width: 100%; padding: .62em .9em .62em 38px; border: 1px solid var(--pr-line); border-radius: 999px; background: var(--pr-bg); color: var(--pr-ink); font: inherit; font-size: .92rem;
}
.pr-search input:focus { outline: 2px solid var(--pr-accent); outline-offset: 1px; border-color: transparent; }
.pr-intro { max-width: 760px; margin: 0 0 18px; }
.pr-intro h2 { margin: 0 0 .3em; }
.pr-intro p { margin: 0; color: var(--pr-text); }
.pr-count { margin: 0 0 14px; color: var(--pr-muted); font-size: .85rem; letter-spacing: .02em; }
.pr-empty { padding: 50px 20px; text-align: center; color: var(--pr-text); background: var(--pr-soft); border-radius: var(--pr-radius); }

.pr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 22px; }
.pr-grid--small { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.pr-card {
  position: relative; display: flex; flex-direction: column; background: var(--pr-bg); border: 1px solid var(--pr-line); border-radius: var(--pr-radius);
  overflow: hidden; transition: box-shadow .25s, transform .25s, border-color .25s;
}
.pr-card:hover { border-color: transparent; box-shadow: 0 14px 34px rgba(30, 30, 20, .12); transform: translateY(-3px); }
.pr-card__img { display: block; aspect-ratio: 1; background: #fff; overflow: hidden; }
.pr-card__img img { width: 100%; height: 100%; object-fit: contain; padding: 6%; transition: transform .5s; }
.pr-card:hover .pr-card__img img { transform: scale(1.05); }
.pr-card__noimg { display: block; width: 100%; height: 100%; background: var(--pr-soft); }
.pr-card__body { flex: 1; padding: 4px 18px 10px; }
.pr-card__type { margin: 0 0 4px; color: var(--pr-muted); font-size: .74rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.pr-card__title { margin: 0; font-size: 1.06rem; line-height: 1.3; font-family: var(--pr-head); }
.pr-card__title a { color: var(--pr-ink); text-decoration: none; }
.pr-card__title a::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.pr-card__spec { margin: 4px 0 0; color: var(--pr-text); font-size: .85rem; }
.pr-card__dots { display: flex; gap: 5px; margin: 8px 0 0; }
.pr-card__dots span { width: 14px; height: 14px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.pr-card__add { position: relative; z-index: 2; margin: 0 18px 18px; align-self: flex-start; padding: .5em 1.05em; font-size: .85rem; }
.pr-card__add.is-done { background: var(--pr-accent); border-color: var(--pr-accent); color: var(--pr-on-accent); }
.pr-grid--small .pr-card__body { padding: 2px 14px 8px; }
.pr-grid--small .pr-card__add { margin: 0 14px 14px; }

/* collection cards */
.pr-colls { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 18px; }
.pr-coll {
  position: relative; display: flex; flex-direction: column; align-items: center; padding: 18px 14px 20px; border-radius: var(--pr-radius); background: var(--pr-bg);
  border: 1px solid var(--pr-line); color: var(--pr-ink); text-decoration: none; text-align: center; transition: box-shadow .25s, transform .25s, border-color .25s;
}
.pr-coll:hover { border-color: transparent; box-shadow: 0 14px 34px rgba(30, 30, 20, .12); transform: translateY(-3px); }
.pr-coll__img { width: 100%; aspect-ratio: 1; display: block; margin-bottom: 10px; }
.pr-coll__img img { width: 100%; height: 100%; object-fit: contain; transition: transform .5s; }
.pr-coll:hover .pr-coll__img img { transform: scale(1.06); }
.pr-coll__name { font-family: var(--pr-head); font-size: 1.12rem; font-weight: 600; }
.pr-coll__n { color: var(--pr-muted); font-size: .8rem; margin-top: 2px; }

/* catalogues */
.pr-cats__group + .pr-cats__group { margin-top: 48px; }
.pr-cats__title { margin: 0 0 18px; }
.pr-cats__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 22px; }
.pr-catalogue { display: flex; flex-direction: column; color: var(--pr-ink); text-decoration: none; }
.pr-catalogue__cover { display: block; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; box-shadow: 0 6px 18px rgba(0, 0, 0, .1); transition: transform .3s, box-shadow .3s; background: var(--pr-soft); }
.pr-catalogue:hover .pr-catalogue__cover { transform: translateY(-4px) rotate(-.6deg); box-shadow: 0 18px 36px rgba(0, 0, 0, .16); }
.pr-catalogue__cover img { width: 100%; height: 100%; object-fit: cover; }
.pr-catalogue__ph {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; padding: 22px 18px; color: #fff;
  background: radial-gradient(circle at 80% 18%, rgba(189, 187, 50, .55), transparent 45%), linear-gradient(160deg, #3a3a36, #1c1c1a);
}
.pr-catalogue__ph::before { content: ''; position: absolute; top: 18px; left: 18px; width: 38px; height: 4px; background: var(--pr-accent); border-radius: 2px; }
.pr-catalogue__ph small { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; opacity: .75; margin-bottom: 6px; }
.pr-catalogue__ph strong { font-family: var(--pr-head); font-size: 1.3rem; line-height: 1.2; font-weight: 600; }
.pr-catalogue__ph i { position: absolute; top: 14px; right: 16px; font-style: normal; font-size: .72rem; letter-spacing: .3em; opacity: .55; }
.pr-catalogue__title { margin-top: 12px; font-weight: 600; line-height: 1.3; }
.pr-catalogue__open { display: inline-flex; align-items: center; gap: .35em; margin-top: 4px; color: var(--pr-accent-dark); font-size: .85rem; font-weight: 600; }
.pr-catalogue__open svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ------------------------------------------------------------ product page */
.pr-page { padding: 28px 0 80px; }
.pr-wrap { width: min(1180px, 100% - 40px); margin: 0 auto; }
.pr-crumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; color: var(--pr-muted); font-size: .85rem; }
.pr-crumbs a { color: var(--pr-text); text-decoration: none; }
.pr-crumbs a:hover { color: var(--pr-ink); text-decoration: underline; }
.pr-product { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.pr-gallery__main { aspect-ratio: 1; border-radius: var(--pr-radius); background: #fff; border: 1px solid var(--pr-line); overflow: hidden; }
.pr-gallery__main img { width: 100%; height: 100%; object-fit: contain; padding: 5%; }
.pr-gallery__thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.pr-gallery__thumbs button { width: 76px; height: 76px; padding: 4px; border: 2px solid var(--pr-line); border-radius: 10px; background: #fff; cursor: pointer; transition: border-color .2s; }
.pr-gallery__thumbs button.is-active, .pr-gallery__thumbs button:hover { border-color: var(--pr-accent); }
.pr-gallery__thumbs img { width: 100%; height: 100%; object-fit: contain; }
.pr-info { position: sticky; top: calc(var(--pr-sticky, 72px) + 20px); }
.pr-info__kicker { margin: 0 0 10px; font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.pr-info__kicker a { color: var(--pr-accent-dark); text-decoration: none; }
.pr-info__kicker a:hover { text-decoration: underline; }
.pr-info__title { margin: 0; font-family: var(--pr-head); font-size: clamp(1.9rem, 3.4vw, 2.7rem); line-height: 1.1; color: var(--pr-ink); }
.pr-info__type { margin: 8px 0 0; color: var(--pr-text); font-size: 1.1rem; }
.pr-info__desc { margin-top: 18px; color: var(--pr-text); }
.pr-specs { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 26px 0 0; border-top: 1px solid var(--pr-line); }
.pr-specs div { padding: 12px 0; border-bottom: 1px solid var(--pr-line); }
.pr-specs div:nth-child(odd) { padding-right: 14px; }
.pr-specs dt { color: var(--pr-muted); font-size: .74rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.pr-specs dd { margin: 3px 0 0; color: var(--pr-ink); font-weight: 600; }
.pr-buy { margin-top: 28px; padding: 22px; border-radius: var(--pr-radius); background: var(--pr-soft); }
.pr-variants { margin: 0 0 18px; padding: 0; border: 0; }
.pr-variants legend { margin-bottom: 10px; font-weight: 600; color: var(--pr-ink); }
.pr-variants label { display: inline-block; margin: 0 6px 8px 0; cursor: pointer; }
.pr-variants input { position: absolute; opacity: 0; }
.pr-variants span { display: inline-flex; align-items: center; gap: .45em; padding: .45em .9em .45em .5em; border: 2px solid var(--pr-line); border-radius: 999px; background: #fff; font-size: .9rem; transition: border-color .2s; }
.pr-variants span i { width: 18px; height: 18px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.pr-variants small { color: var(--pr-muted); font-size: .75em; }
.pr-variants input:checked + span { border-color: var(--pr-ink); }
.pr-variants input:focus-visible + span { outline: 3px solid var(--pr-accent); outline-offset: 2px; }
.pr-buy__row { display: flex; flex-wrap: wrap; gap: 12px; align-items: stretch; }
.pr-qty { display: inline-flex; align-items: stretch; border: 1px solid var(--pr-line); border-radius: 999px; background: #fff; overflow: hidden; }
.pr-qty button { width: 44px; border: 0; background: transparent; color: var(--pr-ink); font-size: 1.2rem; cursor: pointer; }
.pr-qty button:hover { background: var(--pr-soft); }
.pr-qty input { width: 74px; border: 0; text-align: center; font: inherit; font-weight: 600; color: var(--pr-ink); -moz-appearance: textfield; appearance: textfield; background: transparent; }
.pr-qty input::-webkit-outer-spin-button, .pr-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pr-qty--small button { width: 34px; font-size: 1rem; }
.pr-qty--small input { width: 58px; padding: .45em 0; }
.pr-buy__note { margin: 12px 0 0; color: var(--pr-muted); font-size: .82rem; }
.pr-related { margin-top: 64px; }
.pr-related h2 { margin: 0 0 18px; font-size: 1.5rem; }

/* ------------------------------------------------------------ cart */
.pr-cart { max-width: 1120px; margin: 0 auto; }
.pr-cart__form { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.pr-cart__form h2 { margin: 0 0 8px; font-size: 1.5rem; }
.pr-cart__intro { margin: 0 0 18px; color: var(--pr-text); }
.pr-lines { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--pr-line); }
.pr-line { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--pr-line); }
.pr-line__img { display: block; width: 76px; height: 76px; border-radius: 10px; border: 1px solid var(--pr-line); background: #fff; overflow: hidden; }
.pr-line__img img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.pr-line__title { display: block; color: var(--pr-ink); font-weight: 600; text-decoration: none; }
.pr-line__title:hover { text-decoration: underline; }
.pr-line__type { display: block; color: var(--pr-muted); font-size: .85rem; }
.pr-line__variant { margin-top: 6px; padding: .35em .6em; border: 1px solid var(--pr-line); border-radius: 8px; font: inherit; font-size: .85rem; max-width: 100%; }
.pr-line__side { display: flex; align-items: center; gap: 8px; }
.pr-line__pcs { color: var(--pr-muted); font-size: .85rem; }
.pr-line__rm { width: 34px; height: 34px; border: 0; border-radius: 50%; background: transparent; color: var(--pr-muted); cursor: pointer; }
.pr-line__rm:hover { background: #fbe9e7; color: var(--pr-err); }
.pr-line__rm svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.pr-cart__details { position: sticky; top: calc(var(--pr-sticky, 72px) + 20px); padding: 26px; border-radius: var(--pr-radius); background: var(--pr-soft); }
.pr-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.pr-field { display: flex; flex-direction: column; gap: 4px; font-size: .86rem; color: var(--pr-ink); font-weight: 600; }
.pr-field[data-pr-field="name"], .pr-field[data-pr-field="company"], .pr-field[data-pr-field="address"], .pr-field--wide { grid-column: 1 / -1; }
.pr-field small { color: var(--pr-muted); font-weight: 400; }
.pr-field b { color: var(--pr-err); font-weight: 600; }
.pr-field input, .pr-field textarea {
  width: 100%; padding: .7em .85em; border: 1px solid #dcdbd2; border-radius: 10px; background: #fff; color: var(--pr-ink); font: inherit; font-weight: 400; font-size: .95rem;
}
.pr-field input:focus, .pr-field textarea:focus { outline: 2px solid var(--pr-accent); outline-offset: 0; border-color: transparent; }
.pr-field.has-error input, .pr-field.has-error textarea { border-color: var(--pr-err); }
.pr-err { color: var(--pr-err); font-style: normal; font-weight: 500; font-size: .8rem; }
.pr-consent { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; margin: 16px 0 0; font-size: .86rem; color: var(--pr-text); cursor: pointer; }
.pr-consent input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--pr-accent-dark); flex: 0 0 auto; }
.pr-consent span { flex: 1; }
.pr-consent .pr-err { flex-basis: 100%; }
.pr-consent a { color: var(--pr-ink); }
.pr-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.pr-note { display: flex; gap: 8px; align-items: flex-start; margin: 16px 0; padding: 12px 14px; border-radius: 10px; background: #fff; color: var(--pr-text); font-size: .85rem; }
.pr-note svg { flex: 0 0 18px; width: 18px; height: 18px; margin-top: 1px; fill: none; stroke: var(--pr-accent-dark); stroke-width: 2; stroke-linecap: round; }
.pr-formerr { margin: 0 0 12px; color: var(--pr-err); font-weight: 600; font-size: .9rem; }
.pr-cart .pr-btn--big { width: 100%; }
.pr-cart__empty, .pr-cart__done { padding: 60px 24px; border-radius: var(--pr-radius); background: var(--pr-soft); text-align: center; }
.pr-cart__empty p { margin: 0 0 18px; font-size: 1.1rem; color: var(--pr-text); }
.pr-cart__done svg { width: 56px; height: 56px; padding: 12px; border-radius: 50%; background: var(--pr-accent); fill: none; stroke: var(--pr-on-accent); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.pr-cart__done h2 { margin: 16px 0 8px; }
.pr-cart__done p { max-width: 560px; margin: 0 auto; color: var(--pr-text); }
.pr-cart__done:focus { outline: none; }

/* cart link + toast */
.pr-cartlink { position: relative; display: inline-flex; align-items: center; gap: .4em; color: inherit; text-decoration: none; }
.pr-cartlink svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pr-cartlink__n {
  position: absolute; top: -8px; left: 12px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--pr-accent); color: var(--pr-on-accent);
  font-size: .7rem; font-weight: 700; line-height: 19px; text-align: center;
}
.pr-cartlink.is-bump .pr-cartlink__n { animation: pr-bump .5s; }
@keyframes pr-bump { 30% { transform: scale(1.35); } }
.pr-toast {
  position: fixed; right: 20px; bottom: 20px; z-index: 1000; display: flex; align-items: center; gap: 12px; max-width: min(420px, calc(100vw - 40px));
  padding: 12px 12px 12px 14px; border-radius: 14px; background: #222; color: #fff; box-shadow: 0 16px 40px rgba(0, 0, 0, .25);
  transform: translateY(140%); opacity: 0; transition: transform .35s cubic-bezier(.2, .9, .3, 1.2), opacity .25s; pointer-events: none;
}
.pr-toast.is-on { transform: none; opacity: 1; pointer-events: auto; }
.pr-toast__ok svg { width: 28px; height: 28px; padding: 5px; border-radius: 50%; background: var(--pr-accent); fill: none; stroke: #1d1d1b; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; display: block; }
.pr-toast__txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.pr-toast__txt small { color: #bbb; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 960px) {
  .pr-product, .pr-cart__form { grid-template-columns: 1fr; gap: 30px; }
  .pr-info, .pr-cart__details { position: static; }
}
@media (max-width: 640px) {
  .pr-filters { position: static; }
  .pr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .pr-card__body { padding: 2px 12px 8px; }
  .pr-card__title { font-size: .95rem; }
  .pr-card__add { margin: 0 12px 12px; }
  .pr-search { flex-basis: 100%; }
  .pr-fields { grid-template-columns: 1fr; }
  .pr-line { grid-template-columns: 60px minmax(0, 1fr); }
  .pr-line__img { width: 60px; height: 60px; }
  .pr-line__side { grid-column: 2; }
  .pr-specs { grid-template-columns: 1fr; }
  .pr-specs div:nth-child(odd) { padding-right: 0; }
  .pr-cart__details { padding: 20px 16px; }
  .pr-toast { left: 12px; right: 12px; bottom: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .pr-card, .pr-card__img img, .pr-coll, .pr-catalogue__cover, .pr-toast { transition: none; }
}
