:root {
  --primary-color: #D95D8A;
  --background-color: #FFF9FB;
  --text-color: #333;
}

body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
}

html {
  scroll-behavior: smooth;
}

section {
  padding: 80px 20px;
  text-align: center;
}

h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2.8em;
  margin-top: 0;
  margin-bottom: 40px;
}

.header-container {
  background-color: rgba(255, 249, 251, 0.85);
  padding: 15px 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #FEEAEE;
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.5em;
  color: var(--text-color);
  text-decoration: none;
}

.logo img {
  width: 35px;
  height: 35px;
}

nav ul {
  list-style: none;
  display: flex;
  padding: 0;
  margin: 0;
  gap: 35px;
}

nav ul li a {
  color: #555;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

nav ul li a:hover,
nav ul li a.active {
  color: var(--primary-color);
  font-weight: 700;
}

.cart-icon {
  position: relative;
  cursor: pointer;
}

.cart-icon svg {
  width: 28px;
  height: 28px;
  color: #444;
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -10px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 2px solid var(--background-color);
}

.catalog-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: auto;
}

.flower-card {
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
  text-align: center;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  /* --- Style Awal untuk Animasi Scroll --- */
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* --- Style Akhir untuk Animasi Scroll (setelah elemen terlihat) --- */
.flower-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.flower-card:hover {
  transform: translateY(-5px) !important;
  /* Tambah !important agar override state animasi */
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.flower-card img {
  width: 100%;
  height: 280px;
  object-fit: cover;
}

.flower-card .info {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.flower-card h3 {
  font-family: 'Playfair Display', serif;
  margin: 0 0 10px;
  font-size: 1.4em;
  color: var(--text-color);
}

.flower-card .price {
  margin: 15px 0 15px;
  color: var(--primary-color);
  font-weight: bold;
  font-size: 1.2em;
}

.card-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 15px;
}

.details-btn {
  background-color: #f0f0f0;
  color: #333;
  border: none;
  padding: 12px 20px;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.details-btn:hover {
  background-color: #e0e0e0;
}

.add-to-cart-btn {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 50px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-weight: 600;
}

.add-to-cart-btn:hover {
  background-color: #c74b79;
}

.cart-sidebar {
  position: fixed;
  top: 0;
  right: -100%;
  width: 400px;
  max-width: 90%;
  height: 100%;
  background-color: white;
  box-shadow: -5px 0 25px rgba(0, 0, 0, 0.1);
  transition: right 0.4s ease-in-out;
  z-index: 1100;
  display: flex;
  flex-direction: column;
}

.cart-sidebar.open {
  right: 0;
}

.cart-header {
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #eee;
}

.cart-header h3 {
  margin: 0;
  font-family: 'Playfair Display', serif;
}

.close-btn {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #888;
}

.cart-body {
  flex-grow: 1;
  overflow-y: auto;
  padding: 20px;
}

.cart-item {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  align-items: center;
}

.cart-item img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
}

.cart-item-details {
  flex-grow: 1;
  text-align: left;
}

.quantity-control {
  display: flex;
  align-items: center;
  gap: 10px;
}

.quantity-control button {
  background-color: #f0f0f0;
  border: none;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  cursor: pointer;
  font-weight: bold;
}

.cart-footer {
  padding: 20px;
  border-top: 1px solid #eee;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-weight: bold;
  font-size: 1.2em;
  margin-bottom: 20px;
}

.checkout-btn {
  background-color: var(--primary-color);
  color: white;
  border: none;
  width: 100%;
  padding: 15px;
  border-radius: 8px;
  font-size: 1.1em;
  cursor: pointer;
}

.cart-empty {
  text-align: center;
  color: #888;
  padding: 40px 0;
}

.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1050;
  transition: opacity 0.3s ease;
}

.overlay.show {
  display: block;
}

.modal {
  display: none;
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 500px;
  background: white;
  border-radius: 15px;
  z-index: 1200;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

/* --- Style untuk Modal Detail Produk --- */
.details-modal-content {
  padding: 0;
}

.details-modal-content img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 15px 15px 0 0;
}

.details-modal-info {
  padding: 20px 30px 30px;
  text-align: left;
}

.details-modal-info h3 {
  font-family: 'Playfair Display', serif;
  font-size: 2em;
  margin: 0 0 10px;
}

.details-modal-info .price {
  color: var(--primary-color);
  font-size: 1.3em;
  font-weight: bold;
  margin-bottom: 15px;
}

.details-modal-info .description {
  color: #555;
  line-height: 1.6;
  margin-bottom: 20px;
}

#close-details-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  color: white;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* --- Style untuk Modal Checkout (sudah ada) --- */
/* catalog.css */
.checkout-btn {
  width: 100%;
  padding: 15px;
  background-color: #25D366;
  /* Warna Hijau WA biar user tahu ini ke WA */
  color: white;
  border: none;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  margin-top: 15px;
  transition: 0.3s;
}

.checkout-btn:hover {
  background-color: #128C7E;
  transform: scale(1.02);
}

/* Modal Checkout Styling */
.checkout-modal-content {
  background: white;
  padding: 30px;
  border-radius: 20px;
  max-width: 450px;
  width: 90%;
  margin: auto;
}

.checkout-modal-content input,
.checkout-modal-content textarea {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border-radius: 10px;
  border: 1px solid #ddd;
  box-sizing: border-box;
  font-family: 'Poppins';
}

.footer {
  background-color: #4A4A4A;
  text-align: center;
  padding: 30px 20px;
  color: white;
  margin-top: 40px;
}

/* ==========================================================================
   SINKRONISASI NAV AVATAR PROFILE DROPDOWN (ANTI-HILANG SAAT DIGESER)
   ========================================================================== */
.profile-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 100%;
    z-index: 1010; /* Berada di atas layer header utama */
    padding-bottom: 15px; /* Memberikan ruang sensor hover ke bawah */
    margin-bottom: -15px; /* Menyeimbangkan margin agar tidak merusak tata letak nav */
}

/* Lingkaran profil user */
.avatar-circle { 
    width: 30px; 
    height: 30px; 
    background-color: #D95D8A; 
    color: white; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-weight: 600; 
    font-size: 0.85rem;
    cursor: pointer; 
    box-shadow: 0 2px 5px rgba(217, 93, 138, 0.2);
    transition: transform 0.2s ease;
}

.avatar-circle:hover {
    transform: scale(1.05);
}

/* Kotak menu drop-down */
.dropdown-menu { 
    display: none; 
    position: absolute; 
    top: 100%; 
    right: 0; 
    background: white; 
    min-width: 160px; 
    box-shadow: 0px 8px 24px rgba(0,0,0,0.12); 
    border-radius: 8px; 
    z-index: 1020; /* Kunci utama: Berada paling depan agar link peka klik */
    padding: 8px 0; 
    margin-top: -5px; /* Menempel pas di area batas padding sensor hantaran */
    border: 1px solid #fdf0f3;
}

/* TRIK JEMBATAN SEMU: Menghubungkan celah kosong agar hover tidak lepas saat digeser turun */
.dropdown-menu::before {
    content: "";
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    height: 20px;
    background: transparent; /* Lapisan tidak terlihat tapi peka sensor mouse */
}

.dropdown-menu a { 
    color: #333 !important; 
    padding: 10px 16px; 
    text-decoration: none; 
    display: block; 
    font-size: 0.85rem; 
    text-align: left;
    transition: background 0.2s, color 0.2s;
}

.dropdown-menu a:hover { 
    background-color: #FFF9FB; 
    color: #D95D8A !important; 
}

/* Memunculkan dropdown secara aman dan responsif saat di-hover */
.profile-wrapper:hover .dropdown-menu { 
    display: block; 
}
/* ==========================================
   STYLING POP-UP CUSTOM CEGAT LOGIN
   ========================================== */
.auth-modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background-color: #ffffff;
  padding: 35px 30px;
  border-radius: 16px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
  z-index: 1200; /* Harus di atas overlay utama */
  max-width: 400px;
  width: 90%;
  text-align: center;
  transition: all 0.3s ease-in-out;
}

.auth-modal.show {
  display: block;
  transform: translate(-50%, -50%) scale(1);
}

.auth-modal h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  margin-top: 0;
  margin-bottom: 12px;
  color: #333;
}

.auth-modal p {
  font-size: 0.95rem;
  color: #666;
  line-height: 1.6;
  margin-bottom: 25px;
}

.auth-modal-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-btn-login {
  background-color: var(--primary-color);
  color: white !important;
  text-decoration: none;
  padding: 13px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  display: block;
  transition: background-color 0.2s ease;
}

.auth-btn-login:hover {
  background-color: #be4873;
}

.auth-btn-back {
  background-color: #f2f2f2;
  color: #444;
  border: none;
  padding: 13px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.auth-btn-back:hover {
  background-color: #e5e5e5;
}