/* product.css — single-product page: hero (photo + info), tabs, related. */

/* ============ PRODUCT DETAIL ============ */
.b3d-detail .b3d-crumbs {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--b3d-font-ui); font-weight: 500;
  font-size: 13px; color: var(--b3d-n-500);
  margin-bottom: 24px;
}
.b3d-detail .b3d-crumbs a { color: var(--b3d-ink-soft); }
.b3d-detail .b3d-crumbs a:hover { color: var(--b3d-ink); }
.b3d-detail .b3d-crumbs i { font-size: 9px; color: var(--b3d-n-400); }
.b3d-product {
  background: white;
  border: 1px solid var(--b3d-n-200);
  border-radius: 28px;
  overflow: hidden;
}
.b3d-product-hero { display: grid; grid-template-columns: 5fr 6fr; }
.b3d-product-hero > * { min-width: 0; }
.b3d-product-photo {
  position: relative; padding: 32px;
  background: var(--b3d-fleece-2);
  display: flex; align-items: center; justify-content: center;
  min-height: 480px;
  min-width: 0;
}
.b3d-product-photo img { width: 100%; height: 100%; object-fit: contain; max-height: 440px; }
.b3d-pins {
  position: absolute; top: 20px; left: 20px;
  display: flex; gap: 8px; flex-wrap: wrap; z-index: 2;
}
.b3d-pin {
  font-family: var(--b3d-font-ui); font-weight: 600;
  font-size: 11px; letter-spacing: 0.5px;
  padding: 5px 12px; border-radius: 999px;
  background: var(--b3d-fleece); color: var(--b3d-ink);
  display: inline-flex; align-items: center; gap: 6px;
  white-space: nowrap;
}
.b3d-pin-final { background: var(--b3d-success); color: white; }
.b3d-pin-new { background: var(--b3d-ink); color: var(--b3d-fleece); }
.b3d-product-info {
  padding: 40px; display: flex; flex-direction: column; gap: 14px;
  min-width: 0;
}
.b3d-product-host {
  font-family: var(--b3d-font-mono); font-size: 12px;
  color: var(--b3d-n-500);
}
.b3d-product-title {
  font-family: var(--b3d-font-title); font-weight: 700;
  font-size: 32px; line-height: 1.15;
  color: var(--b3d-ink); margin: 0;
  letter-spacing: -0.015em;
  overflow-wrap: anywhere; word-break: break-word;
}
.b3d-product-desc { font-size: 16px; color: var(--b3d-n-700); margin: 0; }
.b3d-product-price {
  font-family: var(--b3d-font-title); font-weight: 700;
  font-size: 36px; color: var(--b3d-ink); line-height: 1; margin-top: 8px;
}
.b3d-features {
  background: var(--b3d-fleece-2);
  border-radius: 14px; padding: 18px 22px; margin-top: 4px;
}
.b3d-features h4 {
  font-family: var(--b3d-font-ui); font-weight: 600;
  font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--b3d-n-500); margin: 0 0 10px;
}
.b3d-features ul { margin: 0; padding-left: 18px; font-size: 14.5px; line-height: 1.7; color: var(--b3d-ink-soft); }

.b3d-variations { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.b3d-variation-field {
  display: flex; flex-direction: column; gap: 6px;
  font-family: var(--b3d-font-ui); font-weight: 600;
  font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--b3d-n-500);
}
.b3d-variation-field select {
  font-family: var(--b3d-font-body); font-weight: 400; font-size: 15px; color: var(--b3d-ink);
  text-transform: none; letter-spacing: normal;
  background: white;
  border: 1px solid var(--b3d-n-300); border-radius: 10px;
  padding: 11px 14px;
  transition: border-color 150ms var(--b3d-ease);
}
.b3d-variation-field select:focus { border-color: var(--b3d-ink); outline: none; }
.b3d-variation-field select:focus-visible { outline: 2px solid var(--b3d-ink); outline-offset: 2px; }

.b3d-buy-row { display: flex; gap: 10px; align-items: stretch; margin-top: 6px; }
.b3d-buy-row .b3d-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.b3d-qty {
  display: inline-flex; align-items: center;
  border: 1px solid var(--b3d-n-300); border-radius: 999px;
  background: white;
  overflow: hidden;
}
.b3d-qty button {
  width: 42px; height: 100%;
  border: 0; background: transparent;
  font-size: 18px; color: var(--b3d-ink);
}
.b3d-qty button:hover { background: var(--b3d-fleece-2); }
.b3d-qty button:disabled { opacity: 0.35; cursor: not-allowed; background: transparent; }
.b3d-qty span {
  min-width: 32px; text-align: center;
  font-family: var(--b3d-font-mono); font-size: 14px; color: var(--b3d-ink);
}
.b3d-qty-sm button { width: 28px; font-size: 14px; }
.b3d-qty-sm span { min-width: 22px; font-size: 12px; }
.b3d-stock-note { margin: 8px 0 0; font-size: 13px; font-weight: 600; color: #8a6200; }

.b3d-manual-row { margin-top: 4px; display: flex; }
.b3d-marketplace-row {
  margin-top: 12px; padding-top: 20px;
  border-top: 1px solid var(--b3d-n-200);
  display: flex; flex-direction: column; gap: 12px;
}
.b3d-marketplace-label {
  font-family: var(--b3d-font-ui); font-weight: 600;
  font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--b3d-n-500);
}
.b3d-marketplace-btns { display: flex; flex-wrap: wrap; gap: 8px; }

/* Accordion */
.b3d-accord { border-top: 1px solid var(--b3d-n-200); }
.b3d-acc-item + .b3d-acc-item { border-top: 1px solid var(--b3d-n-200); }
.b3d-acc-head {
  width: 100%; text-align: left;
  background: transparent; border: 0;
  padding: 22px 40px;
  font-family: var(--b3d-font-title); font-weight: 600;
  font-size: 18px; color: var(--b3d-ink);
  display: flex; justify-content: space-between; align-items: center;
}
.b3d-acc-head:hover { background: var(--b3d-fleece-2); }
.b3d-acc-body { padding: 0 40px 28px; }
.b3d-spec, .b3d-rev { width: 100%; border-collapse: collapse; font-family: var(--b3d-font-mono); font-size: 13.5px; }
.b3d-spec tr + tr, .b3d-rev tr + tr { border-top: 1px solid var(--b3d-n-200); }
.b3d-spec th, .b3d-spec td, .b3d-rev th, .b3d-rev td { padding: 10px 14px; text-align: left; vertical-align: top; }
.b3d-spec th, .b3d-rev th { color: var(--b3d-n-500); font-weight: 500; }
.b3d-spec th { width: 220px; }
.b3d-rev th { font-family: var(--b3d-font-ui); text-transform: uppercase; font-size: 11px; letter-spacing: 1px; font-weight: 600; }
.b3d-rev td:first-child { font-weight: 500; color: var(--b3d-ink); width: 80px; }
.b3d-ship p { font-size: 14.5px; color: var(--b3d-n-600); margin: 0 0 10px; }

.b3d-related { margin-top: 64px; }
.b3d-related h2 {
  font-family: var(--b3d-font-title); font-weight: 700;
  font-size: 28px; color: var(--b3d-ink); margin: 0 0 24px;
  letter-spacing: -0.01em;
}
.b3d-related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

/* Tab overrides (replace design's accordion for detail tabs) */
.b3d-tabs { border-top: 1px solid var(--b3d-n-200); display: flex; gap: 4px; padding: 10px 24px 0; flex-wrap: wrap; }
.b3d-tab { background: transparent; border: 0; padding: 12px 18px; font-family: var(--b3d-font-ui); font-weight: 600; font-size: 13px; color: var(--b3d-n-600); border-bottom: 2px solid transparent; cursor: pointer; }
.b3d-tab:hover { color: var(--b3d-ink); }
.b3d-tab.active { color: var(--b3d-ink); border-bottom-color: var(--b3d-ink); }
.b3d-tabpanel { padding: 24px 40px 32px; }
.b3d-tabpanel[hidden] { display: none; }
/* The base reset makes links look like text; links inside product descriptions and tables need to read as links. */
.b3d-tabpanel a:not(.b3d-btn) { color: var(--b3d-ink); text-decoration: underline; text-underline-offset: 3px; }
.b3d-prose { font-family: var(--b3d-font-body); font-size: 16px; line-height: 1.7; color: var(--b3d-ink-soft); }
.b3d-prose h1, .b3d-prose h2, .b3d-prose h3 { font-family: var(--b3d-font-title); color: var(--b3d-ink); }

/* Gallery */
.b3d-product-photo { display: flex; flex-direction: column; gap: 16px; }
.b3d-product-photo-main { background: var(--b3d-fleece); border-radius: 14px; aspect-ratio: 4/3; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.b3d-product-photo-main img, .b3d-product-photo-main video, .b3d-product-photo-main iframe { max-width: 100%; max-height: 100%; width: 100%; height: 100%; object-fit: contain; border: 0; }
.b3d-product-photo-thumbs { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.b3d-product-thumb { flex: 0 0 72px; width: 72px; height: 72px; border: 1px solid var(--b3d-n-200); border-radius: 10px; background: white; padding: 0; overflow: hidden; display: grid; place-items: center; cursor: pointer; }
.b3d-product-thumb.active { border-color: var(--b3d-ink); }
.b3d-product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.b3d-product-thumb-play { font-size: 16px; color: var(--b3d-n-600); }

/* ============ LIGHTBOX ============ */
.b3d-product-photo-main { cursor: zoom-in; }

.b3d-lightbox-scrim {
    position: fixed; inset: 0;
    background: rgba(17, 17, 17, 0.9);
    z-index: 200;
}
.b3d-lightbox-scrim[hidden] { display: none; }

.b3d-lightbox {
    position: fixed; inset: 0;
    z-index: 201;
    display: flex; align-items: center; justify-content: center;
    padding: 48px 24px 72px;
}
.b3d-lightbox[hidden] { display: none; }

.b3d-lightbox-media {
    max-width: 100%; max-height: 100%;
    display: flex; align-items: center; justify-content: center;
}
.b3d-lightbox-media img {
    max-width: min(92vw, 1400px);
    max-height: calc(100vh - 120px);
    width: auto; height: auto;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.6);
    background: var(--b3d-fleece);
}
.b3d-lightbox-media video,
.b3d-lightbox-media iframe {
    width: min(92vw, 1100px);
    aspect-ratio: 16 / 9;
    border: 0;
    border-radius: 12px;
    background: #000;
}

.b3d-lightbox-close {
    position: fixed; top: 18px; right: 18px;
    width: 44px; height: 44px; border-radius: 50%;
    background: rgba(255, 255, 255, 0.12); color: white;
    border: 0; cursor: pointer;
    display: grid; place-items: center;
    font-size: 16px;
    backdrop-filter: blur(6px);
    transition: background 150ms var(--b3d-ease);
}
.b3d-lightbox-close:hover { background: rgba(255, 255, 255, 0.24); }

.b3d-lightbox-nav {
    position: fixed; top: 50%; transform: translateY(-50%);
    width: 52px; height: 52px; border-radius: 50%;
    background: rgba(255, 255, 255, 0.12); color: white;
    border: 0; cursor: pointer;
    display: grid; place-items: center;
    font-size: 18px;
    backdrop-filter: blur(6px);
    transition: background 150ms var(--b3d-ease);
}
.b3d-lightbox-nav:hover { background: rgba(255, 255, 255, 0.24); }
.b3d-lightbox-prev { left: 18px; }
.b3d-lightbox-next { right: 18px; }
.b3d-lightbox-nav[hidden] { display: none; }

.b3d-lightbox-counter {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
    font-family: var(--b3d-font-mono); font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(0, 0, 0, 0.35);
    padding: 6px 14px; border-radius: 999px;
    backdrop-filter: blur(6px);
}
.b3d-lightbox-counter[hidden] { display: none; }

@media (max-width: 640px) {
    .b3d-lightbox { padding: 56px 8px 64px; }
    .b3d-lightbox-close, .b3d-lightbox-nav { width: 40px; height: 40px; }
    .b3d-lightbox-prev { left: 8px; }
    .b3d-lightbox-next { right: 8px; }
}
