/* ======================================================
   🍓 HISHAN STRAWBERRY — STYLE UTAMA
   ====================================================== */

/* === VARIABEL WARNA === */
:root {
  --primary: #e63946; /* Merah stroberi segar */
  --secondary: #ff7b9c; /* Pink cerah */
  --accent: #ffd6dc; /* Pink lembut */
  --cream: #fff6f0; /* Latar krem */
  --muted: #6b7280; /* Abu lembut */
  --bg-hero: linear-gradient(180deg, #ffe5ea, #ffffff);
  --bg-products: #fff8f9;
  --bg-footer: #ffe8ed;
  --shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

/* === RESET & DASAR === */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: "Poppins", "Inter", sans-serif;
  color: #222;
  background: #fffafa;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ======================================================
   🍃 NAVBAR
   ====================================================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--primary);
  color: #fff;
  padding: 0.9rem 1.2rem;
  border-bottom: 3px solid var(--secondary);
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.brand .logo {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.brand h1 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.menu {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.menu a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

.menu a:hover {
  color: var(--accent);
}

/* === KERANJANG === */
.cart {
  position: relative;
  display: flex;
  align-items: center;
}

.count {
  position: absolute;
  top: -6px;
  right: -10px;
  background: #ef4444;
  color: #fff;
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 12px;
  font-weight: bold;
}

/* === TOMBOL === */
.btn {
  background: var(--secondary);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.6rem 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn:hover {
  background: var(--primary);
  transform: scale(1.03);
}

/* === MENU TOGGLE (MOBILE) === */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 20px;
  cursor: pointer;
}

.menu-toggle span {
  height: 3px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translateY(8px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translateY(-8px);
}

/* ======================================================
   🍓 HERO SECTION
   ====================================================== */
/* === HERO SECTION UTAMA === */
.hero {
  width: 100%;
  display: flex;
  flex-direction: column;
  background: #fff;
  overflow: hidden;
}

/* === Gambar besar penuh layar === */
.hero-image img {
  width: 100%;
  height: 45vh;
  object-fit: cover;
}

/* === Bagian bawah hero === */
.hero-bottom {
  background: var(--bg-products);
  padding: 30px 15px;
  display: flex;
  justify-content: center;
}

/* === Kontainer teks + kartu (desktop) === */
.hero-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  width: 100%;
  gap: 20px;
}

/* === TEKS KIRI === */
.hero-text {
  flex: 1;
  padding-right: 20px;
}

.hero-text h1 {
  font-size: 36px;
  font-weight: 800;
  color: var(--primary);
  margin-top: 6px;
  letter-spacing: 1px;
  font-family: "Times New Roman", Times, serif;
}

.hero-text p {
  font-size: 15px;
  letter-spacing: 1px;
  color: #333;
  margin: 0;
  text-align: justify;
  font-family: "Times New Roman", Times, serif;
}

/* === KARTU KANAN === */
.hero-cards {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 15px;
}

.hero-cards .card {
  width: 230px;
  height: 190px;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: 0.3s;
}

.hero-cards .card {
  background: none;
  padding: 0;
  border-radius: 2px;
  box-shadow: none;
}

.hero-cards .card:hover {
  transform: translateY(-5px);
}

.hero-cards img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* === RESPONSIVE UNTUK HP === */
@media (max-width: 768px) {
  /* Gambar besar lebih proporsional di HP */
  .hero-image img {
    height: 20vh;
    object-fit: cover;
    object-position: center;
  }

  /* Urutan: gambar → card → teks */
  .hero-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2px;
  }

  /* === CARD HORIZONTAL BERJARAK DAN RAPI === */
  .hero-cards {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 2px;
  }

  .hero-cards::-webkit-scrollbar {
    display: none; /* sembunyikan scrollbar */
  }

  .hero-cards .card {
    flex: 0 0 auto;
    width: 115px;
    height: 75px;
    border-radius: 1px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    scroll-snap-align: center;
    transition: transform 0.3s ease;
    object-fit: cover;
  }

  .hero-cards .card:hover {
    transform: scale(1.05);
  }

  /* === TEKS DI BAWAH CARD === */
  .hero-text {
    display: grid;
    order: 3;
    justify-content: center;
    align-items: center;
  }

  .hero-text h1 {
    font-size: 16px;
    margin-bottom: 5px;
    color: var(--primary);
    text-align: center;
    padding-left: 10px;
  }

  .hero-text p {
    font-size: 12px;
    line-height: 1.5;
    color: #333;
    padding-left: 20px;
    text-align: center;
  }

  /* Padding keseluruhan hero-bottom */
  .hero-bottom {
    padding: 2px 2px;
    flex-direction: column;
    gap: 2px;
  }
}

/* ======================================================
   🍰 PRODUK
   ====================================================== */
.products-section {
  background: var(--bg-products);
  padding: 3rem 1.5rem;
}

.products-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
  padding-left: 10px;
  margin-bottom: 1.5rem;
}

.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.5rem;
}

.card {
  border: 1px solid #ffd6dc;
  border-radius: 14px;
  background: #ffffff;
  padding: 16px;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(230, 57, 70, 0.15);
}

.card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 10px;
}

.card h3 {
  margin: 10px 0 6px;
  font-size: 1rem;
  color: var(--primary);
}

.card p {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.price {
  font-weight: 700;
  color: var(--secondary);
}

.actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

@media (max-width: 768px) {
  .products-title {
    justify-content: center;
    align-items: center;
    text-align: center;
  }
}

/* ======================================================
   🛍️ MODAL (KERANJANG & DETAIL) — VERSI TENGAH RAPI
   ====================================================== */
.modal {
  padding-top: 50px;
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  z-index: 999;
  transition: opacity 0.3s ease;
  opacity: 0;
}

.modal.open {
  display: flex;
  opacity: 1;
  animation: fadeInBg 0.3s ease forwards;
}

.modal-content {
  background: #fffdfa;
  padding: 2rem 1.5rem;
  border-radius: 18px;
  min-width: 320px;
  max-width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 8px 25px rgba(230, 57, 70, 0.15);
  animation: fadeInUp 0.35s ease forwards;
  position: relative;

  /* 🎯 Tambahan agar isi di tengah */
  display: flex;
  flex-direction: column;
  align-items: center; /* horizontal center */
  justify-content: center; /* vertical center */
  text-align: center;
  gap: 1rem;
}

/* Gaya gambar dan teks di dalam modal */
.modal-content img {
  max-width: 100%;
  width: 220px;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(230, 57, 70, 0.15);
}

.modal-content h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
}

.modal-content p {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 90%;
  line-height: 1.5;
}

/* Tombol close */
.close-modal {
  position: absolute;
  top: 12px;
  right: 14px;
  border: none;
  background: rgba(255, 107, 129, 0.1);
  color: var(--primary);
  font-size: 1.4rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-modal:hover {
  background: var(--primary);
  color: #fff;
  transform: rotate(90deg);
}

/* ======================================================
   ✨ ANIMASI
   ====================================================== */
@keyframes fadeInBg {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ======================================================
   📱 RESPONSIVE (HP)
   ====================================================== */
@media (max-width: 480px) {
  .modal-content {
    width: 92%;
    padding: 1.3rem;
    border-radius: 14px;
    max-height: 80vh;
  }

  .modal-content img {
    width: 180px;
  }

  .modal-content h2 {
    font-size: 1.2rem;
  }

  .modal-content p {
    font-size: 0.85rem;
  }

  .close-modal {
    top: 10px;
    right: 10px;
    font-size: 1.3rem;
    width: 32px;
    height: 32px;
  }
}

/* ======================================================
   📱 RESPONSIVE DESIGN
   ====================================================== */

/* NAVBAR MOBILE */
@media (max-width: 800px) {
  .menu {
    position: absolute;
    top: 64px;
    right: 16px;
    background: var(--primary);
    flex-direction: column;
    align-items: flex-start;
    width: 200px;
    padding: 15px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transform: scaleY(0);
    transform-origin: top;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  .menu.show {
    transform: scaleY(1);
    opacity: 1;
    pointer-events: auto;
  }

  .menu-toggle {
    display: flex;
  }
}

/* ======================================================
   ✨ ANIMASI
   ====================================================== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
