:root {
  --shop-paper: #fbfaf7;
  --shop-surface: #ffffff;
  --shop-ink: #241f23;
  --shop-muted: #746d75;
  --shop-border: #e7e0dc;
  --shop-border-strong: #cfc6c2;
  --shop-primary: #d81a7f;
  --shop-primary-dark: #a9125f;
  --shop-blue: #1872c9;
  --shop-green: #1f8a63;
  --shop-shadow: 0 18px 45px rgba(36, 31, 35, .08);
}

[hidden] {
  display: none !important;
}

/* Visually hidden but available to screen readers (e.g. live loading status) */
.shop-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip-to-content — hidden until keyboard-focused */
.shop-skip-link {
  position: fixed;
  inset-inline-start: 12px;
  top: 12px;
  z-index: 1000;
  transform: translateY(-160%);
  border-radius: 8px;
  padding: 10px 16px;
  background: var(--shop-ink);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  transition: transform .15s ease;
}

.shop-skip-link:focus {
  transform: translateY(0);
  outline: 3px solid var(--shop-primary);
  outline-offset: 2px;
}

body {
  background:
    linear-gradient(180deg, #fff 0, #fff 120px, var(--shop-paper) 520px),
    var(--shop-paper);
  color: var(--shop-ink);
}

.shop-header {
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--shop-border);
  box-shadow: 0 10px 30px rgba(36, 31, 35, .04);
}

.shop-header .site-header__inner {
  min-height: 72px;
}

.shop-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--shop-ink);
  text-decoration: none;
  font-weight: 800;
}

.shop-brand__mark {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 8px;
  background: var(--shop-primary);
  color: #fff;
  font-weight: 900;
}

.shop-nav {
  display: flex;
  gap: 8px;
  align-items: center;
}

.shop-nav a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  border-radius: 8px;
  padding: 0 14px;
  color: var(--shop-ink);
  text-decoration: none;
  font-weight: 700;
}

.shop-cart-link {
  gap: 4px;
}

.cart-count {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--shop-primary);
  color: #fff;
  font-size: .78rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.shop-nav a:hover,
.shop-nav a:focus-visible {
  background: #f3eeeb;
}

.shop-nav a.is-active {
  background: #f4e7ee;
  color: var(--shop-primary-dark);
}

.shop-main {
  min-height: 70vh;
  padding: 34px 0 68px;
}

.shop-footer {
  border-top: 1px solid var(--shop-border);
  background: #fff;
  padding: 22px 0;
}

.shop-footer a,
.shop-back {
  color: var(--shop-primary-dark);
  font-weight: 800;
  text-decoration: none;
}

.shop-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
}

.shop-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
  color: var(--shop-muted);
  font-size: .92rem;
}

.shop-breadcrumb .shop-back {
  margin-bottom: 0;
}

.shop-breadcrumb a {
  color: var(--shop-primary-dark);
  font-weight: 800;
  text-decoration: none;
}

.shop-breadcrumb a:hover,
.shop-breadcrumb a:focus-visible {
  text-decoration: underline;
}

.shop-breadcrumb__sep {
  color: var(--shop-border-strong);
}

.shop-breadcrumb__current {
  color: var(--shop-ink);
  font-weight: 800;
}

.shop-back::before {
  content: "›";
  font-size: 1.3rem;
  line-height: 1;
}

.shop-page-head {
  max-width: 780px;
  margin: 0 0 30px;
}

.shop-page-head--compact {
  margin-bottom: 24px;
}

.shop-kicker {
  margin: 0 0 8px;
  color: var(--shop-primary-dark);
  font-size: .9rem;
  font-weight: 900;
  letter-spacing: 0;
}

.shop-page-head h1,
.product-header h1,
.confirm-panel h1 {
  margin: 0;
  color: var(--shop-ink);
  font-size: 2.25rem;
  line-height: 1.12;
  letter-spacing: 0;
}

.shop-page-head p:not(.shop-kicker),
.product-header p:not(.product-price),
.shop-status,
.shop-empty {
  color: var(--shop-muted);
  font-size: 1rem;
  line-height: 1.65;
}

.shop-status,
.shop-empty {
  margin: 12px 0 20px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-block: 16px 30px;
}

.product-card {
  position: relative;
  display: flex;
  min-height: 156px;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--shop-border);
  border-radius: 8px;
  padding: 18px;
  background: var(--shop-surface);
  color: inherit;
  text-decoration: none;
  box-shadow: 0 1px 0 rgba(36, 31, 35, .03);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.product-card:hover,
.product-card:focus-visible {
  border-color: rgba(216, 26, 127, .45);
  box-shadow: var(--shop-shadow);
  transform: translateY(-2px);
}

.product-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  background: #f1ece9;
}

.product-card__name {
  margin: 0;
  color: var(--shop-ink);
  font-size: 1.08rem;
  font-weight: 900;
  line-height: 1.35;
}

.product-card__price {
  color: var(--shop-primary-dark);
  font-size: .95rem;
  font-weight: 800;
}

.product-card__cta {
  display: inline-flex;
  width: fit-content;
  min-height: 34px;
  align-items: center;
  border: 1px solid var(--shop-border);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--shop-ink);
  font-size: .88rem;
  font-weight: 800;
}

.category-card {
  min-height: 170px;
}

.category-card__icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 8px;
  background: #f4e7ee;
  color: var(--shop-primary-dark);
  font-size: 1.35rem;
  font-weight: 900;
}

.category-stack {
  display: grid;
  gap: 30px;
}

.catalog-sub {
  padding-top: 18px;
  border-top: 1px solid var(--shop-border);
}

.catalog-sub__title {
  margin: 0 0 12px;
  color: var(--shop-ink);
  font-size: 1.25rem;
  font-weight: 900;
}

.shop-product {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 780px);
  gap: 34px;
  align-items: start;
}

.product-media {
  position: sticky;
  top: 94px;
  overflow: hidden;
  border: 1px solid var(--shop-border);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shop-shadow);
}

.product-media img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.product-media__fallback {
  display: grid;
  min-height: 320px;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(216, 26, 127, .12), rgba(24, 114, 201, .12)),
    #fff;
  color: var(--shop-primary-dark);
  font-size: 2rem;
  font-weight: 900;
}

.product-config {
  min-width: 0;
}

.product-header {
  padding-bottom: 22px;
  border-bottom: 1px solid var(--shop-border);
}

.product-header h1 {
  margin-bottom: 8px;
}

.product-header p:not(.product-price) {
  margin: 0;
}

.product-price {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  gap: 8px;
  margin: 18px 0 0;
  border: 1px solid var(--shop-border);
  border-radius: 8px;
  padding: 0 16px;
  background: #fff;
  color: var(--shop-ink);
  font-weight: 900;
}

.product-price span {
  color: var(--shop-primary-dark);
}

.option-form fieldset {
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--shop-border);
  padding: 24px 0;
}

.option-form legend {
  margin: 0 0 13px;
  padding: 0;
  color: var(--shop-muted);
  font-size: 1.02rem;
  font-weight: 900;
}

.opt-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, max-content));
  gap: 10px;
  align-items: stretch;
}

.opt-choice {
  position: relative;
  display: inline-grid;
  min-height: 58px;
  min-width: 150px;
  max-width: 260px;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--shop-border-strong);
  border-radius: 8px;
  padding: 10px 14px;
  background: #fff;
  color: var(--shop-ink);
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease, transform .15s ease;
}

.opt-choice:hover {
  border-color: var(--shop-primary);
}

.opt-choice:has(input:focus-visible) {
  border-color: var(--shop-primary);
  box-shadow: 0 0 0 3px rgba(216, 26, 127, .25);
}

.opt-choice:has(input:checked) {
  border-color: var(--shop-ink);
  box-shadow: inset 0 0 0 1px var(--shop-ink);
  background: #fffdfb;
}

.opt-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.opt-choice__label {
  min-width: 0;
  color: var(--shop-ink);
  font-weight: 900;
  line-height: 1.25;
}

.opt-choice__delta {
  color: var(--shop-muted);
  font-size: .92rem;
  font-weight: 800;
  white-space: nowrap;
}

.product-extras {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 24px 0 4px;
}

.product-extra {
  display: grid;
  gap: 9px;
  align-content: start;
  border: 1px solid var(--shop-border);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

.product-extra span,
.checkout-form label,
.checkout-form legend {
  color: var(--shop-ink);
  font-weight: 900;
}

.product-extra small {
  color: var(--shop-muted);
  line-height: 1.5;
}

.product-extra input[type="file"] {
  width: 100%;
  border: 1px dashed var(--shop-border-strong);
  border-radius: 8px;
  padding: 14px;
  background: #fbfaf8;
  color: var(--shop-muted);
}

.product-extra textarea,
.checkout-form input,
.checkout-form textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--shop-border-strong);
  border-radius: 8px;
  padding: 12px 14px;
  background: #fff;
  color: var(--shop-ink);
  font: inherit;
}

.product-extra textarea {
  min-height: 126px;
  resize: vertical;
}

.product-extra textarea:focus,
.product-extra input[type="file"]:focus,
.checkout-form input:focus,
.checkout-form textarea:focus {
  border-color: var(--shop-primary);
  outline: 3px solid rgba(216, 26, 127, .14);
}

.shop-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 18px;
}

.product-actions {
  position: sticky;
  bottom: 0;
  margin-top: 22px;
  border-top: 1px solid var(--shop-border);
  padding: 16px 0 4px;
  background: linear-gradient(180deg, rgba(251, 250, 247, .75), var(--shop-paper) 40%);
}

.form-error-banner {
  margin-top: 16px;
  border: 1px solid #e69ab9;
  border-radius: 8px;
  padding: 12px 14px;
  background: #fff4f8;
  color: #8a1247;
  font-weight: 800;
}

.field-error {
  color: #8a1247;
  font-size: .88rem;
  font-weight: 700;
}

.checkout-form input[aria-invalid="true"] {
  border-color: #c2185b;
  outline: 3px solid rgba(194, 24, 91, .12);
}

.cart-list {
  display: grid;
  gap: 12px;
  max-width: 920px;
  padding: 0;
  margin: 16px 0;
  list-style: none;
}

.cart-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--shop-border);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

.cart-line__info {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.cart-line__info strong {
  color: var(--shop-ink);
  font-size: 1.02rem;
}

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

.cart-line__name-link:hover,
.cart-line__name-link:focus-visible {
  color: var(--shop-primary-dark);
  text-decoration: underline;
}

.cart-line__meta {
  display: block;
  color: var(--shop-muted);
  font-size: .9rem;
  line-height: 1.45;
}

.cart-line__price {
  color: var(--shop-primary-dark);
  font-weight: 900;
  white-space: nowrap;
}

.cart-total {
  max-width: 920px;
  margin: 18px 0 0;
  border-top: 2px solid var(--shop-ink);
  padding-top: 14px;
  color: var(--shop-ink);
  font-size: 1.16rem;
  font-weight: 900;
}

.checkout-form {
  display: grid;
  gap: 16px;
  max-width: 640px;
  border: 1px solid var(--shop-border);
  border-radius: 8px;
  padding: 22px;
  background: #fff;
  box-shadow: var(--shop-shadow);
}

.checkout-form label {
  display: grid;
  gap: 8px;
}

.checkout-form fieldset {
  margin: 0;
  border: 0;
  padding: 0;
}

.checkout-form legend {
  margin-bottom: 8px;
}

.fulfilment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.fulfilment-grid label {
  min-height: 52px;
  align-items: center;
  border: 1px solid var(--shop-border-strong);
  border-radius: 8px;
  padding: 0 14px;
  background: #fbfaf8;
  font-weight: 800;
}

.fulfilment-grid label:has(input:checked) {
  border-color: var(--shop-ink);
  box-shadow: inset 0 0 0 1px var(--shop-ink);
  background: #fff;
}

.hp-field {
  position: absolute;
  left: -9999px;
}

.confirm-panel {
  max-width: 720px;
  border: 1px solid var(--shop-border);
  border-radius: 8px;
  padding: 28px;
  background: #fff;
  box-shadow: var(--shop-shadow);
}

.confirm-number {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 12px;
  border-radius: 8px;
  background: #eef8f3;
  padding: 6px 14px;
  color: var(--shop-green);
  font-weight: 900;
}

.confirm-copy {
  min-height: 32px;
  border: 1px solid var(--shop-green);
  border-radius: 6px;
  padding: 4px 12px;
  background: #fff;
  color: var(--shop-green);
  font-weight: 800;
  cursor: pointer;
}

.confirm-copy:hover,
.confirm-copy:focus-visible {
  background: #dff3ea;
}

.confirm-items,
.confirm-steps {
  border-top: 1px solid var(--shop-border);
  margin: 20px 0 0;
  padding-top: 16px;
}

.confirm-items {
  padding-inline-start: 20px;
}

.confirm-item__meta {
  display: block;
  color: var(--shop-muted, #6c6770);
}

/* Undo toast (cart removal) — non-focus-stealing, auto-dismissing */
.shop-toast {
  position: fixed;
  inset-inline: 0;
  bottom: 18px;
  z-index: 1000;
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  width: max-content;
  max-width: calc(100% - 32px);
  margin-inline: auto;
  border-radius: 10px;
  padding: 12px 16px;
  background: var(--shop-ink);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 12px 30px rgba(36, 31, 35, .25);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}

.shop-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.shop-toast__undo {
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  padding: 6px 14px;
  background: var(--shop-primary);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.shop-toast__undo:hover,
.shop-toast__undo:focus-visible {
  background: var(--shop-primary-dark);
}

/* Skeleton loaders — shown while catalog data is fetching */
.skeleton {
  position: relative;
  overflow: hidden;
  background: #efe9e5;
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .65), transparent);
  animation: shop-shimmer 1.2s infinite;
}

.skel-card {
  border: 1px solid var(--shop-border);
  border-radius: 8px;
  min-height: 156px;
  background: var(--shop-surface);
  box-shadow: none;
}

.skel-card::after {
  background: linear-gradient(90deg, transparent, rgba(36, 31, 35, .05), transparent);
}

/* Product-page skeleton (media + text bars) */
.skel-media {
  aspect-ratio: 1 / 1;
  border-radius: 8px;
}

.skel-line {
  height: 16px;
  margin: 0 0 12px;
  border-radius: 6px;
}

.skel-line--title {
  height: 30px;
  width: 70%;
  margin-bottom: 18px;
}

.skel-line--short {
  width: 50%;
}

.skel-line--price {
  height: 46px;
  width: 160px;
  margin-top: 18px;
}

@keyframes shop-shimmer {
  100% { transform: translateX(100%); }
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .shop-main *,
  .product-card,
  .opt-choice,
  .shop-skip-link,
  .shop-toast {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }

  .product-card:hover,
  .product-card:focus-visible {
    transform: none;
  }

  .skeleton::after {
    animation: none;
  }
}

/* Tabular figures keep prices from shifting width as digits change live */
.product-price,
.product-price span,
.product-card__price,
.opt-choice__delta,
.cart-line__price,
.cart-total,
.confirm-number {
  font-variant-numeric: tabular-nums;
}

/* Required-field marker (checkout) — matches the product page's "*" */
.checkout-form .req {
  color: var(--shop-primary-dark);
  font-weight: 900;
}

@media (max-width: 820px) {
  .shop-product {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .product-media {
    position: static;
    max-width: 420px;
  }

  .product-extras {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .shop-main {
    padding-top: 24px;
  }

  .shop-page-head h1,
  .product-header h1,
  .confirm-panel h1 {
    font-size: 1.75rem;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .opt-choice-grid {
    grid-template-columns: 1fr;
  }

  .opt-choice {
    width: 100%;
    max-width: none;
  }

  .cart-line {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .cart-line__price {
    justify-self: start;
  }

  .checkout-form,
  .confirm-panel {
    padding: 18px;
  }

  .fulfilment-grid {
    grid-template-columns: 1fr;
  }

  .shop-actions .btn {
    width: 100%;
  }

  .cart-actions {
    position: sticky;
    bottom: 0;
    margin-top: 16px;
    padding: 12px 0 10px;
    background: linear-gradient(180deg, rgba(251, 250, 247, 0), var(--shop-paper) 28%);
  }
}

/* Print: clean order confirmation (and any shop page) for save-as-PDF */
@media print {
  .shop-header,
  .shop-footer,
  .shop-skip-link,
  .shop-toast,
  .shop-breadcrumb,
  .confirm-copy,
  .confirm-panel .btn {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .shop-main {
    padding: 0;
  }

  .confirm-panel {
    border: 0;
    box-shadow: none;
    padding: 0;
  }

  .confirm-number {
    background: none;
    padding: 0;
  }
}
