/* ==========================================================================
   D09 — Noor Kaya, illustration shop (demos/noor-kaya/index.html)
   Playful preset. Hero collage, filterable product grid, product dialog
   with options + loupe, cart drawer with EU digital-withdrawal consent.
   ========================================================================== */

.nk-section {
  margin-top: clamp(80px, 10vw, 144px);
}

/* ---- Shared controls ---------------------------------------------------- */

/* Row of toggle chips (filters, print options) */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  font-size: 15px;
  white-space: nowrap;
  cursor: pointer;
}

.chip[aria-pressed="true"] {
  background: var(--ink);
  color: var(--canvas);
}

/* Square close button (×) */
.icon-btn {
  flex: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  font-size: 20px;
  cursor: pointer;
}

/* Dimmed page behind dialogs */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(31, 27, 63, .4);
}

.overlay--light {
  background: rgba(31, 27, 63, .35);
}

/* ---- Hero --------------------------------------------------------------- */
.shop-hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  align-items: center;
  gap: 32px 56px;
  padding-top: clamp(24px, 4vw, 56px);
}

.shop-hero__copy {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.shop-hero__badge {
  align-self: flex-start;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--canvas);
  font-size: 14px;
  font-weight: 500;
  transform: rotate(-3deg);
}

.shop-hero__title {
  font-size: clamp(56px, 8vw, 136px);
  line-height: .92;
}

.shop-hero__lead {
  max-width: 26em;
  margin: 0;
  font-size: var(--t-lead);
}

.shop-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Tilted prints + round sticker */
.collage {
  position: relative;
  height: clamp(320px, 40vw, 520px);
}

.collage__print {
  position: absolute;
  padding: 10px;
}

.collage__print--back {
  left: 2%;
  top: 2%;
  width: 42%;
  transform: rotate(-5deg);
}

.collage__print--front {
  right: 2%;
  top: 16%;
  z-index: 1;
  width: 40%;
  transform: rotate(4deg);
}

.collage__sticker {
  position: absolute;
  left: 36%;
  bottom: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20%;
  aspect-ratio: 1;
  padding: 10px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-size: clamp(13px, 1.3vw, 17px);
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  transform: rotate(-10deg);
}

/* ---- Shop grid ---------------------------------------------------------- */
.shop {
  margin-top: clamp(64px, 8vw, 120px);
}

.shop__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 28px;
}

.shop__title {
  font-size: var(--t-h1);
}

.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: 36px 24px;
}

/* Product card (tilt and image ratio via --tilt / --ratio) */
.product {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transform: rotate(var(--tilt, 0deg));
}

.product__image {
  width: 100%;
  padding: 10px;
}

.product__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  width: 100%;
}

.product__name {
  font-size: 22px;
}

.product__price {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.product__meta {
  font-size: 14px;
  color: var(--muted);
}

/* ---- Product dialog ----------------------------------------------------- */
.pd {
  position: fixed;
  inset: clamp(0px, 4vw, 48px);
  z-index: 85;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 32px;
  padding: clamp(20px, 3vw, 40px);
  overflow: auto;
  border-radius: var(--radius);
  background: var(--canvas);
}

/* Image with riso-grain loupe */
.pd__image {
  position: relative;
  align-self: start;
  aspect-ratio: var(--ratio, 4/5);
  overflow: hidden;
  border-radius: var(--radius);
  background: repeating-linear-gradient(135deg, var(--ph) 0 10px, var(--ph-stripe) 10px 11px);
  filter: var(--img-filter);
  cursor: zoom-in;
}

.pd__image-label {
  position: absolute;
  left: 10px;
  bottom: 10px;
}

/* Lens position (--x/--y) and background offset (--bg-x/--bg-y) set by JS */
.pd__lens {
  position: absolute;
  left: var(--x, 0);
  top: var(--y, 0);
  width: 160px;
  height: 160px;
  margin: -80px 0 0 -80px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background:
    radial-gradient(rgba(0, 0, 0, .25) 1px, transparent 1.5px),
    repeating-linear-gradient(135deg, var(--ph) 0 25px, var(--ph-stripe) 25px 27.5px);
  background-size: 6px 6px, auto;
  background-position: 0 0, var(--bg-x, 0) var(--bg-y, 0);
  pointer-events: none;
}

.pd__info {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.pd__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.pd__name {
  font-size: clamp(32px, 3.5vw, 48px);
  line-height: 1;
}

.pd__meta {
  margin-top: 6px;
  color: var(--muted);
}

.pd__price {
  font-size: 36px;
  font-variant-numeric: tabular-nums;
}

/* Option groups take part in the column's gap directly */
.pd__group {
  display: contents;
}

.pd__note {
  font-size: 14px;
  color: var(--muted);
}

.pd__add {
  justify-content: center;
}

/* License picker (digital products) */
.licenses {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
  gap: 8px;
}

.license-option {
  min-height: 64px;
  padding: 12px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.license-option[aria-pressed="true"] {
  border-color: var(--ink);
}

.license-option__label {
  display: block;
  font-weight: 600;
}

.license-option__sub {
  display: block;
  font-size: 13px;
  color: var(--muted);
}

.reviews {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.reviews__by {
  font-size: 14px;
  color: var(--muted);
}

/* ---- Commissions -------------------------------------------------------- */
.commission {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  align-items: end;
  gap: 24px 48px;
  padding: clamp(28px, 5vw, 64px);
  border-radius: var(--radius);
  background: var(--sheet);
  color: var(--sheet-ink);
}

.commission__kicker {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--edge);
}

.commission__title {
  margin-top: 10px;
  font-size: clamp(40px, 5vw, 72px);
  line-height: .95;
}

.commission__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.commission__text {
  color: var(--sheet-muted);
}

/* ---- About -------------------------------------------------------------- */
.about {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  align-items: center;
  gap: 32px 64px;
}

.about__copy {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.about__title {
  font-size: var(--t-h2);
}

.about__text {
  margin: 0;
  color: var(--muted);
}

/* ---- Cart drawer -------------------------------------------------------- */
.cart {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 85;
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: min(440px, 100vw);
  padding: 28px;
  overflow: auto;
  background: var(--surface);
}

.cart__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart__title {
  font-size: 30px;
}

.cart__list {
  border-top: 1px solid var(--line);
}

.cart__empty {
  padding: 24px 0;
  color: var(--muted);
}

.cart-item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.cart-item__thumb {
  width: 56px;
  aspect-ratio: 1;
  border-radius: 8px;
  background: repeating-linear-gradient(135deg, var(--ph) 0 10px, var(--ph-stripe) 10px 11px);
  filter: var(--img-filter);
}

.cart-item__name {
  font-weight: 600;
}

.cart-item__opts {
  font-size: 13px;
  color: var(--muted);
}

.cart-item__price {
  font-size: 14px;
}

.cart-item__remove {
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--muted);
  text-decoration: underline;
  cursor: pointer;
}

/* Totals */
.totals {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.totals__row {
  display: flex;
  justify-content: space-between;
}

.totals__row--muted {
  color: var(--muted);
}

.totals__row--total {
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: 18px;
  font-weight: 600;
}

/* Digital download consent */
.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  font-size: 14px;
  cursor: pointer;
}

.consent--error {
  border-color: var(--error);
}

.consent__box {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  accent-color: var(--ink);
}

.cart__error {
  font-size: 14px;
  color: var(--error);
}

.cart__paid {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cart__paid-text {
  font-size: 15px;
}

.cart__checkout {
  justify-content: center;
}

.cart__legal {
  font-size: 13px;
  color: var(--muted);
}

/* ---- Footer tweak ------------------------------------------------------- */
.site-footer__label--form {
  margin-bottom: 6px;
}
