:root {
  --bg: #f6f5f2;
  --surface: #fdfcf9;
  --surface-soft: #f2efea;
  --ink: #463a38;
  --accent: #a4565e;
  --accent-strong: #5f4f56;
  --muted: #63595a;
  --border: #e7e0d8;
  --shadow: 0 10px 25px rgba(92, 72, 64, 0.08);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Nunito Sans", "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(246, 245, 242, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.brand {
  font-family: "Cormorant Garamond", "Times New Roman", serif;
  font-size: 1.55rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.header-actions { display: flex; align-items: center; gap: 0.45rem; flex-shrink: 0; }
.icon-btn, .quick-link {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
  background: var(--surface);
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.quick-link {
  border: none;
  background: transparent;
  color: var(--accent-strong);
  font-weight: 700;
  min-width: auto;
  padding-inline: 0.2rem;
}
.quick-link:hover { color: var(--ink); }
.menu-toggle, .cart-pill { width: 2.75rem; height: 2.75rem; padding: 0; }
.menu-toggle svg, .cart-pill svg { width: 1.35rem; height: 1.35rem; }
.menu-toggle {
  border: none;
  background: transparent;
  color: var(--ink);
}
.cart-pill {
  position: relative;
  border: none;
  background: transparent;
}
.cart-pill.bump {
  animation: cartBump 0.35s ease;
}

.cart-count {
  position: absolute;
  right: -0.3rem;
  top: -0.25rem;
  min-width: 1.1rem;
  height: 1.1rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  background: var(--accent-strong);
  color: white;
}

.cart-fly-item {
  position: fixed;
  z-index: 80;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: linear-gradient(140deg, #f6c8b8, #d39a90);
  border: 1px solid rgba(70, 58, 56, 0.3);
  box-shadow: 0 8px 22px rgba(70, 58, 56, 0.18);
  pointer-events: none;
}

.main-nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem 1rem;
  display: none;
}
.main-nav.open { display: block; }
.main-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}
.main-nav li + li { border-top: 1px solid var(--border); }
.main-nav a { display: block; padding: 0.85rem 1rem; }

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem;
}

.soft-hero,
.hero {
  background: linear-gradient(130deg, #fcfbf8 0%, #f4efe9 60%, #f7e7e0 100%);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 1.7rem;
  margin-bottom: 1.2rem;
  box-shadow: var(--shadow);
}
.hero p { font-size: 1.1rem; max-width: 65ch; }
.hero.compact {
  margin-top: 1rem;
  margin-bottom: 1rem;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent-strong);
  font-size: 0.78rem;
  margin: 0;
}
.hero h1 {
  margin: 0.3rem 0 0.5rem;
  font-family: "Cormorant Garamond", "Times New Roman", serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 600;
}

.category-section {
  background: linear-gradient(130deg, #fffdfa 0%, #f8f3ee 100%);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 1.2rem;
  margin-bottom: 1.1rem;
  box-shadow: var(--shadow);
}
.product-section {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  margin-bottom: 1.1rem;
  box-shadow: none;
}
.category-section h2,
.product-section h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 1.06rem;
  font-weight: 700;
}
.category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}
.category-pill {
  display: grid;
  place-items: center;
  text-align: center;
  gap: 0.5rem;
}
.category-icon {
  width: 86px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  border: 1px solid var(--border);
  background: var(--surface-soft);
}
.category-pill h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
  gap: 1rem;
}

.card {
  background: linear-gradient(130deg, #fffdfa 0%, #f7f2ed 100%);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.8rem;
  box-shadow: var(--shadow);
}
.card.flat-card {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}
.product-card h3 { margin: 0.6rem 0 0.4rem; }
.product-card h2 { margin: 0.6rem 0 0.4rem; }
.product-card {
  border: none;
  background: transparent;
  box-shadow: none;
  padding: 0;
}
.card p { margin: 0 0 0.7rem; color: var(--muted); }
.product-image-wrap {
  --product-corner-radius: 18px;
  --favorite-inset: 10px;
  --favorite-size: 44px;
  --favorite-radius: calc(var(--product-corner-radius) - var(--favorite-inset));
  position: relative;
  border-radius: var(--product-corner-radius);
  background: transparent;
  border: 1px solid var(--border);
  overflow: hidden;
}
.product-image-wrap img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.badge {
  position: absolute;
  left: 0.5rem;
  bottom: 0.5rem;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border);
  padding: 0.2rem 0.45rem;
  border-radius: 7px;
}

.favorite-toggle {
  position: absolute;
  top: var(--favorite-inset);
  right: var(--favorite-inset);
  width: var(--favorite-size);
  height: var(--favorite-size);
  border-radius: var(--favorite-radius);
  border: 1px solid rgba(180, 82, 97, 0.45);
  background: rgba(180, 82, 97, 0.2);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  cursor: pointer;
  color: rgba(94, 74, 74, 0.95);
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  z-index: 3;
}

.favorite-toggle svg {
  width: 20px;
  height: 20px;
}

.favorite-toggle svg path {
  fill: currentColor;
  stroke: rgba(94, 74, 74, 0.45);
  stroke-width: 1.5;
}

.favorite-toggle:hover {
  transform: translateY(-1px);
}

.favorite-toggle.is-active {
  background: rgba(180, 82, 97, 0.2);
  border-color: rgba(180, 82, 97, 0.45);
  color: #e34b68;
}

.favorite-toggle.is-active svg path {
  stroke: #be2f4d;
}

.favorite-toggle.is-animating {
  animation: favoritePop 0.36s ease;
}
.meta { color: var(--muted); font-size: 0.92rem; }

.featured-cta {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.94rem;
  padding: 0.62rem 0.8rem;
  cursor: pointer;
}
.btn.primary { background: var(--accent); color: #ffffff; border-color: transparent; }
.btn.small { font-size: 0.86rem; padding: 0.45rem 0.65rem; }

.field { margin: 0.7rem 0; }
.field label { font-weight: 700; display: block; margin-bottom: 0.3rem; }
select, input[type="text"], textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: white;
  padding: 0.55rem 0.65rem;
  font: inherit;
}
textarea { min-height: 160px; }

.color-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  max-height: 190px;
  overflow: auto;
  padding: 0.2rem;
}
.notice { font-size: 0.85rem; color: var(--muted); }
.field-error {
  margin-top: 0.35rem;
  font-size: 0.85rem;
  color: #b32727;
  font-weight: 600;
}

.color-choice {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  place-items: center;
  cursor: pointer;
}

.color-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.color-dot {
  display: block;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.65);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.color-choice input:checked + .color-dot {
  transform: scale(1.06);
  border-color: var(--ink);
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--accent-strong);
}

.color-choice.is-disabled .color-dot {
  opacity: 0.35;
}

.cart-list, .order-summary {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.6rem;
}
.cart-list li, .order-summary li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.6rem 0.7rem;
  background: var(--surface);
}

.checkout-intro,
.checkout-section {
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  padding: 0;
}

.checkout-grid {
  gap: 1.5rem;
}

.checkout-section h2 {
  margin-top: 0;
  margin-bottom: 0.8rem;
}

.checkout-summary details {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.order-summary-toggle {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 0;
  cursor: pointer;
}

.order-summary-toggle::-webkit-details-marker {
  display: none;
}

.order-summary-toggle-content {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.order-summary-toggle-title {
  font-size: 1.8rem;
  line-height: 1.1;
  font-weight: 700;
}

.order-summary-toggle-meta {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.3;
}

.order-summary-toggle-chevron {
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: transform 0.26s ease, color 0.2s ease;
}

.order-summary-toggle-chevron svg {
  width: 1.25rem;
  height: 1.25rem;
}

.checkout-summary details[open] .order-summary-toggle-chevron {
  transform: rotate(180deg);
  color: var(--ink);
}

.order-summary-body {
  padding: 0 0 0.9rem;
}

.order-summary {
  gap: 0.55rem;
}

.order-summary li {
  display: block;
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  padding: 0 0 0.6rem;
  background: transparent;
}

.order-summary li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.order-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 0.85rem;
  align-items: flex-start;
}

.order-summary-name {
  font-weight: 700;
}

.order-summary-price {
  font-weight: 700;
  white-space: nowrap;
}

.order-summary-meta {
  color: var(--muted);
  font-size: 0.94rem;
}

.order-summary-empty {
  margin: 0;
  color: var(--muted);
}

.cart-item-main {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  flex: 1;
  min-width: 0;
}

.cart-item-details {
  min-width: 0;
}

.cart-item-meta {
  display: block;
  line-height: 1.3;
}

.cart-item-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.45rem;
}

.quantity-controls {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.45rem;
}

.small-icon-btn {
  width: 2rem;
  height: 2rem;
  padding: 0;
  border-radius: 10px;
}


.small-icon-btn svg {
  width: 1rem;
  height: 1rem;
}

.quantity-controls .small-icon-btn {
  color: #1f1b1c;
}

.small-icon-btn.danger {
  color: #8b3b41;
  border-color: #dcbec2;
  background: #fff4f5;
}

.quantity-value {
  min-width: 1.5rem;
  text-align: center;
  font-weight: 700;
}

.cart-thumb {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--border);
  background: var(--surface-soft);
}

.custom-order-banner {
  background: linear-gradient(125deg, #f6efe9 0%, #f5e8e1 60%, #f3ddd3 100%);
  border: 1px solid #e6d7cb;
  border-radius: 22px;
  padding: 1.2rem;
  margin-bottom: 1.1rem;
  box-shadow: var(--shadow);
}
.custom-order-banner p {
  margin: 0;
  font-size: clamp(1.1rem, 2.6vw, 1.45rem);
  font-weight: 700;
  color: #5f4b4d;
}

.wakelock {
  margin-top: 1rem;
  border-top: 1px dashed var(--border);
  padding-top: 0.8rem;
}
.wakelock-status {
  margin-top: 0.55rem;
  opacity: 0;
  min-height: 1.15rem;
  transition: opacity 0.2s ease;
}
.wakelock-status.visible {
  opacity: 1;
}

.stretched-link {
  display: block;
}
.stretched-link .btn {
  margin-top: 0.4rem;
}

.product-detail-grid {
  display: grid;
  gap: 1rem;
}

.product-section .soft-hero {
  border: none;
  box-shadow: none;
}

.product-section .product-detail-grid .card {
  border: none;
  box-shadow: none;
}

.product-detail-top-image {
  margin-bottom: 0.75rem;
}


.favorites-grid {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
}

.favorite-item {
  display: block;
}

.favorites-empty {
  border: 1px dashed var(--border);
  border-radius: 16px;
  background: var(--surface);
  padding: 1.2rem;
  text-align: center;
}

.favorites-empty h2 {
  margin: 0 0 0.5rem;
}

.favorites-empty p {
  margin-top: 0;
  margin-bottom: 1rem;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
}
.toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.toggle-track {
  width: 2.7rem;
  height: 1.55rem;
  border-radius: 999px;
  background: #d4cdc3;
  position: relative;
  transition: background 0.2s ease;
}
.toggle-track::after {
  content: "";
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background: #fff;
  position: absolute;
  left: 0.2rem;
  top: 0.2rem;
  transition: transform 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.toggle input:checked + .toggle-track {
  background: var(--accent-strong);
}
.toggle input:checked + .toggle-track::after {
  transform: translateX(1.15rem);
}
.toggle-label {
  font-weight: 700;
}

footer {
  margin-top: 2rem;
  padding: 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
}

.thank-you-hero {
  text-align: center;
}

.thank-you-hero .btn {
  margin-top: 0.35rem;
}

.confetti-stage {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 70;
}

.confetti-burst {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
}

.confetti-piece {
  position: absolute;
  width: 0.55rem;
  height: 0.9rem;
  left: 0;
  top: 0;
  border-radius: 2px;
  background: hsl(var(--confetti-hue, 12), 78%, 62%);
  transform: translate(-50%, -50%);
  animation-name: confettiBurst;
  animation-timing-function: ease-out;
  animation-fill-mode: forwards;
  will-change: transform, opacity;
}

@media (max-width: 640px) {
  .category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .category-icon { width: 72px; font-size: 1.35rem; }
}

@media (min-width: 820px) {
  .menu-toggle { display: none; }
  .product-detail-grid {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }
  .main-nav {
    display: block !important;
    padding: 0 1rem 0.7rem;
  }
  .main-nav ul { display: flex; }
  .main-nav li + li { border-top: none; border-left: 1px solid var(--border); }
}

@keyframes cartBump {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}


@keyframes favoritePop {
  0% { transform: scale(1); }
  45% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

@keyframes confettiBurst {
  0% {
    transform: translate(-50%, -50%) scale(0.6) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translate(
      calc(-50% + var(--confetti-x, 0px) + var(--confetti-drift, 0px)),
      calc(-50% + var(--confetti-y, 0px) + 220px)
    ) rotate(540deg);
    opacity: 0;
  }
}


@media (max-width: 720px) {
  .product-section .grid {
    row-gap: 1.75rem;
  }

  .header-inner {
    padding: 0.6rem 0.75rem;
    gap: 0.4rem;
  }

  .brand {
    font-size: 1.25rem;
    letter-spacing: 0.03em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .quick-link {
    min-width: auto;
    font-size: 0.82rem;
    padding-inline: 0.15rem;
  }
}
