/*
Theme Name:   Pasteluxe
Theme URI:    https://pasteluxe.example
Author:       Pasteluxe
Author URI:   https://pasteluxe.example
Description:  Luxury bakery & 3D cake atelier — custom WooCommerce theme converted from the original Pasteluxe HTML/React project. Pastel glassmorphism design system, custom shop & product templates, 3D cake composer.
Version:      1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License:      GNU General Public License v2 or later
License URI:  http://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  pasteluxe
Tags:         e-commerce, woocommerce, custom-colors
WC requires at least: 7.0
WC tested up to: 9.9
*/

/* ============================================================
   PASTELUXE CAKES — Design System
   (ported 1:1 from the original styles.css)
   ============================================================ */

:root {
  /* Brand palette */
  --blush:    #FFD6E7;
  --sky:      #CFEFFF;
  --cream:    #FFF4C1;
  --vanilla:  #FFFDF8;
  --lavender: #E8D9FF;
  --gold:     #D4AF37;
  --gold-soft: #E8CF86;

  /* Tints / washes (very soft) */
  --blush-wash:    #FFF1F6;
  --sky-wash:      #F0FAFF;
  --cream-wash:    #FFFBEB;
  --lavender-wash: #F6F1FF;

  /* Ink */
  --ink:        #2E2024;   /* cocoa-plum, primary text */
  --ink-soft:   #6A5860;   /* muted */
  --ink-faint:  #A99AA0;   /* faint labels */
  --line:       #EDE4E0;

  /* Surfaces */
  --bg:         #FFFDF8;
  --surface:    #FFFFFF;

  /* Glass */
  --glass-bg:     rgba(255,255,255,0.55);
  --glass-bg-strong: rgba(255,255,255,0.72);
  --glass-border: rgba(255,255,255,0.75);
  --glass-blur:   18px;

  /* Shadows — soft, layered */
  --shadow-sm:  0 2px 8px rgba(74,46,58,0.06);
  --shadow-md:  0 8px 28px rgba(74,46,58,0.09);
  --shadow-lg:  0 20px 60px rgba(74,46,58,0.13);
  --shadow-glow: 0 12px 40px rgba(255,168,200,0.28);

  /* Radii */
  --r-sm: 14px;
  --r-md: 22px;
  --r-lg: 32px;
  --r-xl: 44px;
  --r-pill: 999px;

  /* Type */
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans:  'Manrope', -apple-system, system-ui, sans-serif;

  /* Layout */
  --maxw: 1280px;
  --nav-h: 78px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.5;
  overflow-x: hidden;
}

/* Ambient pastel background blobs */
.bg-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(1100px 700px at 78% -8%, var(--blush-wash), transparent 60%),
    radial-gradient(900px 600px at 8% 8%, var(--sky-wash), transparent 55%),
    radial-gradient(1000px 800px at 50% 108%, var(--lavender-wash), transparent 60%),
    var(--bg);
}
.bg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
  animation: drift 26s ease-in-out infinite;
}

@keyframes drift {
  0%,100% { transform: translate(0,0) scale(1); }
  33%     { transform: translate(40px,-30px) scale(1.08); }
  66%     { transform: translate(-30px,25px) scale(0.95); }
}

/* ---------- Typography ---------- */
h1,h2,h3,h4 { font-family: var(--serif); font-weight: 600; line-height: 1.08; margin: 0; letter-spacing: -0.01em; }
.display { font-size: clamp(42px, 6.2vw, 92px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.07; }
.h1 { font-size: clamp(38px, 5vw, 68px); }
.h2 { font-size: clamp(30px, 3.6vw, 50px); }
.h3 { font-size: clamp(22px, 2.2vw, 30px); }
.serif-italic { font-style: italic; font-weight: 500; }
.eyebrow {
  font-family: var(--sans);
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--gold);
}
.lede { font-size: clamp(16px,1.3vw,19px); color: var(--ink-soft); line-height: 1.65; }
p { text-wrap: pretty; }

/* ---------- Layout helpers ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.section { padding: clamp(64px, 9vw, 130px) 0; }
.center { text-align: center; }
.stack { display: flex; flex-direction: column; }

/* ---------- Glass ---------- */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(140%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255,255,255,0.6);
}
.glass-strong {
  background: var(--glass-bg-strong);
  backdrop-filter: blur(calc(var(--glass-blur) + 6px)) saturate(150%);
  -webkit-backdrop-filter: blur(calc(var(--glass-blur) + 6px)) saturate(150%);
  border: 1px solid var(--glass-border);
}

/* ---------- Buttons ---------- */
.btn {
  font-family: var(--sans);
  font-weight: 600; font-size: 15px;
  border: none; cursor: pointer;
  border-radius: var(--r-pill);
  padding: 15px 30px;
  display: inline-flex; align-items: center; gap: 10px;
  transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s, background .25s, color .2s;
  text-decoration: none; white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: linear-gradient(135deg, #FF9EC4, #FF7EAE);
  color: #fff;
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 46px rgba(255,140,180,0.42); color: #fff; }
.btn-ink {
  background: var(--ink); color: #fff;
}
.btn-ink:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); color: #fff; }
.btn-ghost {
  background: var(--glass-bg-strong);
  color: var(--ink);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.btn-ghost:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--gold-soft); color: var(--ink); }
.btn-gold {
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  color: #fff;
  box-shadow: 0 10px 30px rgba(212,175,55,0.3);
}
.btn-gold:hover { transform: translateY(-2px); color: #fff; }
.btn-lg { padding: 18px 38px; font-size: 16px; }
.btn-sm { padding: 10px 20px; font-size: 13px; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s;
  overflow: hidden;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }

/* ---------- Placeholder imagery ---------- */
.ph {
  position: relative;
  background-color: var(--blush-wash);
  background-image:
    repeating-linear-gradient(45deg, rgba(255,255,255,0.5) 0 2px, transparent 2px 13px);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.ph::after {
  content: attr(data-label);
  font-family: 'SFMono-Regular', ui-monospace, 'Cascadia Code', Menlo, monospace;
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(74,46,58,0.42);
  background: rgba(255,255,255,0.55);
  padding: 6px 12px; border-radius: var(--r-pill);
  border: 1px dashed rgba(74,46,58,0.18);
}
.ph-sky    { background-color: var(--sky-wash); }
.ph-cream  { background-color: var(--cream-wash); }
.ph-lav    { background-color: var(--lavender-wash); }

/* Real photo fill — used in product cards & galleries */
.ph.has-img { background-image: none; }
.ph.has-img::after { display: none; }
.ph-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.ph-img.contain { object-fit: contain; }

/* ---------- Chips / tags / pills ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 600;
  padding: 7px 14px; border-radius: var(--r-pill);
  background: var(--surface); border: 1px solid var(--line);
  color: var(--ink-soft); cursor: pointer;
  transition: all .2s;
  text-decoration: none;
  font-family: var(--sans);
}
.chip:hover { border-color: var(--gold-soft); color: var(--ink); }
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }

.tag {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 5px 11px; border-radius: var(--r-pill);
}
.tag-blush { background: var(--blush); color: #8a3a5c; }
.tag-gold  { background: var(--cream); color: #9a7b1e; }
.tag-sky   { background: var(--sky); color: #2d6b8a; }

/* swatch */
.swatch {
  width: 34px; height: 34px; border-radius: 50%;
  border: 2px solid #fff; cursor: pointer;
  box-shadow: 0 0 0 1px var(--line), var(--shadow-sm);
  transition: transform .18s;
}
.swatch:hover { transform: scale(1.12); }
.swatch.sel { box-shadow: 0 0 0 2px var(--gold), 0 0 0 5px rgba(212,175,55,0.25); transform: scale(1.1); }

/* ---------- Floating dessert motif ---------- */
.float { animation: floaty 7s ease-in-out infinite; }
.float-2 { animation: floaty 9s ease-in-out infinite reverse; }
.float-3 { animation: floaty 11s ease-in-out infinite; }
@keyframes floaty {
  0%,100% { transform: translateY(0) rotate(0deg); }
  50%     { transform: translateY(-16px) rotate(4deg); }
}

/* ---------- Reveal on scroll ---------- */
/* Start-invisible states only apply once .anim is on <html> (added when the page
   is actually visible at load). Hidden/background loads show content immediately. */
.anim .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center;
}
.nav-inner {
  width: 100%; max-width: var(--maxw); margin: 0 auto;
  padding: 0 28px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-shell {
  position: sticky; top: 0; z-index: 100;
  transition: background .3s, box-shadow .3s, border-color .3s;
}
.nav-shell.scrolled {
  background: rgba(255,253,248,0.78);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
}
.brand { font-family: var(--serif); font-size: 27px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; display:flex; align-items:center; gap:10px; }
.brand .mark { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, var(--blush), var(--lavender)); box-shadow: inset 0 0 0 2px #fff, var(--shadow-sm); display:grid; place-items:center; font-size:15px; }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-link {
  font-size: 14.5px; font-weight: 600; color: var(--ink-soft);
  padding: 9px 15px; border-radius: var(--r-pill); cursor: pointer;
  background: none; border: none; font-family: var(--sans);
  transition: color .2s, background .2s; display:inline-flex; align-items:center; gap:6px;
  text-decoration: none;
}
.nav-link:hover, .nav-link.active { color: var(--ink); background: rgba(255,255,255,0.6); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: var(--glass-bg-strong); border: 1px solid var(--line);
  color: var(--ink); transition: all .2s; position: relative;
  text-decoration: none;
}
.icon-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--gold-soft); color: var(--ink); }
.cart-count {
  position: absolute; top: -4px; right: -4px;
  min-width: 20px; height: 20px; padding: 0 5px;
  background: linear-gradient(135deg, #FF9EC4, #FF7EAE); color: #fff;
  font-size: 11px; font-weight: 800; border-radius: var(--r-pill);
  display: grid; place-items: center; border: 2px solid var(--vanilla);
}

/* mega menu */
.mega {
  position: absolute; top: calc(var(--nav-h) - 8px); left: 50%; transform: translateX(-50%) translateY(10px);
  width: min(960px, calc(100vw - 40px));
  border-radius: var(--r-lg); padding: 22px;
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s;
  z-index: 120;
}
.mega.open { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); }
/* transparent bridge so the pointer can travel from the nav links into the
   panel without crossing an empty gap that would close it */
.mega::before {
  content: ''; position: absolute; left: 0; right: 0; top: -26px; height: 26px;
}
.mega-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.mega-card {
  display: flex; gap: 14px; align-items: center;
  padding: 14px; border-radius: var(--r-md); cursor: pointer;
  border: 1px solid transparent; transition: all .2s;
  text-decoration: none; color: inherit;
}
.mega-card:hover { background: #fff; border-color: var(--line); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.mega-thumb { width: 64px; height: 64px; border-radius: var(--r-sm); flex-shrink: 0; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: #F3E9EC; padding: 80px 0 36px; margin-top: 60px; border-radius: var(--r-xl) var(--r-xl) 0 0; }
.footer a { color: rgba(243,233,236,0.7); text-decoration: none; transition: color .2s; }
.footer a:hover { color: #fff; }

/* ---------- Forms ---------- */
.field {
  width: 100%; font-family: var(--sans); font-size: 15px;
  padding: 14px 18px; border-radius: var(--r-md);
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
.field:focus { outline: none; border-color: var(--gold-soft); box-shadow: 0 0 0 4px rgba(212,175,55,0.13); }
label.lbl { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 8px; display:block; }

/* utility */
.grid { display: grid; gap: 24px; }
.g2 { grid-template-columns: repeat(2,1fr); }
.g3 { grid-template-columns: repeat(3,1fr); }
.g4 { grid-template-columns: repeat(4,1fr); }
.row { display: flex; align-items: center; gap: 14px; }
.between { justify-content: space-between; }
.muted { color: var(--ink-soft); }
.gold-text { color: var(--gold); }
.divider { height: 1px; background: var(--line); border: none; margin: 0; }
.scrollbar-thin::-webkit-scrollbar { height: 8px; width: 8px; }
.scrollbar-thin::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; }

/* responsive */
@media (max-width: 1024px) {
  .g4 { grid-template-columns: repeat(2,1fr); }
  .g3 { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 860px) {
  .nav-links { display: none; }
  .mega { display: none; }
}
@media (max-width: 680px) {
  .g4, .g3, .g2 { grid-template-columns: 1fr; }
  .mega-grid { grid-template-columns: 1fr; }
}

/* fade/slide page transition */
.anim .page-enter { animation: pageIn .5s cubic-bezier(.2,.8,.2,1); }
@keyframes pageIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.hidden-vis, .screen-reader-text { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); }

/* ---------- WP-specific base resets ---------- */
a { color: inherit; }
img { max-width: 100%; height: auto; }
.wp-block-image img { border-radius: var(--r-md); }

/* toast (ported from app.jsx) */
.pl-toast-wrap {
  position: fixed; bottom: 28px; left: 50%;
  transform: translateX(-50%) translateY(120px);
  opacity: 0; transition: all .4s cubic-bezier(.2,.8,.2,1);
  z-index: 300; pointer-events: none;
}
.pl-toast-wrap.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.pl-toast {
  border-radius: var(--r-pill); padding: 14px 26px;
  box-shadow: var(--shadow-lg); font-weight: 600; font-size: 14.5px;
}

/* composer page is full-bleed (no footer), matching the original app shell */
.page-template-template-composer .footer { display: none; }
