:root {
  --pink: #ff6eb4;
  --purple: #9b5de5;
  --dark-purple: #2d1b69;
  --light: #fff0f9;
  --dark: #1a0a2e;
  --text: #2d1b69;
  --muted: #9b8ab5;
  --gold: #ffd700;
  --white: #ffffff;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--white);
  color: var(--text);
}

/* NAV */
nav {
  background: var(--dark);
  padding: 16px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}
.logo {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--white);
  letter-spacing: 4px;
  text-decoration: none;
}
.logo span { color: var(--pink); }
.nav-links { display: flex; gap: 24px; align-items: center; }
.nav-links a { color: #ccc; text-decoration: none; font-size: 0.9rem; transition: color 0.2s; }
.nav-links a:hover { color: var(--pink); }
.cart-btn {
  background: var(--pink);
  color: var(--white);
  border: none;
  padding: 8px 18px;
  border-radius: 20px;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 6px;
}
.cart-count {
  background: var(--gold);
  color: var(--dark);
  border-radius: 50%;
  width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem;
  font-weight: 900;
}

/* HERO */
.hero {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-purple) 50%, #4a1577 100%);
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 24px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(255,110,180,0.15) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 30%, rgba(155,93,229,0.15) 0%, transparent 60%);
}
.hero-content { position: relative; z-index: 1; max-width: 700px; }
.hero-badge {
  display: inline-block;
  background: rgba(255,110,180,0.2);
  border: 1px solid var(--pink);
  color: var(--pink);
  padding: 6px 18px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 2px;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 900;
  color: var(--white);
  letter-spacing: 8px;
  margin-bottom: 8px;
  line-height: 1;
}
.hero h1 span { color: var(--pink); }
.hero-tagline {
  font-size: 1.1rem;
  color: #ccc;
  margin-bottom: 12px;
  font-style: italic;
}
.hero-sub {
  font-size: 0.95rem;
  color: #999;
  max-width: 480px;
  margin: 0 auto 36px;
  line-height: 1.6;
}
.hero-mascot {
  font-size: 8rem;
  margin-bottom: 16px;
  display: block;
  animation: float 3s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
}
.btn-primary {
  background: linear-gradient(135deg, var(--pink), var(--purple));
  color: var(--white);
  border: none;
  padding: 14px 36px;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(255,110,180,0.4);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(255,110,180,0.5); }
.btn-secondary {
  background: transparent;
  border: 2px solid var(--pink);
  color: var(--pink);
  padding: 12px 28px;
  border-radius: 30px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: all 0.2s;
}
.btn-secondary:hover { background: rgba(255,110,180,0.1); }

/* SECTION */
.section { padding: 80px 24px; max-width: 1200px; margin: 0 auto; }
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 900;
  color: var(--dark);
  margin-bottom: 8px;
}
.section-title span { color: var(--pink); }
.section-sub { color: var(--muted); font-size: 0.95rem; margin-bottom: 40px; }

/* PRODUCT GRID */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}
.product-card {
  background: var(--light);
  border-radius: 20px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}
.product-card:hover { transform: translateY(-6px); box-shadow: 0 12px 40px rgba(155,93,229,0.15); }
.product-img {
  width: 100%;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 6rem;
  position: relative;
  overflow: hidden;
}
.product-info { padding: 16px; }
.product-name { font-weight: 700; font-size: 1rem; color: var(--dark); margin-bottom: 4px; }
.product-desc { color: var(--muted); font-size: 0.82rem; margin-bottom: 12px; line-height: 1.4; }
.product-price { font-size: 1.2rem; font-weight: 900; color: var(--purple); }
.product-add {
  background: var(--pink);
  color: var(--white);
  border: none;
  padding: 8px 18px;
  border-radius: 20px;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.85rem;
  float: right;
  transition: opacity 0.2s;
}
.product-add:hover { opacity: 0.85; }

/* FEATURES */
.features {
  background: var(--dark);
  padding: 60px 24px;
  text-align: center;
}
.features-inner { max-width: 1000px; margin: 0 auto; }
.features h2 { color: var(--white); font-size: 1.8rem; margin-bottom: 40px; }
.features h2 span { color: var(--pink); }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; }
.feature-item { padding: 24px; }
.feature-icon { font-size: 2.5rem; margin-bottom: 12px; }
.feature-item h4 { color: var(--white); margin-bottom: 8px; }
.feature-item p { color: #999; font-size: 0.85rem; line-height: 1.5; }

/* CART MODAL */
.cart-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 500;
  align-items: flex-end;
  justify-content: flex-end;
}
.cart-overlay.active { display: flex; }
.cart-panel {
  background: var(--white);
  width: 100%;
  max-width: 420px;
  height: 100vh;
  padding: 32px 24px;
  overflow-y: auto;
  box-shadow: -4px 0 40px rgba(0,0,0,0.2);
}
.cart-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.cart-header h3 { font-size: 1.3rem; color: var(--dark); }
.cart-close { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--muted); }
.cart-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid #f0e0f0; align-items: center; }
.cart-item-emoji { font-size: 2.5rem; }
.cart-item-info { flex: 1; }
.cart-item-name { font-weight: 700; font-size: 0.9rem; }
.cart-item-price { color: var(--purple); font-weight: 700; }
.cart-item-remove { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 1.1rem; }
.cart-total { font-size: 1.2rem; font-weight: 900; color: var(--dark); margin: 20px 0; }
.cart-empty { text-align: center; color: var(--muted); padding: 40px 0; font-size: 0.95rem; }

/* PRODUCT MODAL */
.product-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 500;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.product-overlay.active { display: flex; }
.product-modal {
  background: var(--white);
  border-radius: 24px;
  padding: 32px;
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}
.product-modal-img { font-size: 8rem; text-align: center; margin-bottom: 16px; }
.product-modal h2 { font-size: 1.5rem; color: var(--dark); margin-bottom: 8px; }
.product-modal-desc { color: var(--muted); line-height: 1.6; margin-bottom: 16px; }
.size-select { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.size-btn {
  padding: 8px 16px;
  border: 2px solid #e0d0f0;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  background: none;
  color: var(--text);
  transition: all 0.2s;
}
.size-btn.selected { border-color: var(--pink); background: rgba(255,110,180,0.1); color: var(--pink); }
.modal-close { float: right; background: none; border: none; font-size: 1.4rem; cursor: pointer; color: var(--muted); }

/* FOOTER */
footer {
  background: var(--dark);
  padding: 48px 24px 24px;
  color: #999;
  font-size: 0.85rem;
}
.footer-inner { max-width: 1000px; margin: 0 auto; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 32px; margin-bottom: 32px; }
.footer-brand .logo { font-size: 1.4rem; }
.footer-brand p { color: #888; font-size: 0.82rem; margin-top: 8px; line-height: 1.5; }
.footer-col h4 { color: var(--white); margin-bottom: 12px; font-size: 0.9rem; }
.footer-col a { display: block; color: #888; text-decoration: none; margin-bottom: 6px; font-size: 0.82rem; }
.footer-col a:hover { color: var(--pink); }
.footer-bottom { border-top: 1px solid #2a1a4a; padding-top: 20px; text-align: center; }

/* TOAST */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px); background: var(--dark); color: var(--white); padding: 12px 24px; border-radius: 30px; font-weight: 600; font-size: 0.9rem; opacity: 0; transition: all 0.3s; z-index: 1000; border: 1px solid var(--pink); }
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

@media (max-width: 640px) {
  nav { padding: 12px 16px; }
  .nav-links a { display: none; }
  .hero h1 { letter-spacing: 4px; }
  .cart-panel { max-width: 100%; }
}

/* Inline size chips on product cards */
.size-row { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0 4px; }
.size-chip { background: rgba(255,255,255,0.08); color: #ccc; border: 1px solid rgba(255,255,255,0.15); border-radius: 6px; padding: 3px 8px; font-size: 0.72rem; cursor: pointer; transition: all 0.2s; }
.size-chip:hover { border-color: #ff6eb4; color: #fff; }
.size-chip.selected { background: #ff6eb4; color: #fff; border-color: #ff6eb4; font-weight: 700; }

/* Cart panel sticky footer fix */
.cart-panel { display: flex; flex-direction: column; max-height: 90vh; }
.cart-panel #cartItems { flex: 1; overflow-y: auto; min-height: 0; }
.cart-footer { flex-shrink: 0; padding-top: 8px; border-top: 1px solid rgba(255,255,255,0.08); margin-top: 8px; }

/* Bigger close button on mobile */
.cart-close { min-width: 44px; min-height: 44px; font-size: 1.3rem; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(255,255,255,0.1); border: none; color: #fff; cursor: pointer; }
.cart-close:hover { background: rgba(255,110,180,0.3); }
@media (max-width: 600px) { .cart-close { min-width: 48px; min-height: 48px; font-size: 1.5rem; } }

/* 2-column product grid on mobile */
@media (max-width: 600px) {
  .product-grid-store {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    padding: 0 12px !important;
  }
  .pcard-img { height: 160px !important; }
  .pcard-name { font-size: 0.82rem !important; }
  .pcard-desc { display: none !important; }
  .pcard-price { font-size: 1rem !important; }
  .pcard-btn { font-size: 0.78rem !important; padding: 8px 10px !important; }
  .pcard-body { padding: 10px 12px 12px !important; }
}

/* Out of stock size buttons */
.size-btn.sold-out { opacity: 0.35; cursor: not-allowed; text-decoration: line-through; background: rgba(255,255,255,0.03) !important; border-color: rgba(255,255,255,0.1) !important; }
.size-btn.sold-out small { font-size: 0.6rem; display: block; text-decoration: none; color: #ff6eb4; }
