/* ═══════════════════════════════════════════
   LAMDA — BABYMAMA CENTRE
   Premium Vanilla UI System
   ═══════════════════════════════════════════ */

/* ── Design Tokens ── */
:root {
  /* Brand */
  --pink: #E5A99E; --peach: #F5D3C8; --sage: #8EB69B;
  --dark: #4A3E3D; --light: #FDFBF7; --white: #fff;

  --bm-pink-soft: #fde4eb;
  --bm-pink-main: #eda8b9;
  --bm-pink-deep: #d9899d;
  --bm-blue-soft: #e3f2ff;
  --bm-blue-main: #8fc5ee;
  --bm-cream: #fffaf6;
  --bm-text-dark: #3f3438;
  --bm-text-muted: #7d6f74;

  /* Spacing scale (4px base) */
  --space-1: 4px; --space-2: 8px; --space-3: 12px;
  --space-4: 16px; --space-5: 20px; --space-6: 24px;
  --space-8: 32px; --space-10: 40px; --space-12: 48px;

  /* Typography clamp scale */
  --text-xs: clamp(0.65rem, 0.63rem + 0.12vw, 0.7rem);
  --text-sm: clamp(0.75rem, 0.71rem + 0.18vw, 0.82rem);
  --text-md: clamp(0.85rem, 0.82rem + 0.2vw, 0.95rem);
  --text-lg: clamp(1rem, 0.96rem + 0.25vw, 1.08rem);
  --text-xl: clamp(1.38rem, 1.16rem + 1.05vw, 1.85rem);
  --text-2xl: clamp(1.8rem, 1.3rem + 2.5vw, 2.8rem);
  --text-3xl: clamp(2.2rem, 1.4rem + 4vw, 3.6rem);

  /* Radii */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-full: 999px;

  /* Shadows */
  --shadow-sm: 0 2px 12px rgba(0,0,0,.06);
  --shadow-md: 0 8px 28px rgba(16,24,40,.09);
  --shadow-lg: 0 18px 45px rgba(139,111,118,.16);
  --shadow-xl: 0 24px 60px rgba(139,111,118,.2);

  /* Z-index scale */
  --z-sticky: 100;
  --z-overlay: 200;
  --z-modal: 1000;
  --z-toast: 2000;

  /* Tap target */
  --tap: 48px;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }
body {
  font-family: Inter, system-ui, -apple-system, sans-serif;
  background: var(--light); color: var(--dark);
  line-height: 1.6; padding-bottom: 80px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--pink); text-decoration: none; }

/* ── Focus visible for accessibility ── */
:focus-visible { outline: 2.5px solid var(--bm-pink-main); outline-offset: 2px; }
button:focus-visible, a:focus-visible { border-radius: var(--radius-sm); }

/* ── Skeleton Loading ── */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.skeleton {
  background: linear-gradient(90deg, #f0ece6 25%, #f8f4f0 50%, #f0ece6 75%);
  background-size: 200% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
  border-radius: var(--radius-sm);
}
.skeleton-card { height: 320px; margin-bottom: var(--space-4); }
.skeleton-text { height: 14px; width: 60%; margin: var(--space-2) auto; }
.skeleton-text-sm { height: 12px; width: 40%; margin: var(--space-1) auto; }

/* ── Loading States ── */
.loading-txt {
  text-align: center; color: var(--bm-text-muted);
  padding: var(--space-10) 0; font-size: var(--text-md);
  display: flex; flex-direction: column; align-items: center; gap: var(--space-3);
}
.loading-txt::before {
  content: ''; width: 28px; height: 28px;
  border: 3px solid var(--bm-pink-main); border-top-color: transparent;
  border-radius: 50%; animation: btn-spin .7s linear infinite;
}
.empty-txt {
  text-align: center; color: var(--bm-text-muted);
  padding: var(--space-12) var(--space-4); font-size: var(--text-md);
}
.err-txt { text-align: center; color: #e88080; padding: var(--space-10) 0; font-size: var(--text-md); }

/* ── Package Grid ── */
.section { padding: var(--space-10) var(--space-4); max-width: 1100px; margin: 0 auto; }
.section h2 { text-align: center; font-size: var(--text-2xl); margin-bottom: var(--space-5); color: var(--bm-text-dark); }

.pkg-grid {
  display: grid; grid-template-columns: 1fr;
  gap: var(--space-4); max-width: 480px; margin: 0 auto;
}
@media (min-width: 600px) {
  .pkg-grid { max-width: 600px; }
}
@media (min-width: 800px) {
  .pkg-grid { grid-template-columns: 1fr 1fr; max-width: 780px; gap: var(--space-5); }
}

/* ── Package Card ── */
.pkg-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease;
  border: 1px solid var(--pink);
  box-shadow: 0 0 0 4px rgba(229,169,158,.15);
}
.pkg-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(229,169,158,.25);
}
.pkg-card:active {
  transform: translateY(-1px);
  transition-duration: .08s;
}

.pkg-card .img-wrap {
  position: relative;
  aspect-ratio: 9/16;
  overflow: hidden;
  background: #f5f0eb;
  display: flex; align-items: center; justify-content: center;
  padding: 0 8%;
}
.pkg-card.pkg-card-square .img-wrap {
  aspect-ratio: 1/1;
  padding: 0;
}
.pkg-card .img-wrap img {
  width: 100%; height: auto; max-height: 100%;
  object-fit: contain; border-radius: var(--radius-sm);
  transition: transform .35s ease;
}
.pkg-card.pkg-card-square .img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.pkg-card .img-wrap:hover img { transform: scale(1.04); }
.pkg-card .img-wrap .img-fallback {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center; font-size: 3rem;
}

.pkg-card .img-wrap .tap-overlay {
  position: absolute; bottom: var(--space-3); left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--bm-pink-main), #d98a9c);
  color: #fff;
  font-size: var(--text-sm); font-weight: 600;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(237,168,185,.45);
  opacity: 0; transition: opacity .25s ease, transform .25s ease, box-shadow .25s ease;
  cursor: pointer; z-index: 2;
  display: flex; align-items: center; gap: 6px;
  line-height: 1;
}
.pkg-card .img-wrap .tap-overlay:hover {
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 8px 24px rgba(237,168,185,.55);
}
.pkg-card .img-wrap:hover .tap-overlay { opacity: 1; }
.pkg-card .img-wrap .tap-overlay::before {
  content: '🖼️';
  font-size: 1.1em;
}
@media (hover: none) {
  .pkg-card .img-wrap .tap-overlay { opacity: 1; }
}

.pkg-card .badge {
  position: absolute; top: var(--space-3); left: var(--space-3);
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 34px;
  background: linear-gradient(135deg, #fff7da 0%, #f6c849 42%, #d99f20 100%);
  color: #5b3a00;
  font-size: clamp(.78rem, .72rem + .28vw, .92rem);
  font-weight: 900;
  letter-spacing: .45px;
  padding: 7px 14px 7px 9px;
  border-radius: var(--radius-full);
  text-transform: uppercase; z-index: 3;
  border: 1px solid rgba(255,255,255,.75);
  box-shadow: 0 10px 24px rgba(193,132,16,.28), 0 2px 8px rgba(0,0,0,.10);
  isolation: isolate;
}
.pkg-card .badge::after {
  content: '';
  position: absolute; inset: 2px;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,.45), rgba(255,255,255,0));
  pointer-events: none;
  z-index: -1;
}
/* Clean image-based free shipping badge */
.pkg-card .badge.badge-shipping-img {
  top: 12px; left: 12px;
  width: clamp(118px, 40%, 158px);
  min-height: 0;
  padding: 5px 8px;
  border: 1px solid rgba(255,255,255,.88);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,.94), rgba(255,250,244,.88));
  box-shadow: 0 10px 22px rgba(84,52,33,.14), 0 3px 8px rgba(0,0,0,.08);
  overflow: hidden;
  transform: none;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.pkg-card .badge.badge-shipping-img::after { display: none; }
.pkg-card .badge.badge-shipping-img img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 999px;
  object-fit: contain;
}
@media (max-width: 480px) {
  .pkg-card .badge.badge-shipping-img {
    top: 10px; left: 10px;
    width: clamp(112px, 42%, 148px);
    padding: 4px 7px;
  }
}

.pkg-card .info {
  padding: var(--space-3) var(--space-4) var(--space-4);
  display: flex; flex-direction: column; gap: var(--space-1);
  text-align: center; align-items: center;
}
.pkg-card .info .name {
  font-size: var(--text-md); font-weight: 700; line-height: 1.3;
  color: var(--bm-text-dark); text-align: center;
}
.pkg-card .info .price {
  font-size: var(--text-lg); font-weight: 700; color: var(--pink);
  display: flex; align-items: center; gap: var(--space-2);
}
.pkg-card .info .price .orig {
  text-decoration: line-through; color: #bbb;
  font-size: var(--text-sm); font-weight: 400;
}
.pkg-card .info .card-status {
  font-size: var(--text-xs); color: var(--bm-text-muted);
  display: flex; align-items: center; gap: var(--space-1);
}
.pkg-card.added .card-status { color: var(--sage); }

/* ── Gallery Modal (legacy — kept for admin) ── */
.gallery-modal {
  max-width: 720px !important; width: 96% !important;
  padding: 0 !important; overflow: hidden !important;
}

/* ═══════════════════════════════════════════
   GALLERY PAGE
   ═══════════════════════════════════════════ */

.gallery-page { padding-top: 56px; padding-bottom: 80px; }
.gallery-topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: var(--z-sticky);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,.06);
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-3) var(--space-4); height: 52px;
}
.gallery-back {
  font-weight: 600; font-size: var(--text-md);
  color: var(--pink); text-decoration: none;
  display: flex; align-items: center; gap: var(--space-1);
  padding: var(--space-1) 0; min-height: var(--tap);
}
.gallery-title {
  font-weight: 700; font-size: var(--text-md);
  color: var(--dark); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; max-width: 60%;
}

.gallery-info { text-align: center; padding: var(--space-6) var(--space-4) var(--space-2); }
.gallery-info h1 { font-size: var(--text-xl); font-weight: 800; margin-bottom: var(--space-1); color: var(--bm-text-dark); }
.gallery-info .gallery-price { font-size: var(--text-xl); font-weight: 700; color: var(--pink); }
.gallery-info .gallery-price-range {
  font-size: var(--text-xl); font-weight: 700;
  color: var(--pink); margin-top: 2px;
}
.gallery-info .gallery-price .orig {
  text-decoration: line-through; color: #bbb;
  font-size: var(--text-md); margin-left: 6px; font-weight: 400;
}
.gallery-info .gallery-desc {
  font-size: var(--text-sm); color: var(--bm-text-muted);
  margin-top: var(--space-2); max-width: 450px;
  margin-left: auto; margin-right: auto;
  white-space: pre-line; line-height: 1.7;
}
.gallery-info .gallery-desc-list {
  list-style: none;
  display: grid;
  gap: 7px;
  max-width: 460px;
  margin: var(--space-3) auto 0;
  padding: 0;
  text-align: center;
  font-size: var(--text-sm);
  line-height: 1.45;
  color: var(--bm-text-muted);
}
.gallery-info .gallery-desc-list li {
  text-align: center;
  padding-left: 0;
}
.gallery-info .gallery-desc-list li::before {
  display: none;
}
.gallery-info .gallery-hint { font-size: var(--text-xs); color: #bbb; margin-top: var(--space-2); }

.gallery-images {
  display: flex; flex-direction: column; align-items: center;
  gap: var(--space-4); padding: 0 var(--space-3) var(--space-6);
}
.gallery-loading { text-align: center; padding: 80px 20px; color: #999; font-size: var(--text-md); }
.gallery-error { text-align: center; padding: 80px 20px; color: #e88080; }

.gallery-header { padding: var(--space-4) var(--space-5) var(--space-2); text-align: center; }
.gallery-header h3 { font-size: var(--text-lg); font-weight: 800; margin-bottom: var(--space-1); }
.gallery-header .gallery-price { font-size: var(--text-lg); font-weight: 700; color: var(--pink); }
.gallery-header .gallery-price .orig {
  text-decoration: line-through; color: #bbb;
  font-size: var(--text-sm); margin-left: 6px; font-weight: 400;
}
.gallery-header .gallery-desc { font-size: var(--text-sm); color: #888; margin-top: var(--space-2); max-width: 450px; margin-left: auto; margin-right: auto; }
.gallery-header .gallery-in-cart {
  display: inline-block; margin-top: var(--space-2);
  background: var(--sage); color: #fff;
  font-size: var(--text-sm); font-weight: 600;
  padding: 5px 14px; border-radius: var(--radius-full);
}

.gallery-grid {
  display: flex; flex-direction: column;
  gap: var(--space-4); padding: var(--space-3) var(--space-3) var(--space-6);
  max-height: 72vh; overflow-y: auto; align-items: center;
}

.gallery-img-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
  width: 100%; max-width: 100%;
  border: 1px solid rgba(0,0,0,.04);
}
@media (min-width: 600px) { .gallery-img-card { max-width: 380px; } }
.gallery-img-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.gallery-img-card img {
  width: 100%; aspect-ratio: 9/16; object-fit: cover;
  background: #f5f0eb;
}
/* Maryam + Azzahra + Blanket packages: square 1:1 gallery frame */
.gallery-page.gallery-pakej-maryam .gallery-img-card img,
.gallery-page.gallery-pakej-maryam .gallery-img-card .gallery-placeholder,
.gallery-page.gallery-pakej-azzahra .gallery-img-card img,
.gallery-page.gallery-pakej-azzahra .gallery-img-card .gallery-placeholder,
.gallery-page.gallery-blanket .gallery-img-card img,
.gallery-page.gallery-blanket .gallery-img-card .gallery-placeholder {
  aspect-ratio: 1/1;
}
.gallery-img-card .gallery-placeholder {
  width: 100%; aspect-ratio: 9/16; background: #f5f0eb;
  display: flex; align-items: center; justify-content: center; font-size: 5rem;
}

.gallery-img-card .btn-add-card {
  width: 100%; padding: var(--space-3);
  border: none;
  background: var(--pink); color: #fff;
  font-size: var(--text-md); font-weight: 700; cursor: pointer;
  transition: background .2s ease, transform .15s ease;
  min-height: var(--tap);
}
.gallery-img-card .btn-add-card:hover { background: #d49188; }
.gallery-img-card .btn-add-card:active { transform: scale(.97); }
.gallery-img-card .btn-add-card.added-btn { background: var(--sage); }
.gallery-img-card .btn-add-card.added-btn:hover { background: #7aa38a; }

.gallery-modal .close {
  position: absolute; top: var(--space-3); right: var(--space-4);
  z-index: 10;
  background: rgba(0,0,0,.35); color: #fff;
  border: none; width: 34px; height: 34px;
  border-radius: 50%; font-size: 1.1rem;
  cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  transition: background .2s;
}
.gallery-modal .close:hover { background: rgba(0,0,0,.55); }

/* ═══════════════════════════════════════════
   CART FLOATING BAR
   ═══════════════════════════════════════════ */

@keyframes cartSlideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
#cartBar {
  display: none; position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--white); border-top: 2px solid var(--pink);
  padding: var(--space-3) var(--space-4);
  z-index: var(--z-sticky);
  box-shadow: 0 -6px 24px rgba(0,0,0,.1);
  animation: cartSlideUp .3s ease;
}
.cart-bar-inner {
  display: flex; justify-content: space-between;
  align-items: center; max-width: 1100px; margin: 0 auto; gap: var(--space-3);
}
.cart-bar-inner > div:first-child {
  display: flex; align-items: baseline; gap: var(--space-2);
  flex-wrap: wrap;
}
.cart-bar-count { font-weight: 700; font-size: var(--text-sm); }
.cart-bar-total { color: var(--pink); font-weight: 700; font-size: var(--text-lg); }
.btn-cart-open {
  padding: 10px 22px; background: var(--pink); color: #fff;
  border: none; border-radius: var(--radius-sm);
  font-weight: 700; font-size: var(--text-sm);
  cursor: pointer; white-space: nowrap;
  transition: background .2s, transform .15s;
  min-height: 44px;
}
.btn-cart-open:hover { background: #d49188; }
.btn-cart-open:active { transform: scale(.96); }

/* ═══════════════════════════════════════════
   TOAST NOTIFICATION
   ═══════════════════════════════════════════ */

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-12px); }
  to { opacity: 1; transform: translateX(-50%) translateY(4px); }
}
@keyframes toastOut {
  from { opacity: 1; transform: translateX(-50%) translateY(4px); }
  to { opacity: 0; transform: translateX(-50%) translateY(-12px); }
}
.added-toast {
  position: fixed; top: var(--space-4); left: 50%;
  transform: translateX(-50%);
  background: var(--sage); color: #fff;
  padding: 12px 24px; border-radius: var(--radius-md);
  font-size: var(--text-sm); font-weight: 600;
  z-index: var(--z-toast); opacity: 0;
  pointer-events: none;
  box-shadow: 0 6px 24px rgba(0,0,0,.15);
  white-space: nowrap;
  transition: opacity .25s ease, transform .25s ease;
}
.added-toast.show {
  opacity: 1; transform: translateX(-50%) translateY(4px);
  animation: toastIn .25s ease;
}
.added-toast.hide {
  animation: toastOut .2s ease forwards;
}

/* ── Page-level toast (admin) ── */
.toast {
  position: fixed; bottom: var(--space-5); right: var(--space-5);
  padding: 12px 20px; border-radius: var(--radius-sm);
  color: #fff; font-size: var(--text-sm); z-index: var(--z-toast);
  box-shadow: var(--shadow-md);
  animation: toastIn .25s ease;
}
.toast.success { background: var(--sage); }
.toast.error { background: #e88080; }

/* ═══════════════════════════════════════════
   ORDER MODAL
   ═══════════════════════════════════════════ */

@keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalSlideUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }

.modal-overlay {
  display: none; position: fixed; inset: 0;
  z-index: var(--z-modal);
  background: rgba(0,0,0,.5);
  align-items: flex-start; justify-content: center;
  padding: 0;
  animation: modalFadeIn .2s ease;
}
.modal-overlay.open { display: flex; }

.modal {
  background: var(--white);
  border-radius: var(--radius-xl);
  max-width: 480px; width: 100%;
  max-height: calc(100dvh - var(--space-6));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  padding: var(--space-5);
  padding-bottom: var(--space-6);
  animation: modalSlideUp .3s ease;
  position: relative; margin: var(--space-3) var(--space-2);
}
.modal .close {
  float: right; background: none; border: none;
  font-size: 1.5rem; cursor: pointer; color: var(--bm-text-muted);
  line-height: 1; width: var(--tap); height: var(--tap);
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; transition: background .2s;
}
.modal .close:hover { background: rgba(0,0,0,.05); }
.modal h3 {
  font-size: var(--text-lg); margin-bottom: var(--space-4);
  color: var(--bm-text-dark);
  display: flex; align-items: center; gap: var(--space-2);
}

@media (max-width: 480px) {
  .modal-overlay.open { align-items: stretch; }
  .modal {
    border-radius: 0; max-width: 100%;
    max-height: none; height: 100dvh;
    margin: 0; padding: var(--space-5) var(--space-4) var(--space-8);
  }
}

/* ── Cart Items ── */
.cart-items { margin-bottom: var(--space-1); }
.cart-item-row {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: var(--space-1); padding: var(--space-2) 0;
  border-bottom: 1px solid #f0ece6; font-size: var(--text-sm);
}
.cart-item-name { flex: 1 1 100%; font-weight: 600; }
.cart-item-meta { font-size: var(--text-xs); color: var(--bm-text-muted); }
.cart-item-qty {
  margin-left: auto; display: flex;
  align-items: center; gap: var(--space-1);
}
.cart-item-qty button {
  border: 1.5px solid #ddd; background: var(--white);
  border-radius: 50%; width: 28px; height: 28px;
  cursor: pointer; font-size: 1rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .2s, background .2s;
}
.cart-item-qty button:hover { border-color: var(--pink); background: #fdf8f5; }
.cart-item-qty button:active { transform: scale(.85); transition: transform .08s; }
.cart-item-qty span {
  min-width: 22px; text-align: center; font-weight: 600;
}

/* ── Addons ── */
.addon-section {
  background: #fdf8f5;
  border-radius: var(--radius-md);
  padding: var(--space-3); margin-top: var(--space-3);
}
.addon-section h4 {
  font-size: var(--text-xs); color: var(--bm-text-muted);
  text-transform: uppercase; letter-spacing: .04em;
  margin-bottom: var(--space-2); font-weight: 700;
}
.addon-opt {
  display: flex; align-items: center; gap: var(--space-2);
  padding: var(--space-2) 0;
  cursor: pointer; border-bottom: 1px solid #f0e6e0;
  user-select: none; min-height: var(--tap);
}
.addon-opt:last-child { border-bottom: none; }
.addon-opt input[type="checkbox"] {
  width: 20px; height: 20px; accent-color: var(--pink);
  cursor: pointer; flex-shrink: 0;
}
.addon-label { font-size: var(--text-sm); font-weight: 500; flex: 1; }
.addon-price {
  font-weight: 700; color: var(--pink);
  font-size: var(--text-sm); flex-shrink: 0;
}

/* ── Form Fields ── */
.fg { margin-bottom: var(--space-3); }
.fg label {
  display: block; font-size: var(--text-xs);
  font-weight: 700; color: var(--bm-text-muted);
  text-transform: uppercase; letter-spacing: .03em;
  margin-bottom: var(--space-1);
}
.fg input, .fg textarea, .fg select {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid rgba(0,0,0,.1);
  border-radius: var(--radius-sm);
  font-size: var(--text-md); outline: none;
  font-family: inherit; background: var(--white);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.fg input:focus, .fg textarea:focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(229,169,158,.15);
}
.fg textarea { min-height: 56px; resize: vertical; }
.fg-row { display: flex; gap: var(--space-3); }
.fg-row .fg { flex: 1; }

/* ── Summary ── */
.summary {
  background: var(--light);
  border-radius: var(--radius-md);
  padding: var(--space-3); margin-top: var(--space-2);
  font-size: var(--text-sm);
}
.summary .row {
  display: flex; justify-content: space-between;
  padding: var(--space-1) 0;
}
.summary .total {
  font-weight: 700; font-size: var(--text-lg);
  margin-top: var(--space-1); padding-top: var(--space-2);
  border-top: 1.5px solid rgba(0,0,0,.08);
  color: var(--pink);
}

/* ── Buttons ── */
.btn-wa {
  width: 100%; padding: 14px;
  background: #25D366; color: #fff;
  border: none; border-radius: var(--radius-md);
  font-size: var(--text-lg); font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center;
  justify-content: center; gap: var(--space-2);
  margin-top: var(--space-3);
  transition: background .2s, transform .15s;
  min-height: var(--tap);
}
.btn-wa:hover { background: #1ebe57; }
.btn-wa:active { transform: scale(.97); }
.btn-wa:disabled { background: #aaa; cursor: not-allowed; transform: none; }

.btn-primary {
  width: 100%; padding: var(--space-3);
  background: var(--pink); color: #fff;
  border: none; border-radius: var(--radius-md);
  font-weight: 700; cursor: pointer;
  font-size: var(--text-md); min-height: var(--tap);
  transition: background .2s, transform .15s;
}
.btn-primary:hover { background: #d49188; }
.btn-primary:active { transform: scale(.97); }

/* ═══════════════════════════════════════════
   FLOATING WHATSAPP FAB
   ═══════════════════════════════════════════ */

@keyframes fabBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.fab-wa {
  position: fixed; bottom: 90px; right: 20px;
  z-index: 50;
  background: #25D366; color: #fff;
  font-size: 1.4rem;
  width: 56px; height: 56px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 24px rgba(37,211,102,.4);
  text-decoration: none;
  animation: fabBounce 2.4s infinite;
  transition: transform .2s, box-shadow .2s;
}
.fab-wa:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 32px rgba(37,211,102,.5);
}

/* ═══════════════════════════════════════════
   BABYMAMA CENTRE — NEW HEADER & INTRO
   ═══════════════════════════════════════════ */

/* ── Admin Bar ── */
.bm-admin-bar {
  display: none; background: #4a3b40; color: #fff;
  padding: var(--space-3) var(--space-4);
  justify-content: center; align-items: center;
  gap: var(--space-4); font-size: var(--text-sm); font-weight: 500;
}
.bm-admin-bar.show { display: flex; }
.bm-admin-bar a {
  color: #fff; opacity: 0.9;
  text-decoration: underline; text-underline-offset: 3px;
}
.bm-admin-bar a:hover { opacity: 1; }
.bm-admin-bar span { opacity: .6; }

/* ── Baby Hero ── */
.baby-hero {
  position: relative; overflow: hidden;
  padding: 18px 16px 42px;
  background:
    radial-gradient(circle at 15% 12%, rgba(255,255,255,.95) 0 90px, transparent 92px),
    radial-gradient(circle at 90% 8%, rgba(227,242,255,.95) 0 130px, transparent 132px),
    linear-gradient(135deg, var(--bm-pink-soft) 0%, #fff7f4 48%, var(--bm-blue-soft) 100%);
  border-bottom: 1px solid rgba(237,168,185,.28);
}
.bm-hero-wrap { max-width: 980px; margin: 0 auto; position: relative; z-index: 2; }

/* Nav */
.bm-nav {
  display: flex; justify-content: space-between;
  align-items: center; gap: var(--space-4); margin-bottom: 36px;
}
.bm-brand-box {
  display: flex; align-items: center;
  gap: 11px; color: var(--bm-text-dark); text-decoration: none;
}
.bm-brand-icon {
  width: 44px; height: 44px; border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--bm-pink-main), var(--bm-blue-main));
  display: grid; place-items: center; color: #fff; font-size: 22px;
  box-shadow: 0 10px 22px rgba(237,168,185,.35);
  flex-shrink: 0;
}
.bm-brand-text strong {
  display: block; font-size: 17px;
  letter-spacing: .5px; color: var(--bm-text-dark);
}
.bm-brand-text span {
  display: block; font-size: var(--text-xs);
  color: var(--bm-text-muted); margin-top: 2px;
}
.bm-nav-pill {
  background: rgba(255,255,255,.68);
  border: 1px solid rgba(255,255,255,.9);
  padding: 10px 14px; border-radius: var(--radius-full);
  color: var(--bm-text-dark);
  font-size: 13px; font-weight: 700;
  box-shadow: 0 8px 22px rgba(141,197,238,.15);
  white-space: nowrap; text-decoration: none;
  transition: transform .2s, box-shadow .2s;
}
.bm-nav-pill:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(141,197,238,.22); }

/* Hero Content */
.bm-hero-content { text-align: center; max-width: 780px; margin: 0 auto; padding: 18px 0 6px; }
.bm-eyebrow {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: 9px 16px; border-radius: var(--radius-full);
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(255,255,255,.95);
  color: #8a5d68;
  font-size: 13px; font-weight: 800; letter-spacing: .4px;
  box-shadow: 0 12px 26px rgba(237,168,185,.16);
  margin-bottom: 18px;
}
.bm-hero-content h1 {
  margin: 0; font-size: clamp(34px, 7vw, 58px);
  line-height: 1.12; letter-spacing: -1.3px;
  color: var(--bm-text-dark);
}
.bm-hero-content h1 span {
  background: linear-gradient(135deg, var(--bm-pink-deep), #74add9);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.bm-hero-content p {
  margin: 18px auto 0; max-width: 650px;
  font-size: clamp(16px, 3.9vw, 19px);
  line-height: 1.7; color: var(--bm-text-muted);
}
.bm-highlight {
  display: inline-block; background: rgba(237,168,185,.25);
  color: #83535e; padding: 2px 8px; border-radius: 8px;
  font-weight: 800; white-space: nowrap;
}

/* Badges */
.bm-hero-badges {
  display: flex; flex-wrap: wrap;
  justify-content: center; gap: var(--space-3);
  margin: 26px auto 28px;
}
.bm-hero-badges span {
  background: rgba(255,255,255,.76);
  border: 1px solid rgba(255,255,255,.98);
  padding: 10px 13px; border-radius: var(--radius-full);
  font-size: 14px; font-weight: 700;
  color: #5d4c52;
  box-shadow: 0 8px 22px rgba(125,111,116,.09);
}

/* CTA Buttons */
.bm-hero-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-2); }
.bm-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--space-2); min-height: 50px;
  padding: 14px 20px; border-radius: 17px;
  font-size: 15px; font-weight: 800;
  transition: transform .2s ease, box-shadow .2s ease;
  text-decoration: none;
}
.bm-btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--bm-pink-main), #e49aac);
  box-shadow: 0 14px 28px rgba(237,168,185,.36);
}
.bm-btn-secondary {
  background: rgba(255,255,255,.8);
  border: 1px solid rgba(141,197,238,.35);
  color: #4b3e43;
}
.bm-btn:hover { transform: translateY(-2px); }
.bm-btn:active { transform: translateY(0); }

/* Mini Info Cards */
.bm-hero-cards {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3); max-width: 720px; margin: 34px auto 0;
}
.bm-mini-card {
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(255,255,255,.9);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-3);
  box-shadow: 0 14px 28px rgba(125,111,116,.09);
  text-align: center;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.bm-mini-card strong {
  display: block; font-size: 24px;
  color: var(--bm-text-dark); line-height: 1; margin-bottom: 7px;
}
.bm-mini-card span {
  display: block; font-size: 13px;
  color: var(--bm-text-muted); font-weight: 700;
}

/* Floating Clouds */
.bm-cloud {
  position: absolute; border-radius: var(--radius-full);
  background: rgba(255,255,255,.42);
  filter: blur(1px); z-index: 1;
  pointer-events: none;
}
.bm-cloud-1 { width: 170px; height: 170px; left: -70px; bottom: 25px; }
.bm-cloud-2 {
  width: 130px; height: 130px; right: -45px; top: 110px;
  background: rgba(141,197,238,.22);
}

/* Package Intro Section */
.bm-pkg-intro {
  max-width: 980px; margin: 0 auto;
  padding: 36px 18px 20px; text-align: center;
}
.bm-pkg-intro .bm-box-icon {
  width: 58px; height: 58px; border-radius: var(--radius-lg);
  display: grid; place-items: center; margin: 0 auto 14px;
  background: linear-gradient(135deg, var(--bm-pink-soft), var(--bm-blue-soft));
  font-size: 27px; box-shadow: var(--shadow-lg);
}
.bm-pkg-intro h2 {
  margin: 0; font-size: clamp(28px, 5vw, 40px);
  letter-spacing: -.8px; color: var(--bm-text-dark);
}
.bm-pkg-intro p {
  margin: 10px auto 0; max-width: 560px;
  font-size: 15.5px; line-height: 1.65; color: var(--bm-text-muted);
}

/* ═══════════════════════════════════════════
   BUTTON ANIMATION SYSTEM
   ═══════════════════════════════════════════ */

@keyframes btn-spin { to { transform: rotate(360deg); } }
@keyframes btn-success-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.07); }
  100% { transform: scale(1); }
}
@keyframes btn-shake {
  0%,100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}
@keyframes btn-added-pop {
  0% { transform: scale(1); background: var(--pink); }
  30% { transform: scale(1.12); background: var(--sage); }
  60% { transform: scale(.96); background: var(--sage); }
  100% { transform: scale(1); background: var(--sage); }
}

.btn--loading {
  position: relative; color: transparent !important;
  pointer-events: none; opacity: .85;
}
.btn--loading::before {
  content: ''; position: absolute; inset: 0; margin: auto;
  width: 20px; height: 20px;
  border: 2.5px solid rgba(255,255,255,.35); border-top-color: #fff;
  border-radius: 50%; animation: btn-spin .6s linear infinite;
}
.btn-wa.btn--loading::before,
.btn-primary.btn--loading::before {
  border-color: rgba(255,255,255,.35); border-top-color: #fff;
}
.admin-table button.btn--loading::before {
  border-color: rgba(0,0,0,.12); border-top-color: #666;
}

.btn--success {
  animation: btn-success-pop .45s ease;
  background: var(--sage) !important; border-color: var(--sage) !important;
  color: #fff !important;
}
.btn--error {
  animation: btn-shake .5s ease;
  background: #e88080 !important; border-color: #e88080 !important;
  color: #fff !important;
}
.btn--pulse { animation: btn-success-pop .25s ease; }
.btn--added { animation: btn-added-pop .7s ease forwards; }

/* ═══════════════════════════════════════════
   ADMIN DASHBOARD
   ═══════════════════════════════════════════ */

.admin-wrap { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 200px; background: var(--dark);
  color: #fff; padding: var(--space-4) 0; flex-shrink: 0;
}
.admin-sidebar a {
  display: block; color: #fff;
  padding: 9px 16px; font-size: var(--text-sm);
  text-decoration: none; transition: background .2s;
}
.admin-sidebar a:hover,
.admin-sidebar a.active { background: rgba(255,255,255,.1); }
.admin-main { flex: 1; padding: var(--space-5); background: #f8f6f3; }
.admin-main h1 { font-size: var(--text-xl); margin-bottom: var(--space-4); }

.admin-table {
  width: 100%; border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden; box-shadow: var(--shadow-sm);
}
.admin-table th {
  background: #f5f0eb; text-align: left;
  padding: 8px 12px; font-size: var(--text-xs);
  text-transform: uppercase; color: #666; font-weight: 700;
}
.admin-table td {
  padding: 8px 12px; border-top: 1px solid #f0ece6;
  font-size: var(--text-sm);
}
.admin-table .thumb {
  width: 44px; height: 44px; object-fit: cover;
  border-radius: var(--radius-sm);
}
.admin-table button {
  background: none; border: 1px solid #ddd;
  padding: 6px 10px; border-radius: var(--radius-sm);
  cursor: pointer; font-size: var(--text-xs);
  margin: 0 2px; transition: background .2s;
}
.admin-table button:hover { background: #f5f0eb; }

/* Upload Zone */
.upload-zone {
  border: 2px dashed rgba(0,0,0,.12);
  border-radius: var(--radius-md);
  padding: var(--space-6); text-align: center;
  cursor: pointer; transition: border-color .2s, background .2s;
  margin: var(--space-3) 0;
}
.upload-zone:hover,
.upload-zone.drag { border-color: var(--pink); background: #fdf8f5; }
.upload-preview {
  display: flex; gap: var(--space-1); flex-wrap: wrap;
  margin-top: var(--space-3);
}
.upload-preview img {
  width: 70px; height: 70px; object-fit: cover;
  border-radius: var(--radius-sm);
}

/* Login */
.login-page {
  display: flex; align-items: center;
  justify-content: center; min-height: 100vh;
  background: var(--light);
}
.login-card {
  background: var(--white); padding: var(--space-8);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  width: 400px; max-width: 92vw;
}
.login-card h1 {
  text-align: center; font-size: var(--text-xl);
  margin-bottom: var(--space-5);
}
.login-card .fg { margin-bottom: var(--space-4); }
.login-card .fg input {
  padding: 12px 14px; font-size: var(--text-md);
  width: 100%; box-sizing: border-box;
}
.login-card .btn-primary {
  width: 100%; padding: 12px; font-size: var(--text-md);
  margin-top: var(--space-2);
}

/* ── Disabled state ── */
button:disabled {
  opacity: .6; cursor: not-allowed;
  transform: none !important;
}

/* ═══════════════════════════════════════════
   RESPONSIVE — MOBILE
   ═══════════════════════════════════════════ */

@media (max-width: 768px) {
  html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }
  .admin-wrap {
    flex-direction: column;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }
  .admin-sidebar {
    width: 100vw;
    max-width: 100vw;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px;
    box-sizing: border-box;
    padding: var(--space-2);
    overflow-x: hidden;
    text-align: center;
  }
  .admin-sidebar > div {
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    padding: 0 0 8px !important;
  }
  .admin-sidebar a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 10px; font-size: var(--text-xs);
  }
  .admin-sidebar a:nth-last-child(-n+2) {
    min-width: 88px;
    text-align: center;
  }
  .admin-main {
    width: 100%;
    max-width: 100vw;
    min-width: 0;
    box-sizing: border-box;
    overflow-x: hidden;
    padding: var(--space-5) var(--space-3);
  }
  .admin-table {
    width: 100%;
    max-width: 100%;
    table-layout: fixed;
  }
  .admin-table th,
  .admin-table td {
    padding-left: 8px;
    padding-right: 8px;
    overflow-wrap: anywhere;
  }
  .admin-table th:nth-child(1), .admin-table td:nth-child(1) { width: 7%; text-align: center; }
  .admin-table th:nth-child(2), .admin-table td:nth-child(2) { width: 10%; text-align: center; }
  .admin-table th:nth-child(3), .admin-table td:nth-child(3) { width: 28%; }
  .admin-table th:nth-child(4), .admin-table td:nth-child(4) { width: 18%; }
  .admin-table th:nth-child(5), .admin-table td:nth-child(5) { width: 9%; text-align: center; }
  .admin-table th:nth-child(6), .admin-table td:nth-child(6) { width: 14%; }
  .admin-table th:nth-child(7), .admin-table td:nth-child(7) { width: 14%; text-align: center; }
  .admin-table .thumb {
    width: 38px;
    height: 38px;
  }
  .admin-table button {
    margin: 2px 0;
    padding: 6px 8px;
    min-width: 40px;
  }
  .section { padding: var(--space-6) var(--space-3); }
  .gallery-grid { gap: var(--space-3); padding: var(--space-3) var(--space-4) var(--space-4) !important; }
  .gallery-header { padding: var(--space-4) var(--space-4) var(--space-1); }
}

@media (max-width: 640px) {
  .baby-hero { padding: 14px 15px 38px; }
  .bm-nav { margin-bottom: 26px; }
  .bm-brand-icon { width: 40px; height: 40px; border-radius: 14px; }
  .bm-brand-text strong { font-size: 15px; }
  .bm-brand-text span { font-size: 11px; }
  .bm-nav-pill { display: none; }
  .bm-hero-content { padding-top: 10px; }
  .bm-hero-badges { gap: var(--space-2); }
  .bm-hero-badges span { font-size: 13px; padding: 9px 11px; }
  .bm-hero-actions { display: grid; grid-template-columns: 1fr; }
  .bm-btn { width: 100%; }
  .bm-hero-cards {
    grid-template-columns: 1fr;
    gap: var(--space-3); margin-top: 28px;
  }
}

/* ═══════ FOOTER ═══════ */
.bm-footer {
  background: #1a1a2e; color: #ccc;
  padding: 40px 20px 0; margin-top: 40px;
}
.bm-footer-inner {
  max-width: 900px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 30px;
}
.bm-footer-brand { font-weight: 900; font-size: 1.05rem; color: #fff; margin-bottom: 10px; }
.bm-footer-desc { font-size: .8rem; line-height: 1.55; color: #aaa; margin: 0; }
.bm-footer-heading { font-weight: 800; font-size: .78rem; text-transform: uppercase; color: #fff; margin-bottom: 10px; letter-spacing: .5px; }
.bm-footer-link { display: block; color: #bbb; font-size: .82rem; text-decoration: none; padding: 4px 0; transition: color .2s; }
.bm-footer-link:hover { color: #e88080; }
.bm-footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08); margin-top: 30px;
  padding: 16px 0; text-align: center; font-size: .72rem; color: #777;
}
@media (max-width: 640px) {
  .bm-footer-inner { grid-template-columns: 1fr; gap: 20px; }
  .bm-footer { padding: 30px 16px 0; }
  .bm-footer-bottom { margin-top: 20px; }
}
/* ═══════ SUB-FRONTPAGE (category choice) ═══════ */
.sub-frontpage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 0 var(--space-4) var(--space-4);
  max-width: 700px;
  margin: 0 auto;
}
.sub-fp-card {
  display: flex; flex-direction: column;
  background: #fff; border-radius: 16px;
  overflow: hidden; text-decoration: none;
  box-shadow: 0 4px 20px rgba(0,0,0,.08);
  transition: transform .2s ease, box-shadow .2s ease;
}
.sub-fp-card:hover { transform: translateY(-3px); box-shadow: 0 8px 30px rgba(0,0,0,.12); }
.sub-fp-card:active { transform: scale(.97); }
.sub-fp-img-wrap {
  width: 100%; aspect-ratio: 1/1; overflow: hidden; background: #f5f0eb;
}
.sub-fp-img-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  display: block; transition: transform .3s ease;
}
.sub-fp-card:hover .sub-fp-img-wrap img { transform: scale(1.05); }
.sub-fp-label {
  padding: 14px 14px 4px; font-weight: 800; font-size: 1.05rem;
  color: var(--dark); text-align: center;
}
.sub-fp-count {
  padding: 0 14px 14px; font-size: .8rem; color: #888; text-align: center;
}
.sub-fp-price {
  padding: 0 14px 0; font-size: .95rem; font-weight: 700;
  color: var(--pink); text-align: center;
}
.sub-fp-range {
  padding: 1px 14px 0; font-size: .78rem; font-weight: 600;
  color: var(--pink); text-align: center; opacity: .7;
}

/* ═══════ FILTERED GALLERY ═══════ */
.gallery-cat-name {
  font-weight: 800; font-size: 1.2rem; color: var(--dark);
  padding: 12px var(--space-4) 8px; margin: 0;
  border-bottom: 2px solid var(--pink); margin-bottom: 12px;
}
.gallery-sub-back { margin: 8px 0 10px; font-size: .85rem; text-align: center; }
.gallery-sub-back a {
  display: inline-block; color: var(--pink); text-decoration: none;
  border: 1.5px solid var(--pink); border-radius: 30px;
  padding: 8px 22px; font-weight: 600; font-size: .9rem;
  transition: background .2s, color .2s;
}
.gallery-sub-back a:hover { background: var(--pink); color: #fff; }
.gallery-single-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0 var(--space-4) var(--space-4);
  max-width: 500px;
  margin: 0 auto;
  max-height: none;
  overflow-y: visible;
}
.gallery-single-grid .gallery-img-card img {
  height: auto !important;
  aspect-ratio: auto !important;
  object-fit: contain;
  background: #f5f0eb;
}
.gallery-single-grid .gallery-img-card {
  flex-shrink: 0;
}

/* ═══════ OLD DUAL SUB-GALLERY (deprecated) ═══════ */
/* Kept only for reference — no longer used */

@media (max-width: 640px) {
  .sub-frontpage { grid-template-columns: 1fr; max-width: 400px; }
  .gallery-single-grid { max-width: 100%; }
}
