/* ============================================================
   TRIMSCB PREMIUM 3D ENHANCEMENT LAYER
   Fixes: Hero mobile responsive | Payment toggles | Enhanced UI
   ============================================================ */

/* â”€â”€â”€ 1. HERO â€” Full-Background Image (text overlay) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

/* Image becomes a true full-bleed background behind all content */
.hero {
  min-height: calc(100vh - 86px);
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  padding: 60px clamp(24px, 7vw, 110px) 130px;
  overflow: hidden;
  isolation: isolate;
}

/* Image: full-bleed background, behind everything */
.hero-visual {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  display: block;
  opacity: 0.38;
  filter: saturate(0.7) contrast(1.1);
  animation: heroDrift 10s ease-in-out infinite;
  transform-origin: center center;
}

/* Gradient veil â€” keeps text crisp, image stays moody */
.hero-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(160deg,
      rgba(7,8,9,0.78) 0%,
      rgba(7,8,9,0.55) 40%,
      rgba(7,8,9,0.35) 70%,
      rgba(7,8,9,0.65) 100%),
    linear-gradient(0deg, rgba(7,8,9,0.85) 0%, transparent 30%);
  z-index: 1;
}

/* Copy sits above image */
.hero-copy {
  position: relative;
  z-index: 3;
  max-width: 680px;
}

/* Search bar */
.hero-search {
  position: absolute;
  bottom: 44px;
  left: 50%;
  transform: translateX(-50%);
  width: min(780px, 86%);
  z-index: 4;
}

/* Float chip â€” keep visible, top-right corner */
.float-chip {
  position: absolute;
  right: clamp(24px, 5vw, 80px);
  bottom: 22%;
  z-index: 4;
}

/* â”€â”€â”€ Tablet (max 1000px) â”€â”€â”€ */
@media (max-width: 1000px) {
  .hero {
    min-height: calc(100vh - 86px);
    padding: 50px clamp(20px, 5vw, 70px) 120px;
  }
  .hero-visual img { opacity: 0.32; }
  .hero-copy { max-width: 600px; }
  .float-chip { right: 24px; bottom: 18%; }
}

/* â”€â”€â”€ Mobile (max 760px) â”€â”€â”€ */
@media (max-width: 760px) {
  .hero {
    min-height: 94svh;
    padding: 48px 20px 110px;
    align-items: flex-start;
  }

  /* Image stays full background â€” just slightly more opaque for impact */
  .hero-visual img {
    opacity: 0.28;
    object-position: 65% center;
  }

  .hero-visual::after {
    background:
      linear-gradient(160deg,
        rgba(7,8,9,0.88) 0%,
        rgba(7,8,9,0.62) 45%,
        rgba(7,8,9,0.45) 75%,
        rgba(7,8,9,0.75) 100%),
      linear-gradient(0deg, rgba(7,8,9,0.92) 0%, transparent 28%);
  }

  .hero-copy { max-width: 100%; }
  .hero h1 { font-size: clamp(44px, 12vw, 62px); letter-spacing: -1.5px; }
  .hero-copy > p { font-size: 14px; max-width: 88%; margin: 18px 0; }
  .hero-cta { flex-direction: column; align-items: flex-start; gap: 16px; }
  .trust-row { flex-wrap: wrap; gap: 14px; margin-top: 30px; }

  .float-chip {
    right: 16px;
    bottom: 130px;
    padding: 10px 14px;
    font-size: 8px;
  }

  .hero-search {
    bottom: 20px;
    left: 14px;
    right: 14px;
    width: auto;
    transform: none;
    height: 56px;
  }
  .hero-search button { padding: 0 14px; font-size: 9px; }
}

@media (max-width: 480px) {
  .hero { min-height: 92svh; }
  .hero-visual img { opacity: 0.22; object-position: 72% center; }
  .hero h1 { font-size: clamp(40px, 13vw, 58px); }
  .float-chip { display: none; }
}

/* â”€â”€â”€ 2. ENHANCED 3D ANIMATIONS â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

/* Scroll-reveal stagger */
.product-grid .product-card:nth-child(1) { transition-delay: 0.04s; }
.product-grid .product-card:nth-child(2) { transition-delay: 0.10s; }
.product-grid .product-card:nth-child(3) { transition-delay: 0.16s; }
.product-grid .product-card:nth-child(4) { transition-delay: 0.22s; }
.product-grid .product-card:nth-child(5) { transition-delay: 0.28s; }
.product-grid .product-card:nth-child(6) { transition-delay: 0.34s; }
.product-grid .product-card:nth-child(7) { transition-delay: 0.40s; }
.product-grid .product-card:nth-child(8) { transition-delay: 0.46s; }

.product-card {
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.45s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.3s ease;
  opacity: 0;
  transform: translateY(30px) scale(0.97);
}

.product-card.in-view {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.product-card:hover {
  transform: perspective(1000px) rotateX(3.5deg) rotateY(var(--tilt-y, 0deg)) translateY(-12px) scale(1.012);
  box-shadow: 0 40px 100px rgba(0,0,0,0.6), 0 0 0 1px rgba(143,231,255,0.25) inset;
}

/* Category cards enhanced */
.category-card {
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.4s ease,
              background 0.3s ease;
}

.category-card:hover {
  transform: perspective(1000px) rotateX(2.5deg) translateY(-10px);
  box-shadow: 0 36px 90px rgba(0,0,0,0.5), 0 0 0 1px rgba(121,242,208,0.2) inset;
}

/* Glowing accent on marquee */
.marquee {
  background: linear-gradient(90deg, transparent, rgba(143,231,255,0.04), transparent);
  border-color: rgba(255,255,255,0.09);
}

/* Section heads with subtle slide-in */
.section-head { overflow: hidden; }

/* Manifesto section - depth layer */
.manifesto {
  position: relative;
}
.manifesto::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 50%, rgba(143,231,255,0.06), transparent 40%),
              radial-gradient(circle at 80% 60%, rgba(121,242,208,0.05), transparent 35%);
  pointer-events: none;
  z-index: 0;
}
.manifesto > * { position: relative; z-index: 1; }

/* Testimonials â€” ambient glow pulse */
.testimonials {
  position: relative;
  overflow: hidden;
}
.testimonials::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(185,167,255,0.08), transparent 60%);
  animation: pulseGlow 6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes pulseGlow {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}

/* Floating orbs on hero for depth */
.hero::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(143,231,255,0.1), transparent 65%);
  top: -100px;
  right: 20%;
  pointer-events: none;
  z-index: 1;
  animation: orbFloat 12s ease-in-out infinite;
}
.hero::after {
  content: '';
  position: absolute;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(185,167,255,0.08), transparent 65%);
  bottom: 80px;
  left: 10%;
  pointer-events: none;
  z-index: 1;
  animation: orbFloat 9s ease-in-out infinite reverse;
}
@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(20px, -30px) scale(1.05); }
  66% { transform: translate(-15px, 20px) scale(0.97); }
}

/* Float chip refined */
.float-chip {
  border-radius: 20px;
  animation: chipFloat 6s ease-in-out infinite;
}
@keyframes chipFloat {
  0%, 100% { transform: translateY(0) rotate(0.3deg); }
  50% { transform: translateY(-14px) rotate(-0.3deg); }
}

/* Stat cards enhanced hover */
.stats span {
  background: linear-gradient(145deg, rgba(255,255,255,0.1), rgba(255,255,255,0.03));
  border-radius: 14px;
  padding: 16px 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.stats span:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.35);
}

/* Smooth btn shimmer */
.btn.primary {
  position: relative;
  overflow: hidden;
}
.btn.primary::after {
  content: '';
  position: absolute;
  inset: -60% -30%;
  background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,0.55), transparent 65%);
  transform: translateX(-80%);
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.btn.primary:hover::after { transform: translateX(80%); }

/* Product add button micro-animation */
.product-info button {
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.product-info button:hover {
  transform: scale(1.12) rotate(12deg);
  box-shadow: 0 12px 30px rgba(143,231,255,0.2);
}
.product-info button.added {
  animation: addedPop 0.4s ease;
}
@keyframes addedPop {
  0% { transform: scale(1); }
  40% { transform: scale(1.3) rotate(18deg); }
  100% { transform: scale(1); }
}

/* Reviewer badge glow */
.reviewer > span {
  background: linear-gradient(145deg, #e8ecf0, #c8ced4);
  box-shadow: 0 12px 35px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.reviewer > span:hover {
  transform: scale(1.08) rotate(-5deg);
}

/* â”€â”€â”€ 3. ADMIN PAYMENT TOGGLE VISUAL FIX â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

/* Toggle label layout */
.toggle-label {
  display: flex !important;
  align-items: center;
  gap: 14px;
  grid-column: 1 / -1;
  cursor: pointer;
}
.toggle-label span {
  font-size: 13px;
  color: #c8cdd2;
  user-select: none;
}

/* Improved toggle appearance */
.admin-toggle {
  flex: 0 0 52px;
  width: 52px !important;
  height: 28px !important;
  appearance: none;
  -webkit-appearance: none;
  background: rgba(107,114,128,0.6);
  border: 1px solid rgba(255,255,255,0.12) !important;
  border-radius: 999px;
  position: relative;
  cursor: pointer;
  transition: background 0.3s ease, box-shadow 0.3s ease;
  flex-shrink: 0;
}
.admin-toggle::before {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  left: 2px;
  top: 2px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.admin-toggle:checked {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  border-color: rgba(34,197,94,0.4) !important;
  box-shadow: 0 0 0 4px rgba(34,197,94,0.12);
}
.admin-toggle:checked::before {
  transform: translateX(24px);
}
.admin-toggle:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Payment panel enhanced */
.payment-panel {
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.3s ease;
}
.payment-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(143,231,255,0.5), rgba(121,242,208,0.5), rgba(185,167,255,0.5));
  opacity: 0;
  transition: opacity 0.3s ease;
}
.payment-panel:hover::before { opacity: 1; }
.payment-panel:has(.admin-toggle:checked)::before { opacity: 1; }

/* â”€â”€â”€ 4. GLASSMORPHISM UPGRADE â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

/* Hero search glass */
.hero-search.glass {
  background: rgba(12, 14, 16, 0.7);
  border: 1px solid rgba(255,255,255,0.15);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: 0 24px 60px rgba(0,0,0,0.4), 0 1px 0 rgba(255,255,255,0.08) inset;
}

/* Nav glass on mobile */
.site-header nav.open {
  background: rgba(8, 10, 12, 0.94);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
}

/* Order summary card */
.order-summary, .form-panel {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* â”€â”€â”€ 5. HEADER SCROLL EFFECT â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

.site-header.scrolled {
  background: rgba(7,8,9,0.95) !important;
  border-bottom-color: rgba(255,255,255,0.08) !important;
  box-shadow: 0 8px 40px rgba(0,0,0,0.4) !important;
}

/* â”€â”€â”€ 6. SMOOTH PAGE TRANSITIONS â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
main { animation: pageIn 0.4s ease both; }

/* â”€â”€â”€ 7. TOAST ENHANCEMENT â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.toast {
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.2);
  backdrop-filter: blur(16px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

/* â”€â”€â”€ 8. FOOTER GLASS BORDER â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
footer {
  position: relative;
}
footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(143,231,255,0.3), rgba(121,242,208,0.25), transparent);
}

/* â”€â”€â”€ 9. REDUCED MOTION RESPECT â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
@media (prefers-reduced-motion: reduce) {
  .hero-visual img,
  .float-chip,
  .hero::before,
  .hero::after,
  .testimonials::before,
  .product-card {
    animation: none !important;
    transition: none !important;
  }
  .product-card {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Final mobile hero polish */
@media (max-width: 760px) {
  .hero {
    display: flex;
    flex-direction: column;
    min-height: auto;
    padding: 46px 20px 34px;
    overflow: hidden;
  }
  .hero-copy {
    width: min(100%, 620px);
    padding: 14px 0 0;
  }
  .hero h1 {
    max-width: 11.5ch;
    font-size: clamp(46px, 14vw, 66px);
    line-height: 0.96;
    letter-spacing: 0;
  }
  .hero h1 em {
    -webkit-text-stroke-width: 0.8px;
  }
  .hero-copy > p {
    max-width: 34rem;
    margin: 20px 0 24px;
    font-size: 14px;
    line-height: 1.75;
    color: #d4d8dc;
    border-left: 2px solid rgba(255,255,255,.28);
    padding-left: 14px;
  }
  .hero-visual {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    right: auto;
    opacity: 1;
  }
  .hero-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 68% top;
    opacity: 0.24;
    transform: none !important;
  }
  .hero-visual::after {
    background:
      linear-gradient(90deg, rgba(7,8,9,.96) 0%, rgba(7,8,9,.78) 45%, rgba(7,8,9,.42) 100%),
      linear-gradient(0deg, rgba(7,8,9,.95) 0%, transparent 34%);
  }
  .float-chip { display: none; }
  .trust-row {
    margin-top: 28px;
    gap: 16px;
  }
  .hero-search {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    transform: none;
    width: 100%;
    margin-top: 30px;
    height: auto;
    min-height: 58px;
  }
}

@media (max-width: 420px) {
  .hero {
    padding-top: 38px;
    padding-bottom: 28px;
  }
  .hero h1 {
    font-size: clamp(42px, 13.5vw, 58px);
    max-width: 10.8ch;
  }
  .hero-copy > p {
    max-width: 100%;
  }
}
