/* Squishy Cases — playful storefront styles */

:root {
  --bg: #fff9f3;
  --card: #ffffff;
  --ink: #2d2a32;
  --muted: #8a8494;
  --pink: #ff6b8a;
  --pink-dark: #e14e6e;
  --peach: #ffd9c7;
  --mint: #cdeac0;
  --lav: #e3d5ff;
  --yellow: #ffe8a3;
  --radius: 18px;
  --shadow: 0 8px 24px rgba(45, 42, 50, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Nunito", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
}
img { max-width: 100%; display: block; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
h1, h2, h3 { line-height: 1.2; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-weight: 800;
  font-size: 1rem;
  padding: 14px 28px;
  border-radius: 999px;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn-primary { background: var(--pink); color: #fff; box-shadow: 0 6px 16px rgba(255, 107, 138, 0.4); }
.btn-primary:hover { background: var(--pink-dark); transform: translateY(-2px); }
.btn-secondary { background: var(--ink); color: #fff; }
.btn-secondary:hover { transform: translateY(-2px); }
.btn-full { width: 100%; text-align: center; }
.link-btn {
  background: none; border: none; cursor: pointer;
  font-family: inherit; font-weight: 700; color: var(--pink-dark);
  padding: 8px 0; font-size: 0.95rem;
}
.icon-btn {
  background: #f3eef7; border: none; cursor: pointer;
  width: 48px; height: 48px; border-radius: 50%;
  font-size: 1.2rem; line-height: 1; color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 249, 243, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid #f5e8dc;
}
.header-inner { display: flex; align-items: center; gap: 20px; padding: 14px 20px; }
.logo { font-weight: 900; font-size: 1.35rem; color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 8px; }
.logo-emoji { font-size: 1.6rem; }
.logo-img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.logo-img.small { width: 28px; height: 28px; }
.main-nav { margin-left: auto; display: flex; gap: 18px; }
.main-nav a { color: var(--ink); text-decoration: none; font-weight: 700; }
.main-nav a:hover { color: var(--pink-dark); }
.cart-btn {
  border: none; cursor: pointer; font-family: inherit;
  background: var(--ink); color: #fff; font-weight: 800;
  border-radius: 999px; padding: 10px 18px; font-size: 1rem;
  position: relative;
}
.cart-count {
  background: var(--pink); border-radius: 999px;
  min-width: 22px; height: 22px; display: inline-flex;
  align-items: center; justify-content: center;
  font-size: 0.8rem; padding: 0 6px; margin-left: 4px;
}

/* ---------- Hero ---------- */
.hero { padding: 56px 0 40px; overflow: hidden; }
.hero-inner { display: flex; align-items: center; gap: 32px; flex-wrap: wrap; }
.hero-text { flex: 1 1 320px; }
.hero-text h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 900; margin: 0 0 12px; }
.hero-text p { font-size: 1.1rem; color: var(--muted); margin: 0 0 24px; max-width: 46ch; }
.hero-art { flex: 1 1 240px; position: relative; min-height: 220px; }
.hero-blob {
  font-size: 6rem; position: absolute; left: 20%; top: 10%;
  animation: float 4s ease-in-out infinite;
  filter: drop-shadow(0 12px 16px rgba(255,107,138,.25));
}
.hero-blob.small { font-size: 3.4rem; left: 62%; top: 52%; animation-delay: 1.2s; }
.hero-blob.small2 { font-size: 2.6rem; left: 8%; top: 58%; animation-delay: 2.1s; }
@keyframes float { 0%,100% { transform: translateY(0) rotate(-4deg);} 50% { transform: translateY(-10px) rotate(4deg);} }

/* ---------- Shop ---------- */
.shop-section { padding: 24px 0 48px; }
.shop-section h2 { font-size: 1.9rem; font-weight: 900; margin: 0; }
.section-sub { color: var(--muted); margin: 4px 0 24px; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.product-card {
  background: var(--card); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  cursor: pointer; transition: transform 0.15s ease;
  position: relative;
}
.product-card:hover { transform: translateY(-4px); }
.product-card .p-img { aspect-ratio: 1; background: var(--peach); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.product-card .p-img img { width: 100%; height: 100%; object-fit: cover; }
.product-card .p-body { padding: 16px; }
.product-card h3 { margin: 0 0 4px; font-size: 1.05rem; font-weight: 800; }
.product-card .blurb { color: var(--muted); font-size: 0.9rem; margin: 0 0 12px; }
.product-card .p-foot { display: flex; align-items: center; justify-content: space-between; }
.price { font-weight: 900; font-size: 1.25rem; }
.add-btn {
  border: none; cursor: pointer; font-family: inherit; font-weight: 800;
  background: var(--pink); color: #fff; border-radius: 999px; padding: 10px 18px;
}
.add-btn:hover { background: var(--pink-dark); }
.badge {
  position: absolute; top: 12px; left: 12px;
  background: var(--ink); color: #fff; font-size: 0.75rem; font-weight: 800;
  padding: 5px 12px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.04em;
}

/* ---------- Perks / About / Contact ---------- */
.perks { background: #fff; border-top: 2px solid #f5e8dc; border-bottom: 2px solid #f5e8dc; padding: 36px 0; }
.perks-inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; text-align: center; }
.perk span { font-size: 2.2rem; }
.perk h3 { margin: 8px 0 4px; font-size: 1.05rem; }
.perk p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.about, .contact { padding: 48px 0; text-align: center; }
.about-inner p, .contact-inner p { max-width: 60ch; margin: 0 auto 24px; color: var(--muted); font-size: 1.05rem; }
.about h2, .contact h2 { font-size: 1.7rem; font-weight: 900; }

/* ---------- Cards / checkout ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; }
.checkout-inner { padding: 32px 20px 56px; max-width: 1080px; }
.checkout-inner h2 { font-size: 1.9rem; font-weight: 900; }
.checkout-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 20px; }
@media (max-width: 760px) { .checkout-grid { grid-template-columns: 1fr; } }
.checkout-summary h3, .checkout-pay h3 { margin-top: 0; }
.co-item { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px dashed #eee; }
.co-item img { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; background: var(--peach); }
.co-item .co-name { flex: 1; font-weight: 700; font-size: 0.95rem; }
.co-item .co-qty { color: var(--muted); font-size: 0.85rem; }
.ship-options h4 { margin: 18px 0 8px; }
.ship-radio { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 2px solid #f0e6da; border-radius: 12px; margin-bottom: 8px; cursor: pointer; font-weight: 600; }
.ship-radio input { accent-color: var(--pink); }
.ship-radio .s-price { margin-left: auto; font-weight: 800; }
.totals { margin-top: 18px; border-top: 2px solid #f5e8dc; padding-top: 12px; }
.row { display: flex; justify-content: space-between; padding: 4px 0; }
.row.grand { font-weight: 900; font-size: 1.2rem; margin-top: 6px; }
.notice {
  background: #fff4d6; border: 2px solid #ffd66e; border-radius: 12px;
  padding: 14px 16px; font-size: 0.92rem; margin: 12px 0;
}
.notice code { background: #fff; padding: 2px 6px; border-radius: 6px; }
.secure-note { font-size: 0.85rem; color: var(--muted); margin-top: 16px; }

/* ---------- Success ---------- */
.success-inner { padding: 56px 20px; max-width: 560px; }
.success-card { text-align: center; }
.success-emoji { font-size: 3.5rem; }
.order-meta { background: var(--bg); border-radius: 12px; padding: 16px; margin: 20px 0; text-align: left; }

/* ---------- Footer ---------- */
.site-footer { border-top: 2px solid #f5e8dc; padding: 32px 0; text-align: center; background: #fff; }
.footer-brand { font-weight: 900; font-size: 1.1rem; margin-bottom: 8px; }

/* ---------- Cart drawer ---------- */
.drawer-overlay, .modal-overlay {
  position: fixed; inset: 0; background: rgba(45,42,50,.45);
  z-index: 90; opacity: 1;
}
.cart-drawer {
  position: fixed; top: 0; right: 0; height: 100dvh; width: min(400px, 92vw);
  background: var(--bg); z-index: 100; display: flex; flex-direction: column;
  box-shadow: -8px 0 32px rgba(0,0,0,.12);
  transform: translateX(0); transition: transform .25s ease;
}
.cart-drawer[hidden], .drawer-overlay[hidden], .modal-overlay[hidden] { display: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 2px solid #f5e8dc; }
.drawer-head h3 { margin: 0; }
.drawer-items { flex: 1; overflow-y: auto; padding: 12px 20px; }
.drawer-empty { text-align: center; color: var(--muted); padding: 40px 0; }
.drawer-empty .big { font-size: 3rem; display: block; margin-bottom: 12px; }
.d-item { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px dashed #e8dccf; }
.d-item img { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; background: var(--peach); }
.d-item .d-info { flex: 1; }
.d-item .d-name { font-weight: 800; font-size: 0.95rem; }
.d-item .d-price { color: var(--muted); font-size: 0.88rem; }
.qty-stepper { display: inline-flex; align-items: center; gap: 10px; background: #fff; border: 2px solid #f0e6da; border-radius: 999px; padding: 4px 8px; margin-top: 6px; }
.qty-stepper button { border: none; background: var(--peach); width: 26px; height: 26px; border-radius: 50%; cursor: pointer; font-weight: 900; font-size: 1rem; line-height: 1; }
.qty-stepper span { font-weight: 800; min-width: 20px; text-align: center; }
.d-remove { background: none; border: none; cursor: pointer; color: var(--muted); font-size: 1.1rem; }
.drawer-foot { padding: 18px 20px 22px; border-top: 2px solid #f5e8dc; background: #fff; }
.drawer-foot .btn { margin: 10px 0 6px; }
.drawer-foot .link-btn { display: block; margin: 0 auto; }

/* ---------- Modal ---------- */
.modal-overlay { display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal { max-width: 760px; width: 100%; max-height: 90dvh; overflow-y: auto; position: relative; }
.modal-close { position: absolute; top: 14px; right: 14px; z-index: 2; }
.modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 640px) { .modal-grid { grid-template-columns: 1fr; } }
.modal-img { background: var(--peach); border-radius: 12px; overflow: hidden; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; }
.modal-img img { width: 100%; height: 100%; object-fit: cover; }
.modal-info h3 { margin: 6px 0 4px; font-size: 1.4rem; font-weight: 900; }
.modal-info .price { margin-bottom: 10px; }
.modal-info p { color: var(--muted); }
.details { padding-left: 20px; color: var(--muted); font-size: 0.93rem; margin: 0 0 18px; }
.details li { margin-bottom: 4px; }
.qty-row { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; font-weight: 700; }
.qty-row .qty-stepper { margin-top: 0; }
.modal .badge { position: static; display: inline-block; margin-bottom: 4px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; font-weight: 700;
  padding: 12px 22px; border-radius: 999px; z-index: 200;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
}
.toast[hidden] { display: none; }
