/*
Theme Name: Bamatex
Author: BAMATEX
Description: Tema WordPress modern untuk produk sarung BAMATEX.
Version: 1.3 Final Premium (Navbar Horizontal + Hover Line Fix)
*/

/* === RESET & GLOBAL === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  color: #222;
  background-color: #f9f8f6;
  overflow-x: hidden;
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

/* === HEADER === */
.site-header {
  width: 100%;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #eee;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999;
  opacity: 0;
  transform: translateY(-30px);
  transition: all 0.6s ease;
}

.site-header.visible {
  opacity: 1;
  transform: translateY(0);
}

.site-header.scrolled {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.header-container {
  max-width: 1250px;
  margin: 0 auto;
  padding: 14px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* === LOGO === */
.logo a {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  font-weight: 700;
  color: #111;
  letter-spacing: 1px;
}

/* === NAVIGATION (FIX FINAL) === */
.site-nav {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.nav-menu,
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 35px;
}

.nav-menu li {
  display: inline-block;
  position: relative;
}

.nav-menu a {
  text-decoration: none;
  color: #222;
  font-weight: 600;
  font-size: 15px;
  font-family: 'Poppins', sans-serif;
  padding: 8px 0;
  position: relative;
  transition: all 0.3s ease;
}

/* Hover effect garis bawah */
.nav-menu a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: #d4b27f;
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-menu a:hover::after,
.nav-menu .current-menu-item a::after {
  width: 100%;
}

.nav-menu a:hover {
  color: #b99c5c;
}

/* === HEADER ICONS === */
.header-icons {
  display: flex;
  align-items: center;
  gap: 18px;
}

.header-icons a {
  color: #222;
  font-size: 16px;
  transition: color 0.3s ease;
}

.header-icons a:hover {
  color: #b99c5c;
}

/* === RESPONSIVE HEADER === */
@media (max-width: 900px) {
  .header-container {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-nav {
    width: 100%;
  }

  .nav-menu {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    margin-top: 10px;
    width: 100%;
  }

  .header-icons {
    margin-top: 10px;
  }
}

/* === HERO SECTION === */
.hero-section {
  position: relative;
  height: 100vh;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  text-align: center;
}

.hero-section .video-bg iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120%;
  height: 120%;
  transform: translate(-50%, -50%);
  z-index: -2;
}

.hero-section .overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: -1;
}

.hero-content {
  z-index: 2;
  max-width: 800px;
  padding: 20px;
}

.hero-content h1 {
  font-size: 3.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 15px;
}

.hero-content h1 span {
  color: #d4b27f;
}

.hero-content p {
  font-size: 1.1rem;
  margin-bottom: 25px;
}

.hero-content .btn {
  background: #d4b27f;
  color: #fff;
  padding: 12px 32px;
  border-radius: 30px;
  transition: background 0.3s ease;
}

.hero-content .btn:hover {
  background: #b99c5c;
}

/* === SECTION STRUCTURE === */
section {
  position: relative;
  overflow: hidden;
}
section .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 20px;
}

/* === ABOUT SECTION === */
.about-section {
  background-size: cover;
  background-position: center;
  padding: 100px 0;
  color: #333;
}

.about-container {
  display: flex;
  align-items: center;
  gap: 40px;
}

.about-image img {
  width: 100%;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.about-text h2 {
  font-size: 2rem;
  margin-bottom: 15px;
}

.about-text span {
  color: #b99c5c;
}

/* === PRODUK SECTION === */
.produk-section {
  background: #fafafa;
  padding: 100px 0;
  text-align: center;
}
.produk-section h2 {
  font-size: 2rem;
  color: #333;
}
.produk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 40px;
  margin-top: 40px;
}
.produk-item {
  text-align: center;
  overflow: hidden;
}
.produk-img {
  width: 100%;
  height: 320px;
  border-radius: 16px;
  background-size: cover;
  background-position: center;
  transition: transform 0.7s ease, filter 0.4s ease;
}
.produk-img:hover {
  transform: scale(1.08);
  filter: brightness(1.1);
}
.produk-item h3 {
  margin-top: 15px;
  font-size: 1rem;
  font-weight: 600;
  color: #333;
}

/* === FOOTER === */
.site-footer {
  background: #1c1b19;
  color: #e6e3d9;
  padding: 60px 20px 0;
  font-family: "Playfair Display", "Open Sans", sans-serif;
  position: relative;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-col h2.footer-logo {
  font-size: 26px;
  color: #d4b483;
  margin-bottom: 10px;
}

.footer-col h3 {
  font-size: 18px;
  color: #d4b483;
  margin-bottom: 15px;
}

.footer-col p, 
.footer-col a, 
.footer-col li {
  color: #e6e3d9;
  text-decoration: none;
  font-size: 15px;
  line-height: 1.7;
}

.footer-col a:hover {
  color: #d4b483;
  transition: color 0.3s ease;
}

.footer-bottom {
  border-top: 1px solid #3c3a35;
  text-align: center;
  padding: 15px 0;
  margin-top: 40px;
  font-size: 14px;
  color: #bfbdb6;
}

/* === HEADER ANIMATION === */
.hide-header {
  transform: translateY(-100%);
  transition: transform 0.4s ease;
}

#preloader {
  position: fixed;
  inset: 0;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #d4b27f;
  border-top: 3px solid transparent;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* === FIX HEADER TERPOTONG === */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #fff; /* warna latar belakang header */
  z-index: 999;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Biar konten tidak ketutup header */
body {
  padding-top: 90px; /* sesuaikan tinggi header kamu */
}

/* Responsif — kalau di mobile header lebih tinggi */
@media (max-width: 768px) {
  body {
    padding-top: 110px;
  }
}
.site-header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}
/* ==== Produk: sidebar + grid + lightbox ==== */

.produk-page {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  margin: 80px auto;
  max-width: 1200px;
  align-items: start;
  padding: 0 20px 80px;
}

/* Sidebar */
.produk-sidebar {
  background: transparent;
  position: sticky;
  top: 110px; /* agar tetap terlihat saat scroll */
  align-self: start;
}
.produk-sidebar h3 {
  font-size: 18px;
  margin-bottom: 14px;
  color: #1c1b19;
  font-weight: 700;
}
.kategori-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.kategori-list li {
  margin-bottom: 10px;
}
.kategori-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid transparent;
  color: #1c1b19;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, transform 0.12s;
}
.kategori-btn:hover {
  background: rgba(217,181,110,0.08);
  color: #b99c5c;
  transform: translateX(4px);
}
.kategori-btn.active {
  background: rgba(217,181,110,0.12);
  color: #b99c5c;
  border-color: rgba(217,181,110,0.18);
}

/* Produk content */
.produk-content { width: 100%; }
.produk-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* Card */
.produk-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 22px rgba(0,0,0,0.06);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  display: flex;
  flex-direction: column;
}
.produk-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}

.produk-thumb {
  height: 260px;
  overflow: hidden;
  background: #f7f5f2;
}
.produk-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.produk-card:hover .produk-thumb img {
  transform: scale(1.08);
}

.produk-body {
  padding: 18px;
}
.produk-body h4 {
  font-size: 1.05rem;
  margin: 0 0 8px;
  color: #1c1b19;
}
.produk-excerpt {
  font-size: 0.93rem;
  color: #666;
  margin-bottom: 12px;
}
.produk-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}
.produk-actions .zoom-btn {
  border: none;
  background: transparent;
  color: #b99c5c;
  font-weight: 600;
  cursor: pointer;
}
.produk-actions .btn-detail {
  margin-left: auto;
  background: #d9b56e;
  color: #111;
  padding: 8px 14px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s ease;
}
.produk-actions .btn-detail:hover {
  background: #b99c5c;
  color: #fff;
}

/* Lightbox */
.produk-lightbox {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  background: rgba(8,8,8,0.75);
  z-index: 9999;
}
.produk-lightbox.active {
  display: flex;
}
.lightbox-inner {
  position: relative;
  max-width: 940px;
  width: 94%;
  background: transparent;
  padding: 18px;
  text-align: center;
}
.lightbox-inner img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}
.lightbox-close {
  position: absolute;
  right: 6px;
  top: -8px;
  background: rgba(255,255,255,0.08);
  border: none;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  padding: 6px 10px;
  cursor: pointer;
  border-radius: 6px;
}

/* Responsive */
@media (max-width: 1100px) {
  .produk-grid { grid-template-columns: repeat(2, 1fr); }
  .produk-page { grid-template-columns: 220px 1fr; gap: 30px; }
}
@media (max-width: 820px) {
  .produk-page { grid-template-columns: 1fr; margin-top: 20px; padding-bottom: 60px; }
  .produk-sidebar { position: relative; top: auto; margin-bottom: 20px; }
  .produk-grid { grid-template-columns: 1fr; }
}

/* small helpers (optional) */
.kategori-title { margin-bottom: 18px; }

/* Atur ukuran logo header */
.custom-logo {
    max-height: 70px !important;
    width: auto !important;
}


/* ===== Slider Produk ===== */
.produk-slider {
  position: relative;
  margin: 60px auto;
  overflow: hidden;
  border-radius: 20px;
  max-width: 1100px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.slider-wrapper {
  display: flex;
  transition: transform 0.6s ease;
}

.slider-wrapper .slide {
  min-width: 100%;
  flex-shrink: 0;
}

.slider-wrapper img {
  width: 100%;
  height: 480px;
  object-fit: cover;
  display: block;
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.4);
  color: #fff;
  border: none;
  font-size: 24px;
  padding: 12px 18px;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.3s;
}

.slider-btn:hover {
  background: rgba(0,0,0,0.7);
}

.slider-btn.prev { left: 15px; }
.slider-btn.next { right: 15px; }

.produk-search {
  display: none;
  text-align: right;
  margin-bottom: 20px;
}

.produk-search.show {
  display: block;
}

#produkSearchInput {
  width: 250px;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  transition: all 0.3s ease;
}

#produkSearchInput:focus {
  border-color: #c9a44b;
  box-shadow: 0 0 5px rgba(201, 164, 75, 0.3);
  outline: none;
}
/* === Header Search Style === */
.header-search {
  position: relative;
  display: inline-block;
}

.header-search-input {
  position: absolute;
  top: 50%;
  right: 100%;
  transform: translateY(-50%);
  width: 0;
  opacity: 0;
  padding: 6px 10px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 20px;
  outline: none;
  background: #fff;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  pointer-events: none;
}

.header-search.active .header-search-input {
  width: 180px;
  opacity: 1;
  margin-right: 8px;
  pointer-events: auto;
}
