/* ═══════════════════════════════════════════════════════════
   ONE IN A MILLION — STOREFRONT STYLES
   Modern Minimal · Party Decoration
   ═══════════════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@500;700&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --pink:    #E91E8C;
  --pink-lt: #FFF0F8;
  --gold:    #F5A623;
  --dark:    #1A1A2E;
  --gray:    #6B7280;
  --light:   #F9FAFB;
  --white:   #FFFFFF;
  --border:  #E5E7EB;
  --radius:  12px;
  --shadow:  0 4px 24px rgba(0,0,0,.08);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; color: var(--dark); background: var(--white); line-height: 1.6; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }

/* ─── HEADER ─────────────────────────────────────────────── */
.header { position: sticky; top: 0; z-index: 100; background: var(--white); border-bottom: 1px solid var(--border); }
.header-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 24px; height: 64px; }
.logo { font-family: 'Playfair Display', serif; font-size: 1.4rem; font-weight: 700; color: var(--pink); white-space: nowrap; }
.logo span { color: var(--dark); }
.nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { padding: 6px 14px; border-radius: 20px; font-size: .875rem; font-weight: 500; color: var(--gray); white-space: nowrap; transition: all .2s; }
.nav a:hover, .nav a.active { background: var(--pink-lt); color: var(--pink); }
.header-actions { display: flex; align-items: center; gap: 12px; }
.search-bar { display: flex; align-items: center; background: var(--light); border-radius: 24px; padding: 8px 16px; gap: 8px; }
.search-bar input { border: none; background: none; outline: none; font-size: .875rem; width: 180px; }
.btn-icon { background: none; border: none; cursor: pointer; padding: 8px; border-radius: 8px; color: var(--gray); transition: all .2s; position: relative; }
.btn-icon:hover { background: var(--light); color: var(--pink); }
.cart-count { position: absolute; top: 2px; right: 2px; background: var(--pink); color: white; font-size: .65rem; font-weight: 700; border-radius: 50%; width: 16px; height: 16px; display: flex; align-items: center; justify-content: center; }

/* ─── HERO ───────────────────────────────────────────────── */
.hero { background: linear-gradient(135deg, #1A1A2E 0%, #16213E 50%, #0F3460 100%); color: white; padding: 80px 24px; text-align: center; position: relative; overflow: hidden; }
.hero::before { content: '🎉'; font-size: 200px; position: absolute; top: -40px; right: -20px; opacity: .06; }
.hero-tag { display: inline-block; background: var(--pink); color: white; font-size: .75rem; font-weight: 600; padding: 4px 12px; border-radius: 20px; margin-bottom: 16px; letter-spacing: .05em; text-transform: uppercase; }
.hero h1 { font-family: 'Playfair Display', serif; font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700; margin-bottom: 12px; }
.hero p { font-size: 1.1rem; color: rgba(255,255,255,.7); margin-bottom: 32px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 32px; border-radius: 32px; font-size: .9rem; font-weight: 600; cursor: pointer; border: none; transition: all .2s; }
.btn-primary { background: var(--pink); color: white; }
.btn-primary:hover { background: #c9167a; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(233,30,140,.3); }
.btn-outline { background: transparent; color: white; border: 2px solid rgba(255,255,255,.4); }
.btn-outline:hover { border-color: white; background: rgba(255,255,255,.1); }

/* ─── SECTIONS ───────────────────────────────────────────── */
.section { max-width: 1200px; margin: 0 auto; padding: 60px 24px; }
.section-title { font-family: 'Playfair Display', serif; font-size: 1.8rem; font-weight: 700; margin-bottom: 8px; }
.section-sub { color: var(--gray); margin-bottom: 36px; }

/* ─── CATEGORIES ─────────────────────────────────────────── */
.cats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px; }
.cat-card { background: var(--light); border-radius: var(--radius); padding: 24px 16px; text-align: center; cursor: pointer; transition: all .2s; border: 2px solid transparent; }
.cat-card:hover { border-color: var(--pink); background: var(--pink-lt); transform: translateY(-4px); }
.cat-card img { width: 64px; height: 64px; object-fit: contain; margin: 0 auto 12px; }
.cat-card .cat-emoji { font-size: 2.5rem; margin-bottom: 12px; }
.cat-card span { font-size: .875rem; font-weight: 600; color: var(--dark); }
.cat-card small { display: block; font-size: .75rem; color: var(--gray); margin-top: 4px; }

/* ─── PRODUCTS GRID ──────────────────────────────────────── */
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.product-card { background: white; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); transition: all .25s; cursor: pointer; }
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--pink); }
.product-card-img { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--light); }
.product-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.product-card:hover .product-card-img img { transform: scale(1.06); }
.badge { position: absolute; top: 10px; left: 10px; background: var(--pink); color: white; font-size: .7rem; font-weight: 700; padding: 3px 8px; border-radius: 4px; }
.badge-gold { background: var(--gold); color: var(--dark); }
.btn-wishlist { position: absolute; top: 10px; right: 10px; background: white; border: none; border-radius: 50%; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 1rem; box-shadow: 0 2px 8px rgba(0,0,0,.1); opacity: 0; transition: opacity .2s; }
.product-card:hover .btn-wishlist { opacity: 1; }
.product-card-body { padding: 14px; }
.product-card-cat { font-size: .7rem; color: var(--gray); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.product-card-title { font-size: .9rem; font-weight: 600; margin-bottom: 10px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-card-price { display: flex; align-items: center; gap: 8px; }
.price-final { font-size: 1.05rem; font-weight: 700; color: var(--pink); }
.price-orig { font-size: .8rem; color: var(--gray); text-decoration: line-through; }
.price-off { font-size: .75rem; color: #16a34a; font-weight: 600; }
.btn-add-cart { width: 100%; margin-top: 12px; padding: 10px; border-radius: 8px; border: 2px solid var(--pink); background: white; color: var(--pink); font-weight: 600; font-size: .85rem; cursor: pointer; transition: all .2s; }
.btn-add-cart:hover { background: var(--pink); color: white; }

/* ─── TRUST BADGES ───────────────────────────────────────── */
.trust-bar { background: var(--light); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.trust-inner { max-width: 1200px; margin: 0 auto; padding: 32px 24px; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 24px; }
.trust-item { display: flex; align-items: center; gap: 12px; }
.trust-icon { font-size: 1.8rem; }
.trust-text strong { display: block; font-size: .875rem; font-weight: 600; }
.trust-text span { font-size: .75rem; color: var(--gray); }

/* ─── PRODUCT PAGE ───────────────────────────────────────── */
.product-page { max-width: 1200px; margin: 0 auto; padding: 40px 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.product-gallery { display: flex; flex-direction: column; gap: 12px; }
.gallery-main { aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: var(--light); }
.gallery-main img, .gallery-main video { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 8px; overflow-x: auto; }
.gallery-thumb { flex-shrink: 0; width: 72px; height: 72px; border-radius: 8px; overflow: hidden; cursor: pointer; border: 2px solid transparent; background: var(--light); }
.gallery-thumb.active, .gallery-thumb:hover { border-color: var(--pink); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-info h1 { font-family: 'Playfair Display', serif; font-size: 1.8rem; margin-bottom: 8px; }
.product-info .product-price { font-size: 2rem; font-weight: 700; color: var(--pink); margin: 16px 0; }
.product-features { list-style: none; margin: 16px 0; }
.product-features li { padding: 6px 0; font-size: .875rem; color: var(--gray); display: flex; gap: 8px; }
.product-features li::before { content: '✓'; color: var(--pink); font-weight: 700; }
.qty-selector { display: flex; align-items: center; gap: 16px; margin: 20px 0; }
.qty-btns { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 8px; }
.qty-btns button { border: none; background: none; padding: 10px 16px; cursor: pointer; font-size: 1.1rem; }
.qty-btns span { padding: 0 8px; font-weight: 600; min-width: 32px; text-align: center; }

/* ─── CART SIDEBAR ───────────────────────────────────────── */
.cart-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 200; opacity: 0; pointer-events: none; transition: opacity .3s; }
.cart-overlay.open { opacity: 1; pointer-events: all; }
.cart-sidebar { position: fixed; right: 0; top: 0; bottom: 0; width: 400px; max-width: 100vw; background: white; z-index: 201; transform: translateX(100%); transition: transform .3s; display: flex; flex-direction: column; }
.cart-sidebar.open { transform: translateX(0); }
.cart-header { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.cart-header h3 { font-size: 1.1rem; font-weight: 700; }
.cart-items { flex: 1; overflow-y: auto; padding: 16px 24px; }
.cart-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.cart-item img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; background: var(--light); }
.cart-item-info { flex: 1; }
.cart-item-title { font-size: .875rem; font-weight: 600; margin-bottom: 4px; }
.cart-item-price { font-size: .875rem; color: var(--pink); font-weight: 700; }
.cart-item-remove { background: none; border: none; cursor: pointer; color: var(--gray); font-size: 1.2rem; }
.cart-footer { padding: 20px 24px; border-top: 1px solid var(--border); }
.cart-total { display: flex; justify-content: space-between; font-weight: 700; font-size: 1.1rem; margin-bottom: 16px; }
.cart-free-ship { font-size: .8rem; color: #16a34a; text-align: center; margin-bottom: 12px; }

/* ─── CHECKOUT ───────────────────────────────────────────── */
.checkout-page { max-width: 960px; margin: 0 auto; padding: 40px 24px; display: grid; grid-template-columns: 1fr 380px; gap: 32px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: .875rem; font-weight: 500; margin-bottom: 6px; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px; font-size: .9rem; outline: none; transition: border .2s; }
.form-group input:focus, .form-group select:focus { border-color: var(--pink); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.order-summary { background: var(--light); border-radius: var(--radius); padding: 24px; height: fit-content; position: sticky; top: 80px; }

/* ─── FOOTER ─────────────────────────────────────────────── */
.footer { background: var(--dark); color: rgba(255,255,255,.7); margin-top: 80px; }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 48px 24px 24px; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer-brand .logo { color: white; margin-bottom: 12px; font-size: 1.2rem; }
.footer-brand p { font-size: .875rem; line-height: 1.7; }
.footer-social { display: flex; gap: 12px; margin-top: 16px; }
.footer-social a { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.1); display: flex; align-items: center; justify-content: center; font-size: .9rem; transition: background .2s; }
.footer-social a:hover { background: var(--pink); }
.footer-col h4 { color: white; font-size: .9rem; font-weight: 600; margin-bottom: 16px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { font-size: .875rem; transition: color .2s; }
.footer-col ul li a:hover { color: var(--pink); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 20px 24px; text-align: center; font-size: .8rem; }

/* ─── TOAST ──────────────────────────────────────────────── */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 999; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--dark); color: white; padding: 12px 20px; border-radius: 8px; font-size: .875rem; max-width: 300px; animation: slideUp .3s ease; display: flex; align-items: center; gap: 8px; }
.toast.success { border-left: 4px solid #16a34a; }
.toast.error { border-left: 4px solid #dc2626; }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ─── PAGE LOADER ────────────────────────────────────────── */
.page-loader { display: flex; justify-content: center; align-items: center; min-height: 40vh; }
.spinner { width: 40px; height: 40px; border: 3px solid var(--border); border-top-color: var(--pink); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .header-inner { padding: 0 16px; }
  .search-bar input { width: 120px; }
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .product-page { grid-template-columns: 1fr; }
  .checkout-page { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .cats-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 480px) {
  .nav { display: none; }
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .hero { padding: 48px 16px; }
  .section { padding: 40px 16px; }
}
