*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Jost', sans-serif; color: #1a1a1a; background: #fff; padding-bottom: 60px; }

/* NAV */
.cnav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.5rem; height: 50px; background: #fff;
  border-bottom: 1px solid #f0e8e6; position: sticky; top: 0; z-index: 100;
}
.cnav-logo { font-family: 'Cormorant Garamond', serif; font-size: 1.3rem; font-weight: 400; letter-spacing: .05em; opacity: 0; transition: opacity .3s; }
.cnav-logo.vis { opacity: 1; }
.cnav-links { display: flex; gap: 1.8rem; list-style: none; position: absolute; left: 50%; transform: translateX(-50%); }
.cnav-links a { font-size: .78rem; letter-spacing: .12em; text-decoration: none; color: #1a1a1a; padding: 3px 10px; border-radius: 20px; cursor: pointer; transition: background .2s; }
.cnav-links a:hover { background: #f0c4bc; }
.cnav-links a.act { border: 1.5px solid #1a1a1a; }
.cnav-cart { cursor: pointer; position: relative; }
.cbadge { position: absolute; top: -7px; right: -9px; background: #e53935; color: #fff; font-size: .6rem; width: 16px; height: 16px; border-radius: 50%; display: none; align-items: center; justify-content: center; }
.cbadge.on { display: flex; }

/* PAGES */
.pg { display: none; min-height: calc(100vh - 50px); flex-direction: column; }
.pg.act { display: flex; }
.pink-bar { background: #e8a89c; height: 3px; flex-shrink: 0; }

/* HOME */
.hero { background: #f9ddd9; flex: 1; display: flex; align-items: center; justify-content: center; min-height: 340px; }
.hero h1 { font-family: 'Cormorant Garamond', serif; font-size: clamp(3rem, 8vw, 5.5rem); font-weight: 300; letter-spacing: .35em; animation: fadeUp .8s ease forwards; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.hero-bot { background: #fff; display: flex; flex-direction: column; align-items: center; min-height: 160px; padding: 2rem; }
.btn-gs { background: #f0c4bc; border: none; border-radius: 30px; padding: 12px 48px; font-family: 'Jost', sans-serif; font-size: .8rem; letter-spacing: .14em; cursor: pointer; transition: background .2s, transform .2s; }
.btn-gs:hover { background: #e8a89c; transform: scale(1.03); }

/* SOCIAL BAR (fixed bottom) */
.social-bar {
  position: fixed;
  bottom: 0; left: 0;
  width: 100%;
  height: 55px;
  background: #fff;
  border-top: 1px solid #f0e8e6;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  z-index: 99;
}
.social-bar a { display: flex; text-decoration: none; transition: opacity .2s; }
.social-bar a:nth-child(1) { color: #1da1f2; }
.social-bar a:nth-child(2) { color: #c13584; }
.social-bar a:nth-child(3) { color: #5865F2; }
.social-bar a:hover { opacity: .6; }

/* ORDER */
#pg-order { min-height: 100vh; flex-direction: column; }
.order-wrap { display: flex; flex: 1; }
.sidebar { width: 210px; background: #f5d5d0; padding: 2rem 1.2rem; flex-shrink: 0; }
.sidebar-lbl { font-size: .7rem; letter-spacing: .08em; color: #555; margin-bottom: .8rem; }
.cat-list { list-style: none; }
.cat-list li { font-family: 'Cormorant Garamond', serif; font-size: 1.3rem; padding: .35rem .6rem; border-radius: 6px; cursor: pointer; transition: background .2s; margin-bottom: .05rem; }
.cat-list li:hover { background: rgba(255,255,255,.5); }
.cat-list li.act { background: rgba(255,255,255,.75); }
.order-main { flex: 1; padding: 2rem 2.5rem; background: #fff; }

/* PRODUCT GRID */
.prod-section { display: none; }
.prod-section.act { display: block; }
.prod-title { font-family: 'Cormorant Garamond', serif; font-size: 1.6rem; font-weight: 500; letter-spacing: .06em; margin-bottom: .5rem; }
.prod-desc { font-size: .75rem; letter-spacing: .07em; line-height: 1.8; color: #555; margin-bottom: 1.4rem; max-width: 560px; }
.prod-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.prod-card { display: flex; flex-direction: column; gap: .5rem; cursor: pointer; }
.prod-card-img { position: relative; border-radius: 4px; overflow: hidden; aspect-ratio: 1; background: #f5d5d0; }
.prod-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.prod-card:hover .prod-card-img img { transform: scale(1.04); }
.prod-card.disabled { pointer-events: none; opacity: 0.6; }
.prod-card.disabled:hover .prod-card-img img { transform: none; }
.oos-overlay { position: absolute; inset: 0; background: rgba(255,255,255,.45); display: flex; align-items: center; justify-content: center; }
.oos-label { font-size: .7rem; letter-spacing: .12em; color: #fff; background: rgba(180,140,130,.75); padding: 4px 10px; border-radius: 3px; text-align: center; line-height: 1.4; }
.prod-card-label { font-size: .78rem; letter-spacing: .1em; color: #1a1a1a; text-align: center; }

/* DETAIL / CUSTOMIZATION VIEW */
.detail-view { display: none; }
.detail-view.act { display: block; }
.back-btn { background: #f5d5d0; border: none; border-radius: 20px; padding: 7px 18px; font-family: 'Jost', sans-serif; font-size: .75rem; letter-spacing: .1em; cursor: pointer; margin-bottom: 1.2rem; transition: background .2s; }
.back-btn:hover { background: #e8a89c; }
.detail-layout { display: flex; gap: 1.5rem; align-items: flex-start; }

/* CUSTOM PANEL */
.custom-panel { width: 195px; flex-shrink: 0; }
.custom-title { font-family: 'Cormorant Garamond', serif; font-size: 1rem; font-weight: 500; letter-spacing: .08em; margin-bottom: .8rem; }
.select-row { margin-bottom: .55rem; }
.select-row label { font-size: .68rem; letter-spacing: .06em; color: #555; display: block; margin-bottom: .2rem; }
.hover-select { position: relative; display: inline-block; width: 100%; }
.hs-trigger { background: #fff; border: 1px solid #ddd; border-radius: 4px; padding: 4px 22px 4px 8px; font-family: 'Jost', sans-serif; font-size: .68rem; letter-spacing: .06em; cursor: pointer; width: 100%; text-align: left; color: #1a1a1a; position: relative; }
.hs-trigger::after { content: '▾'; position: absolute; right: 7px; top: 50%; transform: translateY(-50%); font-size: .6rem; color: #999; }
.hs-trigger.chosen { background: #fdf0ee; border-color: #e8a89c; }
.hs-menu { position: absolute; top: 100%; left: 0; width: 100%; background: #fff; border: 1px solid #e8a89c; border-radius: 4px; z-index: 50; display: none; }
.hover-select:hover .hs-menu { display: block; }
.hs-menu button { display: block; width: 100%; background: none; border: none; text-align: left; padding: 6px 10px; font-family: 'Jost', sans-serif; font-size: .68rem; letter-spacing: .06em; cursor: pointer; color: #1a1a1a; }
.hs-menu button:hover { background: #fdf0ee; }
.panel-divider { border: none; border-top: 1px solid #f0e8e6; margin: .8rem 0; }
.frosting-lbl, .decor-lbl { font-size: .68rem; letter-spacing: .06em; color: #555; margin-bottom: .4rem; }
.tool-btns { display: flex; gap: .4rem; margin-bottom: .4rem; }
.tool-btn { background: #fff; border: 1px solid #ddd; border-radius: 4px; padding: 4px 8px; font-size: .65rem; letter-spacing: .06em; cursor: pointer; transition: all .15s; }
.tool-btn.act { background: #fdf0ee; border-color: #e8a89c; }
.swatches { display: flex; gap: 4px; flex-wrap: wrap; }
.swatch { width: 18px; height: 18px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; transition: border-color .15s; }
.swatch.sel { border-color: #1a1a1a; }
.brush-row { display: flex; align-items: center; gap: .4rem; margin-top: .4rem; }
.brush-row label { font-size: .65rem; color: #888; }
.brush-row input { width: 70px; }
.brush-row span { font-size: .65rem; color: #888; min-width: 16px; }
.decor-tray { display: flex; flex-wrap: wrap; gap: 5px; background: #fdf0ee; border-radius: 6px; padding: 6px; }
.decor-chip { font-size: 1.3rem; cursor: grab; padding: 2px; border-radius: 3px; user-select: none; }
.decor-chip:active { cursor: grabbing; }

/* CANVAS */
.canvas-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; }
.canvas-title { font-family: 'Cormorant Garamond', serif; font-size: 1.1rem; font-weight: 500; letter-spacing: .1em; margin-bottom: .7rem; }
.canvas-container { position: relative; width: 280px; height: 280px; border-radius: 6px; overflow: hidden; cursor: crosshair; }
.cake-bg { position: absolute; inset: 0; background: #f5d5d0; }
.cake-bg img { width: 100%; height: 100%; object-fit: cover; display: block; }
#draw-canvas { position: absolute; inset: 0; border-radius: 6px; }
.dropped-decor { position: absolute; font-size: 1.5rem; cursor: grab; user-select: none; transform: translate(-50%, -50%); z-index: 10; }
.dropped-decor:active { cursor: grabbing; }
.canvas-actions { display: flex; gap: .5rem; margin-top: .5rem; }
.action-btn { background: #fff; border: 1px solid #ddd; border-radius: 4px; padding: 5px 10px; font-family: 'Jost', sans-serif; font-size: .65rem; letter-spacing: .06em; cursor: pointer; }
.action-btn:hover { background: #fdf0ee; border-color: #e8a89c; }
.toast { position: absolute; bottom: -28px; left: 50%; transform: translateX(-50%); background: #1a1a1a; color: #fff; font-size: .68rem; letter-spacing: .08em; padding: 5px 14px; border-radius: 20px; opacity: 0; transition: opacity .3s; pointer-events: none; white-space: nowrap; }
.toast.show { opacity: 1; }

/* PRICE PANEL */
.price-panel { width: 145px; flex-shrink: 0; display: flex; flex-direction: column; }
.price-title { font-family: 'Cormorant Garamond', serif; font-size: 1.1rem; font-weight: 500; letter-spacing: .06em; margin-bottom: .15rem; }
.price-item-id { font-size: .62rem; letter-spacing: .08em; color: #aaa; margin-bottom: 1rem; }
.qty-row { display: flex; align-items: center; gap: .4rem; margin-bottom: 1.2rem; }
.qty-btn { background: #f5d5d0; border: none; width: 24px; height: 24px; border-radius: 50%; font-size: .9rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .2s; }
.qty-btn:hover { background: #e8a89c; }
.qty-n { font-family: 'Cormorant Garamond', serif; font-size: 1rem; min-width: 20px; text-align: center; }
.done-btn { background: #f5d5d0; border: none; border-radius: 20px; padding: 10px 0; font-family: 'Jost', sans-serif; font-size: .75rem; letter-spacing: .12em; cursor: pointer; width: 100%; margin-top: auto; transition: background .2s; }
.done-btn:hover { background: #e8a89c; }

/* CART */
#pg-cart { flex-direction: column; }
.summary-wrap { padding: 1.5rem 2rem; flex: 1; }
.summary-title { font-family: 'Cormorant Garamond', serif; font-size: 1.5rem; font-weight: 400; letter-spacing: .1em; text-align: center; margin-bottom: 1.2rem; }
.receipt-card { background: #fdf0ee; border-radius: 8px; padding: 1.2rem 1.4rem; max-width: 380px; margin: 0 auto; position: relative; }
.receipt-minus { position: absolute; top: .8rem; right: 1rem; background: none; border: none; font-size: 1.1rem; cursor: pointer; color: #999; line-height: 1; }
.receipt-minus:hover { color: #c0705a; }
.receipt-date { font-size: .72rem; letter-spacing: .1em; text-align: center; color: #555; margin-bottom: .3rem; }
.receipt-addr { font-size: .72rem; letter-spacing: .1em; text-align: center; color: #555; margin-bottom: 1rem; line-height: 1.7; }
.receipt-img { width: 180px; height: 180px; object-fit: cover; border-radius: 4px; display: block; margin: 0 auto 1rem; }
.receipt-line { display: flex; justify-content: space-between; font-size: .72rem; letter-spacing: .09em; color: #444; padding: 3px 0; }
.receipt-line.main { color: #1a1a1a; font-weight: 500; }
.receipt-divider { border: none; border-top: 1px solid #ccc; margin: 1rem 0 .6rem; }
.receipt-total { display: flex; justify-content: space-between; font-family: 'Cormorant Garamond', serif; font-size: 1rem; font-weight: 500; }
.cart-empty-msg { font-family: 'Cormorant Garamond', serif; font-size: 1.1rem; letter-spacing: .1em; color: #bbb; text-align: center; margin-top: 3rem; }
.checkout-btn { display: block; width: 200px; margin: 1.5rem auto 0; background: #f5d5d0; border: none; border-radius: 30px; padding: 12px; font-family: 'Jost', sans-serif; font-size: .78rem; letter-spacing: .14em; cursor: pointer; transition: background .2s; }
.checkout-btn:hover { background: #e8a89c; }

/* CONTENT PAGES */
.content { max-width: 640px; margin: 0 auto; padding: 2.5rem 2rem; flex: 1; }
.ct { font-family: 'Cormorant Garamond', serif; font-size: 2rem; font-weight: 400; letter-spacing: .1em; margin-bottom: 1.2rem; }
.cs { font-family: 'Cormorant Garamond', serif; font-size: 1.5rem; font-weight: 400; letter-spacing: .08em; margin: 1.8rem 0 .8rem; }
.cb { font-size: .8rem; letter-spacing: .09em; line-height: 2; color: #444; margin-bottom: .8rem; }
.gallery-t { font-family: 'Cormorant Garamond', serif; font-size: 1.7rem; text-align: center; letter-spacing: .1em; margin: 2rem 0 1.2rem; }
.gallery { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.2rem; margin-bottom: 1.5rem; }
.gitem { display: flex; flex-direction: column; gap: .6rem; }
.gi { height: 160px; border-radius: 4px; background: #f9ddd9; overflow: hidden; }
.gi img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gitem p { font-size: .72rem; letter-spacing: .06em; line-height: 1.7; color: #666; }

/* CONTACT */
#pg-contact { flex-direction: column; }
.contact-wrap { display: flex; gap: 3rem; padding: 2.5rem 3rem; flex: 1; }
.contact-l { flex: 0 0 280px; }
.sh-title { font-family: 'Cormorant Garamond', serif; font-size: 1.7rem; font-weight: 400; letter-spacing: .12em; margin-bottom: 1.2rem; }
.hours-t { border-collapse: collapse; margin-bottom: 1.5rem; }
.hours-t td { font-size: .78rem; letter-spacing: .09em; padding: 3px 14px 3px 0; color: #444; line-height: 1.8; }
.hours-t td:first-child { text-align: right; color: #1a1a1a; padding-right: .8rem; }
.cdet { display: flex; flex-direction: column; gap: .75rem; }
.cdet-item { display: flex; align-items: flex-start; gap: .7rem; font-size: .78rem; letter-spacing: .05em; color: #555; line-height: 1.6; }
.contact-r { flex: 1; display: flex; flex-direction: column; gap: 1rem; }
.form-row { display: flex; gap: 1.2rem; }
.fg { display: flex; flex-direction: column; gap: .3rem; flex: 1; }
.fg label { font-size: .72rem; letter-spacing: .07em; color: #555; }
.fg input, .fg textarea { border: none; border-bottom: 1px solid #ccc; padding: 7px 3px; font-family: 'Jost', sans-serif; font-size: .78rem; color: #1a1a1a; background: transparent; outline: none; transition: border-color .2s; }
.fg input:focus, .fg textarea:focus { border-bottom-color: #e8a89c; }
.fg textarea { resize: none; height: 70px; }
.rg { display: flex; gap: 1.5rem; margin-top: .2rem; }
.rg label { display: flex; align-items: center; gap: .4rem; font-size: .78rem; cursor: pointer; color: #555; }
.btn-send { background: #f0c4bc; border: none; border-radius: 30px; padding: 12px 44px; font-family: 'Jost', sans-serif; font-size: .78rem; letter-spacing: .14em; cursor: pointer; align-self: flex-end; transition: background .2s; }
.btn-send:hover { background: #e8a89c; }

/* SENT POPUP */
.sent-overlay {
  position: fixed; inset: 0;
  background: rgba(249,221,217,.7);
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
}
.sent-overlay.open { display: flex; }

.sent-box {
  background: #fdf0ee;
  border-radius: 12px;
  width: 380px;
  height: 260px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sent-close {
  position: absolute;
  top: 1rem; right: 1rem;
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  color: #1a1a1a;
  line-height: 1;
}
.sent-close:hover { opacity: .6; }

/* ENVELOPE */
.envelope {
  position: relative;
  width: 200px;
  height: 140px;
  animation: envPop .4s ease forwards;
}

@keyframes envPop {
  from { opacity: 0; transform: scale(.85); }
  to   { opacity: 1; transform: scale(1); }
}

.envelope-back {
  position: absolute;
  inset: 0;
  background: #f5c2b8;
  border-radius: 4px;
}

/* letter peeking out */
.envelope-letter {
  position: absolute;
  bottom: 40%;
  left: 50%;
  transform: translateX(-50%);
  width: 72%;
  height: 80px;
  background: #fff;
  border-radius: 3px 3px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: letterRise .5s .2s ease forwards;
  opacity: 0;
  z-index: 2;
}

@keyframes letterRise {
  from { opacity: 0; bottom: 30%; }
  to   { opacity: 1; bottom: 45%; }
}

.envelope-letter span {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: .1em;
  color: #1a1a1a;
}

/* front flap fold lines */
.envelope-front-left {
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 0;
  border-style: solid;
  border-width: 70px 0 0 100px;
  border-color: transparent transparent transparent #f0b8ac;
  z-index: 3;
}

.envelope-front-right {
  position: absolute;
  bottom: 0; right: 0;
  width: 0; height: 0;
  border-style: solid;
  border-width: 70px 100px 0 0;
  border-color: transparent #f0b8ac transparent transparent;
  z-index: 3;
}

.envelope-bottom {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 50%;
  background: #eaada0;
  border-radius: 0 0 4px 4px;
  z-index: 4;
}

/* top flap (open) */
.envelope-back::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 0; height: 0;
  border-style: solid;
  border-width: 0 100px 65px 100px;
  border-color: transparent transparent #e8a89c transparent;
  z-index: 1;
}

/* DELETE POPUP */
.delete-overlay { position: fixed; inset: 0; background: rgba(240,200,195,.6); z-index: 200; display: none; align-items: center; justify-content: center; }
.delete-overlay.open { display: flex; }
.delete-box { background: #fdf0ee; border-radius: 6px; padding: 2rem 2.5rem; text-align: center; max-width: 300px; width: 90%; }
.delete-box p { font-family: 'Cormorant Garamond', serif; font-size: 1.1rem; letter-spacing: .07em; line-height: 1.6; margin-bottom: 1.5rem; }
.delete-actions { display: flex; border-top: 1px solid #e0c8c4; }
.delete-actions button { flex: 1; background: none; border: none; padding: .8rem; font-family: 'Cormorant Garamond', serif; font-size: .95rem; letter-spacing: .1em; cursor: pointer; transition: background .2s; }
.delete-actions button:first-child { border-right: 1px solid #e0c8c4; }
.delete-actions button:hover { background: rgba(200,150,140,.15); }

/* RESPONSIVE */
@media (max-width: 768px) {
  .cnav-links { gap: 1rem; }
  .cnav-links a { font-size: .7rem; padding: 3px 7px; }
  .order-wrap { flex-direction: column; }
  .sidebar { width: 100%; padding: 1rem; }
  .cat-list { display: flex; flex-wrap: wrap; gap: .4rem; }
  .cat-list li { font-size: 1rem; padding: .25rem .7rem; }
  .order-main { padding: 1.5rem; }
  .detail-layout { flex-direction: column; }
  .custom-panel { width: 100%; }
  .canvas-container { width: 100%; height: auto; aspect-ratio: 1; }
  .prod-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
  .contact-wrap { flex-direction: column; padding: 2rem 1.5rem; gap: 2rem; }
  .contact-l { flex: none; }
  .form-row { flex-direction: column; }
}