/* ═══════════════════════════════════════════════════════════
   ROYAL BALLOON DECOR — Global Stylesheet
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ─── CSS Variables ──────────────────────────────────────── */
:root {
  --gold: #C9913D;
  --gold-light: #E8B86D;
  --gold-dark: #9B6E28;
  --cream: #FDF8F0;
  --cream-dark: #F5EDD9;
  --text-dark: #1A1208;
  --text-mid: #4A3728;
  --text-light: #7A6554;
  --pink: #E8637A;
  --pink-light: #F5A3B0;
  --purple: #7B4FA6;
  --teal: #3A8C8C;
  --white: #FFFFFF;
  --border: rgba(201,145,61,0.2);
  --shadow: 0 4px 24px rgba(26,18,8,0.08);
  --shadow-lg: 0 12px 48px rgba(26,18,8,0.14);
  --radius: 16px;
  --radius-sm: 8px;
  --nav-height: 72px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Reset & Base ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; font-family: inherit; border: none; outline: none; }
input, select, textarea { font-family: inherit; outline: none; }

/* ─── Typography ─────────────────────────────────────────── */
h1,h2,h3,h4,h5,h6 { font-family: 'Playfair Display', serif; line-height: 1.2; }
.serif { font-family: 'Playfair Display', serif; }
.text-gold { color: var(--gold); }
.text-center { text-align: center; }
.italic { font-style: italic; }

/* ─── Navigation ─────────────────────────────────────────── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--nav-height);
  background: rgba(253,248,240,0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 40px;
  transition: var(--transition);
}
.navbar.scrolled {
  box-shadow: var(--shadow);
  background: rgba(253,248,240,0.99);
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem; font-weight: 700;
  color: var(--text-dark);
  margin-right: auto;
}
.site-logo { display: block; height: auto; object-fit: contain; }
.site-logo-nav { height: 52px; max-width: 180px; }
.site-logo-footer { height: 64px; max-width: 220px; margin-bottom: 12px; }
.site-logo-auth { height: 72px; max-width: 240px; margin-bottom: 24px; }
.site-logo-admin { height: 40px; max-width: 160px; }
.site-logo-login { height: 56px; max-width: 200px; margin: 0 auto 12px; }
.nav-logo span { color: var(--gold); }
.nav-logo .logo-icon { font-size: 1.8rem; }
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-links a {
  padding: 8px 16px; border-radius: 50px;
  font-size: 0.9rem; font-weight: 500;
  color: var(--text-mid);
  transition: var(--transition);
}
.nav-links a:hover, .nav-links a.active {
  background: var(--cream-dark); color: var(--gold);
}
.nav-actions { display: flex; align-items: center; gap: 12px; margin-left: 24px; }
.nav-icon-btn {
  position: relative; width: 42px; height: 42px;
  border-radius: 50%; background: var(--cream-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: var(--text-mid);
  transition: var(--transition);
}
.nav-icon-btn:hover { background: var(--gold); color: white; transform: translateY(-2px); }
.cart-badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--pink); color: white;
  font-size: 0.65rem; font-weight: 700;
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.btn-nav-login {
  padding: 10px 22px; border-radius: 50px;
  background: var(--gold); color: white;
  font-weight: 600; font-size: 0.9rem;
  transition: var(--transition);
}
.btn-nav-login:hover { background: var(--gold-dark); transform: translateY(-2px); box-shadow: 0 4px 16px rgba(201,145,61,0.35); }
.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  top: var(--nav-height);
  background: rgba(0,0,0,0.45);
  z-index: 999;
}
.nav-backdrop.open { display: block; }
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  padding: 10px;
  margin-left: 8px;
  z-index: 1002;
  background: transparent;
  border: none;
  min-width: 44px;
  min-height: 44px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-mid);
  border-radius: 2px;
  transition: var(--transition);
}
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
body.nav-open,
body.modal-open { overflow: hidden; }

/* ─── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 32px; border-radius: 50px;
  font-weight: 600; font-size: 0.95rem; letter-spacing: 0.02em;
  transition: var(--transition); border: 2px solid transparent;
}
.btn-primary { background: var(--gold); color: white; }
.btn-primary:hover { background: var(--gold-dark); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(201,145,61,0.4); }
.btn-outline { background: transparent; border-color: var(--gold); color: var(--gold); }
.btn-outline:hover { background: var(--gold); color: white; }
.btn-dark { background: var(--text-dark); color: white; }
.btn-dark:hover { background: var(--text-mid); transform: translateY(-2px); }
.btn-pink { background: var(--pink); color: white; }
.btn-pink:hover { background: #d14d64; transform: translateY(-2px); }
.btn-sm { padding: 10px 20px; font-size: 0.85rem; }
.btn-block { width: 100%; }

/* ─── Section Layout ─────────────────────────────────────── */
.section { padding: 80px 0; }
.section-sm { padding: 48px 0; }
.container { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.section-header { margin-bottom: 48px; }
.section-label {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--gold);
  background: rgba(201,145,61,0.1); padding: 6px 16px; border-radius: 50px;
  margin-bottom: 12px;
}
.section-title { font-size: clamp(2rem, 4vw, 3rem); color: var(--text-dark); }
.section-subtitle { font-size: 1.1rem; color: var(--text-light); max-width: 540px; margin-top: 12px; }

/* ─── Product Cards ──────────────────────────────────────── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 28px;
}
.product-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.product-card-link {
  color: inherit;
  display: flex;
  flex: 1;
  flex-direction: column;
  text-decoration: none;
}
.product-card-img {
  position: relative; aspect-ratio: 4/3; overflow: hidden;
  background: var(--cream-dark);
}
.product-card-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s ease;
}
.product-card:hover .product-card-img img { transform: scale(1.07); }
.product-card-badge {
  position: absolute; top: 12px; left: 12px;
  background: var(--gold); color: white;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 4px 12px; border-radius: 50px;
}
.product-card-actions {
  position: absolute; top: 12px; right: 12px;
  display: flex; flex-direction: column; gap: 8px;
  opacity: 0; transform: translateX(10px);
  transition: var(--transition);
}
.product-card:hover .product-card-actions { opacity: 1; transform: translateX(0); }
.product-share-wrap {
  position: absolute; bottom: 12px; right: 12px; z-index: 3;
}
.product-share-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.95); color: var(--text-mid);
  border: none; cursor: pointer; font-size: 1rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  transition: var(--transition);
}
.product-share-btn:hover { background: var(--gold); color: white; }
.product-share-menu {
  position: absolute; bottom: calc(100% + 8px); right: 0;
  min-width: 150px; background: white; border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg); padding: 6px;
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: var(--transition); pointer-events: none;
}
.product-share-menu.open {
  opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto;
}
.product-share-menu button {
  display: block; width: 100%; text-align: left;
  padding: 10px 12px; border: none; background: none;
  font-size: 0.85rem; color: var(--text-dark); cursor: pointer;
  border-radius: 6px; transition: var(--transition);
}
.product-share-menu button:hover { background: var(--cream-dark); color: var(--gold); }
.product-share-inline { flex: 0 0 auto !important; min-width: 64px; }
.action-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: white; color: var(--text-mid);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  transition: var(--transition);
}
.action-btn:hover { background: var(--gold); color: white; }
.product-card-body { padding: 20px 20px 88px; flex: 1; }
.product-card-category {
  font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--gold); margin-bottom: 6px;
}
.product-card-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem; color: var(--text-dark);
  margin-bottom: 8px; line-height: 1.3;
}
.product-card-inclusion {
  font-size: 0.82rem; color: var(--text-light);
  line-height: 1.5; margin-bottom: 16px;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.product-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 14px; border-top: 1px solid var(--border);
}
.product-card-buttons {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
  display: flex;
  gap: 8px;
}
.product-card-buttons .btn {
  flex: 1;
  justify-content: center;
  min-height: 38px;
  padding-left: 10px;
  padding-right: 10px;
}
.product-price {
  font-size: 1.1rem; font-weight: 700; color: var(--text-dark);
}
.product-price span { font-size: 0.75rem; font-weight: 400; color: var(--text-light); }
.product-tax-note {
  margin-top: 3px;
  font-size: 0.72rem;
  color: var(--text-light);
  line-height: 1.25;
}

/* ─── Image Slider ───────────────────────────────────────── */
.slider { position: relative; width: 100%; aspect-ratio: 4/3; overflow: hidden; background: var(--cream-dark); border-radius: var(--radius); }
.slider-track { display: flex; height: 100%; transition: transform 0.45s cubic-bezier(0.4,0,0.2,1); }
.slide { min-width: 100%; height: 100%; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slider-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,0.9); color: var(--text-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; box-shadow: var(--shadow);
  transition: var(--transition); z-index: 2;
}
.slider-btn:hover { background: var(--gold); color: white; }
.slider-btn.prev { left: 12px; }
.slider-btn.next { right: 12px; }
.slider-dots {
  position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 6px;
}
.slider-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(255,255,255,0.6); transition: var(--transition); cursor: pointer;
}
.slider-dot.active { background: white; width: 20px; border-radius: 4px; }

/* ─── Toast ──────────────────────────────────────────────── */
.toast-container {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 9999; display: flex; flex-direction: column; gap: 10px;
}
.toast {
  background: var(--text-dark); color: white;
  padding: 14px 20px; border-radius: var(--radius-sm);
  font-size: 0.9rem; display: flex; align-items: center; gap: 10px;
  box-shadow: var(--shadow-lg); animation: slideInToast 0.3s ease;
  max-width: 340px;
}
.toast.success { border-left: 4px solid #4CAF50; }
.toast.error { border-left: 4px solid var(--pink); }
.toast.info { border-left: 4px solid var(--gold); }
@keyframes slideInToast {
  from { opacity: 0; transform: translateX(100%); }
  to { opacity: 1; transform: translateX(0); }
}

/* ─── Modal ──────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: var(--transition);
}
.modal-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.modal {
  background: var(--white); border-radius: var(--radius);
  max-width: 520px; width: 100%;
  transform: scale(0.9) translateY(20px);
  transition: var(--transition);
  max-height: 90vh; overflow-y: auto;
  position: relative;
  z-index: 2001;
  pointer-events: auto;
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }
.modal-header {
  padding: 28px 28px 0;
  display: flex; align-items: center; justify-content: space-between;
}
.modal-title { font-family: 'Playfair Display', serif; font-size: 1.5rem; }
.modal-close {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--cream-dark); color: var(--text-mid);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; transition: var(--transition);
  border: none; cursor: pointer;
  flex-shrink: 0;
}
.modal-close:hover { background: var(--pink); color: white; }
.modal-body { padding: 24px 28px 28px; }

.google-signin-wrap { display: flex; justify-content: center; margin-bottom: 8px; min-height: 44px; }
.google-hint { font-size: 0.82rem; color: var(--text-light); text-align: center; line-height: 1.5; }
.otp-display-banner {
  background: #fff8e6;
  border: 2px dashed var(--gold);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 16px;
  text-align: center;
}
.otp-display-banner .otp-code {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: var(--gold-dark);
  display: inline-block;
  margin-left: 8px;
}
.otp-display-banner .otp-hint { font-size: 0.8rem; color: var(--text-light); margin: 8px 0 0; }

/* ─── Form Styles ────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text-mid); margin-bottom: 6px; }
.form-control {
  width: 100%; padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--cream); color: var(--text-dark);
  font-size: 0.95rem; transition: var(--transition);
}
.form-control:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,145,61,0.15); }
.form-control::placeholder { color: var(--text-light); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ─── Loading ────────────────────────────────────────────── */
.loading-spinner {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 60px; gap: 16px; color: var(--text-light);
}
.spinner {
  width: 40px; height: 40px; border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: var(--gold);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Empty State ────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 80px 24px; color: var(--text-light);
}
.empty-state-icon { font-size: 4rem; margin-bottom: 16px; opacity: 0.4; }
.empty-state h3 { font-family: 'Playfair Display', serif; font-size: 1.5rem; color: var(--text-mid); margin-bottom: 8px; }

/* ─── Footer ─────────────────────────────────────────────── */
.footer {
  background: var(--text-dark);
  color: rgba(255,255,255,0.7);
  padding: 64px 0 32px;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px; margin-bottom: 48px;
}
.footer-brand .logo { font-family: 'Playfair Display', serif; font-size: 1.5rem; color: white; margin-bottom: 12px; }
.footer-brand .logo span { color: var(--gold); }
.footer-brand p { font-size: 0.9rem; line-height: 1.7; max-width: 280px; }
.footer h4 { color: white; font-size: 0.9rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 16px; }
.footer ul { display: flex; flex-direction: column; gap: 10px; }
.footer ul a { font-size: 0.9rem; transition: var(--transition); }
.footer ul a:hover { color: var(--gold); }
.footer-bottom {
  padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.85rem;
}
.social-links { display: flex; gap: 12px; }
.social-link {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.95rem; transition: var(--transition);
}
.social-link:hover { background: var(--gold); color: white; }

/* ─── Page Header ────────────────────────────────────────── */
.page-hero {
  padding: calc(var(--nav-height) + 48px) 0 48px;
  background: linear-gradient(135deg, var(--cream) 0%, var(--cream-dark) 100%);
  position: relative; overflow: hidden;
}
.page-hero::before {
  content: '🎈';
  position: absolute; right: -40px; top: -40px;
  font-size: 20rem; opacity: 0.04; transform: rotate(-15deg);
  pointer-events: none;
}
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--text-light); margin-bottom: 16px; }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb span { opacity: 0.5; }

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .navbar {
    padding: 0 12px 0 16px;
    flex-wrap: wrap;
    align-items: center;
  }
  .nav-logo { margin-right: 0; flex: 1; min-width: 0; }
  .nav-logo-text { font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--cream);
    padding: 16px 20px 24px;
    box-shadow: var(--shadow-lg);
    border-top: 1px solid var(--border);
    gap: 4px;
    max-height: calc(100vh - var(--nav-height));
    overflow: auto;
    z-index: 1001;
  }
  .nav-links a { width: 100%; padding: 14px 16px; font-size: 1rem; border-radius: 10px; }
  .nav-links.open { display: flex; }
  .hamburger { display: flex; order: 3; }
  .nav-actions {
    order: 2;
    margin-left: auto;
    gap: 6px;
    flex-shrink: 0;
  }
  .nav-icon-btn { width: 40px; height: 40px; font-size: 1rem; }
  .btn-nav-login { padding: 10px 14px; font-size: 0.82rem; min-height: 40px; }
  .nav-user-menu { display: none !important; }
  .nav-greeting { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
  .products-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
  .form-row { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .container { padding: 0 12px; }
  .products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .product-card { border-radius: 10px; }
  .product-card-img { aspect-ratio: 1 / 1; }
  .product-card-badge { top: 8px; left: 8px; max-width: calc(100% - 16px); padding: 3px 7px; font-size: 0.58rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .product-card-actions { display: none; }
  .product-share-wrap { bottom: 8px; right: 8px; }
  .product-share-btn { width: 32px; height: 32px; font-size: 0.9rem; }
  .product-card-body { padding: 10px 10px 76px; }
  .product-card-category { font-size: 0.62rem; letter-spacing: 0.06em; margin-bottom: 4px; }
  .product-card-title { font-size: 0.86rem; line-height: 1.25; margin-bottom: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .product-card-inclusion { font-size: 0.72rem; line-height: 1.35; margin-bottom: 8px; -webkit-line-clamp: 2; }
  .product-price { font-size: 0.88rem; line-height: 1.25; }
  .product-price small { display: none; }
  .product-price span { display: block; font-size: 0.65rem; }
  .product-card-buttons { left: 10px; right: 10px; bottom: 10px; gap: 6px; }
  .product-card-buttons .btn-sm { padding: 7px 6px; font-size: 0.68rem; min-height: 34px; }
  .btn { min-height: 44px; }
  .form-control { font-size: 16px; }
}
