/* ============================================================
   WISHAAN INSTA-STYLE REELS SHOPPING FEED
   ============================================================ */

:root {
  --reels-bg: #07070C;
  --reels-card-bg: rgba(18, 16, 28, 0.94);
  --reels-accent: #E9367F;
  --reels-accent-grad: linear-gradient(135deg, #FF3E8A 0%, #FF6536 100%);
  --reels-gold: #F8C44F;
  --reels-green: #25D366;
  --reels-border: rgba(255, 255, 255, 0.12);
  --reels-text: #FFFFFF;
  --reels-sub: rgba(255, 255, 255, 0.72);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  background: var(--reels-bg);
  color: var(--reels-text);
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  user-select: none;
}

/* App Wrapper */
.reels-app {
  width: 100%;
  height: 100%;
  height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  background: #000;
}

/* Feed Viewport */
.reels-viewport {
  width: 100%;
  max-width: 460px;
  height: 100%;
  height: 100dvh;
  position: relative;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  background: #000;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
}

.reels-viewport::-webkit-scrollbar {
  display: none;
}

/* Top Floating Header */
.reels-top-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0) 100%);
  pointer-events: none;
}

.reels-top-bar > * {
  pointer-events: auto;
}

.reels-logo {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 0.5px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.reels-logo span {
  color: var(--reels-accent);
}

.reels-live-tag {
  background: rgba(233, 54, 127, 0.25);
  border: 1px solid var(--reels-accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.reels-live-dot {
  width: 6px;
  height: 6px;
  background: #FF3E8A;
  border-radius: 50%;
  animation: pulseDot 1.4s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.4); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

.reels-top-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.reels-pill-btn {
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.reels-pill-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Individual Reel Slide */
.reel-slide {
  width: 100%;
  height: 100%;
  height: 100dvh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  position: relative;
  display: flex;
  flex-direction: column;
  background: #000;
  overflow: hidden;
}

/* Video Stage (80% - 85% on Mobile) */
.reel-video-stage {
  flex: 1;
  width: 100%;
  position: relative;
  background: radial-gradient(circle at center, #181524 0%, #07070C 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
}

.reel-video-main {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: relative;
  z-index: 2;
  display: block;
}

/* Play / Pause Animated Icon Overlay */
.reel-play-indicator {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.6);
  width: 72px;
  height: 72px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(10px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  color: #fff;
  z-index: 10;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.reel-play-indicator.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* Floating Sound Toggle inside Video */
.reel-sound-toggle {
  position: absolute;
  bottom: 14px;
  right: 14px;
  z-index: 15;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
}

.reel-counter-badge {
  position: absolute;
  top: 60px;
  right: 14px;
  z-index: 15;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.9);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
}

/* Video Progress Bar Line (GPU Transform) */
.reel-progress-wrap {
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.18);
  position: relative;
  z-index: 20;
  overflow: hidden;
}

.reel-progress-fill {
  height: 100%;
  width: 100%;
  background: var(--reels-accent-grad);
  transform-origin: left center;
  transform: scaleX(0);
  will-change: transform;
}

/* Bottom Bar (Product Details, Sizes & Buy Now) */
.reel-bottom-bar {
  width: 100%;
  background: var(--reels-card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--reels-border);
  padding: 12px 16px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 25;
}

/* Row 1: Product Title & Price */
.reel-info-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.reel-title-box {
  flex: 1;
  min-width: 0;
}

.reel-title {
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.2px;
}

.reel-category {
  font-size: 11px;
  color: var(--reels-gold);
  font-weight: 600;
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.reel-price-box {
  text-align: right;
  flex-shrink: 0;
}

.reel-price {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: #fff;
}

.reel-shipping-tag {
  font-size: 10px;
  color: #00E676;
  font-weight: 700;
  letter-spacing: 0.3px;
}

/* Row 2: Size Selector */
.reel-sizes-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.reel-sizes-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--reels-sub);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.reel-sizes-pills {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.reel-sizes-pills::-webkit-scrollbar {
  display: none;
}

.reel-size-pill {
  min-width: 36px;
  height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.reel-size-pill:hover {
  border-color: rgba(255, 255, 255, 0.45);
}

.reel-size-pill.selected {
  background: #ffffff;
  color: #000000;
  border-color: #ffffff;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.4);
}

.reel-size-pill.shake {
  animation: pillShake 0.4s ease;
}

@keyframes pillShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* Row 3: BUY NOW Button */
.reel-buy-btn {
  width: 100%;
  height: 46px;
  border-radius: 12px;
  background: var(--reels-accent-grad);
  border: none;
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(233, 54, 127, 0.4);
  transition: transform 0.12s ease, filter 0.12s ease;
}

.reel-buy-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.reel-buy-btn:active {
  transform: translateY(1px);
}

/* Desktop Navigation Controls */
.desktop-nav-btn {
  position: absolute;
  right: calc(50% - 290px);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  z-index: 50;
  transition: all 0.2s ease;
}

.desktop-nav-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.08);
}

.desktop-nav-btn--up {
  top: 42%;
}

.desktop-nav-btn--down {
  top: 52%;
}

@media (max-width: 680px) {
  .desktop-nav-btn {
    display: none;
  }
}

/* ============================================================
   ADDRESS POPUP / BOTTOM SHEET
   ============================================================ */

.address-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.address-modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.address-sheet {
  width: 100%;
  max-width: 460px;
  max-height: 88vh;
  background: #181524;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px 24px 0 0;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.6);
}

.address-modal-backdrop.open .address-sheet {
  transform: translateY(0);
}

/* Sheet Grabber & Header */
.sheet-drag-handle {
  width: 40px;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  margin: 10px auto 4px auto;
}

.sheet-head {
  padding: 12px 20px 14px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sheet-title {
  font-weight: 700;
  font-size: 17px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sheet-close-btn {
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Sheet Product Summary */
.sheet-prod-summary {
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sheet-prod-name {
  font-weight: 700;
  font-size: 14px;
  color: #fff;
}

.sheet-prod-meta {
  font-size: 12px;
  color: var(--reels-gold);
  margin-top: 2px;
}

.sheet-prod-price {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  text-align: right;
}

.sheet-prod-free-ship {
  font-size: 10px;
  color: #00E676;
  font-weight: 700;
}

/* Form Body */
.sheet-body {
  padding: 18px 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: thin;
}

.sheet-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sheet-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--reels-sub);
}

.sheet-input {
  width: 100%;
  height: 44px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  padding: 0 14px;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s ease;
}

.sheet-input:focus {
  border-color: var(--reels-accent);
  background: rgba(255, 255, 255, 0.1);
}

.sheet-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Sheet Footer CTA */
.sheet-footer {
  padding: 14px 20px 20px 20px;
  background: #181524;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sheet-pay-btn {
  width: 100%;
  height: 48px;
  border-radius: 12px;
  background: var(--reels-accent-grad);
  border: none;
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(233, 54, 127, 0.45);
}

.sheet-pay-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.sheet-trust-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
}

/* ============================================================
   ORDER SUCCESS OVERLAY
   ============================================================ */

.order-success-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(11, 10, 18, 0.95);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.order-success-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.order-success-card {
  width: 100%;
  max-width: 400px;
  background: #1F1B30;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 32px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}

.order-success-icon {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: #00E676;
  color: #000;
  font-size: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  margin-bottom: 6px;
}

.order-success-card h2 {
  font-size: 22px;
  color: #fff;
  font-weight: 800;
}

.order-success-card p {
  font-size: 13px;
  color: var(--reels-sub);
  line-height: 1.5;
}

.order-details-box {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 12px;
  font-size: 12px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.order-success-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.wa-confirm-btn {
  width: 100%;
  height: 44px;
  border-radius: 10px;
  background: #25D366;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}
