/* =========================================================
   Tech4U — Home page
   ========================================================= */

/* ===================== Hero ===================== */
.hero-section {
  padding: 26px 0 8px;
}

.hero-carousel {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  position: relative;
  background: #0b1220;
}

.hero-carousel .carousel-inner {
  height: 470px;
}

.hero-slide {
  height: 100%;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px);
  background-size: 26px 26px;
  opacity: 0.45;
  pointer-events: none;
}

.hero-slide--1 {
  background: radial-gradient(circle at 76% 38%, rgba(99, 102, 241, 0.55), transparent 52%),
    linear-gradient(120deg, #080d1b 0%, #141a3d 55%, #0b3a52 100%);
}

.hero-slide--2 {
  background: radial-gradient(circle at 76% 40%, rgba(6, 182, 212, 0.45), transparent 52%),
    linear-gradient(120deg, #080d1b 0%, #1b1540 55%, #3b1d5e 100%);
}

.hero-slide--3 {
  background: radial-gradient(circle at 76% 40%, rgba(249, 115, 22, 0.32), transparent 52%),
    linear-gradient(120deg, #080d1b 0%, #12252b 55%, #0b4a52 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  max-width: 640px;
  padding: 44px 56px 58px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
}

.hero-content .hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.25);
  border: 1px solid rgba(129, 140, 248, 0.45);
  color: #c7d2fe;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.hero-content h1 {
  color: #fff;
  font-size: clamp(1.8rem, 3.2vw, 2.9rem);
  line-height: 1.14;
  margin-bottom: 14px;
  letter-spacing: -0.03em;
}

.hero-content h1 .gradient-text {
  background: linear-gradient(90deg, #a5b4fc, #22d3ee);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-content p {
  color: #cbd5e1;
  font-size: 0.95rem;
  max-width: 460px;
  margin-bottom: 24px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-btn-main {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  font-size: 0.92rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-btn-main:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(255, 255, 255, 0.18);
  color: var(--ink);
}

.hero-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  font-weight: 600;
  font-size: 0.92rem;
  backdrop-filter: blur(6px);
}

.hero-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.hero-stats {
  display: flex;
  gap: 30px;
  margin-top: 26px;
}

.hero-stats .stat strong {
  display: block;
  font-size: 1.25rem;
  color: #fff;
  line-height: 1.2;
}

.hero-stats .stat span {
  font-size: 0.72rem;
  color: #94a3b8;
}

/* Floating product visual */
.hero-visual {
  position: absolute;
  right: 5%;
  top: 50%;
  transform: translateY(-50%);
  width: 40%;
  height: 78%;
  display: grid;
  place-items: center;
  z-index: 1;
  pointer-events: none;
}

.hero-glow {
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.2), transparent 65%);
  filter: blur(8px);
}

.hero-visual img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 34px 46px rgba(0, 0, 0, 0.5));
  position: relative;
  z-index: 1;
}

.hero-carousel .carousel-item.active .hero-visual img {
  animation: heroFloat 6s ease-in-out infinite;
}

@keyframes heroFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-14px);
  }
}

.hero-visual-card {
  position: absolute;
  left: 0;
  bottom: 4%;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(10px);
  color: #fff;
}

.hero-visual-card .hv-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(16, 185, 129, 0.22);
  color: #6ee7b7;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.hero-visual-card strong {
  display: block;
  font-size: 0.8rem;
  line-height: 1.2;
}

.hero-visual-card small {
  font-size: 0.68rem;
  color: #cbd5e1;
}

/* Carousel indicators & controls */
.hero-carousel .carousel-indicators {
  bottom: 22px;
  left: auto;
  right: 56px;
  margin: 0;
  padding: 0;
  justify-content: flex-end;
}

.hero-carousel .carousel-indicators [data-bs-target] {
  width: 26px;
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.35);
  border: 0;
  margin: 0 4px;
  transition: width 0.3s ease, background 0.3s ease;
}

.hero-carousel .carousel-indicators .active {
  width: 46px;
  background: #fff;
}

.hero-carousel .carousel-control-prev,
.hero-carousel .carousel-control-next {
  width: 56px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.hero-carousel:hover .carousel-control-prev,
.hero-carousel:hover .carousel-control-next {
  opacity: 1;
}

/* ===================== Service strip ===================== */
.service-strip {
  margin-top: 26px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.service-item {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.service-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.service-item .icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--brand-100);
  color: var(--brand-600);
  font-size: 1.05rem;
  flex-shrink: 0;
}

.service-item strong {
  display: block;
  font-size: 0.9rem;
  color: var(--ink);
  line-height: 1.3;
}

.service-item span {
  font-size: 0.76rem;
  color: var(--muted);
}

/* ===================== Categories ===================== */
.category-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.category-tile {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: auto -30% -60% -30%;
  height: 120px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.14), transparent 70%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.category-tile:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
  border-color: rgba(99, 102, 241, 0.4);
}

.category-tile:hover::after {
  opacity: 1;
}

.category-tile .cat-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 14px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  color: #fff;
  background: var(--gradient);
  box-shadow: 0 10px 22px rgba(79, 70, 229, 0.28);
  transition: transform 0.25s ease;
}

.category-tile:nth-child(2n) .cat-icon {
  background: linear-gradient(135deg, #06b6d4, #0ea5e9);
  box-shadow: 0 10px 22px rgba(6, 182, 212, 0.25);
}

.category-tile:nth-child(3n) .cat-icon {
  background: linear-gradient(135deg, #f97316, #f59e0b);
  box-shadow: 0 10px 22px rgba(249, 115, 22, 0.25);
}

.category-tile:hover .cat-icon {
  transform: scale(1.08) rotate(-4deg);
}

.category-tile h3 {
  font-size: 0.92rem;
  margin-bottom: 4px;
}

.category-tile p {
  font-size: 0.74rem;
  color: var(--muted);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===================== Product card ===================== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.product-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  position: relative;
  height: 100%;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(99, 102, 241, 0.35);
}

.product-card__media {
  position: relative;
  height: 200px;
  background: linear-gradient(160deg, #f8f9ff 0%, #eef1fb 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  overflow: hidden;
}

.product-card__media img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
  transition: transform 0.35s ease;
}

.product-card:hover .product-card__media img {
  transform: scale(1.06);
}

.product-card__badges {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 2;
}

.p-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  background: var(--brand-600);
  color: #fff;
  box-shadow: 0 6px 14px rgba(79, 70, 229, 0.3);
}

.p-badge.sale {
  background: var(--accent);
  box-shadow: 0 6px 14px rgba(249, 115, 22, 0.3);
}

.p-badge.featured {
  background: #0ea5e9;
}

.p-badge.out {
  background: #64748b;
  box-shadow: none;
}

.product-card__quick {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #fff;
  color: var(--brand-600);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  transform: translateY(-6px);
  transition: all 0.25s ease;
  z-index: 2;
}

.product-card:hover .product-card__quick {
  opacity: 1;
  transform: translateY(0);
}

.product-card__body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.product-card__meta .brand-name {
  color: var(--brand-600);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.product-card__title {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
}

.product-card__title a {
  color: var(--ink);
}

.product-card__title a:hover {
  color: var(--brand-600);
}

.product-card__rating {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: #0f766e;
  margin-bottom: 10px;
}

.product-card__rating i {
  color: #0d9488;
}

.product-card__price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: auto;
  margin-bottom: 14px;
}

.price-now {
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--danger);
  letter-spacing: -0.02em;
}

.price-old {
  font-size: 0.8rem;
  color: #94a3b8;
  text-decoration: line-through;
}

.product-card__actions {
  display: flex;
  gap: 8px;
}

.product-card__actions .btn {
  flex: 1;
}

.product-card__actions .btn-icon {
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  padding: 0;
}

/* ===================== Promo banners ===================== */
.promo-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
}

.promo-card {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 36px;
  overflow: hidden;
  color: #fff;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  isolation: isolate;
}

.promo-card.primary {
  background: linear-gradient(120deg, #312e81 0%, #4f46e5 55%, #0891b2 100%);
}

.promo-card.secondary {
  background: linear-gradient(140deg, #0f172a 0%, #1e293b 55%, #334155 100%);
}

.promo-card::after {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  right: -90px;
  top: -110px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.22), transparent 65%);
  z-index: -1;
}

.promo-card .promo-tag {
  display: inline-flex;
  align-self: flex-start;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.promo-card h3 {
  color: #fff;
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  margin-bottom: 8px;
  max-width: 380px;
}

.promo-card p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.88rem;
  max-width: 340px;
  margin-bottom: 20px;
}

.promo-card .promo-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  padding: 10px 18px;
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  font-size: 0.85rem;
}

.promo-card .promo-link:hover {
  transform: translateY(-2px);
  color: var(--ink);
}

/* ===================== Newsletter ===================== */
.newsletter-band {
  border-radius: var(--radius-lg);
  background: var(--gradient);
  padding: 42px;
  color: #fff;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 28px;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.newsletter-band::after {
  content: "";
  position: absolute;
  right: -120px;
  bottom: -160px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.newsletter-band h2 {
  color: #fff;
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  margin-bottom: 8px;
}

.newsletter-band p {
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
  font-size: 0.9rem;
}

.newsletter-form {
  display: flex;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.newsletter-form input {
  flex: 1;
  border: 0;
  border-radius: 14px;
  padding: 14px 18px;
  font-size: 0.9rem;
  outline: none;
  background: rgba(255, 255, 255, 0.95);
}

.newsletter-form button {
  border: 0;
  border-radius: 14px;
  padding: 0 24px;
  background: #0b1220;
  color: #fff;
  font-weight: 700;
  font-size: 0.88rem;
}

/* ===================== Responsive ===================== */
@media (max-width: 1200px) {
  .category-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero-visual {
    width: 38%;
    right: 3%;
  }
}

@media (max-width: 992px) {
  .hero-carousel .carousel-inner {
    height: 420px;
  }

  .hero-content {
    padding: 32px;
    max-width: 100%;
  }

  .hero-visual {
    opacity: 0.35;
    width: 46%;
    right: 0;
  }

  .hero-visual-card {
    display: none;
  }

  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .promo-grid,
  .newsletter-band {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .hero-carousel .carousel-inner {
    height: 400px;
  }

  .hero-content {
    padding: 26px;
  }

  .hero-content p {
    display: none;
  }

  .hero-visual {
    opacity: 0.22;
    width: 60%;
  }

  .hero-stats {
    margin-top: 20px;
    gap: 20px;
  }

  .hero-carousel .carousel-indicators {
    right: 26px;
    bottom: 14px;
  }

  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .product-card__media {
    height: 160px;
  }

  .newsletter-band {
    padding: 28px;
  }
}

@media (max-width: 420px) {
  .product-grid {
    grid-template-columns: 1fr;
  }

  .service-grid {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    display: none;
  }
}
