/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Serena & Lily — POC Microsite Styles
   Stage 2: Product Detail Page wrapping the LD 3D Configurator
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

@import url('https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.cdnfonts.com/css/pp-fragment');

/* ── TOKENS ── */
:root {
  --sl-navy:           #243953;
  --sl-navy-dark:      #1f2e42;
  --sl-red:            #970013;
  --sl-text:           #2f2f2f;
  --sl-text-secondary: #667487;
  --sl-border:         #e5e5e5;
  --sl-bg-light:       #f8f8f8;
  --sl-white:          #ffffff;
  --sl-max-width:      1400px;
  --sl-font-serif:     'PP Fragment', Georgia, 'Times New Roman', serif;
  --sl-font-sans:      'Source Sans Pro', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--sl-font-sans);
  color: var(--sl-text);
  background: var(--sl-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
button { font-family: var(--sl-font-sans); }


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   HEADER — Logo only
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.sl-header {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 72px;
  border-bottom: 1px solid var(--sl-border);
  background: var(--sl-white);
}

.sl-logo {
  font-family: var(--sl-font-serif);
  font-size: 23px;
  font-weight: 400;
  letter-spacing: 0.22em;
  color: var(--sl-navy);
  text-transform: uppercase;
  user-select: none;
}

.sl-logo .amp {
  font-size: 17px;
  letter-spacing: 0.12em;
  vertical-align: 1px;
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   NAV — non-functional display
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.sl-nav {
  background: var(--sl-white);
  border-bottom: 1px solid var(--sl-border);
}

.sl-nav ul {
  display: flex;
  align-items: center;
  justify-content: center;
  list-style: none;
  max-width: var(--sl-max-width);
  margin: 0 auto;
  padding: 0 24px;
  overflow-x: auto;
  scrollbar-width: none;
}
.sl-nav ul::-webkit-scrollbar { display: none; }

.sl-nav li a {
  display: block;
  padding: 14px 13px;
  font-size: 13px;
  font-weight: 400;
  color: var(--sl-text);
  white-space: nowrap;
  letter-spacing: 0.01em;
  transition: color 0.15s;
  cursor: default;
}

.sl-nav li a:hover { color: var(--sl-navy); }
.sl-nav li a.active { color: var(--sl-navy); font-weight: 600; }


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   BREADCRUMB — non-functional display
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.sl-breadcrumb {
  max-width: var(--sl-max-width);
  margin: 0 auto;
  padding: 14px 32px;
  font-size: 12px;
  color: var(--sl-text-secondary);
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.sl-breadcrumb a {
  color: var(--sl-text-secondary);
  cursor: default;
  transition: color 0.15s;
}
.sl-breadcrumb a:hover { color: var(--sl-navy); text-decoration: underline; }

.sl-breadcrumb .sep { color: var(--sl-border); }
.sl-breadcrumb .current { color: var(--sl-text); }


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   PRODUCT LAYOUT — two-column grid
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.sl-product {
  display: grid;
  grid-template-columns: 60fr 40fr;
  gap: 48px;
  max-width: var(--sl-max-width);
  margin: 0 auto;
  padding: 0 32px 80px;
  align-items: start;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   LEFT COLUMN — Carousel (3D viewer + rendered images)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.sl-viewer {
  position: sticky;
  top: 16px;
}

/* Carousel outer wrapper — aspect-ratio here drives height for both children */
.sl-carousel {
  display: flex;
  gap: 8px;
  align-items: stretch;
  aspect-ratio: 4 / 3;
}

/* Vertical thumbnail strip — scrolls when > ~6 thumbs */
.sl-carousel-thumbs {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 92px;
  flex-shrink: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--sl-border) transparent;
}

.sl-thumb {
  width: 80px;
  aspect-ratio: 1;
  border: 1px solid var(--sl-border);
  border-radius: 2px;
  overflow: hidden;
  cursor: pointer;
  background: var(--sl-bg-light);
  padding: 0;
  transition: border-color 0.15s;
  flex-shrink: 0;
}

.sl-thumb.active {
  border: 2px solid var(--sl-navy);
}

.sl-thumb:hover:not(.active) {
  border-color: #aaa;
}

.sl-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 3D thumbnail */
.sl-thumb-3d {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: var(--sl-text-secondary);
}

.sl-thumb-3d svg  { width: 22px; height: 22px; }
.sl-thumb-3d span {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Main display area — height comes from .sl-carousel's aspect-ratio */
.sl-carousel-main {
  flex: 1;
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  background: #f5f5f5;
}

/* All slides stacked — opacity-based show/hide preserves WebGL context */
.sl-carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.sl-carousel-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.sl-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ld-configurator fills its slide */
.sl-carousel-slide ld-configurator {
  display: block;
  width: 100%;
  height: 100%;
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   RIGHT COLUMN — Product Info
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.sl-info {
  padding-top: 4px;
}

/* Title */
.sl-title {
  font-family: var(--sl-font-serif);
  font-size: 30px;
  font-weight: 400;
  color: var(--sl-navy);
  line-height: 1.2;
  margin-bottom: 18px;
}

/* Price */
.sl-price {
  margin-bottom: 18px;
}

.sl-price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 5px;
}

.sl-price-original {
  font-size: 16px;
  color: var(--sl-text-secondary);
  text-decoration: line-through;
}

.sl-price-sale {
  font-size: 16px;
  color: var(--sl-red);
  font-weight: 600;
}

.sl-price-affirm {
  font-size: 13px;
  color: var(--sl-text-secondary);
  margin-top: 4px;
}

.sl-price-affirm a {
  color: var(--sl-navy);
  text-decoration: underline;
  cursor: default;
}

/* Promo badge */
.sl-badge-promo {
  border: 1px solid #e8c4c4;
  background: #fdf8f8;
  color: var(--sl-red);
  font-size: 13px;
  font-weight: 500;
  padding: 10px 16px;
  margin-bottom: 10px;
  letter-spacing: 0.01em;
}

/* USA badge */
.sl-badge-usa {
  background: var(--sl-bg-light);
  font-size: 13px;
  color: var(--sl-text);
  padding: 12px 16px;
  border-radius: 2px;
  line-height: 1.4;
}

/* Divider */
.sl-divider {
  border: none;
  border-top: 1px solid var(--sl-border);
  margin: 20px 0;
}

/* Section labels */
.sl-section-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--sl-text);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sl-section-label .sl-label-value {
  font-weight: 400;
  color: var(--sl-text-secondary);
}

/* Size buttons */
.sl-size-options {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
}

.sl-size-btn {
  min-width: 52px;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--sl-border);
  background: var(--sl-white);
  font-size: 14px;
  color: var(--sl-text);
  cursor: default;
  border-radius: 2px;
  transition: border-color 0.15s;
}

.sl-size-btn.active {
  border: 2px solid var(--sl-navy);
  font-weight: 600;
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   FABRIC SWATCHES — functional, drives 3D viewer
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.sl-made-to-order {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--sl-text-secondary);
  margin: 4px 0 12px;
  text-transform: uppercase;
}

.sl-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
  min-height: 52px;
}

.sl-swatch-btn {
  width: 52px;
  height: 52px;
  border: 1px solid var(--sl-border);
  border-radius: 2px;
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  background: var(--sl-bg-light);
  transition: border-color 0.15s, box-shadow 0.15s;
  position: relative;
  flex-shrink: 0;
}

.sl-swatch-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.sl-swatch-btn:hover {
  border-color: var(--sl-navy);
  box-shadow: 0 0 0 1px var(--sl-navy);
}

.sl-swatch-btn.active {
  border: 2px solid var(--sl-navy);
  box-shadow: 0 0 0 1px var(--sl-navy);
}

/* Loading skeleton for swatches */
.sl-swatch-skeleton {
  width: 52px;
  height: 52px;
  border-radius: 2px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: sl-shimmer 1.4s infinite;
  flex-shrink: 0;
}

@keyframes sl-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Fabric links */
.sl-fabric-links {
  display: flex;
  gap: 24px;
}

.sl-fabric-links a {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--sl-navy);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: default;
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   DELIVERY & ACTIONS
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.sl-delivery {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: var(--sl-text-secondary);
  line-height: 1.4;
}

.sl-delivery strong { color: var(--sl-text); font-weight: 600; }

.sl-delivery-icon {
  flex-shrink: 0;
  color: var(--sl-text-secondary);
}

.sl-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Quantity control */
.sl-qty {
  display: flex;
  align-items: center;
  border: 1px solid var(--sl-border);
  border-radius: 48px;
  height: 48px;
  overflow: hidden;
  flex-shrink: 0;
}

.sl-qty-btn {
  width: 44px;
  height: 48px;
  border: none;
  background: none;
  font-size: 20px;
  font-weight: 300;
  color: var(--sl-text-secondary);
  cursor: default;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.sl-qty-val {
  width: 32px;
  text-align: center;
  font-size: 15px;
  color: var(--sl-text);
  font-weight: 400;
}

/* Add to bag CTA */
.sl-add-to-bag {
  flex: 1;
  height: 48px;
  background: var(--sl-navy);
  color: var(--sl-white);
  border: none;
  border-radius: 48px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: default;
  transition: background 0.15s;
}

.sl-add-to-bag:hover { background: var(--sl-navy-dark); }


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   DEMO FOOTER — London Dynamics attribution
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.sl-demo-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 36px;
  background: var(--sl-white);
  border-top: 1px solid var(--sl-border);
}

.sl-demo-logo {
  display: block;
  height: 20px;
  width: auto;
  color: #bbb;
  flex-shrink: 0;
}

.sl-demo-sep {
  font-size: 13px;
  color: #ddd;
}

.sl-demo-label {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: #bbb;
  font-family: 'Helvetica Neue', Arial, sans-serif;
}


/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   RESPONSIVE
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media (max-width: 1024px) {
  .sl-product {
    grid-template-columns: 55fr 45fr;
    gap: 32px;
    padding: 0 24px 60px;
  }
  .sl-title { font-size: 26px; }
}

@media (max-width: 768px) {
  .sl-product {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0 16px 48px;
  }

  .sl-viewer {
    position: static;
    margin-bottom: 24px;
  }

  .sl-carousel        { flex-direction: column-reverse; gap: 8px; aspect-ratio: unset; width: 100%; }
  .sl-carousel-main   { aspect-ratio: 4 / 3; width: 100%; flex: none; }
  .sl-carousel-thumbs { flex-direction: row; width: 100%; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
  .sl-carousel-thumbs::-webkit-scrollbar { display: none; }
  .sl-thumb           { width: 62px; flex-shrink: 0; }

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

  .sl-nav ul { justify-content: flex-start; }

  .sl-breadcrumb { padding: 10px 16px; }
}
