/* ============================================================
   DOG JOKES COMIC — Product Page Styles
   ============================================================ */

/* ── BREADCRUMB ─────────────────────────────────────────── */
.breadcrumb {
  max-width: var(--max-w); margin: 0 auto;
  padding: 16px 48px 0;
  font-size: 13px; font-weight: 600; color: var(--gray-500);
  display: flex; align-items: center; gap: 8px;
}
.breadcrumb a { color: var(--gray-500); text-decoration: none; }
.breadcrumb a:hover { color: var(--black); }

/* ── PRODUCT LAYOUT ─────────────────────────────────────── */
.product-section { background: var(--white); padding: 32px 0 64px; }
.product-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 48px;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 64px; align-items: start;
}

/* ── GALLERY ────────────────────────────────────────────── */
.product-gallery { position: sticky; top: calc(var(--nav-h) + 16px); }

.gallery-hero {
  position: relative;
  width: 100%; aspect-ratio: 1/1;
  background: var(--gray-100); border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.gallery-hero img,
.gallery-hero video {
  width: 100%; height: 100%;
  object-fit: contain; display: block;
  border-radius: var(--radius-lg);
}
.gallery-hero model-viewer {
  width: 100%; height: 100%; border-radius: var(--radius-lg);
}

/* arrows on hero */
.gallery-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 10;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,.9);
  border: 1.5px solid rgba(0,0,0,.1);
  box-shadow: var(--shadow);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background .15s, transform .15s;
  color: var(--black);
}
.gallery-arrow:hover { background: #fff; transform: translateY(-50%) scale(1.08); }
.gallery-arrow svg { width: 18px; height: 18px; }
.gallery-arrow-prev { left: 12px; }
.gallery-arrow-next { right: 12px; }

/* thumbnail strip */
.gallery-thumbs {
  display: flex; gap: 8px;
  margin-top: 12px;
  overflow-x: auto; padding-bottom: 4px;
  scrollbar-width: none;
}
.gallery-thumbs::-webkit-scrollbar { display: none; }
.gallery-thumb {
  flex-shrink: 0;
  width: 72px; height: 72px; border-radius: 10px;
  background: var(--gray-100); overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color .15s, transform .15s;
}
.gallery-thumb:hover { transform: translateY(-2px); }
.gallery-thumb.active { border-color: var(--black); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-thumb-icon {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; color: var(--gray-500);
}

/* ── PRODUCT INFO ───────────────────────────────────────── */
.product-info { padding-top: 8px; }

/* labels */
.product-labels { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.label-tag {
  display: inline-flex; align-items: center;
  padding: 4px 12px; border-radius: 100px;
  font-size: 11px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase;
}
.label-new       { background: var(--yellow); color: var(--black); }
.label-sale      { background: #e63946; color: #fff; }
.label-limited   { background: var(--black); color: var(--white); }
.label-sold-out  { background: var(--gray-200); color: var(--gray-700); }
.label-coming-soon { background: var(--gray-100); color: var(--gray-700); border: 1.5px solid var(--gray-200); }

/* name */
.product-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(36px, 4vw, 56px);
  letter-spacing: .5px; line-height: 1;
  margin-bottom: 16px;
}

/* pricing */
.product-pricing {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 16px;
}
.product-price {
  font-size: 32px; font-weight: 800; line-height: 1;
}
.product-price-orig {
  font-size: 20px; font-weight: 700;
  color: var(--gray-500); text-decoration: line-through;
}
.product-save-badge {
  background: #e63946; color: #fff;
  font-size: 11px; font-weight: 800; letter-spacing: .5px;
  padding: 3px 10px; border-radius: 100px; text-transform: uppercase;
}

/* blurb */
.product-blurb {
  font-size: 15px; color: var(--gray-700); line-height: 1.7;
  margin-bottom: 24px;
}

/* variants */
.product-variants { margin-bottom: 24px; }
.variant-group { margin-bottom: 16px; }
.variant-group-label {
  font-size: 12px; font-weight: 800; letter-spacing: .5px;
  text-transform: uppercase; color: var(--gray-700);
  margin-bottom: 10px; display: flex; align-items: center; gap: 8px;
}
.variant-group-label .selected-val {
  font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--black);
}
.variant-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.variant-pill {
  padding: 7px 18px; border-radius: 100px;
  border: 2px solid var(--gray-200);
  font-size: 13px; font-weight: 700;
  cursor: pointer; background: var(--white); color: var(--black);
  transition: border-color .15s, background .15s;
  user-select: none;
}
.variant-pill:hover { border-color: var(--black); }
.variant-pill.active { border-color: var(--black); background: var(--black); color: var(--white); }
.variant-pill.sold-out { opacity: .4; cursor: not-allowed; text-decoration: line-through; }
/* swatch variant (color circles) */
.variant-swatch {
  width: 32px; height: 32px; border-radius: 50%;
  border: 3px solid transparent; outline: 2px solid transparent;
  cursor: pointer; transition: outline-color .15s;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.12);
}
.variant-swatch.active { outline-color: var(--black); outline-offset: 2px; }

/* qty */
.product-qty-row {
  display: flex; align-items: center; gap: 16px; margin-bottom: 16px;
}
.qty-label { font-size: 13px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; color: var(--gray-700); }
.qty-stepper {
  display: flex; align-items: center;
  border: 2px solid var(--gray-200); border-radius: var(--radius-sm);
  overflow: hidden;
}
.qty-btn {
  width: 40px; height: 40px; border: none; background: none;
  font-size: 20px; font-weight: 700; cursor: pointer; color: var(--black);
  transition: background .12s;
}
.qty-btn:hover { background: var(--gray-100); }
#qty-input {
  width: 52px; height: 40px; border: none;
  text-align: center; font-family: 'Nunito', sans-serif;
  font-size: 15px; font-weight: 700;
  appearance: textfield; -moz-appearance: textfield;
  outline: none; background: var(--white);
}
#qty-input::-webkit-outer-spin-button,
#qty-input::-webkit-inner-spin-button,
#qty-std-input::-webkit-outer-spin-button,
#qty-std-input::-webkit-inner-spin-button { -webkit-appearance: none; }
#qty-std-input {
  width: 52px; border: none;
  text-align: center; font-family: 'Nunito', sans-serif;
  font-size: 15px; font-weight: 700;
  appearance: textfield; -moz-appearance: textfield;
  outline: none; background: var(--white);
}

/* CTAs */
.product-ctas { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }

/* trust row */
.product-trust {
  display: flex; gap: 16px; flex-wrap: wrap;
  font-size: 12px; font-weight: 700; color: var(--gray-500);
  padding-top: 16px; border-top: 1px solid var(--gray-200);
}

/* ── DESCRIPTION TABS ───────────────────────────────────── */
.product-desc-section { border-top: 1px solid var(--gray-200); }
.desc-tabs {
  display: flex; gap: 0;
  border-bottom: 2px solid var(--gray-200);
  margin-bottom: 32px;
}
.desc-tab {
  padding: 12px 24px; cursor: pointer;
  font-size: 14px; font-weight: 700;
  color: var(--gray-500);
  border-bottom: 3px solid transparent; margin-bottom: -2px;
  transition: color .15s, border-color .15s;
  background: none; border-top: none; border-left: none; border-right: none;
  font-family: 'Nunito', sans-serif;
}
.desc-tab:hover { color: var(--black); }
.desc-tab.active { color: var(--black); border-bottom-color: var(--black); }
.desc-panel { display: none; }
.desc-panel.active { display: block; }
.desc-panel p {
  font-size: 15px; color: var(--gray-700); line-height: 1.8;
  margin-bottom: 16px; max-width: 680px;
}
.desc-panel p:last-child { margin-bottom: 0; }

/* ── REVIEWS ────────────────────────────────────────────── */
.reviews-header {
  display: flex; justify-content: space-between;
  align-items: flex-end; flex-wrap: wrap; gap: 20px;
  margin-bottom: 36px;
}
.reviews-summary { text-align: right; }
.reviews-avg { font-family: 'Bebas Neue', sans-serif; font-size: 48px; line-height: 1; }
.reviews-stars { font-size: 22px; letter-spacing: 2px; }
.reviews-count { font-size: 13px; color: var(--gray-500); font-weight: 600; display: block; margin-top: 2px; }

.reviews-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.review-card {
  background: var(--white); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}
.review-stars { font-size: 16px; letter-spacing: 1px; margin-bottom: 10px; }
.review-text { font-size: 14px; color: var(--gray-700); line-height: 1.65; margin-bottom: 14px; }
.review-meta { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.review-author { font-size: 13px; font-weight: 800; }
.review-date { font-size: 12px; color: var(--gray-500); font-weight: 600; }
.review-photo { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius-sm); margin-bottom: 12px; }

/* ── BUYER PHOTOS ───────────────────────────────────────── */
.ugc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.ugc-item {
  position: relative; border-radius: var(--radius); overflow: hidden;
  cursor: pointer; aspect-ratio: 1/1;
  background: var(--gray-200);
}
.ugc-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.ugc-item:hover img { transform: scale(1.04); }
.ugc-author {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.6));
  color: #fff; font-size: 11px; font-weight: 700;
  padding: 24px 10px 8px;
  opacity: 0; transition: opacity .2s;
}
.ugc-item:hover .ugc-author { opacity: 1; }

/* ── RELATED PRODUCTS ───────────────────────────────────── */
.related-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.related-card {
  display: block; text-decoration: none; color: var(--black);
  background: var(--white); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  transition: box-shadow .2s, transform .2s;
}
.related-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.related-img {
  width: 100%; aspect-ratio: 1/1;
  object-fit: cover; display: block;
  background: var(--gray-100);
}
.related-info { padding: 14px 16px 16px; }
.related-name { font-family: 'Bebas Neue', sans-serif; font-size: 18px; margin-bottom: 4px; }
.related-price { font-size: 15px; font-weight: 800; }

/* ── LIGHTBOX ───────────────────────────────────────────── */
.lightbox {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.88);
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
}
.lightbox[hidden] { display: none; }
.lightbox-close {
  position: absolute; top: 20px; right: 24px;
  background: none; border: none; color: #fff;
  font-size: 28px; cursor: pointer; line-height: 1;
  transition: transform .15s;
}
.lightbox-close:hover { transform: scale(1.2); }
.lightbox-content img {
  max-width: 90vw; max-height: 85vh;
  border-radius: var(--radius); object-fit: contain;
}

/* ── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .product-inner { grid-template-columns: 1fr; gap: 32px; }
  /* min-width:0 lets grid items shrink below their min-content size
     (without it, flex children like gallery-thumbs inflate the column) */
  .product-gallery { position: static; min-width: 0; }
  .product-info { min-width: 0; }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
  .reviews-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .breadcrumb { padding: 12px 20px 0; }
  .product-inner { padding: 0 20px; }
  .product-trust { gap: 10px; }
  .ugc-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .related-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .reviews-header { flex-direction: column; align-items: flex-start; }
  .reviews-summary { text-align: left; }

  /* ── Description tabs: equal-width flex so they don't overflow ── */
  .desc-tabs { overflow-x: auto; scrollbar-width: none; }
  .desc-tabs::-webkit-scrollbar { display: none; }
  .desc-tab { flex: 1; padding: 10px 12px; font-size: 13px; text-align: center; white-space: nowrap; }
}

/* ── FORMAT CARDS (shared across product pages) ────── */
.format-cards { display:flex; gap:12px; flex-wrap:wrap; margin-top:12px; }
.format-card {
  flex:1; min-width:120px; border:2px solid var(--gray-200);
  border-radius:12px; overflow:hidden; cursor:pointer;
  text-align:center; background:#fff;
  transition:border-color .15s, transform .15s;
}
.format-card:hover { border-color:var(--black); transform:translateY(-2px); }
.format-card.selected { border-color:var(--black); outline:3px solid var(--yellow); outline-offset:1px; }
.format-card input { display:none; }
.format-card img { width:100%; aspect-ratio:1/1; object-fit:contain; display:block; padding:12px; background:var(--gray-100); }
.format-card-name { font-family:'Bebas Neue',sans-serif; font-size:18px; display:block; padding:6px 4px 2px; }
.format-card-price { font-size:13px; font-weight:800; color:var(--gray-700); display:block; padding-bottom:10px; }

/* ── STORE HERO (reused from store.css) ──────────────── */
.breadcrumb { max-width:var(--max-w); margin:0 auto; padding:16px 48px 0; font-size:13px; font-weight:600; color:var(--gray-500); display:flex; align-items:center; gap:8px; }
.breadcrumb a { color:var(--gray-500); text-decoration:none; }
.breadcrumb a:hover { color:var(--black); }
@media(max-width:768px){ .breadcrumb{padding:12px 20px 0;} }

/* ── Standard actions component ──────────────────────── */
.product-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.product-actions .qty-stepper {
  flex-shrink: 0;
  height: 52px;
}
.product-actions .qty-stepper .qty-btn { height: 100%; }
.product-actions .qty-stepper input  { height: 100%; }
.btn-add-cart {
  flex: 2;
  height: 52px;
  font-size: 16px !important;
  font-weight: 800 !important;
  justify-content: center;
  background: var(--yellow) !important;
  color: var(--black) !important;
  border: none !important;
}
.btn-add-cart:hover { background: var(--yellow-dk) !important; }
.btn-buy-now {
  flex: 1;
  height: 52px;
  justify-content: center;
  background: transparent !important;
  color: var(--black) !important;
  border: 2px solid var(--black) !important;
}
.btn-buy-now:hover { background: var(--black) !important; color: #fff !important; }
