
/**
 * ============================================================
 *  STYLE.CSS — Yani Digital E-Book Store (Navbar tanpa animasi)
 * ============================================================
 */

:root {
  --blush:       #FDF0F3;
  --petal:       #FAE4EA;
  --rose-light:  #F2C4CE;
  --rose:        #C47A8A;
  --rose-dark:   #9E4F63;
  --mauve:       #7B3B52;
  --body-text:   #5A3040;
  --muted:       #A88090;
  --red-badge:   #D9536A;

  --space-xs: clamp(.4rem, 1vw, .6rem);
  --space-sm: clamp(.75rem, 2vw, 1rem);
  --space-md: clamp(1rem, 3vw, 1.5rem);
  --space-lg: clamp(1.5rem, 4vw, 2.5rem);
  --space-xl: clamp(2.5rem, 6vw, 5rem);

  --text-xs:   clamp(.65rem, 1.2vw, .75rem);
  --text-sm:   clamp(.78rem, 1.5vw, .88rem);
  --text-base: clamp(.88rem, 1.8vw, 1rem);
  --text-lg:   clamp(1rem, 2.2vw, 1.15rem);
  --text-xl:   clamp(1.15rem, 2.5vw, 1.4rem);

  --transition-smooth: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  font-size: var(--text-base);
  background: var(--blush);
  color: var(--body-text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }

/* ========== NAVBAR (Tanpa Animasi Hamburger) ========== */
.navbar-custom {
  background: var(--mauve);
  padding: var(--space-sm) var(--space-lg);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 3px solid var(--rose);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  box-shadow: 0 2px 16px rgba(123,59,82,.18);
  flex-wrap: wrap;
}

.navbar-brand-text {
  font-family: 'Dancing Script', cursive;
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
  text-decoration: none;
  white-space: nowrap;
}

.hamburger {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}

.hamburger-line {
  display: block;
  width: 28px;
  height: 3px;
  background-color: #fff;
  margin: 5px 0;
  border-radius: 3px;
  transition: none; /* Tidak ada animasi */
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2rem);
}

.nav-link {
  color: rgba(255,255,255,.85);
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s;
  padding: 0.25rem 0;
}

.nav-link:hover {
  color: var(--rose-light);
}

/* Responsif Mobile */
@media (max-width: 768px) {
  .hamburger {
    display: block;
  }
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    max-width: 280px;
    height: 100vh;
    background: var(--mauve);
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
    transition: right 0.3s ease-in-out; /* Hanya animasi slide */
    box-shadow: -5px 0 15px rgba(0,0,0,0.2);
    z-index: 1000;
    padding: 2rem 1.5rem;
  }
  .nav-menu.active {
    right: 0;
  }
  .nav-link {
    font-size: 1.3rem;
    width: 100%;
    text-align: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.2);
  }
}

/* ========== HERO ========== */
.hero {
  color: var(--mauve);
  padding: var(--space-xl) var(--space-lg);
  text-align: center;
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse at 15% 50%, rgba(196,122,138,.22) 0%, transparent 60%),
              radial-gradient(ellipse at 85% 20%, rgba(242,196,206,.55) 0%, transparent 55%),
              radial-gradient(ellipse at 60% 90%, rgba(253,224,200,.4) 0%, transparent 50%),
              var(--blush);
}
.hero::before, .hero::after {
  content: '';
  position: absolute;
  border-radius: 60% 40% 70% 30% / 50% 60% 40% 50%;
  pointer-events: none;
  opacity: .18;
}
.hero::before {
  width: clamp(180px, 35vw, 340px);
  height: clamp(180px, 35vw, 340px);
  background: var(--rose);
  top: -60px;
  left: -60px;
}
.hero::after {
  width: clamp(140px, 28vw, 260px);
  height: clamp(140px, 28vw, 260px);
  background: var(--rose-dark);
  bottom: -50px;
  right: -40px;
  border-radius: 40% 60% 30% 70% / 60% 40% 70% 30%;
}
.hero > * { position: relative; }
.hero-eyebrow {
  font-size: var(--text-xs);
  letter-spacing: clamp(3px,1vw,6px);
  text-transform: uppercase;
  color: var(--rose);
  margin-bottom: var(--space-sm);
  font-weight: 600;
  animation: slideDown 0.8s ease-out;
}
.hero-title {
  font-family: 'Dancing Script', cursive;
  font-size: clamp(2.4rem, 8vw, 6rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: var(--space-sm);
  color: var(--mauve);
  animation: gentleFadeIn 1.2s ease-out;
}
.hero-title em { color: var(--rose); font-style: normal; }
.hero-sub {
  font-size: clamp(.85rem, 2vw, 1rem);
  color: var(--muted);
  max-width: min(480px, 90%);
  margin: 0 auto var(--space-md);
  line-height: 1.7;
  animation: fadeInUp 1s ease-out 0.2s both;
}
.hero-cta {
  background: var(--rose);
  color: #fff;
  border: none;
  padding: clamp(.7rem,2vw,.95rem) clamp(1.6rem,4vw,2.8rem);
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: var(--text-sm);
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 999px;
  transition: background .25s, transform .2s, box-shadow .25s;
  box-shadow: 0 4px 18px rgba(196,122,138,.35);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.hero-cta:hover {
  background: var(--rose-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(158,79,99,.35);
}
.hero-buttons-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-top: var(--space-md);
  animation: fadeInUp 1s ease-out 0.4s both;
}
@keyframes gentleFadeIn {
  0% { opacity: 0; transform: scale(0.98); letter-spacing: -2px; }
  100% { opacity: 1; transform: scale(1); letter-spacing: normal; }
}
@keyframes slideDown {
  0% { opacity: 0; transform: translateY(-20px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInUp {
  0% { opacity: 0; transform: translateY(25px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ========== SEARCH & FILTER ========== */
.search-wrapper { max-width: min(680px, 100%); margin: 0 auto; position: relative; }
.search-input {
  width: 100%;
  border: 2px solid var(--rose-light);
  border-radius: 999px;
  padding: clamp(.7rem,2vw,1rem) 3.6rem clamp(.7rem,2vw,1rem) clamp(1.1rem,2.5vw,1.6rem);
  font-family: 'DM Sans', sans-serif;
  font-size: var(--text-base);
  background: #fff;
  color: var(--body-text);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.search-input:focus { border-color: var(--rose); box-shadow: 0 0 0 3px rgba(196,122,138,.15); }
.search-btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: clamp(34px,6vw,42px);
  height: clamp(34px,6vw,42px);
  background: var(--rose);
  color: #fff;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-base);
  cursor: pointer;
  transition: background .2s;
}
.search-btn:hover { background: var(--rose-dark); }
.search-count {
  text-align: center;
  margin-top: var(--space-sm);
  font-size: var(--text-sm);
  color: var(--muted);
}
.filter-section {
  background: var(--blush);
  border-bottom: 1px solid var(--rose-light);
  padding: var(--space-sm) var(--space-md);
}
.filter-scroll {
  display: flex;
  gap: var(--space-xs);
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  justify-content: center;
  flex-wrap: wrap;
}
@media (max-width: 600px) { .filter-scroll { flex-wrap: nowrap; justify-content: flex-start; } }
.filter-scroll::-webkit-scrollbar { display: none; }
.filter-pill {
  background: #fff;
  border: 1.5px solid var(--rose-light);
  color: var(--body-text);
  border-radius: 999px;
  padding: clamp(.35rem,1vw,.5rem) clamp(.8rem,2vw,1.3rem);
  font-size: var(--text-xs);
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all .2s;
}
.filter-pill:hover { border-color: var(--rose); color: var(--rose); }
.filter-pill.active {
  background: var(--rose);
  border-color: var(--rose);
  color: #fff;
  box-shadow: 0 3px 10px rgba(196,122,138,.3);
}
.sort-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-md);
  background: var(--petal);
  border-bottom: 1px solid var(--rose-light);
  font-size: var(--text-sm);
}
.sort-select {
  border: 1.5px solid var(--rose-light);
  border-radius: 999px;
  padding: .35rem 2rem .35rem .85rem;
  font-family: 'DM Sans', sans-serif;
  font-size: var(--text-sm);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23C47A8A'/%3E%3C/svg%3E") no-repeat right .75rem center;
  color: var(--body-text);
  cursor: pointer;
  appearance: none;
}

/* ========== PRODUCTS SECTION ========== */
.products-section { padding: var(--space-lg) var(--space-md) var(--space-xl); }
.section-label {
  font-size: var(--text-xs);
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .3rem;
}
.section-title {
  font-family: 'Dancing Script', cursive;
  font-size: clamp(1.6rem, 4.5vw, 2.4rem);
  font-weight: 700;
  color: var(--mauve);
  margin-bottom: var(--space-lg);
  position: relative;
  display: inline-block;
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--rose), var(--rose-light));
  border-radius: 3px;
  transition: width 0.3s ease;
}
.section-title:hover::after { width: 100%; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(.7rem, 2vw, 1.3rem);
}
@media (min-width: 576px)  { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px)  { .product-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 992px)  { .product-grid { grid-template-columns: repeat(5, 1fr); } }

.product-card {
  background: #fff;
  border: 1px solid var(--rose-light);
  border-radius: 16px;
  cursor: pointer;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
  animation: fadeUp .4s ease both;
  outline: none;
}
.product-card:hover { transform: translateY(-8px); box-shadow: 0 25px 35px -12px rgba(123,59,82,0.2); }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.product-img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 3.6;
  background: var(--petal);
}
.product-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}
.product-card:hover .product-img-wrap img { transform: scale(1.08); }
.card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(123,59,82,0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .3s ease;
  backdrop-filter: blur(3px);
}
.product-card:hover .card-overlay { opacity: 1; }
.overlay-text {
  color: #fff;
  font-weight: 700;
  font-size: var(--text-sm);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  border: 2px solid rgba(255,255,255,.8);
  padding: .45rem 1.1rem;
  border-radius: 999px;
  transition: all 0.2s ease;
  transform: scale(0.95);
}
.product-card:hover .overlay-text { transform: scale(1); }
.product-info {
  padding: clamp(.7rem, 2vw, 1.1rem);
  display: flex;
  flex-direction: column;
  gap: clamp(.25rem,.5vw,.4rem);
  flex: 1;
}
.product-cat {
  font-size: var(--text-xs);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--rose);
  font-weight: 600;
}
.product-name {
  font-family: 'DM Sans', sans-serif;
  font-size: clamp(.88rem, 1.8vw, 1rem);
  font-weight: 600;
  line-height: 1.35;
  color: var(--mauve);
}
.product-price .price-current {
  font-size: clamp(.9rem, 2vw, 1.1rem);
  font-weight: 700;
  color: var(--mauve);
}
.buy-btn {
  margin-top: clamp(.5rem, 1.5vw, .75rem);
  background: var(--rose);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: clamp(.5rem,1.5vw,.65rem) clamp(.8rem,2vw,1.2rem);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  width: 100%;
  transition: background .2s;
}
.buy-btn:hover { background: var(--rose-dark); }
@media (hover: hover) and (pointer: fine) { .buy-btn { display: none; } }

.search-highlight {
  background: rgba(196,122,138,.25);
  padding: 0 2px;
  border-radius: 3px;
}

.empty-state {
  text-align: center;
  padding: clamp(3rem,8vw,6rem) 1rem;
  display: none;
}
.empty-state i {
  font-size: clamp(2.5rem,6vw,4rem);
  color: var(--rose-light);
  display: block;
  margin-bottom: var(--space-sm);
}
.empty-state h4 {
  font-family: 'Dancing Script', cursive;
  font-size: var(--text-xl);
  color: var(--mauve);
}
.pagination-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: var(--space-lg);
}
.pagination-btn {
  background: #fff;
  border: 1.5px solid var(--rose-light);
  color: var(--body-text);
  font-size: var(--text-sm);
  font-weight: 500;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.pagination-btn.active {
  background: var(--rose);
  border-color: var(--rose);
  color: white;
}
.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.toast-container {
  position: fixed;
  bottom: clamp(1rem,3vw,2rem);
  right: clamp(1rem,3vw,2rem);
  z-index: 9999;
}
.toast-msg {
  background: var(--mauve);
  color: #fff;
  padding: clamp(.7rem,2vw,.9rem) clamp(1rem,2.5vw,1.5rem);
  font-size: var(--text-sm);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: .6rem;
  border-left: 3px solid var(--rose-light);
  animation: slideIn .3s ease;
}
@keyframes slideIn {
  from { transform: translateX(120%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

footer {
  background: var(--mauve);
  color: rgba(255,255,255,.5);
  text-align: center;
  padding: var(--space-md);
  font-size: var(--text-sm);
}
footer span { color: var(--rose-light); }

/* ========== REVEAL & ABOUT ========== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: var(--transition-smooth);
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}
.about-section {
  background: rgba(250,228,234,0.7);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(242,196,206,0.5);
  border-radius: 24px;
  padding: var(--space-lg);
  text-align: center;
  transition: var(--transition-smooth);
}
.about-section:hover {
  transform: scale(1.01);
  box-shadow: 0 15px 30px rgba(123,59,82,0.08);
}
.about-title {
  font-family: 'Dancing Script', cursive;
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  color: var(--mauve);
}
.about-text { max-width: 700px; margin: 0 auto; line-height: 1.6; }

.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--rose);
  color: white;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
  border: none;
}
.back-to-top.show {
  opacity: 1;
  visibility: visible;
}
.back-to-top:hover {
  background: var(--rose-dark);
  transform: translateY(-5px);
}
#produk-section {
  scroll-margin-top: 80px;
}

/* ========== KATEGORI CARD ========== */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-lg);
}
.category-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}
.category-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 30px -12px rgba(0,0,0,0.3);
}