/* ===================================
   Petal Cart — style.css
   =================================== */
@import url('https://fonts.googleapis.com/css2?family=Pacifico&family=Poppins:wght@400;500;600;700&display=swap');

/* ---------- 1. Theme variables ---------- */
:root {
  --white: #FFFFFF;
  --blush: #FFF0F5;
  --soft-pink: #F8C8DC;
  --rose: #E75480;
  --rose-dark: #C93D68;
  --text: #3D2C35;
  --muted: #8A7480;
  --star: #F5A623;
  --radius: 18px;
  --shadow: 0 4px 14px rgba(231, 84, 128, 0.10);
  --shadow-hover: 0 12px 28px rgba(231, 84, 128, 0.22);
}

/* ---------- 2. Reset & basics ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Poppins', sans-serif;
  background: var(--blush);
  color: var(--text);
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button, input, select { font: inherit; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.hidden-toggle { display: none; }

/* ---------- 3. Buttons ---------- */
.btn {
  display: inline-block;
  background: var(--rose);
  color: var(--white);
  padding: 12px 28px;
  border: 2px solid var(--rose);
  border-radius: 999px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.btn:hover {
  background: var(--rose-dark);
  border-color: var(--rose-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(231, 84, 128, 0.35);
}
.btn-outline { background: transparent; color: var(--rose); }
.btn-outline:hover { background: var(--rose); color: var(--white); }

/* ---------- 4. Header ---------- */
.header {
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.logo {
  font-family: 'Pacifico', cursive;
  font-size: 1.8rem;
  color: var(--rose);
  white-space: nowrap;
}
.search { flex: 1; display: flex; }
.search input {
  flex: 1;
  padding: 10px 18px;
  border: 2px solid var(--soft-pink);
  border-right: none;
  border-radius: 999px 0 0 999px;
  outline: none;
  transition: border-color 0.2s;
}
.search input:focus { border-color: var(--rose); }
.search button {
  padding: 0 20px;
  border: none;
  background: var(--rose);
  color: var(--white);
  border-radius: 0 999px 999px 0;
  cursor: pointer;
}
.header-links { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.header-link { font-size: 0.8rem; line-height: 1.3; color: var(--muted); }
.header-link strong { color: var(--text); font-size: 0.95rem; }
.header-link:hover strong { color: var(--rose); }
.cart-link { position: relative; font-size: 1.6rem; cursor: pointer; }
.cart-count {
  position: absolute;
  top: -4px;
  right: -12px;
  width: 20px;
  height: 20px;
  background: var(--rose);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

/* ---------- 5. Category nav + dropdown ---------- */
.nav { background: var(--soft-pink); }
.nav-list {
  max-width: 1200px;
  margin: 0 auto;
  padding: 6px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.nav-list > li > a {
  display: block;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}
.nav-list > li > a:hover { background: var(--white); color: var(--rose); }
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  background: var(--white);
  border-radius: 14px;
  box-shadow: var(--shadow-hover);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s;
  z-index: 60;
}
.dropdown:hover .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-menu a { display: block; padding: 8px 12px; border-radius: 10px; font-size: 0.9rem; }
.dropdown-menu a:hover { background: var(--blush); color: var(--rose); }

/* ---------- 6. Hero banner ---------- */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: linear-gradient(135deg, var(--soft-pink) 0%, var(--white) 100%);
  border-radius: 28px;
  padding: 48px 56px;
  margin: 28px 0;
}
.hero-tag {
  display: inline-block;
  background: var(--white);
  color: var(--rose);
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 12px;
}
.hero h1 { font-size: 2.6rem; line-height: 1.2; margin-bottom: 12px; }
.hero h1 span { color: var(--rose); }
.hero p { color: var(--muted); margin-bottom: 24px; max-width: 420px; }
.hero-art { font-size: 8rem; animation: float 3s ease-in-out infinite; }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

/* ---------- 7. Section titles & categories ---------- */
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 18px;
}
.section-title h2 { font-size: 1.5rem; }
.section-title a { color: var(--rose); font-weight: 500; font-size: 0.9rem; }
.section-title a:hover { text-decoration: underline; }

.categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 16px;
  margin-bottom: 44px;
}
.category {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px 10px;
  text-align: center;
  font-weight: 500;
  box-shadow: var(--shadow);
  transition: transform 0.2s, color 0.2s;
}
.category span { display: block; font-size: 2.5rem; }
.category:hover { transform: translateY(-4px); color: var(--rose); }

/* ---------- 8. Product grid & cards ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 22px;
  margin-bottom: 44px;
}
.card {
  position: relative;
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  transition: transform 0.25s, box-shadow 0.25s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.card-img {
  aspect-ratio: 1;
  background: var(--blush);
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 4.5rem;
  transition: transform 0.3s;
}
.card:hover .card-img { transform: scale(1.03); }
.badge {
  position: absolute;
  top: 26px;
  left: 26px;
  background: var(--rose);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
}
.badge.sale { background: var(--text); }
.card h3 { font-size: 1rem; font-weight: 500; margin: 12px 0 2px; }
.card h3 a:hover { color: var(--rose); }
.stars { color: var(--star); font-size: 0.9rem; }
.stars small { color: var(--muted); }
.price { color: var(--rose); font-weight: 700; font-size: 1.2rem; }
.old-price { color: #B5A5AD; text-decoration: line-through; font-size: 0.85rem; font-weight: 400; margin-left: 6px; }
.card-actions { display: flex; gap: 8px; margin-top: 12px; }
.card-actions .btn { flex: 1; padding: 8px 10px; font-size: 0.85rem; }

/* ---------- 9. FAQ accordions (<details>) ---------- */
details {
  background: var(--white);
  border-radius: 14px;
  padding: 14px 20px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
}
summary {
  list-style: none;
  cursor: pointer;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; color: var(--rose); font-size: 1.3rem; line-height: 1; }
details[open] summary::after { content: '−'; }
details p { margin-top: 10px; color: var(--muted); font-size: 0.95rem; }

/* ---------- 10. Cart drawer (checkbox hack) ---------- */
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 340px;
  max-width: 90%;
  height: 100%;
  background: var(--white);
  padding: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.1);
  transform: translateX(100%);
  transition: transform 0.35s ease;
}
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(61, 44, 53, 0.35);
  z-index: 150;
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
}
#cart-toggle:checked ~ .drawer { transform: translateX(0); }
#cart-toggle:checked ~ .drawer-overlay { opacity: 1; visibility: visible; }
.drawer-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.drawer-close { cursor: pointer; font-size: 1.3rem; color: var(--muted); }
.drawer-close:hover { color: var(--rose); }
.drawer-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--soft-pink);
  font-size: 0.9rem;
}
.mini-thumb {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  background: var(--blush);
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.8rem;
}
.drawer-footer { margin-top: auto; }
.drawer-footer .btn { width: 100%; margin-top: 10px; }

/* ---------- 11. Popup modal (:target) ---------- */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(61, 44, 53, 0.4);
  display: grid;
  place-items: center;
  z-index: 300;
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
}
.modal:target { opacity: 1; visibility: visible; }
.modal-box {