/* NeXCart shop — sits on top of styles.css and reuses its tokens. */

/* ---- header additions ---- */
.nav-links a.is-current {
  color: var(--brand);
  font-weight: 600;
}
.shop-cart-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--panel);
  font-size: 0.9rem;
  font-weight: 600;
  transition: border-color 0.15s ease;
}
.shop-cart-link:hover {
  border-color: var(--brand);
}
.shop-cart-link svg {
  width: 18px;
  height: 18px;
}
.shop-cart-link [data-cart-count] {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 0.75rem;
  line-height: 20px;
  text-align: center;
}
.nav-end {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ---- shared page furniture ---- */
.shop-main {
  padding: 8px 0 72px;
}
.shop-crumbs {
  margin: 28px 0 0;
  font-size: 0.85rem;
  color: var(--ink-faint);
}
.shop-crumbs a:hover {
  color: var(--brand);
}
.shop-h2 {
  margin: 22px 0 8px;
  font-size: 1rem;
}
.shop-empty {
  margin: 48px auto 0;
  max-width: 460px;
  padding: 44px 28px;
  text-align: center;
  background: var(--panel);
  border: 1px dashed var(--border);
  border-radius: 16px;
}
.shop-empty h2 {
  font-size: 1.25rem;
  margin-bottom: 6px;
}
.shop-empty p {
  color: var(--ink-dim);
  margin-bottom: 20px;
}
.shop-demo {
  margin: 20px 0 0;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--brand-tint);
  border: 1px solid #cfdcff;
  color: var(--ink);
  font-size: 0.88rem;
}
.shop-demo strong {
  color: var(--brand-dark);
}
.shop-block {
  display: flex;
  justify-content: center;
  width: 100%;
}
.shop-link {
  display: block;
  margin-top: 14px;
  text-align: center;
  font-size: 0.88rem;
  color: var(--brand);
  font-weight: 600;
}
.shop-note {
  margin-top: 18px;
  font-size: 0.85rem;
  color: var(--ink-dim);
}
.shop-note a {
  color: var(--brand);
  text-decoration: underline;
}

.shop-title {
  max-width: none;
  margin: 14px 0 0;
  font-size: clamp(1.6rem, 3.4vw, 2.1rem);
  letter-spacing: -0.03em;
  text-align: left;
}

/* ---- catalogue ---- */
.shop-hero {
  padding: 48px 0 8px;
}
.shop-hero h1 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  letter-spacing: -0.03em;
  /* styles.css centres and width-limits every h1 for the landing page hero;
     this one sits left-aligned with the text under it. */
  max-width: none;
  margin: 0 0 8px;
  text-align: left;
}
.shop-hero p {
  color: var(--ink-dim);
  max-width: 620px;
}
.shop-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 28px;
}
.shop-card {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition:
    box-shadow 0.2s ease,
    transform 0.2s ease;
}
.shop-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px -22px rgba(16, 22, 43, 0.35);
}
.shop-card-img {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  background: #fff;
  border-bottom: 1px solid var(--border);
}
/* Filled from the box rather than sized by the photo: the six photos differ
   by a few pixels in height, which made the cards fall out of line. */
.shop-card-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 14px;
}
.shop-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px 20px 20px;
}
.shop-card-colour {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  margin-bottom: 4px;
}
.shop-card h3 {
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.shop-card h3 a:hover {
  color: var(--brand);
}
.shop-card-short {
  flex: 1;
  font-size: 0.9rem;
  color: var(--ink-dim);
  margin-bottom: 16px;
}
.shop-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.shop-price {
  display: block;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.shop-per {
  display: block;
  font-size: 0.75rem;
  color: var(--ink-faint);
}

/* ---- product page ---- */
.shop-product {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
  margin-top: 24px;
  align-items: start;
}
.shop-product-img {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px;
}
.shop-product-img img {
  width: 100%;
  height: auto;
}
.shop-product-info h1 {
  font-size: clamp(1.6rem, 3.2vw, 2.2rem);
  letter-spacing: -0.03em;
  max-width: none;
  margin: 2px 0 10px;
  text-align: left;
}
.shop-product-info > p {
  color: var(--ink-dim);
}
.shop-product-price {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 14px;
}
.shop-product-price .shop-price {
  font-size: 1.7rem;
  color: var(--ink);
}
.shop-features {
  list-style: none;
  display: grid;
  gap: 8px;
}
.shop-features li {
  position: relative;
  padding-left: 26px;
  font-size: 0.93rem;
}
.shop-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--brand-tint)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E")
    center / 11px no-repeat;
}
.shop-buy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
}
.shop-buy .btn {
  padding: 12px 22px;
}

/* ---- quantity stepper ---- */
.shop-qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  overflow: hidden;
}
.shop-qty button {
  width: 40px;
  height: 42px;
  font-size: 1.1rem;
  color: var(--ink-dim);
  transition: background 0.15s ease;
}
.shop-qty button:hover {
  background: var(--brand-tint);
  color: var(--brand);
}
.shop-qty input,
.shop-qty span {
  width: 44px;
  text-align: center;
  font-weight: 600;
  font-size: 0.95rem;
  border: 0;
  background: transparent;
  outline: none;
}
.shop-qty--sm button {
  width: 32px;
  height: 34px;
}
.shop-qty--sm span {
  width: 34px;
}

/* ---- cart ---- */
.shop-checkout-grid[hidden] {
  display: none;
}
.shop-cart-grid,
.shop-checkout-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 28px;
  align-items: start;
  margin-top: 24px;
}
.shop-lines {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
}
.shop-line {
  display: grid;
  grid-template-columns: 84px 1fr auto 110px auto;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}
.shop-line:last-child {
  border-bottom: 0;
}
.shop-line-img {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.shop-line-img img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  padding: 4px;
}
.shop-line-info a {
  font-weight: 600;
  display: block;
}
.shop-line-info a:hover {
  color: var(--brand);
}
.shop-line-info span {
  font-size: 0.82rem;
  color: var(--ink-dim);
}
.shop-line-total {
  font-weight: 700;
  text-align: right;
}
.shop-remove {
  font-size: 0.82rem;
  color: var(--ink-faint);
  text-decoration: underline;
}
.shop-remove:hover {
  color: #dc2626;
}
.shop-summary,
.shop-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
}
.shop-summary {
  position: sticky;
  top: 88px;
}
.shop-summary h2,
.shop-panel h2 {
  font-size: 1.05rem;
  margin-bottom: 14px;
}
.shop-sum-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  font-size: 0.93rem;
}
.shop-sum-muted {
  color: var(--ink-dim);
  font-size: 0.85rem;
}
.shop-sum-total {
  margin: 8px 0 18px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
  font-size: 1.1rem;
  font-weight: 700;
}
.shop-sum-total strong {
  color: var(--brand-dark);
  font-size: 1.25rem;
}
.shop-sum-item {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  font-size: 0.88rem;
}
.shop-sum-item img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.shop-sum-item strong,
.shop-sum-item span {
  display: block;
}
.shop-sum-item span {
  color: var(--ink-dim);
  font-size: 0.8rem;
}

/* ---- checkout form ---- */
.shop-steps {
  display: flex;
  gap: 8px;
  margin: 26px 0 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-faint);
}
.shop-steps .is-on {
  color: var(--brand);
}
.shop-steps li {
  list-style: none;
}
.shop-steps li + li::before {
  content: "›";
  margin-right: 8px;
  color: var(--ink-faint);
}
.shop-stack {
  display: grid;
  gap: 22px;
}
.shop-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
}
.shop-field--full {
  grid-column: 1 / -1;
}
.shop-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.83rem;
  font-weight: 600;
}
.shop-field input,
.shop-field textarea {
  width: 100%;
  padding: 11px 13px;
  font: inherit;
  font-size: 0.93rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: none;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}
.shop-field input:focus,
.shop-field textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}
.shop-field.has-error input {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}
.shop-field input::placeholder {
  color: var(--ink-faint);
}
.shop-hint {
  margin-top: 5px;
  font-size: 0.78rem;
  color: var(--ink-faint);
}
.shop-error {
  min-height: 0;
  margin-top: 5px;
  font-size: 0.8rem;
  color: #dc2626;
}
.shop-error:empty {
  display: none;
}

/* payment method picker */
.shop-methods {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.shop-method {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 10px;
  text-align: center;
  background: #fff;
  border: 2px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    background 0.15s ease;
}
.shop-method:hover {
  border-color: #b7c9f5;
}
.shop-method.is-selected {
  border-color: var(--brand);
  background: var(--brand-tint);
}
.shop-method input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.shop-method img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}
.shop-method b {
  font-size: 0.88rem;
}
.shop-method small {
  font-size: 0.74rem;
  color: var(--ink-dim);
  line-height: 1.3;
}
.shop-pay-panel {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.shop-agree {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.85rem;
  color: var(--ink-dim);
}
.shop-agree input {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
}
.shop-agree a {
  color: var(--brand);
  text-decoration: underline;
}
.shop-pay-btn {
  width: 100%;
  justify-content: center;
  padding: 14px 20px;
  font-size: 1rem;
}
.shop-secure {
  margin-top: 10px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--ink-faint);
}

/* payment progress overlay */
.shop-locked {
  overflow: hidden;
}
.shop-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(16, 22, 43, 0.55);
  backdrop-filter: blur(4px);
}
.shop-overlay[hidden] {
  display: none;
}
.shop-overlay-box {
  width: 100%;
  max-width: 380px;
  padding: 36px 28px;
  text-align: center;
  background: var(--panel);
  border-radius: 20px;
  box-shadow: 0 30px 80px -20px rgba(16, 22, 43, 0.5);
}
.shop-spinner {
  width: 46px;
  height: 46px;
  margin: 0 auto 18px;
  border: 4px solid var(--brand-tint);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: shop-spin 0.8s linear infinite;
}
.shop-overlay.is-done .shop-spinner {
  border-color: var(--success);
  border-top-color: var(--success);
  animation: none;
}
.shop-overlay-box h2 {
  font-size: 1.15rem;
  margin-bottom: 6px;
}
.shop-overlay-box p {
  font-size: 0.9rem;
  color: var(--ink-dim);
}
@keyframes shop-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---- confirmation ---- */
.shop-confirm {
  max-width: 640px;
  margin: 40px auto 0;
  text-align: center;
}
.shop-tick {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: var(--success);
  color: #fff;
  box-shadow: 0 0 0 10px rgba(22, 163, 74, 0.14);
}
.shop-confirm h1 {
  font-size: 1.9rem;
  letter-spacing: -0.03em;
}
.shop-confirm-sub {
  margin: 6px 0 24px;
  color: var(--ink-dim);
}
.shop-receipt {
  padding: 24px;
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
}
.shop-receipt dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 20px;
  padding-bottom: 16px;
  margin-bottom: 8px;
  border-bottom: 1px dashed var(--border);
}
.shop-receipt dt {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}
.shop-receipt dd {
  font-weight: 600;
  word-break: break-word;
}
.shop-paid {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: #eaf7ef;
  color: var(--success);
  font-size: 0.82rem;
}
.shop-ship {
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}
.shop-ship h2 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  margin-bottom: 4px;
}
.shop-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 22px;
}

/* ---- toasts ---- */
.shop-toasts {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 200;
  display: grid;
  gap: 8px;
}
.shop-toast {
  max-width: 340px;
  padding: 12px 16px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--success);
  box-shadow: 0 14px 34px -14px rgba(16, 22, 43, 0.4);
  font-size: 0.88rem;
  font-weight: 500;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}
.shop-toast.is-in {
  opacity: 1;
  transform: none;
}
.shop-toast--error {
  border-left-color: #dc2626;
}
.shop-toast--warning {
  border-left-color: #d97706;
}

/* ---- responsive ---- */
@media (max-width: 960px) {
  .shop-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .shop-product,
  .shop-cart-grid,
  .shop-checkout-grid {
    grid-template-columns: 1fr;
  }
  .shop-summary {
    position: static;
  }
}
@media (max-width: 640px) {
  .shop-grid {
    grid-template-columns: 1fr;
  }
  .shop-fields,
  .shop-methods {
    grid-template-columns: 1fr;
  }
  .shop-line {
    grid-template-columns: 64px 1fr;
    row-gap: 10px;
  }
  .shop-line .shop-qty,
  .shop-line-total,
  .shop-remove {
    grid-column: 2;
    justify-self: start;
  }
  .shop-receipt dl {
    grid-template-columns: 1fr;
  }
  .nav-links {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .shop-card,
  .shop-toast {
    transition: none;
  }
  .shop-spinner {
    animation-duration: 2.4s;
  }
}

@media print {
  header,
  footer,
  .shop-actions,
  .shop-crumbs,
  .shop-toasts {
    display: none !important;
  }
  body {
    background: #fff;
  }
  .shop-receipt {
    border: 0;
    padding: 0;
  }
}
