/* ========================================
   FILE: frontend/css/home.css
   ======================================== */

/* Trust Bar */
.trust-bar {
  background: var(--color-bg-light);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-md) 0;
  overflow: hidden;
}
.trust-bar-track {
  display: flex;
  animation: marquee 25s linear infinite;
  white-space: nowrap;
}
.trust-bar-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 0 var(--space-2xl);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.trust-bar-item i { color: var(--color-primary); font-size: 16px; }

/* Category Grid */
.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}
.category-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 1;
  cursor: pointer;
  background: var(--color-bg-light);
}
.category-card:nth-child(1) { grid-row: span 2; aspect-ratio: auto; }
.category-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  opacity: 0;
  transition: transform var(--transition-slow), opacity 0.3s ease;
}
.category-card-img.loaded {
  opacity: 1;
}
.category-card:hover .category-card-img { transform: scale(1.07); }
.category-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, transparent 60%);
}
.category-card-label {
  position: absolute;
  bottom: var(--space-lg);
  left: var(--space-lg);
  right: var(--space-lg);
}
.category-card-name {
  color: white;
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-black);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: block;
}
.category-card-count {
  color: rgba(255,255,255,0.7);
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Products Slider */
.products-slider-track {
  display: flex;
  gap: var(--space-md);
  overflow-x: auto;
  overflow-y: visible;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--space-sm);
}
.products-slider-track::-webkit-scrollbar { display: none; }
.products-slider-track .product-card {
  flex-shrink: 0;
  width: 260px;
  scroll-snap-align: start;
}

/* Features Banner */
.features-banner {
  position: relative;
  min-height: 400px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  align-items: center;
}
.features-banner-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.6);
}
.features-banner-content {
  position: relative;
  z-index: 1;
  padding: var(--space-3xl) var(--space-2xl);
  color: white;
  max-width: 560px;
  box-sizing: border-box;
  overflow: hidden;
}

@media (max-width: 480px) {
  .features-banner-content {
    padding: var(--space-lg) var(--space-md);
    max-width: 100%;
  }
  .features-banner-content .hero-btn-primary,
  .features-banner-content a.btn {
    width: 100%;
    text-align: center;
    box-sizing: border-box;
    white-space: normal;
    word-break: break-word;
    display: block;
  }
}
.features-banner-tag {
  background: var(--color-primary);
  color: white;
  display: inline-block;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-md);
}
.features-banner-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: var(--font-weight-black);
  text-transform: uppercase;
  line-height: 1.1;
  margin-bottom: var(--space-md);
}

/* ── Reels / Video Section ─────────────────────────────── */
#reels-section { padding: var(--space-2xl) 0; }

.reels-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
  min-height: 300px;
  align-items: stretch;
}
.reels-track::-webkit-scrollbar { display: none; }

.reel-card {
  flex-shrink: 0;
  width: 200px;
  scroll-snap-align: start;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  display: block;
}

.reel-inner {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.3s ease;
  background-color: #111;
  display: block;
}
.reel-card:hover .reel-inner { transform: scale(1.03); }

.reel-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.5) 0%,
    transparent 30%,
    transparent 55%,
    rgba(0,0,0,0.8) 100%
  );
  z-index: 1;
}

.reel-top {
  position: absolute;
  top: 10px;
  left: 10px;
  color: white;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  z-index: 2;
}

.reel-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,0.2);
  border: 2px solid rgba(255,255,255,0.7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
  z-index: 2;
  transition: background 0.2s ease;
  padding-left: 3px;
}
.reel-card:hover .reel-play {
  background: rgba(255,255,255,0.35);
}

/* Video element inside reel card */
.reel-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  border-radius: 14px;
}

/* Play icon fades out when video is playing */
.reel-play-icon {
  transition: opacity 0.3s ease;
  pointer-events: none;
}

/* Mute button clickable */
.reel-mute[data-action="toggle-mute"] {
  cursor: pointer;
  transition: color 0.2s ease;
}
.reel-mute[data-action="toggle-mute"]:hover {
  color: white;
}

.reel-bottom {
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: 10px;
  z-index: 2;
}
.reel-mute {
  color: rgba(255,255,255,0.7);
  font-size: 13px;
  text-align: right;
  margin-bottom: 4px;
}
.reel-product {
  color: white;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Trust Badges Section */
.trust-badges-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}
.trust-badge-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-md);
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  background: var(--color-bg-light);
  transition: box-shadow var(--transition-base);
}
.trust-badge-card:hover { box-shadow: var(--shadow-md); }
.trust-badge-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(255,60,0,0.1);
  display: flex; align-items: center; justify-content: center;
  color: var(--color-primary);
  font-size: 22px;
}
.trust-badge-title {
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-sm);
}
.trust-badge-desc {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  line-height: 1.5;
}

@media (min-width: 640px)  { .reel-card { width: 210px; } }
@media (min-width: 768px) {
  .category-grid { grid-template-columns: repeat(4, 1fr); }
  .category-card:nth-child(1) { grid-row: auto; aspect-ratio: 1; }
  .trust-badges-grid { grid-template-columns: repeat(4, 1fr); }
  .products-slider-track .product-card { width: 300px; }
  .reel-card { width: 230px; }
}
@media (min-width: 1024px) {
  .products-slider-track .product-card { width: 320px; }
  .reel-card { width: 250px; }
}
@media (min-width: 1280px) { .reel-card { width: 270px; } }
