/* ============================================================
   REELS + PRODUCT SECTION
   Scoped under .reels-section — edit variables below to restyle
   ============================================================ */

/* ---- EDIT COLORS / SIZING HERE ---- */
:root {
  --reels-bg: #FAFAFA;               /* Soft background to match global theme */
  --reels-accent: #d4a574;           /* Warm Tan/Gold accent */
  --reels-accent-dark: #c59664;
  --reels-text: #2c2c2c;             /* Consistent text color */
  --reels-muted: #6B7280;
  --reels-card-radius: 16px;         /* Slightly tighter radius for luxury feel */
  --reels-card-shadow: 0 12px 32px rgba(0,0,0,0.08);
  --reels-modal-bg: rgba(0,0,0,0.85); 
  --reels-sheet-bg: #ffffff;
  --reels-card-w: 240px;             
  --reels-modal-w: 950px;
}

/* ===================== SECTION ===================== */
.reels-section {
  background: var(--reels-bg);
  padding: 30px 0 40px; /* Reduced padding for tighter layout */
  overflow: hidden;
  font-family: 'Inter', sans-serif;
}

.reels-section__header {
  text-align: center;
  padding: 0 20px 48px;
  max-width: 800px;
  margin: 0 auto;
}

.reels-section__title {
  font-size: clamp(28px, 4vw, 42px); /* Slightly refined size */
  font-weight: 700;
  color: #0d2b1a; /* Keep signature green for titles */
  font-family: 'Playfair Display', serif;
  line-height: 1.1;
  margin-bottom: 8px;
}

.reels-section__subtitle {
  font-size: 16px;
  color: var(--reels-muted);
  font-weight: 500;
  margin-bottom: 24px;
}

/* Header Pills */
.reels-section__pills {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

.reels-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #e6eee2;
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  color: var(--reels-accent);
}

.reels-pill i {
  font-size: 14px;
}

/* ===================== SWIPER CAROUSEL ===================== */
.reels-swiper-wrap {
  padding: 0 60px;
  position: relative;
}

.reels-swiper {
  overflow: visible !important;
  padding: 20px 0 40px; /* Extra space for coverflow shadow */
}

.reels-swiper .swiper-slide {
  width: var(--reels-card-w);
  flex-shrink: 0;
  transition: all 0.3s ease;
}

/* Ensure the center play button is always visible for "static" look */
.reel-card__play {
  opacity: 0.9 !important;
  transform: scale(0.9);
}
.reel-card:hover .reel-card__play {
  opacity: 1 !important;
  transform: scale(1); /* Stabilized - No more scaling */
}

/* ===================== REEL CARD ===================== */
.reel-card {
  position: relative;
  width: var(--reels-card-w);
  border-radius: var(--reels-card-radius);
  overflow: visible; /* Allow info panel below to show */
  cursor: pointer;
  background: transparent;
  -webkit-tap-highlight-color: transparent;
}

/* The actual video frame part */
.reel-card__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: var(--reels-card-radius);
  overflow: hidden;
  box-shadow: var(--reels-card-shadow);
  background: #000;
}

/* Product info below the card */
.reel-card__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 4px 4px;
}

.reel-card__product-name {
  font-size: 12px; /* Smaller and more subtle */
  font-weight: 500;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reel-card__product-price {
  font-size: 12px;
  font-weight: 400;
  color: #666;
}
.reel-card__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
  opacity: 1;
  border-radius: var(--reels-card-radius);
}

.reel-card__overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 40%, transparent 70%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  transition: all 0.3s ease;
  border-radius: var(--reels-card-radius);
}

.reel-card:hover .reel-card__overlay {
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 50%, transparent 80%);
}

/* Card Top Tags & Fav */
.reel-card__tag {
  position: absolute;
  top: 14px; left: 14px;
  z-index: 5;
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}
.reel-card__tag--top-rated { background: #2e7d32; }
.reel-card__tag--best-seller { background: #c6a052; }
.reel-card__tag--trending { background: #512da8; }
.reel-card__tag--new { background: #00695c; }
.reel-card__tag--offer { background: #d32f2f; }

.reel-card__fav {
  position: absolute;
  top: 14px; right: 14px;
  z-index: 5;
  width: 32px; height: 32px;
  background: rgba(255,255,255,0.25);
  backdrop-filter: blur(4px);
  border: none;
  border-radius: 50%;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}
.reel-card__fav:hover { background: rgba(255,255,255,0.4); transform: scale(1.1); }

.reel-card__play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -100%); /* Position slightly above center since title is at bottom */
  width: 54px;
  height: 54px;
  background: rgba(255,255,255,0.25);
  backdrop-filter: blur(8px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 4;
}

.reel-card:hover .reel-card__play {
  transform: translate(-50%, -100%) scale(1); /* Removed scale boost */
  background: rgba(255,255,255,0.35); /* Very subtle background brighten */
}

.reel-card__play svg { width: 24px; height: 24px; fill: #fff; transform: translateX(2px); }

/* Card Product Details */
.reel-card__details {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #fff;
}

.reel-card__title {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  font-family: 'Playfair Display', serif;
  line-height: 1.3;
}

.reel-card__rating {
  display: flex;
  align-items: center;
  gap: 8px;
}

.reel-card__stars {
  display: flex;
  gap: 2px;
  color: #ffc107; /* Gold stars */
  font-size: 10px;
}

.reel-card__rating-val {
  font-size: 11px;
  font-weight: 600;
  opacity: 0.9;
}

.reel-card__footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}

.reel-card__price {
  font-size: 18px;
  font-weight: 800;
}

.reel-card__shop-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--reels-accent);
  color: #fff;
  border: none;
  border-radius: 8px; /* Slightly squarer from photo */
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.reel-card__shop-btn:hover { background: #1b4b32; transform: translateY(-2px); }
.reel-card__shop-btn i { font-size: 14px; }

.reels-nav-btn {
  position: absolute;
  top: 40%;
  transform: translateY(-50%);
  z-index: 20;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--reels-accent);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.reels-nav-btn:hover { background: var(--reels-accent-dark); transform: translateY(-50%) scale(1.1); }
.reels-nav-btn svg { width: 18px; height: 18px; stroke: #fff; fill: none; stroke-width: 3; }
.reels-nav-prev { left: 4px; }
.reels-nav-next { right: 4px; }

/* Features Bar */
.reels-features-bar {
  margin-top: 50px; /* Increased from 30px to give more space */
  padding: 25px 0; 
  border-top: 1px solid rgba(0,0,0,0.06);
  background: rgba(255,255,255,0.4);
}

.reels-features-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 20px;
}

.reels-feature-item {
  display: flex;
  align-items: center;
  gap: 16px;
}

.reels-feature-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  color: var(--reels-accent);
  box-shadow: 0 4px 10px rgba(0,0,0,0.04);
}

.reels-feature-content h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 2px;
  color: #0d2b1a;
}

.reels-feature-content p {
  font-size: 12px;
  color: var(--reels-muted);
  margin: 0;
}

.reels-feature-divider {
  width: 1px;
  height: 40px;
  background: rgba(0,0,0,0.08);
}

@media (max-width: 991px) {
  .reels-features-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .reels-feature-divider { display: none; }
}

@media (max-width: 480px) {
  .reels-features-grid { grid-template-columns: 1fr; }
}

.reels-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.reels-modal.is-open {
  display: flex !important;
  opacity: 1 !important;
}

@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }

.reels-modal__inner {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

/* Modal Swiper Container */
.modal-swiper {
  width: 100%;
  height: 100%;
  overflow: visible !important;
}

.modal-swiper .swiper-slide {
  display: flex !important;
  align-items: center;
  justify-content: center;
  transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  opacity: 0.3;
  transform: scale(0.85);
  filter: blur(4px);
  width: var(--reels-modal-w) !important;
  max-width: 95vw;
}

.modal-swiper .swiper-slide-active {
  opacity: 1;
  transform: scale(1);
  filter: blur(0);
}

/* Main Modal Box */
.reels-modal__content-box {
  display: flex !important;
  flex-direction: row !important;
  width: 100%;
  height: min(80vh, 720px);
  background: #ffffff !important;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0,0,0,0.6);
  pointer-events: auto;
}

/* TOP-RIGHT Sound icon (like Bloom reference) */
.reels-modal__sound-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 20;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0,0,0,0.45);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  transition: background 0.2s;
}
.reels-modal__sound-btn:hover { background: rgba(0,0,0,0.7); }
.reels-modal__sound-btn svg { width: 18px; height: 18px; stroke: #fff; fill: none; stroke-width: 2; }

/* Video progress bar */
.reels-modal__progress-wrap {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 20;
  padding: 0 0 2px;
}

.reels-modal__progress-bar {
  width: 100%;
  height: 3px;
  background: rgba(255,255,255,0.25);
  cursor: pointer;
}

.reels-modal__progress-fill {
  height: 100%;
  width: 0%;
  background: #ffffff;
  transition: width 0.25s linear;
}

.reels-modal__video-wrap {
  flex: 0 0 55%;
  height: 100%;
  background: #000;
  position: relative;
  overflow: hidden;
}

.reels-modal__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reels-modal__video-badge {
  position: absolute;
  bottom: 20px;
  right: 20px;
  background: #ff6b6b; /* Sale pink red */
  color: #fff;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  z-index: 10;
}

/* RIGHT: Product Panel (Bloom Style) */
.reels-modal__product {
  flex: 0 0 45%;
  background: #ffffff !important;
  padding: 25px 25px; /* Tighter padding */
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px; /* Reduced gap */
  border-left: 1px solid #f2f2f2;
}

.reels-modal__product-header {
  text-align: center;
}

.reels-modal__product-price {
  font-size: 14px;
  font-weight: 500;
  color: #777;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.reels-modal__product-title {
  font-size: 21px; /* Slightly refined */
  font-weight: 700;
  color: #1a1a1a;
  font-family: 'Playfair Display', serif;
  margin: 0;
  line-height: 1.3;
}

.reels-modal__product-img-wrap {
  position: relative;
  width: 100%;
  height: 240px;
  background: #fdfaf7;
  border: 1px solid #f0f0f0;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  flex-shrink: 0;
}

.reels-modal__product-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.reels-modal__img-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
}
.reels-modal__img-dots .dot {
  width: 24px;
  height: 2px;
  background: #e0e0e0;
}
.reels-modal__img-dots .dot.active {
  background: #777;
}

.reels-modal__product-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.reels-modal__label {
  font-size: 13px;
  font-weight: 600;
  color: #1a1a1a;
  letter-spacing: 0.3px;
  display: block;
  margin-bottom: 8px;
}

/* Product description */
.reels-modal__product-desc {
  font-size: 13px;
  line-height: 1.55;
  color: #555;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-top: 4px;
  border-top: 1px solid #f2f2f2;
  padding-bottom: 4px;
}

.reels-modal__variants {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.reels-modal__variant-btn {
  padding: 10px 18px;
  border: 1px solid #e5e5e5;
  border-radius: 4px; /* Shaper corners like reference */
  background: #fff;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  color: #1a1a1a;
}

.reels-modal__variant-btn.selected {
  background: #0b5e32; /* Bloom green */
  border-color: #0b5e32;
  color: #fff;
  font-weight: 600;
}

.reels-modal__product-footer {
  display: flex;
  gap: 12px;
  margin-top: auto;
  padding-top: 20px;
}

.reels-modal__footer-btn {
  flex: 1;
  padding: 14px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.reels-modal__footer-btn--more {
  background: transparent;
  border: 1px solid #d1d5db;
  color: #1a1a1a;
}

.reels-modal__footer-btn--add {
  background: #0b5e32; /* Bloom green */
  border: none;
  color: #fff;
}
.reels-modal__footer-btn--add:hover {
  background: #084a27;
  transform: translateY(-2px);
}
.reels-modal__footer-btn--more:hover {
  background: #f9f9f9;
}

/* Removed old qty styles */

/* Modal nav arrows */
.reels-modal__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10002;
}
.reels-modal__nav--prev { left: 12px; }
.reels-modal__nav--next { right: 12px; }

.reels-modal__nav button {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: #fff;
  backdrop-filter: blur(4px);
  transition: background 0.2s;
}
.reels-modal__nav button:hover { background: rgba(255,255,255,0.3); }
.reels-modal__nav button svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2.5; }

/* Close button */
.reels-modal__close {
  position: fixed; /* changed to fixed to guarantee it stays in viewport */
  top: 30px; right: 30px;
  z-index: 2147483647; /* maximum z-index */
  width: 50px; height: 50px;
  border-radius: 50%;
  background: #ffffff !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  border: 2px solid #e0e0e0;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #000000;
  transition: all 0.2s;
}
.reels-modal__close:hover { 
    background: #f8f8f8 !important; 
    transform: scale(1.1);
}
.reels-modal__close svg { width: 24px; height: 24px; stroke: #000000; fill: none; stroke-width: 3; }

/* Medium screens (Laptops/Large Tablets) */
@media (max-width: 1200px) {
  :root {
    --reels-card-w: 190px;
    --reels-modal-w: 880px;
  }
}

@media (max-width: 1024px) {
  .reels-swiper-wrap { padding: 0 40px; }
  :root {
    --reels-card-w: 180px;
    --reels-modal-w: 800px;
  }
}

/* Tablets (Portrait) — stack vertically, but keep modal look */
@media (max-width: 900px) {
  .modal-swiper .swiper-slide {
    width: min(500px, 90vw) !important;
  }
  .reels-modal__content-box {
    flex-direction: column !important;
    height: auto;
    max-height: 90vh;
    width: 100%;
  }
  .reels-modal__video-wrap {
    flex: 0 0 450px;
    width: 100%;
  }
  .reels-modal__product {
    flex: 1;
    border-left: none;
    border-top: 1px solid #f2f2f2;
    padding: 20px;
  }
  .reels-modal__product-img-wrap { display: none; } /* Hide secondary img on tablet stack */
}

/* Tablet & phone: stack vertically, full-screen */
@media (max-width: 768px) {
  .reels-modal { padding: 0; align-items: flex-end; }
  .reels-modal__inner { height: 100%; align-items: flex-end; }

  .modal-swiper .swiper-slide {
    width: 100vw !important;
    max-width: 100vw;
    transform: scale(1) !important;
    opacity: 1 !important;
    filter: none !important;
  }

  .reels-modal__content-box {
    flex-direction: column !important;
    height: 100vh;
    height: 100dvh;
    border-radius: 0;
    max-height: 100dvh;
  }

  .reels-modal__video-wrap {
    flex: 1 !important; 
    width: 100%;
  }

  .reels-modal__product {
    flex: 0 0 auto;
    max-height: 50%;
    overflow-y: auto;
    padding: 16px;
    gap: 10px;
    border-top: 1px solid #f2f2f2;
  }

  .reels-modal__product-title { font-size: 18px; }
  .reels-modal__product-img-wrap { display: none; }
  .reels-modal__footer-btn { padding: 12px; font-size: 13px; }
  .reels-modal__nav { display: none; }
  .reels-modal__close { top: 12px; right: 12px; z-index: 10020; }
  .reels-modal__sound-btn { top: 12px; right: 60px; } /* Move away from close btn */
}

/* Landscape phones (short height) */
@media (max-height: 600px) and (min-width: 769px) {
  .reels-modal__content-box { height: 96vh; }
  .reels-modal__product { padding: 12px 20px; gap: 8px; }
  .reels-modal__product-title { font-size: 16px; }
  .reels-modal__product-img-wrap { max-height: 100px; }
}

/* ===================== MOBILE VIEWER (TikTok style) ===================== */

.reels-viewer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #000;
  flex-direction: column;
  overflow: hidden;
  touch-action: none;
}

.reels-viewer.is-open { display: flex; }

.reels-viewer__track {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.reels-viewer__slide {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.reels-viewer__slide video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.reels-viewer__ui {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px 16px env(safe-area-inset-bottom, 20px);
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 50%);
  pointer-events: none;
}

.reels-viewer__handle {
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  pointer-events: auto;
  margin-bottom: 4px;
}

.reels-viewer__product-info {
  pointer-events: auto;
  margin-bottom: 12px;
}

.reels-viewer__product-title {
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  font-family: 'Playfair Display', serif;
  margin: 0 0 2px;
  line-height: 1.2;
}

.reels-viewer__product-price {
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  opacity: 0.9;
}

.reels-viewer__shop-btn {
  pointer-events: auto;
  align-self: flex-start;
  background: var(--reels-accent);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; gap: 6px;
}

.reels-viewer__close {
  position: absolute;
  top: env(safe-area-inset-top, 16px);
  right: 16px;
  z-index: 10;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(0,0,0,0.4);
  border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: #fff;
}
.reels-viewer__close svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2.5; }

/* Counter indicator */
.reels-viewer__counter {
  position: absolute;
  top: env(safe-area-inset-top, 16px);
  left: 16px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

/* ===================== BOTTOM SHEET ===================== */
.reels-sheet {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 10001;
  background: var(--reels-sheet-bg);
  border-radius: 24px 24px 0 0;
  padding: 28px 24px calc(env(safe-area-inset-bottom, 0px) + 28px);
  box-shadow: 0 -10px 40px rgba(0,0,0,0.2);
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 85vh;
  overflow-y: auto;
}

.reels-sheet.is-open {
  display: block;
  animation: sheetUp 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes sheetUp { from { transform: translateY(100%) } to { transform: translateY(0) } }

.reels-sheet__backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0,0,0,0.5);
}
.reels-sheet__backdrop.is-open { display: block; }

.reels-sheet__handle-bar {
  width: 40px; height: 4px;
  background: #e0e0e0;
  border-radius: 4px;
  margin: 0 auto 20px;
}

.reels-sheet__close {
  position: absolute;
  top: 16px; right: 16px;
  width: 36px; height: 36px;
  background: #f0f0f0; /* Stronger gray background */
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: #333;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.reels-sheet__close:hover { background: #e0e0e0; }
.reels-sheet__close svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 3; }

.reels-sheet__header {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
}

.reels-sheet__header img {
  width: 90px; height: 90px;
  object-fit: contain;
  border-radius: 10px;
  background: #f9f5f0;
  flex-shrink: 0;
}

.reels-sheet__info { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.reels-sheet__title { font-size: 16px; font-weight: 700; color: var(--reels-text); font-family: 'Playfair Display', serif; margin-bottom: 2px; }
.reels-sheet__price { font-size: 15px; font-weight: 600; color: var(--reels-accent); margin-bottom: 6px; }
.reels-sheet__desc {
  font-size: 12px;
  line-height: 1.45;
  color: var(--reels-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}

.reels-sheet__variants { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.reels-sheet__variant-btn {
  padding: 6px 14px;
  border: 1.5px solid #e0e0e0;
  border-radius: 50px;
  background: #fff;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
  color: var(--reels-text);
}
.reels-sheet__variant-btn.selected,
.reels-sheet__variant-btn:hover {
  border-color: var(--reels-accent);
  background: var(--reels-accent);
  color: #fff;
}

.reels-sheet__qty {
  display: flex;
  align-items: center;
  border: 1.5px solid #e0e0e0;
  border-radius: 50px;
  width: fit-content;
  overflow: hidden;
  margin-bottom: 20px;
}
.reels-sheet__qty-btn {
  width: 36px; height: 36px;
  background: none; border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--reels-text);
}
.reels-sheet__qty-val { width: 36px; text-align: center; font-size: 15px; font-weight: 600; color: var(--reels-text); }

.reels-sheet__footer {
  display: flex !important;
  flex-direction: row !important;
  gap: 12px;
  margin-top: 15px;
  padding-bottom: 10px; /* Small safe area padding */
}

.reels-sheet__footer-btn--more {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 10px;
  background: #f5f5f5;
  color: var(--reels-text);
  text-decoration: none;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s;
  white-space: nowrap;
}
.reels-sheet__footer-btn--more:hover { background: #eeeeee; }

.reels-sheet__add-btn {
  flex: 1.5;
  padding: 14px 10px;
  background: var(--reels-accent);
  color: #fff;
  border: none;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}
.reels-sheet__add-btn:hover { background: var(--reels-accent-dark); }

/* ===================== TOAST ===================== */
.reels-toast {
  position: fixed;
  bottom: 30px; left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #1a1a1a;
  color: #fff;
  padding: 12px 24px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  z-index: 99999;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s;
  opacity: 0;
  white-space: nowrap;
}
.reels-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 768px) {
  .reels-swiper-wrap { padding: 0 16px; }

  .reels-modal {
    display: none !important;
  }

  :root {
    --reels-card-w: clamp(180px, 62vw, 240px);
  }
}

@media (min-width: 769px) {
  .reels-viewer { display: none !important; } /* Desktop uses modal */
}
