/* =============================================
   HILGOD — HOME PAGE CSS
   ============================================= */

/* ---- HERO SLIDER ---- */
.hero-slider {
  position: relative;
  overflow: hidden;
  height: 480px;
  background: var(--dark);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .6s ease;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: all;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
  transition: transform 6s ease;
}

.hero-slide.active .hero-bg {
  transform: scale(1);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, .65) 0%, rgba(0, 0, 0, .2) 70%, rgba(0, 0, 0, 0) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 0 var(--space-12);
  max-width: 580px;
}

.hero-tag {
  display: inline-block;
  padding: 4px 14px;
  background: var(--primary);
  color: var(--white);
  border-radius: var(--radius-full);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  margin-bottom: var(--space-3);
}

.hero-title {
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--white);
  margin-bottom: var(--space-3);
}

.hero-title span {
  color: var(--primary-light);
}

.hero-sub {
  font-size: 1rem;
  color: rgba(255, 255, 255, .8);
  margin-bottom: var(--space-6);
}

.hero-actions {
  display: flex;
  gap: var(--space-3);
}

/* Hero Product Image */
.hero-product-img {
  position: absolute;
  right: 8%;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  pointer-events: none;
  width: 45%;
  max-width: 480px;
  height: 100%;
  max-height: 480px;
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, .6));
  animation: heroImgIn .9s cubic-bezier(0.2, 0.8, 0.2, 1) .2s both;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.7);
  border: 2px solid rgba(255, 255, 255, 0.1);
  transform: perspective(1000px) rotateY(-8deg) rotateX(4deg);
}

.hero-slide.active .hero-product-img img {
  animation: heroImgFloat 6s ease-in-out infinite alternate;
}

@keyframes heroImgFloat {
  from {
    transform: perspective(1000px) rotateY(-8deg) rotateX(4deg) translateY(0);
  }

  to {
    transform: perspective(1000px) rotateY(-8deg) rotateX(4deg) translateY(-18px);
  }
}

@keyframes heroImgIn {
  from {
    opacity: 0;
    transform: translateY(-40%) translateX(60px) scale(.85);
  }

  to {
    opacity: 1;
    transform: translateY(-50%) translateX(0) scale(1);
  }
}

/* Slider Controls */
.slider-dots {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 3;
}

.slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .4);
  cursor: pointer;
  transition: all var(--transition);
}

.slider-dot.active {
  width: 24px;
  border-radius: 4px;
  background: var(--white);
}

.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .15);
  backdrop-filter: blur(6px);
  color: var(--white);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 3;
  transition: all var(--transition);
  border: 1.5px solid rgba(255, 255, 255, .25);
}

.slider-arrow:hover {
  background: var(--primary);
  border-color: var(--primary);
}

.slider-prev {
  left: 16px;
}

.slider-next {
  right: 16px;
}

/* ---- TRUST BAR ---- */
.trust-bar {
  background: var(--white);
  border-bottom: 1px solid var(--gray-4);
  padding: 10px 0;
}

.trust-bar .container {
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--dark-2);
  padding: 4px 12px;
}

.trust-item i {
  color: var(--primary);
  font-size: 1.1rem;
}

/* ---- FLASH SALE ---- */
.flash-sale-section {
  background: var(--white);
  border-radius: var(--radius-md);
  margin: var(--space-6) 0;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.flash-header {
  background: linear-gradient(135deg, var(--primary), #ff5500);
  padding: var(--space-4) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flash-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 10px;
}

.flash-lightning {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, .2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.12);
    opacity: .8;
  }
}

.countdown {
  display: flex;
  align-items: center;
  gap: 6px;
}

.countdown-block {
  background: rgba(0, 0, 0, .3);
  color: var(--white);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  text-align: center;
  min-width: 50px;
}

.countdown-num {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.countdown-label {
  font-size: .6rem;
  text-transform: uppercase;
  opacity: .8;
  margin-top: 2px;
}

.countdown-sep {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--white);
  opacity: .6;
}

.flash-products {
  padding: var(--space-6);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-4);
}

/* ---- CATEGORIES GRID ---- */
.categories-section {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: var(--space-3);
}

.cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: var(--space-3) var(--space-2);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.cat-card:hover {
  background: var(--primary-xlight);
  transform: translateY(-3px);
}

.cat-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gray-6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--primary);
  transition: all var(--transition);
}

.cat-card:hover .cat-icon {
  background: var(--primary);
  color: var(--white);
}

.cat-name {
  font-size: .78rem;
  font-weight: 600;
  color: var(--dark);
  text-align: center;
  line-height: 1.3;
}

/* ---- TWO-PANEL BANNER ---- */
.banner-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin: var(--space-6) 0;
}

.banner-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 180px;
  cursor: pointer;
  background: linear-gradient(135deg, var(--dark), var(--dark-2));
}

.banner-card__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform var(--transition-slow);
}

.banner-card:hover .banner-card__bg {
  transform: scale(1.06);
}

.banner-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, .6), rgba(0, 0, 0, .1));
}

.banner-card__content {
  position: relative;
  z-index: 1;
  padding: var(--space-6);
}

.banner-card__tag {
  font-size: .72rem;
  color: var(--primary-light);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.banner-card__title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--white);
  margin: 4px 0;
}

.banner-card__sub {
  font-size: .82rem;
  color: rgba(255, 255, 255, .75);
  margin-bottom: 12px;
}

/* ---- 4-PANEL BANNER ---- */
.banner-4col {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  margin: var(--space-6) 0;
}

.mini-banner {
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 130px;
  position: relative;
  cursor: pointer;
  background: var(--gray-6);
  display: flex;
  align-items: center;
  justify-content: center;
}

.mini-banner__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.mini-banner__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .35);
}

.mini-banner__text {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--white);
}

.mini-banner__text h4 {
  font-size: .95rem;
  font-weight: 700;
}

.mini-banner__text p {
  font-size: .75rem;
  opacity: .8;
}

/* ---- PRODUCT GRID SECTION ---- */
.products-section {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-6);
}

.product-grid-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-4);
}

.product-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
}

.product-grid-6 {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--space-3);
}

/* ---- HORIZONTAL SCROLL ROW ---- */
.horizontal-scroll-wrap {
  overflow-x: auto;
  padding-bottom: 8px;
}

.horizontal-scroll-wrap::-webkit-scrollbar {
  height: 4px;
}

.product-row {
  display: flex;
  gap: var(--space-3);
  width: max-content;
}

.product-row .product-card {
  width: 200px;
  flex-shrink: 0;
}

/* ---- FEATURED + SIDEBAR LAYOUT ---- */
.featured-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: var(--space-4);
}

.featured-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.sidebar-banner-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  flex: 1;
  min-height: 150px;
  position: relative;
  background: linear-gradient(135deg, #1a1a1a, #333);
  cursor: pointer;
}

.sidebar-banner-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.sidebar-banner-card:hover img {
  transform: scale(1.06);
}

.sidebar-banner-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, .5), transparent);
}

.sidebar-banner-card__label {
  position: absolute;
  bottom: 12px;
  left: 12px;
  color: var(--white);
  font-size: .85rem;
  font-weight: 700;
}

/* ---- TOP BRANDS ---- */
.brands-section {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-6);
}

.brands-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: var(--space-4);
}

.brand-item {
  height: 70px;
  border: 1.5px solid var(--gray-4);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  color: var(--gray-1);
  font-size: .85rem;
  font-weight: 700;
  padding: 10px;
}

.brand-item:hover {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

/* ---- RECENTLY VIEWED ---- */
.recently-viewed {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-6);
}

/* ---- RESPONSIVE HOME ---- */
@media (max-width: 1100px) {
  .product-grid-5 {
    grid-template-columns: repeat(4, 1fr);
  }

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

  .flash-products {
    grid-template-columns: repeat(4, 1fr);
  }

  .categories-grid {
    grid-template-columns: repeat(6, 1fr);
  }

  .brands-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

@media (max-width: 900px) {
  .hero-slider {
    height: 360px;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-content {
    padding: 0 var(--space-8);
  }

  .hero-product-img {
    max-width: 240px;
    max-height: 280px;
    right: 4%;
  }

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

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

  .categories-grid {
    grid-template-columns: repeat(5, 1fr);
  }

  .featured-layout {
    grid-template-columns: 1fr;
  }

  .brands-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 700px) {
  .hero-slider {
    height: 280px;
  }

  .hero-title {
    font-size: 1.5rem;
  }

  .hero-sub {
    font-size: .87rem;
  }

  .hero-content {
    padding: 0 var(--space-4);
    max-width: 260px;
  }

  .hero-product-img {
    display: none;
  }

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

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

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

  .categories-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .banner-2col {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 440px) {
  .categories-grid {
    grid-template-columns: repeat(3, 1fr);
  }

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