/* NEXUN product detail: source photography, clear choices and a persistent purchase path. */
.product-detail-view[hidden],
.product-detail-status:empty {
  display: none;
}

.product-detail-view {
  min-height: 60dvh;
  padding: 24px 0 64px;
  background: #f8fafc;
}

.product-breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin-bottom: 16px;
  color: #475467;
  font-size: 14px;
}

.product-back-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: #1d4ed8;
  font-weight: 750;
}

.product-back-button:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.product-detail-status {
  margin-bottom: 16px;
  padding: 12px 16px;
  border: 1px solid #d8e2f0;
  border-radius: 12px;
  background: #eef4ff;
  color: #273c66;
  font-size: 14px;
}

.product-detail-status.error {
  border-color: #f1c5c0;
  background: #fff4f2;
  color: #9f2015;
}

.product-sheet {
  overflow: hidden;
  border: 1px solid #dde4ed;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 16px 45px rgba(15, 23, 42, 0.07);
}

.product-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr) minmax(250px, 0.64fr);
  gap: 0;
  align-items: start;
}

.product-gallery {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 16px;
  min-width: 0;
  padding: 28px 24px 28px 28px;
  border-right: 1px solid #e5e9f0;
}

.product-gallery__main {
  position: relative;
  display: grid;
  grid-column: 2;
  grid-row: 1;
  place-items: center;
  min-width: 0;
  min-height: 440px;
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  background: #f8fafc;
  cursor: zoom-in;
}

.product-gallery__main:focus-visible {
  outline-offset: -4px;
}

.product-gallery__image {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 590px;
  aspect-ratio: 1;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.product-gallery__zoom {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(20, 28, 46, 0.9);
  color: #fff;
  font-size: 12px;
  font-weight: 750;
  pointer-events: none;
}

.product-gallery__thumbnails {
  display: flex;
  grid-column: 1;
  grid-row: 1;
  flex-direction: column;
  gap: 10px;
  max-height: 590px;
  margin: 0;
  overflow-y: auto;
  scrollbar-width: thin;
}

.product-gallery__thumbnails .import-thumbnail {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  border-color: #d6dee9;
  background: #fff;
}

.product-gallery__thumbnails .import-thumbnail[aria-current="true"] {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.13);
}

.product-gallery__note {
  grid-column: 1 / -1;
  margin-top: 2px;
  color: #667085;
  font-size: 12px;
  line-height: 1.5;
}

.product-summary {
  min-width: 0;
  padding: 30px 26px;
}

.product-source-line {
  margin-bottom: 8px;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 750;
}

.product-title {
  color: #172033;
  font-size: clamp(23px, 2.15vw, 31px);
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -0.025em;
  overflow-wrap: anywhere;
}

.product-rating {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 28px;
  margin-top: 12px;
  color: #475467;
  font-size: 14px;
}

.product-rating__stars {
  color: #9a6a13;
  letter-spacing: 1px;
}

.product-price-block {
  margin-top: 20px;
  padding: 18px 0;
  border-top: 1px solid #e5e9f0;
  border-bottom: 1px solid #e5e9f0;
}

.product-price {
  color: #0f172a;
  font-size: 30px;
  font-weight: 750;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.product-price-caption {
  margin-top: 5px;
  color: #667085;
  font-size: 12px;
  line-height: 1.5;
}

.product-availability {
  margin-top: 16px;
  color: #067647;
  font-size: 16px;
  font-weight: 750;
}

.product-availability.is-unavailable {
  color: #b42318;
}

.product-availability.is-pending {
  color: #475467;
}

.product-variants {
  display: grid;
  gap: 18px;
  margin-top: 22px;
}

.product-variant-group {
  min-width: 0;
  border: 0;
}

.product-variant-group legend {
  margin-bottom: 9px;
  color: #172033;
  font-size: 14px;
  font-weight: 750;
}

.product-variant-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.product-variant-option {
  min-height: 44px;
  max-width: 100%;
  padding: 9px 13px;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  background: #fff;
  color: #27364c;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
  overflow-wrap: anywhere;
  transition: border-color 0.16s ease-out, background-color 0.16s ease-out;
}

.product-variant-option:hover {
  border-color: #2563eb;
  background: #f5f8ff;
}

.product-variant-option[aria-pressed="true"] {
  border-color: #2563eb;
  background: #eef4ff;
  color: #173f9d;
  box-shadow: 0 0 0 1px #2563eb;
}

.product-variant-option:disabled {
  border-color: #e5e9f0;
  color: #98a2b3;
  cursor: not-allowed;
  text-decoration: line-through;
}

.product-manual-variants {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 22px;
}

.product-manual-variants label,
.product-quantity-control {
  color: #27364c;
  font-size: 13px;
  font-weight: 750;
}

.product-manual-variants input,
.product-quantity-control input {
  width: 100%;
  min-height: 46px;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  background: #fff;
  color: #172033;
}

.product-information {
  margin-top: 26px;
  color: #475467;
  font-size: 14px;
  line-height: 1.65;
}

.product-information h2 {
  margin-bottom: 10px;
  color: #172033;
  font-size: 17px;
}

.product-information ul {
  display: grid;
  gap: 8px;
  padding-left: 20px;
}

.product-information details {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #e5e9f0;
}

.product-information summary {
  min-height: 44px;
  color: #172033;
  font-weight: 750;
  cursor: pointer;
}

.product-description {
  margin-top: 10px;
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.product-purchase-panel {
  position: sticky;
  top: 102px;
  min-width: 0;
  margin: 24px;
  padding: 22px;
  border: 1px solid #d8e0eb;
  border-radius: 14px;
  background: #fff;
}

.product-purchase-panel .product-price {
  font-size: 27px;
}

.product-purchase-quantity {
  margin-top: 18px;
}

.product-purchase-actions {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.product-purchase-actions button {
  width: 100%;
  min-height: 48px;
  border-radius: 999px;
  font-size: 14px;
}

.product-add-button {
  border: 1px solid #cbb28d;
  background: #cbb28d;
  color: #141c2e;
}

.product-add-button:hover {
  border-color: #bda47d;
  background: #bda47d;
}

.product-add-button.import-added {
  border-color: #a6f4c5;
  background: #ecfdf3;
  color: #067647;
}

.product-cart-button {
  border: 1px solid #141c2e;
  background: #141c2e;
  color: #fff;
}

.product-cart-button:hover {
  background: #1e293b;
}

.product-fulfillment {
  display: grid;
  gap: 13px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid #e5e9f0;
}

.product-fulfillment__row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  color: #475467;
  font-size: 13px;
  line-height: 1.5;
}

.product-fulfillment__row svg {
  width: 20px;
  height: 20px;
  color: #2563eb;
}

.product-fulfillment__row strong {
  display: block;
  color: #27364c;
}

.product-source-meta {
  margin-top: 16px;
  color: #667085;
  font-size: 12px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.product-loading {
  min-height: 360px;
  display: grid;
  place-items: center;
  padding: 40px;
  color: #475467;
  text-align: center;
}

@media (max-width: 1100px) {
  .product-detail-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  }

  .product-purchase-panel {
    position: static;
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(160px, 0.55fr) minmax(220px, 0.8fr) minmax(260px, 1fr);
    gap: 20px;
    align-items: center;
  }

  .product-purchase-panel .product-price-block,
  .product-purchase-quantity,
  .product-purchase-actions,
  .product-fulfillment,
  .product-source-meta {
    margin-top: 0;
  }

  .product-purchase-panel .product-price-block {
    padding: 0;
    border: 0;
  }

  .product-fulfillment {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding-top: 18px;
  }
}

@media (max-width: 760px) {
  .product-detail-view {
    padding: 10px 0 36px;
  }

  .product-breadcrumb {
    margin-bottom: 6px;
  }

  .product-sheet {
    border-radius: 14px;
  }

  .product-detail-layout,
  .product-gallery {
    grid-template-columns: minmax(0, 1fr);
  }

  .product-gallery {
    gap: 12px;
    padding: 16px;
    border-right: 0;
    border-bottom: 1px solid #e5e9f0;
  }

  .product-gallery__main {
    grid-column: 1;
    grid-row: 1;
    min-height: 300px;
  }

  .product-gallery__image {
    max-height: 440px;
  }

  .product-gallery__thumbnails {
    grid-column: 1;
    grid-row: 2;
    flex-direction: row;
    max-height: none;
    padding: 2px 2px 6px;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .product-gallery__note {
    grid-column: 1;
  }

  .product-summary {
    padding: 22px 18px;
  }

  .product-title {
    font-size: 24px;
  }

  .product-purchase-panel {
    display: block;
    margin: 0 18px 20px;
    padding: 20px;
  }

  .product-purchase-panel .product-price-block {
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e9f0;
  }

  .product-purchase-quantity,
  .product-purchase-actions,
  .product-fulfillment,
  .product-source-meta {
    margin-top: 16px;
  }

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

@media (max-width: 420px) {
  .product-gallery__main {
    min-height: 270px;
  }

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

  .product-purchase-panel {
    margin-right: 12px;
    margin-left: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .product-variant-option {
    transition: none;
  }
}
