/* ==========================================================================
   HOMEPAGE (BERANDA) STYLES – Andira Utama
   ========================================================================== */

.home-page {
  --home-red: #C51516;
  --home-red-dark: #A31112;
  --home-navy: #1B2B60;
  --home-cream: #F7F5F0;
  --home-sand: #F5F2EE;
  --home-gray-bg: #F2F4F7;
  --home-text: #333333;
  --home-text-muted: #606060;
  --home-text-body: #4A4A4A;

  width: 100%;
  background: #FFFFFF;
  color: var(--home-text);
  font-family: var(--font-inter, 'Inter', sans-serif);
  overflow-x: hidden;
}

.home-container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 120px;
  position: relative;
}

/* Section label (red tag with cut corner) */
.home-label {
  display: inline-flex;
  align-items: center;
  min-height: 35px;
  padding: 8px 32px 8px 24px;
  font-family: var(--font-inter, 'Inter', sans-serif);
  font-weight: 600;
  font-size: 16px;
  line-height: 19px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--home-cream);
  background: linear-gradient(90deg, #C3161C 0%, rgba(195, 22, 28, 0.18) 100%);
  clip-path: polygon(0 12.5px, 22.7px 0, 100% 0, 100% 100%, 0 100%);
}

.home-section-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 40px;
}

.home-section-head.is-center {
  align-items: center;
  text-align: center;
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
}

.home-section-head.is-center .home-label {
  margin-bottom: 16px;
}

.home-section-head.is-split {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.home-section-head.is-split > div:first-child {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.home-section-title {
  font-family: var(--font-inter, 'Inter', sans-serif);
  font-weight: 600;
  font-size: 32px;
  line-height: 44px;
  color: var(--home-text);
  margin: 0;
}

.home-section-desc {
  font-size: 18px;
  line-height: 28px;
  color: var(--home-text-muted);
  margin: 0;
}

/* Outline navy button (Lihat Semua Produk / Lihat Artikel Lainnya) */
.btn-outline-navy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  border: 1px solid var(--home-navy);
  color: var(--home-navy);
  font-weight: 500;
  font-size: 16px;
  line-height: 24px;
  letter-spacing: -0.128px;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.btn-outline-navy:hover {
  background: var(--home-navy);
  color: #FFFFFF;
}

.btn-outline-navy:hover img {
  filter: brightness(0) invert(1);
}

/* ==========================================================================
   1. HERO
   ========================================================================== */
.home-hero-sec {
  position: relative;
  min-height: 670px;
  padding: 111px 0 20px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: #2B2B2B;
}

.home-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 75% center;
  transform: scaleX(-1);
  z-index: 0;
}

.home-hero-overlay {
  position: absolute;
  top: -13px;
  left: 0;
  width: 81%;
  height: calc(100% + 13px);
  background: linear-gradient(95deg, rgba(72, 72, 72, 0.9) 10%, rgba(0, 0, 0, 0) 97%);
  opacity: 0.64;
  filter: blur(28px);
  pointer-events: none;
  z-index: 1;
}

.home-hero-sec .home-container {
  z-index: 2;
}

.home-hero-content {
  width: 666px;
  max-width: 100%;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  color: var(--home-cream);
}

.home-hero-title {
  font-weight: 600;
  font-size: 48px;
  line-height: 64px;
  color: var(--home-cream);
  margin: 24px 0 14px;
}

.home-hero-desc {
  font-weight: 500;
  font-size: 18px;
  line-height: 28px;
  color: var(--home-cream);
  margin: 0 0 40px;
}

.home-hero-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.btn-hero-ghost,
.btn-hero-primary {
  display: inline-flex;
  align-items: center;
  padding: 12px 20px;
  font-weight: 500;
  font-size: 16px;
  line-height: 19px;
  text-decoration: none;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.btn-hero-ghost {
  border: 1px solid var(--home-cream);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  color: var(--home-cream);
}

.btn-hero-ghost:hover {
  background: var(--home-cream);
  color: var(--home-text);
}

.btn-hero-primary {
  border: 1px solid var(--home-red);
  background: var(--home-red);
  color: #FFFFFF;
}

.btn-hero-primary:hover {
  background: var(--home-red-dark);
  border-color: var(--home-red-dark);
}

/* ==========================================================================
   3. KATEGORI PRODUK UNGGULAN
   ========================================================================== */
.home-cat-sec {
  background: var(--home-gray-bg);
  padding: 64px 0 84px;
}

.home-cat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.home-cat-card {
  position: relative;
  display: block;
  height: 276px;
  overflow: hidden;
  text-decoration: none;
}

.home-cat-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--transition-smooth);
}

.home-cat-bar {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 16px;
  height: 72px;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--home-red);
  transition: background-color var(--transition-fast);
}

.home-cat-name {
  font-weight: 700;
  font-size: 16px;
  line-height: 24px;
  color: var(--home-cream);
  margin: 0;
}

.home-cat-bar img {
  transition: transform var(--transition-fast);
}

.home-cat-card:hover .home-cat-img {
  transform: scale(1.04);
}

.home-cat-card:hover .home-cat-bar {
  background: var(--home-red-dark);
}

.home-cat-card:hover .home-cat-bar img {
  transform: translateX(4px);
}

/* ==========================================================================
   4. TENTANG KAMI & KEUNGGULAN
   ========================================================================== */
.home-about-sec {
  background: var(--home-gray-bg);
  padding: 0 0 60px;
}

.home-about-inner {
  display: flex;
  gap: 48px;
  align-items: center;
}

.home-about-img {
  flex: 0 0 520px;
  max-width: 520px;
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

.home-about-content {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.home-about-intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.home-about-text {
  font-size: 18px;
  line-height: 28px;
  color: var(--home-text-muted);
  text-align: justify;
  margin: 0;
}

.home-about-text strong {
  font-weight: 700;
  color: var(--home-navy);
}

.home-about-adv {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.home-about-adv .home-section-title {
  line-height: 1.5;
}

.home-adv-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.home-adv-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.home-adv-item > img {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
}

.home-adv-title {
  font-weight: 600;
  font-size: 16px;
  line-height: 24px;
  color: var(--home-navy);
  margin: 0 0 8px;
}

.home-adv-desc {
  font-size: 16px;
  line-height: 24px;
  color: var(--home-text-body);
  margin: 0;
}

/* ==========================================================================
   5. DAFTAR PRODUK
   ========================================================================== */
.home-products-sec {
  background: #FFFFFF;
  padding: 80px 0;
}

.home-products-sec .home-section-head {
  margin-bottom: 56px;
}

.home-products-layout {
  display: flex;
  gap: 32px;
  align-items: stretch;
}

.home-products-filter {
  flex: 0 0 auto;
  width: max-content;
  min-width: 181px;
  max-width: 260px;
  background: var(--home-sand);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.home-products-filter .category-pill {
  width: 100%;
  padding: 14px 18px;
  border: 0;
  border-left: 4px solid transparent;
  background: transparent;
  font-family: var(--font-inter, 'Inter', sans-serif);
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  color: var(--home-text-body);
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.home-products-filter .category-pill:hover {
  color: var(--home-red);
}

.home-products-filter .category-pill.active {
  background: #FFFFFF;
  border-left-color: var(--home-red);
  color: var(--home-red);
  font-weight: 600;
}

/* Pembungkus carousel produk & artikel (panah & titik hanya aktif di mobile) */
.home-carousel {
  position: relative;
  min-width: 0;
}

.home-products-layout > .home-carousel {
  flex: 1 1 0;
}

.home-carousel-arrow,
.home-carousel-dots {
  display: none;
}

.home-products-grid {
  flex: 1 1 0;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 56px;
  align-content: start;
}

.home-product-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.home-product-img {
  display: block;
  height: 276px;
  overflow: hidden;
  background: var(--home-sand);
}

.home-product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--transition-smooth);
}

.home-product-card:hover .home-product-img img {
  transform: scale(1.04);
}

.home-product-info {
  min-height: 52px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

.home-product-name {
  font-weight: 600;
  font-size: 16px;
  line-height: 24px;
  color: var(--home-red);
  text-transform: capitalize;
  margin: 0;
  /* Nama produk panjang dipotong 1 baris dengan "…" */
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-product-cat {
  font-size: 12px;
  line-height: 18px;
  color: #777777;
  text-transform: uppercase;
}

.home-product-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.btn-product-detail,
.btn-product-order {
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  font-weight: 500;
  font-size: 14px;
  line-height: 24px;
  letter-spacing: -0.112px;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}

.btn-product-detail {
  border: 1px solid #BBBBBB;
  background: rgba(210, 210, 210, 0.1);
  color: var(--home-text-muted);
}

.btn-product-detail:hover {
  border-color: var(--home-navy);
  color: var(--home-navy);
}

.btn-product-order {
  border: 1px solid var(--home-red);
  background: var(--home-red);
  color: #FFFFFF;
}

.btn-product-order:hover {
  background: var(--home-red-dark);
  border-color: var(--home-red-dark);
}

.home-products-empty {
  grid-column: 1 / -1;
  padding: 48px 0;
  text-align: center;
  color: var(--home-text-muted);
}

/* ==========================================================================
   6. TESTIMONI
   ========================================================================== */
.home-testi-sec {
  background: #FFFFFF;
  padding: 36px 0;
}

.home-testi-nav {
  display: flex;
  gap: 12px;
}

.btn-square-red {
  width: 48px;
  height: 48px;
  padding: 8px;
  border: 0;
  background: var(--home-red);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.btn-square-red:hover {
  background: var(--home-red-dark);
}

.home-testi-viewport {
  overflow: hidden;
  touch-action: pan-y;
}

.home-testi-track {
  display: flex;
  gap: 16px;
  will-change: transform;
}

.home-testi-card {
  flex: 0 0 513px;
  min-height: 223px;
  padding: 16px 24px;
  background: var(--home-sand);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.home-testi-stars {
  display: flex;
  gap: 8px;
  height: 23px;
}

.home-testi-text {
  flex: 1 1 auto;
  font-size: 18px;
  line-height: 28px;
  color: var(--home-text);
  margin: 0;
}

.home-testi-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}

.home-testi-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.home-testi-avatar.is-initial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #78909C;
  color: #FFFFFF;
  font-size: 18px;
  line-height: 1;
}

.home-testi-name {
  font-weight: 600;
  font-size: 18px;
  line-height: 28px;
  color: var(--home-text);
}

/* ==========================================================================
   7. BERITA & ARTIKEL
   ========================================================================== */
.home-articles-sec {
  background: #FFFFFF;
  padding: 36px 0;
}

.home-articles-sec .home-section-head {
  margin-bottom: 48px;
}

.home-articles-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.home-article-card {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.home-article-img {
  display: block;
  height: 262px;
  overflow: hidden;
}

.home-article-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--transition-smooth);
}

.home-article-card:hover .home-article-img img {
  transform: scale(1.04);
}

.home-article-body {
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.home-article-date {
  font-size: 14px;
  line-height: 21px;
  color: #A4A4A4;
}

.home-article-title-link {
  text-decoration: none;
}

.home-article-title {
  font-weight: 600;
  font-size: 20px;
  line-height: 28px;
  color: #03221B;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--transition-fast);
}

.home-article-title-link:hover .home-article-title {
  color: var(--home-red);
}

.home-article-excerpt {
  font-size: 18px;
  line-height: 28px;
  color: var(--home-text-muted);
  margin: -6px 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-article-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  font-weight: 600;
  font-size: 16px;
  line-height: 26px;
  color: var(--home-navy);
  text-decoration: none;
}

.home-article-more img {
  transition: transform var(--transition-fast);
}

.home-article-more:hover img {
  transform: translateX(4px);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1280px) {
  .home-container {
    padding: 0 40px;
  }

  .home-about-inner {
    gap: 32px;
  }

  .home-about-img {
    flex: 0 0 440px;
    max-width: 440px;
  }
}

@media (max-width: 1024px) {
  .home-hero-title {
    font-size: 40px;
    line-height: 54px;
  }

  .home-cat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }

  .home-about-inner {
    flex-direction: column;
    gap: 32px;
    align-items: center;
  }

  .home-about-img {
    flex: 0 0 auto;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
  }

  .home-products-layout {
    flex-direction: column;
    gap: 24px;
  }

  .home-products-filter {
    flex: 0 0 auto;
    width: 100%;
    max-width: none;
    flex-direction: row;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 8px;
  }

  .home-products-filter::-webkit-scrollbar {
    display: none;
  }

  .home-products-filter .category-pill {
    width: auto;
    flex: 0 0 auto;
    white-space: nowrap;
    overflow: visible;
    border-left: 0;
    border-bottom: 3px solid transparent;
  }

  .home-products-filter .category-pill.active {
    border-bottom-color: var(--home-red);
  }

  .home-products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px 24px;
  }

  .home-articles-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-articles-grid .home-article-card:nth-child(3) {
    display: none;
  }
}

@media (max-width: 768px) {
  .home-container {
    padding: 0 18px;
  }

  .home-hero-sec {
    min-height: 600px;
    padding: 110px 0 40px;
  }

  .home-hero-overlay {
    width: 100%;
    background: linear-gradient(180deg, rgba(40, 40, 40, 0.85) 0%, rgba(40, 40, 40, 0.55) 100%);
    filter: none;
    opacity: 1;
  }

  .home-hero-content {
    padding: 0;
  }

  .home-hero-title {
    font-size: 32px;
    line-height: 42px;
    margin: 20px 0 12px;
  }

  .home-hero-desc {
    font-size: 16px;
    line-height: 24px;
    margin-bottom: 28px;
  }

  .home-label {
    font-size: 14px;
    padding: 8px 24px 8px 20px;
  }

  .home-section-title {
    font-size: 26px;
    line-height: 36px;
  }

  .home-section-desc {
    font-size: 16px;
    line-height: 24px;
  }

  .home-section-head.is-split {
    flex-direction: column;
    align-items: flex-start;
  }

  .home-cat-sec {
    padding: 48px 0;
  }

  .home-cat-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }



  .home-about-text {
    font-size: 16px;
    line-height: 26px;
  }

  .home-products-sec {
    padding: 48px 0;
  }

  .home-products-sec .home-section-head {
    margin-bottom: 32px;
  }

  .home-testi-card {
    flex-basis: calc(100vw - 36px);
  }

  .home-testi-text {
    font-size: 16px;
    line-height: 26px;
  }

  .home-articles-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .home-articles-grid .home-article-card:nth-child(3) {
    display: flex;
  }

  .home-article-img {
    height: 220px;
  }
}

@media (max-width: 480px) {
  .home-products-grid {
    grid-template-columns: 1fr;
  }

  .home-product-img {
    height: 300px;
  }
}

/* ==========================================================================
   MOBILE: CAROUSEL PRODUK / ARTIKEL & RESPONSIVE
   ========================================================================== */
@media (max-width: 768px) {
  .home-about-inner {
    gap: 24px;
  }

  .home-about-img {
    max-width: 340px;
  }

  #productCarousel {
    --carousel-arrow-top: 138px;
  }

  #articleCarousel {
    --carousel-arrow-top: 110px;
  }

  .home-carousel [data-carousel-track] {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
    position: relative;
  }

  .home-carousel [data-carousel-track]::-webkit-scrollbar {
    display: none;
  }

  .home-carousel [data-carousel-track] > * {
    flex: 0 0 100%;
    scroll-snap-align: start;
  }

  .home-carousel-arrow {
    position: absolute;
    top: var(--carousel-arrow-top);
    z-index: 2;
    width: 40px;
    height: 40px;
    padding: 8px;
    border: 0;
    background: var(--home-red);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-50%);
    cursor: pointer;
    transition: background-color var(--transition-fast);
  }

  .home-carousel-arrow:hover {
    background: var(--home-red-dark);
  }

  .home-carousel-arrow.is-prev {
    left: 8px;
  }

  .home-carousel-arrow.is-next {
    right: 8px;
  }

  .home-carousel-arrow[hidden] {
    display: none;
  }

  .home-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
  }

  .home-carousel-dots:empty {
    display: none;
  }

  .home-carousel-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: #D0D5DD;
    cursor: pointer;
    transition: width var(--transition-fast), background-color var(--transition-fast);
  }

  .home-carousel-dot.is-active {
    width: 24px;
    background: var(--home-red);
  }
}

@media (max-width: 480px) {
  #productCarousel {
    --carousel-arrow-top: 150px;
  }
}
