/* ============================================
   Bachpan Ka Pyaar – Mobile-first styles
   Indian nostalgia store
   ============================================ */

:root {
  --saffron: #f59e0b;
  --saffron-deep: #d97706;
  --mango: #fbbf24;
  --cream: #fffbeb;
  --warm-white: #fef3c7;
  --rose: #f472b6;
  --green-teal: #0d9488;
  --dark: #1c1917;
  --dark-soft: #292524;
  --surface: rgba(255, 255, 255, 0.06);
  --surface-hover: rgba(255, 255, 255, 0.1);
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  --touch-min: 44px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Baloo 2', system-ui, -apple-system, sans-serif;
  font-style: normal;
}

body {
  background: linear-gradient(160deg, #1c1917 0%, #292524 50%, #1c1917 100%);
  color: var(--cream);
  overflow-x: hidden;
  min-height: 100vh;
  font-style: normal;
}

/* ========== HEADER (mobile-first) ========== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(28, 25, 23, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(251, 191, 36, 0.15);
}

.logo {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--mango);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: var(--touch-min);
  min-height: var(--touch-min);
  padding: 10px;
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-sm);
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2.5px;
  background: var(--mango);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-toggle-open span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}
.nav-toggle-open span:nth-child(2) {
  opacity: 0;
}
.nav-toggle-open span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

.nav {
  position: fixed;
  top: 0;
  right: 0;
  width:  min(280px, 85vw);
  height: 100vh;
  background: var(--dark-soft);
  padding: 80px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  box-shadow: -8px 0 24px rgba(0,0,0,0.3);
}
.nav-open {
  transform: translateX(0);
}
.nav a {
  display: block;
  padding: 14px 16px;
  text-decoration: none;
  color: var(--cream);
  font-weight: 600;
  font-size: 1rem;
  border-radius: var(--radius-sm);
  min-height: var(--touch-min);
  line-height: 1.3;
}
.nav a:hover,
.nav a:focus {
  background: var(--surface-hover);
  color: var(--mango);
}
.cart-link {
  position: relative;
}

.cart-badge {
  background: var(--saffron);
  color: var(--dark);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  margin-left: 8px;
}

/* ========== HERO (mobile-first) ========== */
.main {
  min-height: calc(100vh - 52px);
}
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px 48px;
  overflow: hidden;
}

.hero-bg .hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  animation: blobMove 18s infinite alternate ease-in-out;
}
.hero-blob-1 {
  width: 200px;
  height: 200px;
  top: -60px;
  left: -60px;
  background: var(--saffron);
  animation-duration: 15s;
}
.hero-blob-2 {
  width: 180px;
  height: 180px;
  bottom: 10%;
  right: -40px;
  background: var(--mango);
  animation-duration: 20s;
  animation-delay: -5s;
}
.hero-blob-3 {
  width: 160px;
  height: 160px;
  top: 50%;
  left: 50%;
  background: var(--rose);
  animation-duration: 22s;
  animation-delay: -8s;
}
@keyframes blobMove {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, -30px) scale(1.1); }
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  text-align: center;
}

.hero-image-wrap {
  margin-bottom: 24px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow), 0 0 0 3px rgba(251, 191, 36, 0.2);
}
.hero-child-img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  vertical-align: middle;
}

.hero-content {
  padding: 0 8px;
}
.hero-title {
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.2;
  background: linear-gradient(135deg, var(--mango), var(--saffron), var(--rose));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeUp 0.8s ease forwards;
}
.hero-subtitle {
  margin-top: 12px;
  font-size: 1.1rem;
  opacity: 0.95;
  animation: fadeUp 1s ease 0.1s forwards;
  opacity: 0;
  animation-fill-mode: forwards;
}
.hero-tagline {
  margin-top: 8px;
  font-size: 0.95rem;
  opacity: 0.85;
  color: var(--warm-white);
  animation: fadeUp 1s ease 0.2s forwards;
  opacity: 0;
  animation-fill-mode: forwards;
}
.hero-chips {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.hero-chip {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(13, 148, 136, 0.2);
  border: 1px solid rgba(45, 212, 191, 0.4);
  font-size: 0.75rem;
  color: var(--warm-white);
  white-space: nowrap;
}
.cta-btn {
  display: inline-block;
  margin-top: 24px;
  padding: 16px 32px;
  min-height: var(--touch-min);
  line-height: 1.2;
  background: linear-gradient(135deg, var(--saffron), var(--saffron-deep));
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  color: var(--dark);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.4);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  animation: fadeUp 1s ease 0.3s forwards;
  opacity: 0;
  animation-fill-mode: forwards;
}
.cta-btn:hover,
.cta-btn:focus {
  transform: scale(1.05);
  box-shadow: 0 6px 24px rgba(245, 158, 11, 0.5);
}
.cta-btn:active {
  transform: scale(0.98);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========== FOOTER ========== */
.footer {
  text-align: center;
  padding: 24px 16px;
  background: var(--surface);
  font-size: 0.875rem;
  color: rgba(254, 243, 199, 0.8);
  border-top: 1px solid rgba(251, 191, 36, 0.1);
}

/* ========== LAYOUT (shop, cart pages) ========== */
.container {
  padding: 24px 16px;
  min-height: 80vh;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.product-card {
  background: var(--surface);
  padding: 12px;
  border-radius: var(--radius-sm);
  text-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.06);
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.product-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 10px;
  background: var(--dark-soft);
}

.product-info {
  margin-top: 10px;
}
.product-info h3 {
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: var(--cream);
}
.product-info p {
  font-size: 0.85rem;
  opacity: 0.85;
}

.product-card button {
  margin-top: 8px;
  padding: 10px 16px;
  min-height: 40px;
  border: none;
  border-radius: 999px;
  background: var(--saffron);
  color: var(--dark);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s ease;
}
.product-card button:hover {
  background: var(--saffron-deep);
}

/* Cart page */
#cart-items p {
  margin: 8px 0;
}
.cart-item {
  background: var(--surface);
  padding: 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  border: 1px solid rgba(255,255,255,0.06);
}
.qty-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0;
}
.qty-controls button {
  min-width: 40px;
  min-height: 40px;
  padding: 8px 12px;
  border: none;
  background: var(--saffron);
  color: var(--dark);
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
}
.remove-btn {
  margin-top: 8px;
  background: #b91c1c;
  color: white;
  border: none;
  padding: 8px 14px;
  min-height: 40px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
}

/* ========== LIGHTBOX ========== */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 20px;
}
.lightbox img {
  max-width: 95%;
  max-height: 95%;
  object-fit: contain;
  border-radius: var(--radius);
  animation: zoomIn 0.3s ease;
}
@keyframes zoomIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ========== TOAST ========== */
.toast {
  position: fixed;
  bottom: 24px;
  left: 16px;
  right: 16px;
  max-width: 320px;
  margin: 0 auto;
  transform: translateY(100px);
  background: var(--dark-soft);
  color: var(--cream);
  padding: 14px 20px;
  border-radius: 999px;
  text-align: center;
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s ease;
  z-index: 9999;
  box-shadow: var(--shadow);
  border: 1px solid rgba(251, 191, 36, 0.2);
}
.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ========== TABLET AND UP ========== */
@media (min-width: 600px) {
  .header {
    padding: 14px 24px;
  }
  .logo {
    font-size: 1.35rem;
  }
  .nav-toggle {
    display: none;
  }
  .nav {
    position: static;
    width: auto;
    height: auto;
    flex-direction: row;
    padding: 0;
    transform: none;
    background: transparent;
    box-shadow: none;
    gap: 4px;
  }
  .nav a {
    padding: 10px 18px;
    min-height: auto;
  }
  .cart-link {
    margin-top: 0;
  }
  .cart-badge {
    top: -4px;
    right: -10px;
    transform: none;
  }

  .hero {
    padding: 32px 24px 56px;
  }
  .hero-inner {
    max-width: 720px;
  }
  .hero-title {
    font-size: 2.5rem;
  }
  .hero-subtitle {
    font-size: 1.25rem;
  }
  .hero-tagline {
    font-size: 1.05rem;
  }
  .hero-image-wrap {
    margin-bottom: 28px;
  }
  .cta-btn {
    padding: 18px 36px;
    font-size: 1.05rem;
  }

  .container {
    padding: 32px 24px;
  }
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
  }
  .toast {
    left: 50%;
    right: auto;
    transform: translateX(-50%) translateY(100px);
  }
  .toast.show {
    transform: translateX(-50%) translateY(0);
  }
}

/* ========== DESKTOP ========== */
@media (min-width: 900px) {
  .hero-inner {
    max-width: 960px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    text-align: left;
    align-items: center;
  }
  .hero-image-wrap {
    order: 0;
    margin-bottom: 0;
  }
  .hero-content {
    order: 1;
    padding: 0;
  }
  .hero-title {
    font-size: 2.75rem;
  }
  .hero-subtitle {
    margin-top: 16px;
  }
  .hero-tagline {
    margin-top: 10px;
  }
  .cta-btn {
    margin-top: 28px;
  }
}
