/* HAVEN - Classic Crew Tee - Product Page */

:root {
  --cream: #FAFAF7;
  --ink: #1A1A18;
  --ink-soft: #3D3D3A;
  --ink-muted: #7A7A75;
  --border: #E2E2DC;
  --border-dark: #C8C8C0;
  --accent: #1A1A18;
  --accent-hover: #333330;
  --warn: #B85C38;
  --ff-display: 'Fraunces', Georgia, serif;
  --ff-body: 'Instrument Sans', system-ui, sans-serif;
  --nav-h: 56px;
  --announce-h: 36px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--ff-body);
  font-size: 14px;
  font-weight: 300;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
ul { list-style: none; }

/* ANNOUNCEMENT */
.announce {
  background: var(--ink);
  color: var(--cream);
  height: var(--announce-h);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.announce-inner { display: flex; gap: 20px; align-items: center; }
.announce .sep { opacity: 0.4; }

/* NAV */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--cream);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
}
.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}
.nav-left { display: flex; gap: 28px; }
.nav-left a {
  font-size: 13px;
  letter-spacing: 0.04em;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.nav-left a:hover { opacity: 1; }

.wordmark {
  font-family: var(--ff-display);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-align: center;
  font-style: italic;
}

.nav-right { display: flex; gap: 16px; justify-content: flex-end; align-items: center; }
.icon-btn {
  background: none;
  border: none;
  padding: 4px;
  color: var(--ink);
  opacity: 0.8;
  transition: opacity 0.2s;
  position: relative;
}
.icon-btn:hover { opacity: 1; }
.cart-count {
  position: absolute;
  top: 0; right: 0;
  background: var(--ink);
  color: var(--cream);
  font-size: 9px;
  width: 14px; height: 14px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
  display: none;
}
.cart-count.visible { display: flex; }

/* PRODUCT LAYOUT */
#product { min-height: calc(100vh - var(--nav-h) - var(--announce-h)); }
.product-layout {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 480px;
  gap: 0;
  min-height: 100%;
}

/* GALLERY */
.product-gallery {
  position: sticky;
  top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 0;
  overflow: hidden;
}
.gallery-thumbs {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 24px 0 24px 24px;
  overflow-y: auto;
}
.thumb {
  background: none;
  border: 2px solid transparent;
  padding: 2px;
  border-radius: 2px;
  transition: border-color 0.2s;
  flex-shrink: 0;
}
.thumb:hover { border-color: var(--border-dark); }
.thumb.active { border-color: var(--ink); }
.thumb img {
  width: 52px;
  height: 64px;
  object-fit: cover;
  border-radius: 1px;
}

.gallery-main {
  position: relative;
  overflow: hidden;
}
.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s;
}
.gallery-badge {
  position: absolute;
  top: 20px; left: 20px;
  background: var(--cream);
  color: var(--ink);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border: 1px solid var(--border-dark);
}

/* PRODUCT INFO */
.product-info {
  padding: 40px 40px 60px;
  border-left: 1px solid var(--border);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.product-vendor {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 8px;
}
.product-title {
  font-family: var(--ff-display);
  font-size: 28px;
  font-weight: 300;
  font-style: italic;
  color: var(--ink);
  margin-bottom: 12px;
  line-height: 1.2;
}

/* RATING */
.product-rating {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.stars { display: flex; gap: 2px; }
.star { width: 13px; height: 13px; fill: none; stroke: none; }
.star.filled { fill: var(--ink); }
.star.half { fill: url(#half); }
.rating-text {
  font-size: 13px;
  color: var(--ink-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s;
}
.rating-text:hover { color: var(--ink); }

/* PRICE */
.product-price {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.price-current {
  font-size: 20px;
  font-weight: 400;
  color: var(--ink);
}

/* VARIANTS */
.variant-group { margin-bottom: 20px; }
.variant-label {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--ink-soft);
}
.variant-selected { font-weight: 400; color: var(--ink); }

/* COLOR SWATCHES */
.color-swatches {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.swatch-label { cursor: pointer; }
.swatch-label input { position: absolute; opacity: 0; pointer-events: none; }
.swatch {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  outline: 2px solid transparent;
  outline-offset: 2px;
  transition: outline-color 0.15s;
}
.swatch-label:hover .swatch { outline-color: var(--border-dark); }
.swatch-label.active .swatch { outline-color: var(--ink); }

/* SIZE GRID */
.size-grid {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.size-label { cursor: pointer; }
.size-label input { position: absolute; opacity: 0; pointer-events: none; }
.size-label span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 44px;
  border: 1px solid var(--border-dark);
  font-size: 13px;
  font-weight: 400;
  color: var(--ink);
  transition: background 0.15s, border-color 0.15s;
}
.size-label:hover span { border-color: var(--ink); }
.size-label.selected span {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
}
.size-label.unavailable { cursor: not-allowed; }
.size-label.unavailable span {
  color: var(--border-dark);
  position: relative;
  overflow: hidden;
}
.size-label.unavailable span::after {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  width: 100%;
  height: 1px;
  background: var(--border-dark);
  transform: rotate(-45deg) translateX(-20%);
  transform-origin: center;
}

.size-guide-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--ink-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s;
}
.size-guide-link:hover { color: var(--ink); }

/* CTA */
.cta-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
  margin-bottom: 24px;
}
.btn-atc {
  width: 100%;
  height: 52px;
  background: var(--ink);
  color: var(--cream);
  border: none;
  font-family: var(--ff-body);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-atc:hover { background: var(--accent-hover); }
.btn-atc:active { transform: scale(0.99); }
.btn-buy {
  width: 100%;
  height: 52px;
  background: none;
  border: 1px solid var(--border-dark);
  font-family: var(--ff-body);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  transition: border-color 0.2s, background 0.2s;
}
.btn-buy:hover { border-color: var(--ink); background: rgba(26,26,24,0.04); }

/* TRUST STRIP */
.trust-strip {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.trust-strip li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--ink-soft);
}
.trust-strip svg { flex-shrink: 0; color: var(--ink-muted); }

/* ACCORDION */
.accordion { display: flex; flex-direction: column; }
.accordion-trigger {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  background: none;
  border: none;
  border-top: 1px solid var(--border);
  padding: 16px 0;
  font-family: var(--ff-body);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-align: left;
}
.accordion-trigger:last-of-type { border-bottom: 1px solid var(--border); }
.chevron { transition: transform 0.25s; flex-shrink: 0; }
.accordion-trigger[aria-expanded="true"] .chevron { transform: rotate(180deg); }

.accordion-panel {
  overflow: hidden;
  max-height: 400px;
  transition: max-height 0.3s ease, opacity 0.3s;
  opacity: 1;
}
.accordion-panel.closed { max-height: 0; opacity: 0; }
.detail-list {
  padding: 4px 0 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.detail-list li {
  font-size: 13px;
  color: var(--ink-soft);
  padding-left: 14px;
  position: relative;
}
.detail-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 7px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--ink-muted);
}

/* REVIEWS */
.reviews-section {
  background: #F2F1EC;
  padding: 80px 24px;
}
.reviews-inner { max-width: 1280px; margin: 0 auto; }
.reviews-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 48px;
  flex-wrap: wrap;
  gap: 20px;
}
.reviews-header h2 {
  font-family: var(--ff-display);
  font-size: 32px;
  font-weight: 300;
  font-style: italic;
  color: var(--ink);
}
.reviews-aggregate { display: flex; align-items: center; gap: 12px; }
.agg-score {
  font-family: var(--ff-display);
  font-size: 40px;
  font-weight: 300;
  color: var(--ink);
  line-height: 1;
}
.agg-stars { display: flex; gap: 3px; }
.agg-count { font-size: 13px; color: var(--ink-muted); }

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.review-card {
  background: var(--cream);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.review-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.reviewer-info { display: flex; flex-direction: column; gap: 2px; }
.reviewer-name { font-size: 14px; font-weight: 400; color: var(--ink); }
.reviewer-meta { font-size: 12px; color: var(--ink-muted); }
.review-stars { display: flex; gap: 2px; }
.review-title { font-size: 14px; font-weight: 400; color: var(--ink); line-height: 1.4; }
.review-body { font-size: 13px; color: var(--ink-soft); line-height: 1.7; }
.review-date { font-size: 11px; color: var(--ink-muted); margin-top: auto; }

/* FOOTER */
.footer {
  background: var(--ink);
  color: var(--cream);
  padding: 60px 24px 0;
}
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 60px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer-wordmark {
  font-family: var(--ff-display);
  font-size: 24px;
  font-weight: 300;
  font-style: italic;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}
.footer-tagline { font-size: 13px; opacity: 0.5; }
.footer-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-col-title {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.4;
  margin-bottom: 4px;
}
.footer-col a { font-size: 13px; opacity: 0.7; transition: opacity 0.2s; }
.footer-col a:hover { opacity: 1; }
.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-bottom p { font-size: 12px; opacity: 0.4; }
.footer-legal { display: flex; gap: 20px; }
.footer-legal a { font-size: 12px; opacity: 0.4; transition: opacity 0.2s; }
.footer-legal a:hover { opacity: 0.7; }

/* CART DRAWER */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.cart-overlay.visible { opacity: 1; pointer-events: all; }
.cart-drawer {
  position: fixed;
  top: 0; right: 0;
  width: min(400px, 100vw);
  height: 100dvh;
  background: var(--cream);
  z-index: 201;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}
.cart-drawer.open { transform: none; }
.cart-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.cart-drawer-header h2 {
  font-family: var(--ff-display);
  font-size: 18px;
  font-weight: 300;
  font-style: italic;
}
.cart-drawer-body { flex: 1; overflow-y: auto; padding: 24px; }
.cart-empty { font-size: 14px; color: var(--ink-muted); text-align: center; margin-top: 40px; }
.cart-item {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.cart-item-img { width: 72px; height: 88px; object-fit: cover; }
.cart-item-info { display: flex; flex-direction: column; gap: 4px; }
.cart-item-name { font-size: 14px; font-weight: 400; }
.cart-item-variant { font-size: 12px; color: var(--ink-muted); }
.cart-item-price { font-size: 14px; font-weight: 400; align-self: start; }
.cart-drawer-footer {
  padding: 20px 24px 32px;
  border-top: 1px solid var(--border);
}
.cart-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 400;
  margin-bottom: 8px;
}
.cart-note { font-size: 12px; color: var(--ink-muted); margin-bottom: 16px; }

/* RESPONSIVE */
@media (max-width: 960px) {
  .product-layout {
    grid-template-columns: 1fr;
  }
  .product-gallery {
    position: static;
    height: 72vw;
    max-height: 540px;
    grid-template-columns: 60px 1fr;
  }
  .product-info {
    padding: 28px 20px 48px;
    border-left: none;
    border-top: 1px solid var(--border);
  }
  .reviews-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 40px; }
  .footer-links { grid-template-columns: repeat(2, 1fr); }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
}

@media (max-width: 600px) {
  .announce { display: none; }
  .nav-left { display: none; }
  .nav-inner { grid-template-columns: auto 1fr auto; }
  .wordmark { text-align: left; }
  .reviews-header { flex-direction: column; }
  .footer-links { grid-template-columns: 1fr; }
}
