/* Digiknack Store — PDP layout tokens (Digiknack chrome) */
:root {
  --shop-ink: #e3dbcc;
  --shop-bg: #060606;
  --shop-muted: rgba(227, 219, 204, 0.55);
  --shop-line: rgba(227, 219, 204, 0.12);
  --shop-surface: #101010;
  --shop-black: #060606;
  --shop-beige: #e3dbcc;
  --shop-accent: #f2133c;
  --shop-accent-ink: #e3dbcc;
  --shop-radius: 12px;
  --shop-pad-x: 80px;
  --shop-pad-y: 36px;
  --shop-sticky-h: 66px;
  --shop-font: clother, sans-serif;
}

* {
  box-sizing: border-box;
}

html.shop-page,
body.shop-page {
  margin: 0;
  min-height: 100%;
  background: var(--shop-bg);
  color: var(--shop-ink);
  font-family: var(--shop-font);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.store-preview-frame {
  min-height: 100%;
  background: var(--shop-bg);
  color: var(--shop-ink);
  font-family: var(--shop-font);
  font-weight: 300;
}

.shop-page a,
.shop-shell a,
.store-preview-frame a {
  color: var(--shop-ink);
  text-decoration: none;
}

.shop-page a:hover,
.shop-shell a:hover,
.store-preview-frame a:hover {
  text-decoration: underline;
}

.shop-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(var(--shop-sticky-h) + var(--shop-pad-y) + 16px);
  background: var(--shop-bg);
}

.shop-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 18px var(--shop-pad-x);
  border-bottom: 1px solid var(--shop-line);
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(6, 6, 6, 0.96);
  backdrop-filter: blur(8px);
}

.shop-brand {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.shop-brand img {
  height: 16px;
  width: auto;
  max-width: 151px;
  object-fit: contain;
  display: block;
}

.shop-header__right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.shop-search {
  display: flex;
  align-items: center;
}

.shop-search__input {
  width: 160px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--shop-line);
  border-radius: 6px;
  background: var(--shop-surface);
  color: var(--shop-ink);
  font-family: var(--shop-font);
  font-size: 12px;
  font-weight: 400;
}

.shop-search__input::placeholder {
  color: var(--shop-muted);
}

.shop-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--shop-line);
  background: var(--shop-surface);
  color: var(--shop-beige);
  font-family: var(--shop-font);
  font-size: 11px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.shop-cart-link {
  font-size: 12px;
  font-weight: 400;
  color: var(--shop-ink);
  text-decoration: none;
  white-space: nowrap;
}

.shop-cart-link:hover {
  color: var(--shop-accent);
  text-decoration: none;
}

.shop-main {
  width: 100%;
  margin: 0;
  padding: 0;
  flex: 1;
}

.shop-main:has(> .pdp) {
  width: 100%;
  max-width: none;
  padding: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.shop-msg {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  color: var(--shop-muted);
}

.shop-msg.is-error {
  color: #ff8a8a;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}

.shop-card {
  display: block;
  color: inherit;
}

.shop-card__media {
  aspect-ratio: 1;
  background: var(--shop-surface);
  border-radius: var(--shop-radius);
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.shop-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.shop-card__title {
  margin: 0 0 0.2rem;
  font-size: 1rem;
  font-weight: 700;
}

.shop-card__price {
  margin: 0;
  color: var(--shop-muted);
  font-size: 0.95rem;
}

/* ——— PDP ——— */
.pdp {
  width: 100%;
  margin: 0 auto;
  padding: var(--shop-pad-y) var(--shop-pad-x);
  box-sizing: border-box;
}

.pdp--preview {
  padding-top: var(--shop-pad-y);
}

.pdp-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 400;
  color: var(--shop-muted);
  line-height: 1.3;
}

.pdp-crumbs a {
  color: var(--shop-muted);
  text-decoration: none;
}

.pdp-crumbs a:hover {
  color: var(--shop-accent);
  text-decoration: none;
}

.pdp-crumbs__sep {
  color: rgba(227, 219, 204, 0.25);
}

.pdp-crumbs__current {
  color: var(--shop-ink);
}

.pdp-hero {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem 1.5rem;
  margin: 0 0 20px;
}

.pdp-hero__copy {
  flex: 1 1 16rem;
  min-width: 0;
  max-width: 40rem;
}

.pdp-title {
  margin: 0;
  font-family: var(--shop-font);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.25;
  text-transform: none;
  color: var(--shop-ink);
}

.pdp-sub {
  margin: 0.35rem 0 0;
  color: var(--shop-muted);
  font-size: 13px;
  line-height: 1.45;
  font-weight: 300;
}

.pdp-hero__price {
  flex: 0 0 auto;
  text-align: right;
}

.pdp-price {
  margin: 0;
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.25;
}

.pdp-gallery {
  margin: 0 0 1.5rem;
}

.pdp-gallery__row {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 12px;
  width: 100%;
  height: clamp(220px, 28vw, 380px);
  overflow: hidden;
}

.pdp-gallery__tile {
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 12px;
  overflow: hidden;
  background: #101010;
  cursor: pointer;
  box-sizing: border-box;
}

.pdp-gallery__tile--hero {
  flex: 1 1 auto;
  width: 100%;
  cursor: zoom-in;
}

.pdp-gallery__tile--empty {
  cursor: default;
  pointer-events: none;
  border: 1px solid var(--shop-line);
}

.pdp-gallery__tile--empty.pdp-gallery__tile--hero {
  flex: 2.15 1 0;
}

.pdp-gallery__tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pdp-gallery__tile:hover:not(.pdp-gallery__tile--empty):not(.pdp-gallery__tile--hero) {
  outline: 1px solid rgba(242, 19, 60, 0.35);
  outline-offset: -1px;
}

.pdp-gallery__hero {
  position: relative;
  flex: 2.15 1 0;
  min-width: 0;
  height: 100%;
  display: flex;
}

.pdp-gallery__last {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  display: flex;
}

.pdp-gallery__last .pdp-gallery__tile {
  flex: 1 1 auto;
  width: 100%;
}

.pdp-gallery__show {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid rgba(227, 219, 204, 0.35);
  border-radius: 12px;
  background: #060606;
  color: #e3dbcc;
  font-family: var(--shop-font);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  white-space: nowrap;
}

.pdp-gallery__show:hover {
  color: var(--shop-accent);
  border-color: rgba(242, 19, 60, 0.45);
}

.pdp-gallery__show-icon {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  display: inline-block;
  background:
    linear-gradient(currentColor, currentColor) 0 0 / 4px 4px no-repeat,
    linear-gradient(currentColor, currentColor) 8px 0 / 4px 4px no-repeat,
    linear-gradient(currentColor, currentColor) 0 8px / 4px 4px no-repeat,
    linear-gradient(currentColor, currentColor) 8px 8px / 4px 4px no-repeat;
  color: inherit;
}

/* DigiknackTabs — sticky + scroll-spy on PDP (alias .crm-lead-tabs) */
.pdp .dk-tabs.pdp-tabs,
.pdp .crm-lead-tabs.pdp-tabs,
.pdp .dk-tabs,
.pdp .crm-lead-tabs {
  position: sticky;
  top: 0;
  z-index: 15;
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  gap: 0 20px;
  margin: 0 0 1.5rem;
  padding: 0;
  border-bottom: 1px solid var(--shop-line);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  background: var(--shop-bg);
}

.pdp .dk-tabs::-webkit-scrollbar,
.pdp .crm-lead-tabs::-webkit-scrollbar {
  display: none;
}

.pdp .dk-tabs__btn,
.pdp .crm-lead-tabs__btn {
  margin: 0 0 -1px;
  padding: 8px 2px 11px;
  border: none;
  border-radius: 0;
  border-bottom: 1.5px solid transparent;
  background: transparent;
  color: var(--shop-muted);
  font-family: var(--shop-font);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.02em;
  cursor: pointer;
  white-space: nowrap;
  flex: 0 0 auto;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.pdp .dk-tabs__btn:hover,
.pdp .crm-lead-tabs__btn:hover {
  color: var(--shop-ink);
}

.pdp .dk-tabs__btn.is-active,
.pdp .crm-lead-tabs__btn.is-active {
  color: var(--shop-ink);
  border-bottom-color: var(--shop-accent);
}

.pdp-sections {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.pdp-sec {
  margin: 0 0 2.75rem;
  scroll-margin-top: 52px;
}

.pdp-sec:last-child {
  margin-bottom: 1rem;
}

.pdp-sec__title {
  margin: 0 0 1rem;
  font-family: var(--shop-font);
  font-size: 18px;
  font-weight: 400;
  color: var(--shop-ink);
  letter-spacing: 0;
  line-height: 1.25;
}

.pdp-sec__body {
  min-width: 0;
  color: var(--shop-ink);
}

.pdp-tab-body {
  min-height: 0;
  margin: 0 0 1rem;
  color: var(--shop-ink);
  padding-top: 0;
}

.pdp-section {
  max-width: 52rem;
}

.pdp-prose {
  white-space: pre-wrap;
  line-height: 1.65;
  font-size: 0.98rem;
  color: rgba(227, 219, 204, 0.88);
}

.pdp-section__block {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--shop-line);
}

.pdp-section__heading {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 700;
}

.pdp-empty {
  margin: 0;
  color: var(--shop-muted);
  font-size: 0.95rem;
}

.pdp-spec-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem 1.5rem;
}

.pdp-spec__label {
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.pdp-spec__value {
  font-size: 0.9rem;
  color: rgba(227, 219, 204, 0.75);
  line-height: 1.45;
  white-space: pre-wrap;
}

.pdp-colors {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-width: 28rem;
}

.pdp-color-row {
  display: grid;
  grid-template-columns: 1.5rem 1fr auto;
  gap: 0.75rem;
  align-items: center;
}

.pdp-color-row__swatch {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 3px;
  background: #c8c8c8;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.pdp-color-row__name {
  font-size: 0.95rem;
}

.pdp-color-row__meta {
  font-size: 0.85rem;
  color: var(--shop-muted);
}

.pdp-packages {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.25rem;
}

.pdp-package {
  width: 7.5rem;
}

.pdp-package__box {
  width: 100%;
  aspect-ratio: 1;
  background: var(--shop-surface);
  border-radius: 4px;
  margin-bottom: 0.45rem;
}

.pdp-package__meta {
  font-size: 0.8rem;
  line-height: 1.35;
  color: rgba(227, 219, 204, 0.75);
}

.pdp-package__qty {
  font-weight: 700;
}

.pdp-docs {
  margin: 0;
  padding-left: 1.1rem;
  line-height: 1.7;
}

.pdp-sticky {
  position: fixed;
  left: var(--shop-pad-x);
  right: var(--shop-pad-x);
  bottom: var(--shop-pad-y);
  z-index: 30;
  min-height: var(--shop-sticky-h);
  padding: 12px;
  background: var(--shop-surface);
  border: 1px solid var(--shop-line);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  box-sizing: border-box;
}

.pdp-sticky__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 42px;
}

.pdp-sticky__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1 1 auto;
  min-width: 0;
}

.pdp-sticky__k {
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--shop-muted);
  font-weight: 400;
}

.pdp-sticky__v {
  font-size: 12px;
  font-weight: 400;
  color: var(--shop-ink);
}

.pdp-sticky__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.pdp-swatches {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  align-items: center;
}

.pdp-swatch {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 2px solid transparent;
  outline: 1px solid rgba(0, 0, 0, 0.12);
  cursor: pointer;
  padding: 0;
  background: #888;
}

.pdp-swatch.is-active {
  border-color: var(--shop-beige);
  outline-color: transparent;
}

.pdp-swatch--label {
  width: auto;
  min-width: 28px;
  padding: 0 0.45rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--shop-beige);
  background: var(--shop-surface);
}

.shop-btn {
  appearance: none;
  border: 0;
  background: var(--shop-accent);
  color: var(--shop-accent-ink);
  font-family: var(--shop-font);
  font-size: 12px;
  font-weight: 400;
  padding: 0.85rem 1.5rem;
  cursor: pointer;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 12px;
  white-space: nowrap;
}

.shop-btn--atc {
  width: 132px;
  height: 42px;
  min-width: 132px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 12px;
  background: var(--shop-accent);
  color: var(--shop-beige);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.shop-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.shop-btn--ghost {
  background: transparent;
  border: 1px solid var(--shop-line);
  color: var(--shop-ink);
  text-transform: none;
  letter-spacing: 0;
}

/* Gallery lightbox — Digiknack CRM chrome */
.pdp-lightbox {
  position: fixed;
  inset: 0;
  z-index: 13000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2.5rem 1rem 1rem;
  background: rgba(6, 6, 6, 0.94);
}

body.pdp-lightbox-open {
  overflow: hidden;
}

.pdp-lightbox__stage {
  margin: 0;
  max-width: min(960px, 92vw);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
}

.pdp-lightbox__stage img {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 12px;
  background: #101010;
  border: 1px solid rgba(227, 219, 204, 0.12);
}

.pdp-lightbox__count {
  font-family: var(--shop-font);
  font-size: 12px;
  font-weight: 400;
  color: rgba(227, 219, 204, 0.55);
  letter-spacing: 0.04em;
}

.pdp-lightbox__close {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  border: 1px solid rgba(227, 219, 204, 0.35);
  border-radius: 12px;
  background: #060606;
  color: #e3dbcc;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.45rem 0.65rem;
}

.pdp-lightbox__close:hover {
  color: var(--shop-accent);
  border-color: rgba(242, 19, 60, 0.45);
}

.pdp-lightbox__nav {
  border: 1px solid rgba(227, 219, 204, 0.35);
  background: #060606;
  color: #e3dbcc;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 12px;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.pdp-lightbox__nav:hover {
  color: var(--shop-accent);
  border-color: rgba(242, 19, 60, 0.45);
  background: #060606;
}

.cart-table {
  width: 100%;
  border-collapse: collapse;
}

.cart-table th,
.cart-table td {
  text-align: left;
  padding: 0.75rem 0.35rem;
  border-bottom: 1px solid var(--shop-line);
  vertical-align: middle;
}

.cart-table img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  background: var(--shop-surface);
  border-radius: 4px;
}

.cart-summary {
  margin-top: 1.5rem;
  max-width: 420px;
  margin-left: auto;
}

.cart-summary label {
  display: block;
  margin-bottom: 0.75rem;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--shop-muted);
}

.cart-summary input,
.cart-summary select,
.cart-summary textarea {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--shop-line);
  background: var(--shop-surface);
  color: var(--shop-ink);
  font: inherit;
}

.cart-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1rem;
}

.order-confirm h1 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

@media (max-width: 900px) {
  :root {
    --shop-pad-x: 32px;
  }

  .pdp-spec-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  :root {
    --shop-pad-x: 16px;
    --shop-pad-y: 24px;
  }

  .shop-header {
    padding-left: var(--shop-pad-x);
    padding-right: var(--shop-pad-x);
  }

  .shop-search__input {
    width: 110px;
  }

  .pdp-gallery__row {
    height: clamp(160px, 42vw, 260px);
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .pdp-gallery__hero {
    flex: 1.65 1 0;
    min-width: 42%;
  }

  .pdp-gallery__tile {
    min-width: 28%;
  }

  .pdp-spec-grid {
    grid-template-columns: 1fr 1fr;
  }

  .pdp-sticky__inner {
    flex-wrap: wrap;
  }

  .pdp-sticky__actions {
    margin-left: auto;
  }

  .shop-btn--atc {
    width: 132px;
  }
}
