/* Projekt C — „Galeria”, podstrony: lista, produkt, koszyk. Zdjęcia w passe-partout, cienkie mosiężne linie, Bodoni w tytułach. */

[hidden] { display: none !important; }
:root { --ok: #3C7A4E; }

.crumbs { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 26px; font-size: 16px; color: var(--muted); }
.crumbs a { color: var(--green); font-weight: 600; text-underline-offset: 4px; }
.crumbs__sep { color: var(--brass); }
.crumbs [aria-current] { color: var(--ink); }
.ptile__name { font-optical-sizing: none; font-variation-settings: "opsz" 14; }

/* Lista produktów */
.listing { padding-block: 24px clamp(64px, 7vw, 112px); }
.listing__head { display: flex; justify-content: space-between; align-items: end; gap: 32px; margin-bottom: 30px; }
.listing__head h1 { max-width: none; }
.listing__head p { max-width: 30em; color: var(--muted); }
.filters { display: grid; gap: 16px; margin-bottom: 44px; padding-block: 22px; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }
.filters__group { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.filters__label { width: 96px; font-weight: 600; color: var(--deep); }
.chip { min-height: 48px; padding: 0 20px; border: 1.5px solid var(--hair); border-radius: 0; background: var(--paper); font: 500 17px var(--sans); cursor: pointer; transition: background-color .2s, border-color .2s, color .2s; }
.chip:hover { border-color: var(--green); }
.chip[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: var(--cream); }
.filters__bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; color: var(--muted); }
.sort { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--deep); }
.sort select { height: 50px; padding: 0 12px; border: 1.5px solid var(--hair); border-radius: 0; background: var(--paper); font: 500 17px var(--sans); color: var(--ink); }

.pgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 56px clamp(22px, 2.4vw, 40px); }
.ptile { display: flex; flex-direction: column; gap: 6px; }
.ptile__img { display: block; margin-bottom: 16px; }
.ptile__img .mat { overflow: hidden; }
.ptile__img img { aspect-ratio: 5 / 6; transition: transform .8s ease; }
.ptile:hover .ptile__img img { transform: scale(1.03); }
.ptile__body { display: flex; flex: 1; flex-direction: column; gap: 6px; }
.ptile__name { font-size: 27px; line-height: 1.15; }
.ptile__name a, .line h2 a { text-decoration: none; }
.ptile__name a:hover, .line h2 a:hover { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.ptile__notes { font-size: 16px; font-weight: 600; color: var(--brass-text); }
.ptile__meta { font-size: 16px; color: var(--muted); }
.ptile__price { margin-top: auto; padding-top: 8px; font-size: 22px; font-weight: 600; }
.ptile .btn { margin-top: 10px; }
.ptile--off .ptile__img img { filter: grayscale(.7); opacity: .7; }
.ptile__off { margin-top: 10px; font-size: 16px; color: var(--muted); }
.ptile__off a { color: var(--green); font-weight: 600; }

.help { background: var(--paper); border-top: 1px solid var(--hair); }
.help__in { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-block: 52px; }
.help p { margin-top: 6px; color: var(--muted); }

/* Karta produktu */
.pdp { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 96px); align-items: start; padding-block: 26px 72px; }
.gallery { display: grid; gap: 16px; }
.gallery__main img { aspect-ratio: 9 / 10; max-height: max(480px, calc(100vh - 240px)); }
.gallery__thumbs { display: flex; gap: 14px; }
.gallery__thumbs button { width: 100px; padding: 6px; border: 0; background: var(--paper); box-shadow: 0 0 0 1px var(--hair); cursor: pointer; }
.gallery__thumbs button[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--green); }
.gallery__thumbs img { width: 100%; aspect-ratio: 9 / 10; object-fit: cover; }
.buy { display: grid; gap: 16px; }
.buy__type { font-size: 16px; font-weight: 600; color: var(--brass-text); }
.buy h1 { max-width: none; font-size: clamp(42px, 3.8vw, 60px); }
.buy__notes { font-size: 19px; color: var(--muted); }
.buy__price { padding-block: 12px; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); font: 600 30px/1.2 var(--sans); color: var(--deep); }
.buy__desc { color: var(--muted); }
.buy__stock { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--ok); }
.extras { display: grid; gap: 12px; margin: 0; padding: 18px 20px 20px; border: 0; background: var(--paper); box-shadow: 0 0 0 1px var(--hair); }
.extras legend { float: left; width: 100%; margin-bottom: 4px; padding: 0; font-size: 18px; font-weight: 600; color: var(--deep); }
.extra { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.extra input { flex: none; width: 22px; height: 22px; margin: 3px 0 0; accent-color: var(--green); }
.extra span { display: flex; flex: 1; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; }
.extra strong { font-weight: 600; }
.extra__field, .extra__field > div { display: grid; gap: 6px; }
.extra__field { padding-left: 34px; }
.extra__field label { font-size: 16px; font-weight: 600; }
.extra__field input { height: 54px; padding: 0 14px; border: 1.5px solid var(--sand); background: #fff; font-size: 18px; }
.extra__field input:focus { outline: none; border-color: var(--green); }
.buy__row { display: flex; gap: 12px; }
.buy__row .btn { flex: 1; }
.qty { display: inline-flex; height: 56px; border: 1.5px solid var(--hair); background: var(--paper); }
.qty button { width: 48px; border: 0; background: none; color: var(--green); font-size: 24px; cursor: pointer; }
.qty button:hover { background: var(--wall); }
.qty input { width: 48px; border: 0; background: none; font-size: 19px; font-weight: 600; text-align: center; -moz-appearance: textfield; }
.qty input:focus { outline: none; }
.qty input::-webkit-inner-spin-button, .qty input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.buy__help a { color: var(--green); font-weight: 600; }
.buy__trust { display: grid; gap: 8px; padding-top: 16px; border-top: 1px solid var(--hair); font-size: 16px; color: var(--muted); }
.buy__trust li { display: flex; gap: 12px; }
.buy__trust li::before { content: ""; flex: none; width: 12px; height: 7px; margin-top: 7px; border-left: 2px solid var(--green); border-bottom: 2px solid var(--green); transform: rotate(-45deg); }
.details { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 96px); padding-block: 64px; border-top: 1px solid var(--hair); }
.details h2 { margin-bottom: 20px; }
.specs { margin: 0; border-top: 1px solid var(--hair); }
.specs div { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--hair); }
.specs dt { font-weight: 600; color: var(--deep); }
.specs dd { margin: 0; color: var(--muted); }
.tips { display: grid; gap: 18px; }
.tips li { padding-left: 18px; border-left: 2px solid var(--hair); color: var(--muted); }
.tips strong { display: block; font-size: 18px; color: var(--deep); }
.related { padding-block: 64px 104px; border-top: 1px solid var(--hair); }
.related h2 { margin-bottom: 36px; }

/* Koszyk */
.cart { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: clamp(32px, 5vw, 88px); align-items: start; padding-block: 24px 104px; }
.stepsbar { display: flex; flex-wrap: wrap; gap: 8px 30px; margin: 18px 0 28px; padding: 0; list-style: none; }
.stepsbar li { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 17px; }
.stepsbar span { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--hair); border-radius: 50%; background: var(--paper); font: 600 16px/1 var(--sans); color: var(--deep); }
.stepsbar [aria-current] { color: var(--deep); font-weight: 600; }
.stepsbar [aria-current] span { background: var(--green); border-color: var(--green); color: var(--cream); }
.lines { border-top: 1px solid var(--hair); }
.line { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto auto; gap: 22px; align-items: center; padding-block: 22px; border-bottom: 1px solid var(--hair); }
.line__img .mat { padding: 7px; }
.line__img img { aspect-ratio: 6 / 7; }
.line__info { display: grid; gap: 4px; }
.line h2 { font-size: 27px; line-height: 1.15; }
.line__info p { font-size: 16px; color: var(--muted); }
.line__remove { justify-self: start; min-height: 44px; padding: 6px 0; border: 0; background: none; color: var(--green); font-size: 16px; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.line__total { min-width: 110px; font: 600 21px/1.2 var(--sans); white-space: nowrap; text-align: right; color: var(--deep); }
.cart__empty { padding-block: 28px; font-size: 20px; }
.cart__empty a { color: var(--green); font-weight: 600; }
.cart__back { display: inline-block; margin-top: 24px; }
.summary { display: grid; gap: 20px; padding: 32px; background: var(--paper); box-shadow: 0 0 0 1px var(--hair), 0 22px 40px -30px rgba(36, 64, 45, .45); }
.delivery { display: grid; gap: 10px; margin: 0; padding: 0; border: 0; }
.delivery legend { margin-bottom: 10px; padding: 0; font-size: 18px; font-weight: 600; }
.opt { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 14px 16px; border: 1.5px solid var(--hair); background: #fff; cursor: pointer; }
.opt input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--green); }
.opt span { display: grid; font-size: 16px; color: var(--muted); }
.opt strong { color: var(--ink); font-size: 17px; font-weight: 600; }
.opt b { font-weight: 600; }
.opt:has(input:checked) { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.sum { display: grid; gap: 8px; margin: 0; }
.sum div { display: flex; justify-content: space-between; gap: 12px; }
.sum dd { margin: 0; font-weight: 600; }
.sum__total { margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--hair); font: 600 22px/1.3 var(--sans); color: var(--deep); }
.summary__note, .summary__help { font-size: 16px; color: var(--muted); }
.summary__help a { color: var(--green); font-weight: 600; }

@media (max-width: 1180px) {
  .pgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cart { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1100px) {
  .buy__row { flex-direction: column; }
  .buy__row .qty { align-self: flex-start; }
}
@media (max-width: 900px) {
  .listing__head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pdp, .details { grid-template-columns: minmax(0, 1fr); }
  .help__in { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 560px) {
  .filters__label { width: 100%; }
  .filters__bar { flex-direction: column; align-items: flex-start; }
  .pgrid { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .ptile { display: grid; grid-template-columns: 124px minmax(0, 1fr); gap: 16px; }
  .ptile__img { margin: 0; align-self: start; }
  .ptile__img .mat { padding: 7px; }
  .ptile__name { font-size: 24px; }
  .ptile__notes, .ptile__meta { font-size: 15px; }
  .ptile .btn { min-height: 50px; padding: 0 12px; }
  .gallery__thumbs button { width: 80px; }
  .specs div { grid-template-columns: 120px minmax(0, 1fr); }
  .line { grid-template-columns: 92px minmax(0, 1fr) auto; gap: 12px 14px; }
  .line .qty { grid-column: 1 / 3; justify-self: start; }
  .line__info { grid-column: 2 / -1; }
  .line h2 { font-size: 24px; }
  .line__total { min-width: 0; font-size: 19px; }
  .summary { padding: 24px 18px; }
  .summary .btn { padding-inline: 12px; }
}
@media (max-width: 400px) {
  .ptile { grid-template-columns: 104px minmax(0, 1fr); }
}
