/* === GLOBAL RESET & TYPOGRAPHY === */
*, *::before, *::after { 
  margin:0; 
  padding:0; 
  box-sizing:border-box; 
}

body { 
  font-family: 'Montserrat', sans-serif; 
  background:#FFFFFF; 
  color:#000000; 
  overflow-x:hidden; 
}

a { 
  text-decoration:none; 
  color:inherit; 
}

img { 
  max-width:100%; 
  display:block; 
}

.container { 
  width:90%; 
  max-width:1400px; 
  margin:0 auto; 
}

/* === HEADER (Global) === */
.header-fixed {
  position:fixed; 
  top:0; 
  left:0; 
  width:100%; 
  z-index:1000;
  padding:1rem 0; 
  transition: all 0.3s;
  z-index: 1000; /* Pastikan tidak lebih dari z-index menu */
}

.header-inner { 
  display:flex; 
  justify-content:space-between; 
  align-items:center; 
}

.logo a { 
  font-family:'Bebas Neue', cursive; 
  font-size:2rem; 
  letter-spacing:-1px; 
  color:#000; 
  transition:color .3s; 
}

.logo span { 
  color:#000; 
  transition:color .3s; 
}

.nav-desktop ul { 
  display:flex; 
  gap:2.5rem; 
  list-style:none; 
}

.nav-desktop a { 
  color:#000000; 
  font-weight:500; 
  font-size:0.9rem; 
  text-transform:uppercase; 
  letter-spacing:1.5px; 
  transition:color .3s; 
}

.nav-desktop a:hover, .nav-desktop a.active { 
  color:#000; 
}

.header-right { 
  display:flex; 
  align-items:center; 
  gap:1.5rem; 
  font-size:1.1rem; 
}

.cart-link { 
  position:relative; 
  color:#000; 
}

.cart-count {
  position:absolute; 
  top:-8px; 
  right:-8px; 
  background:#000; 
  color:#FFF;
  font-size:0.65rem; 
  width:18px; 
  height:18px; 
  border-radius:50%; 
  display:flex;
  align-items:center; 
  justify-content:center; 
  font-weight:600;
}

/* === MOBILE MENU - SIDEBAR DARI KANAN (Versi Dipercantik) === */
.mobile-menu {
  position: fixed;
  top: 70px;
  right: -320px;
  width: 320px;
  height: calc(100vh - 70px); /* <--- MODIFIKASI: Tinggi dihitung agar tidak melebihi batas layar */
  background: #ffffff;
  box-shadow: -6px 0 25px rgba(0,0,0,0.2);
  transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  z-index: 1001; /* <--- MODIFIKASI: Naikkan z-index agar di atas overlay dan header */
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.mobile-menu.active {
  right: 0;
}

.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 1.5rem;
  border-bottom: 1px solid #eee;
}

.mobile-menu-logo a {
  font-family: 'Bebas Neue', cursive;
  font-size: 1.8rem;
  color: #000;
  letter-spacing: -1px;
}

.mobile-menu-logo span {
  color: #000;
}

.mobile-menu-close {
  background: none;
  border: none;
  font-size: 1.8rem;
  color: #333;
  cursor: pointer;
  padding: 0.5rem;
  transition: all 0.3s;
  position: relative; /* Atau static jika defaultnya sudah begitu */
  z-index: 1002; /* Pastikan lebih tinggi dari elemen di sekitarnya */
}

.mobile-menu-close:hover {
  color: #000;
  transform: rotate(90deg);
}

.mobile-menu-links {
  flex: 1;
  padding: 2rem 0;
}

.mobile-menu-links a {
  display: block;
  padding: 1.3rem 2rem;
  color: #000;
  font-weight: 500;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  transition: all 0.3s;
  border-bottom: 1px solid #f0f0f0;
}

.mobile-menu-links a:hover {
  background: #f8f8f8;
  padding-left: 2.5rem;
  color: #000;
}

.mobile-cart-btn {
  margin-top: auto;
  background: #000;
  color: #fff !important;
  padding: 1.5rem 2rem;
  border-bottom: none;
  font-weight: 600;
}

.mobile-cart-btn i {
  margin-right: 0.8rem;
}

.mobile-cart-btn .cart-badge {
  background: #fff;
  color: #000;
  min-width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  margin-left: 0.8rem;
  font-weight: bold;
}

/* Overlay */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
  z-index: 1000; /* <--- MODIFIKASI: Harus lebih rendah dari menu tapi lebih tinggi dari konten */
  backdrop-filter: blur(4px);
}

/* Hapus padding-top pada .mobile-menu-links karena header sudah dihilangkan */
.mobile-menu-links {
  flex: 1;
  padding: 0; /* Ubah dari 2rem 0 menjadi 0 */
}

.menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Hamburger Icon Styling */
.mobile-toggle {
  display: none;
  cursor: pointer;
  font-size: 1.6rem;
  color: #000;
  padding: 0.5rem;
  transition: all 0.3s;
}

.mobile-toggle:hover {
  color: #333;
  transform: scale(1.1);
}

@media (max-width: 768px) {
  .mobile-toggle {
    display: block;
  }
  .nav-desktop {
    display: none;
  }
}

/* === HERO VIDEO === */
.hero-video-section { 
  position:relative; 
  height:100vh; 
  overflow:hidden; 
}

.hero-video-bg { 
  position:absolute; 
  top:0; 
  left:0; 
  width:100%; 
  height:100%; 
  object-fit:cover; 
}

.hero-overlay { 
  position:absolute; 
  inset:0; 
  background:rgba(255,255,255,0.1); 
}

.hero-content { 
  position:absolute; 
  top:50%; 
  left:50%; 
  transform:translate(-50%,-50%); 
  text-align:center; 
  z-index:2; 
  width:90%; 
}

.hero-content h1 { 
  font-family:'Bebas Neue', cursive; 
  font-size:5rem; 
  letter-spacing:-2px; 
  margin-bottom:1rem; 
  color:#FFF; 
  text-shadow:2px 2px 4px rgba(0,0,0,0.8); 
}

.hero-content p { 
  font-size:1.1rem; 
  color:#FFF; 
  max-width:600px; 
  margin:0 auto 2rem; 
}

/* === BUTTONS === */
.btn-primary {
  background:#FF2A2A; 
  color:#FFF; 
  padding:1rem 2.5rem; 
  font-weight:600; 
  text-transform:uppercase;
  letter-spacing:1.5px; 
  border:none; 
  cursor:pointer; 
  transition:all .3s; 
  display:inline-block;
}

.btn-primary:hover { 
  background:#000; 
  color:#FFF; 
}

/* === FOOTER (Global) === */
/* === FOOTER (Global) - DIPUSATKAN === */
.footer-section { 
  background:#000; 
  color:#DDD; 
  padding:4rem 0 0; 
  font-size:0.9rem; 
  /* Pemusatan teks dasar untuk elemen inline */
  text-align: center; 
}

.footer-inner { 
  display:flex; 
  /* Kunci 1: Gunakan center untuk memusatkan kelompok kolom */
  justify-content: center; 
  /* Kunci 2: Atur jarak antar kolom */
  gap:4rem; /* Tingkatkan jarak antar kolom untuk tampilan yang lebih lega di tengah */
  padding-bottom:3rem; 
  flex-wrap:wrap; 
}

/* Kunci 3: Memastikan setiap kolom memusatkan konten di dalamnya */
.footer-column {
    /* Agar kolom tidak mengambil lebar penuh secara default di desktop, berikan lebar maksimal */
    max-width: 250px; 
    /* Memusatkan teks di dalam setiap kolom */
    text-align: center;
}

.footer-logo a { 
  font-size:2rem; 
  color:#FFF; 
  display: inline-block; /* Agar text-align: center pada parent berfungsi */
}

.footer-logo span { 
  color:#ffffff; 
}

.footer-tagline { 
  margin-top:0.5rem; 
  color:#AAA; 
}

.footer-social { 
  margin-top:1.5rem; 
  display:flex; 
  /* Kunci 4: Memusatkan ikon sosial di dalam kolom */
  justify-content: center; 
  gap:1rem; 
}

.footer-social a { 
  font-size:1.3rem; 
  color:#FFF; 
  transition:color .3s; 
}

.footer-social a:hover { 
  color:#939393; 
}

.footer-column h4 { 
  color:#FFF; 
  font-size:1.1rem; 
  margin-bottom:1.5rem; 
  text-transform:uppercase; 
  font-weight:600; 
  letter-spacing:1px; 
}

.footer-column ul {
    list-style: none;
    padding: 0;
    /* Pastikan list items di tengah */
    text-align: center;
}
.footer-column li {
    margin-bottom: 0.5rem;
}

.footer-column a { 
  color:#DDD; 
  transition:color .3s;
  /* Membuat link menjadi block atau inline-block jika diperlukan */
  display: inline-block;
}

.footer-column a:hover { 
  color:#939393; 
}

.footer-newsletter input { 
  width:100%; 
  padding:0.8rem; 
  margin-bottom:1rem; 
  background:#222; 
  border:1px solid #444; 
  color:#FFF; 
}

.btn-subscribe { 
  background:#ffffff; 
  color:#000000; 
  border:none; 
  padding:0.8rem 1.5rem; 
  cursor:pointer; 
  text-transform:uppercase; 
  font-weight:600; 
  width:100%; 
}

.btn-subscribe:hover { 
  background:#939393; 
}

.footer-bottom { 
  border-top:1px solid #222; 
  padding:1rem 0; 
  /* text-align: center; sudah di kode lama, pastikan tetap ada */
  text-align:center; 
  font-size:0.8rem; 
  color:#777; 
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  /* Di Mobile, ini sudah benar, semua kolom diatur menjadi column dan teks di tengah */
  .footer-inner { 
      flex-direction:column; 
      text-align:center; 
      gap: 3rem; /* Jarak antar blok di mobile */
  }
  .footer-social { 
      justify-content:center; 
  }
  .footer-column {
      max-width: 100%; /* Gunakan lebar penuh di mobile */
      text-align: center;
  }
}

/* === RESPONSIVE: SHOW ON MOBILE ONLY === */
@media (max-width: 768px) {
  .nav-desktop { display: none; }
  .mobile-toggle { display: block; }
}

.desktop-only {
  display: inline-block;
}
@media (max-width: 768px) {
  .desktop-only { display: none; }
}

/* ================= PRODUK & GRID MODIFIKASI BARU ================= */

/* Pastikan product-card relatif untuk posisi tag/overlay */
.product-card {
  position: relative; 
}

/* Gambar Produk: Kotak Penuh (Square) */
.product-img-wrapper {
  position: relative;
  width: 100%;
  /* Membuat kotak sempurna (aspect ratio 1:1) */
  padding-bottom: 100%; 
  overflow: hidden;
}

.product-img-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Memastikan gambar mengisi kotak penuh tanpa distorsi */
  object-fit: cover; 
}

/* Tag Kategori (Button di kiri bawah gambar) */
.product-category-tag {
  position: absolute;
  bottom: 0.5rem; /* Jarak dari bawah */
  left: 0.5rem; /* Jarak dari kiri */
  background: #000;
  color: #fff;
  padding: 0.3rem 0.6rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 600;
  z-index: 50; /* Di atas gambar dan overlay */
  opacity: 0.9;
  border-radius: 4px;
  /* Mencegah elemen ini menghalangi interaksi (misalnya: hover overlay) */
  pointer-events: none; 
}

/* Tata Letak Grid Produk */
.product-grid {
  display: grid;
  /* Mobile Default: 1 produk per baris */
  grid-template-columns: 1fr; 
  gap: 2rem; /* Jarak antar produk */
}

/* Desktop: 2 produk per baris */
@media (min-width: 769px) {
  .product-grid {
    /* Desktop/Tablet: 2 produk per baris */
    grid-template-columns: 1fr 1fr; 
  }
}
/* ================= AKHIR MODIFIKASI ================= */

/* === SHOP PAGE === */
.category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 3rem;
  padding: 1rem 0;
  border-bottom: 1px solid #eee;
}

.category-btn {
  padding: 0.6rem 1.2rem;
  background: transparent;
  color: #333;
  border: 2px solid #ddd;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  text-decoration: none;
}

.category-btn:hover {
  background: #000;
  color: #fff;
  border-color: #000;
}

.category-btn.active {
  background: #000;
  color: #fff;
  border-color: #000;
}

/* Product Card */
.product-card {
  position: relative;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.product-img-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 100%; /* 1:1 ratio */
  overflow: hidden;
  background: #f8f9fa;
}

.product-img-wrapper img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: contain; /* GAMBAR TIDAK TERPOTONG */
  transition: transform 0.4s ease;
}

.product-card:hover .product-img-wrapper img {
  transform: scale(1.05);
}

.product-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.product-card:hover .product-overlay {
  opacity: 1;
}

.btn-add-cart {
  background: #fff;
  color: #000;
  padding: 0.8rem 1.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-add-cart:hover {
  background: #FF2A2A;
  color: #fff;
}

.product-info {
  padding: 1rem;
  text-align: center;
}

.product-info h3 {
  font-size: 1rem;
  margin: 0.5rem 0;
  font-weight: 600;
  color: #000;
}

.product-info .price {
  font-weight: 600;
  color: #000;
  font-size: 0.95rem;
}

.product-info .text-danger {
  color: #FF2A2A !important;
  font-size: 1.1rem;
}

/* Grid Responsif */
.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

@media (min-width: 576px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 992px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1200px) {
  .product-grid { grid-template-columns: repeat(4, 1fr); }
}

/* No Image Fallback */
img[onerror] {
  object-fit: contain !important;
}

.product-link {
    text-decoration: none;
    color: inherit;
    display: block;
}
.product-link:hover .product-img-wrapper img {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}
.product-img-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}
.product-img-wrapper img {
    transition: transform 0.3s ease;
    width: 100%;
    height: 300px;
    object-fit: cover;
}
.discount-badge {
    background: #FF2A2A;
    color: #fff;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 12px;
    margin-left: 8px;
    font-weight: bold;
}