/* ALOV / CRPRT 2026 — scoped storefront fixes. */

/* Collection deadline reminder. */
.alov-deadline-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  overflow-y: auto;
  padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
  background: rgba(0, 0, 0, .84);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  animation: alov-deadline-fade-in .22s ease both;
}

.alov-deadline-dialog {
  position: relative;
  width: min(560px, 100%);
  max-height: calc(100vh - 36px);
  max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 36px);
  overflow-y: auto;
  padding: clamp(28px, 5vw, 48px);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 26px;
  background: #111;
  color: #f5f5f2;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .58);
}

.alov-deadline-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 50%;
  background: rgba(255, 255, 255, .04);
  color: #fff;
  font: 300 27px/1 Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.alov-deadline-eyebrow {
  margin: 0 48px 18px 0;
  color: rgba(245, 245, 242, .55);
  font: 600 10px/1.5 'Space Grotesk', sans-serif;
  letter-spacing: .18em;
}

.alov-deadline-title {
  max-width: 460px;
  margin: 0 0 18px;
  color: #f5f5f2;
  font: 600 clamp(32px, 6vw, 52px)/.98 'Syne', sans-serif;
  letter-spacing: -.045em;
}

.alov-deadline-title span { color: #f04444; }

.alov-deadline-description {
  max-width: 440px;
  margin: 0;
  color: rgba(245, 245, 242, .72);
  font: 400 14px/1.7 'Space Grotesk', sans-serif;
}

.alov-deadline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.alov-deadline-primary,
.alov-deadline-secondary {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: 600 12px/1.35 'Space Grotesk', sans-serif;
  text-align: center;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.alov-deadline-primary { background: #f5f5f2; color: #111; }
.alov-deadline-secondary { border-color: rgba(255, 255, 255, .2); background: transparent; color: #f5f5f2; }
body.alov-deadline-open { overflow: hidden; }

@keyframes alov-deadline-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Hide the card's primary add button whenever its size chooser is open, on all layouts. */
.product-card.alov-size-picker-open .btn-add,
.product-card:has(.size-overlay.pointer-events-auto) .btn-add,
.product-card:has(.size-overlay.opacity-100) .btn-add {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.product-card .size-overlay { scroll-margin-top: 88px; }

/* Chrome Android: avoid fixed-header jitter while preserving the hero overlap. */
@media (max-width: 760px) {
  /* Product and size-guide dialogs must paint above the sticky header (z-index: 1000). */
  .modal-shell { z-index: 2000 !important; }

  #main-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    margin-bottom: -64px !important;
    padding-top: max(12px, env(safe-area-inset-top)) !important;
    padding-bottom: 12px !important;
    transform: none !important;
    transition-property: background-color, border-color, box-shadow !important;
    backface-visibility: hidden;
  }

  #main-header > div { min-height: 40px; }

  #main-header a,
  button,
  [role="button"] {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  /* Buttons that transform on hover should not shift their touch hitboxes on phones. */
  .interactive:hover,
  #main-header a:hover,
  .product-action-button:hover,
  .product-switcher button:hover,
  .detail-gallery-controls button:hover {
    transform: none !important;
  }

  .detail-gallery-controls button {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    touch-action: manipulation;
  }

  #modal-product .detail-image-stage {
    touch-action: pan-y;
    overscroll-behavior-x: contain;
    overscroll-behavior-x: contain;
    user-select: none;
    -webkit-user-select: none;
  }

  #modal-product #detail-image {
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
    user-select: none;
    -webkit-user-select: none;
  }

  .product-card.alov-size-picker-open .product-actions .btn-add {
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  .product-card .size-overlay { scroll-margin-block: 14px; }

  .alov-deadline-backdrop {
    padding-top: max(14px, env(safe-area-inset-top));
    padding-right: 14px;
    padding-bottom: max(14px, env(safe-area-inset-bottom));
    padding-left: 14px;
  }

  .alov-deadline-dialog {
    width: 100%;
    max-height: calc(100vh - 28px);
    max-height: calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 28px);
    padding: 30px 22px 22px;
    border-radius: 22px;
  }

  .alov-deadline-actions { flex-direction: column; margin-top: 22px; }
  .alov-deadline-primary,
  .alov-deadline-secondary { width: 100%; }
}

/* The philosophy video is decorative, not an interactive control. */
#philosophy video {
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
}

#philosophy video::-webkit-media-controls,
#philosophy video::-webkit-media-controls-enclosure {
  display: none !important;
}

.product-image img,
.detail-image-stage img {
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  user-select: none;
}

@media (prefers-reduced-motion: reduce) {
  .alov-deadline-backdrop { animation: none; }
}
