:root {
  --ink: #2b2725;
  --muted: #786d68;
  --paper: #fbf8f5;
  --rose: #ead7d2;
  --rose-2: #f3e7e2;
  --wine: #6e2e3b;
  --gold: #b58a54;
  --line: rgba(54, 43, 39, .12);
  --shadow: 0 18px 45px rgba(62, 43, 39, .12);
  --radius: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
body.locked { overflow: hidden; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
.shell { width: min(1120px, calc(100% - 36px)); margin-inline: auto; }

.hero { min-height: 76vh; position: relative; display: grid; align-items: end; overflow: hidden; color: white; }
.hero__image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 58%; transform: scale(1.01); }
.hero__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,16,15,.15) 20%, rgba(22,15,15,.72) 100%); }
.hero__content { position: relative; z-index: 1; padding-bottom: clamp(52px, 8vw, 92px); max-width: 820px; margin-left: max(18px, calc((100vw - 1120px)/2)); }
.hero h1, h2 { font-family: Georgia, 'Times New Roman', serif; font-weight: 400; letter-spacing: -.035em; }
.hero h1 { font-size: clamp(52px, 10vw, 112px); line-height: .9; margin: 12px 0 20px; text-wrap: balance; }
.hero h1 em { font-weight: 400; color: #f6d9d7; }
.hero__subtitle { font-size: clamp(17px, 2vw, 22px); max-width: 610px; line-height: 1.5; margin: 0 0 30px; color: rgba(255,255,255,.9); }
.eyebrow { font-size: 12px; letter-spacing: .2em; font-weight: 750; margin: 0; }
.eyebrow--dark { color: var(--wine); }

.button { display: inline-flex; justify-content: center; align-items: center; min-height: 50px; padding: 0 24px; border-radius: 999px; border: 0; text-decoration: none; font-weight: 750; transition: transform .2s ease, opacity .2s ease, box-shadow .2s ease; }
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .55; cursor: wait; transform: none; }
.button--light { color: var(--ink); background: rgba(255,255,255,.94); box-shadow: 0 8px 26px rgba(0,0,0,.13); }
.button--dark { color: white; background: var(--ink); box-shadow: 0 10px 25px rgba(43,39,37,.18); }
.button--full { width: 100%; }

.intro { text-align: center; max-width: 760px; padding: 88px 0 78px; }
.intro h2, .section-heading h2, .closing h2, .drawer h2, .checkout-dialog h2 { font-size: clamp(34px, 5vw, 58px); line-height: 1.02; margin: 12px 0 20px; }
.intro p:not(.eyebrow) { color: var(--muted); font-size: 18px; line-height: 1.75; }
.mini-note { display: inline-block; margin-top: 12px; background: var(--rose-2); color: #684d49; padding: 10px 16px; border-radius: 999px; font-size: 13px; }

.gifts-section { padding: 78px 0 100px; background: #f4ece7; border-block: 1px solid var(--line); }
.section-heading { display: flex; gap: 24px; justify-content: space-between; align-items: end; margin-bottom: 34px; }
.section-heading h2 { margin-bottom: 0; }
.search { min-width: min(330px, 100%); height: 50px; display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,.72); border: 1px solid var(--line); border-radius: 999px; padding: 0 18px; }
.search span { font-size: 24px; color: var(--muted); }
.search input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); }

.gift-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.gift-card { background: rgba(255,255,255,.8); border: 1px solid rgba(84,65,57,.09); border-radius: var(--radius); overflow: hidden; box-shadow: 0 2px 0 rgba(255,255,255,.5) inset; transition: transform .2s ease, box-shadow .2s ease; }
.gift-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.gift-card__art { min-height: 170px; display: grid; place-items: center; position: relative; overflow: hidden; background: radial-gradient(circle at 20% 20%, rgba(255,255,255,.9), transparent 42%), linear-gradient(135deg, #e8d5cc, #efdfe0); }
.gift-card:nth-child(3n+2) .gift-card__art { background: radial-gradient(circle at 20% 20%, rgba(255,255,255,.9), transparent 42%), linear-gradient(135deg, #e6dfd3, #efe4d9); }
.gift-card:nth-child(3n+3) .gift-card__art { background: radial-gradient(circle at 20% 20%, rgba(255,255,255,.9), transparent 42%), linear-gradient(135deg, #dcd6dd, #eee1e6); }
.gift-card__art::after { content: ''; position: absolute; width: 150px; height: 150px; border: 1px solid rgba(255,255,255,.58); border-radius: 50%; }
.gift-card__icon { position: relative; z-index: 1; font-size: 64px; filter: drop-shadow(0 7px 10px rgba(72,43,40,.12)); }
.gift-card__body { padding: 22px; }
.gift-card h3 { font-family: Georgia, serif; font-size: 25px; font-weight: 400; letter-spacing: -.025em; margin: 0 0 8px; }
.gift-card p { min-height: 48px; margin: 0 0 18px; color: var(--muted); line-height: 1.5; font-size: 14px; }
.gift-card__bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.gift-price { font-size: 18px; font-weight: 650; color: var(--wine); }
.add-button { border: 1px solid var(--line); background: white; color: var(--ink); border-radius: 999px; padding: 10px 15px; font-weight: 750; }
.add-button:hover { background: var(--ink); color: white; }
.empty-search { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 50px 0; }

.closing { text-align: center; max-width: 720px; padding: 100px 0 130px; }
.closing__mark { font-family: Georgia, serif; font-size: 42px; color: var(--wine); }
.closing p { color: var(--muted); line-height: 1.7; font-size: 17px; }

.cart-fab { position: fixed; z-index: 30; right: 22px; bottom: 22px; border: 0; background: var(--ink); color: white; min-height: 58px; border-radius: 999px; padding: 0 20px; box-shadow: 0 18px 45px rgba(32,22,20,.25); display: flex; align-items: center; gap: 12px; }
.cart-fab[hidden] { display: none; }
.cart-fab > :last-child { padding-left: 12px; border-left: 1px solid rgba(255,255,255,.18); font-weight: 800; }

.backdrop { position: fixed; inset: 0; z-index: 39; background: rgba(26,21,19,.38); backdrop-filter: blur(3px); }
.backdrop[hidden] { display: none; }
.drawer { position: fixed; z-index: 40; top: 0; right: 0; width: min(440px, 100vw); height: 100dvh; background: var(--paper); box-shadow: -22px 0 60px rgba(40,25,20,.14); transform: translateX(105%); transition: transform .28s ease; display: grid; grid-template-rows: auto 1fr auto; }
.drawer.open { transform: translateX(0); }
.drawer__header { padding: 28px 26px 18px; display: flex; align-items: start; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); }
.drawer h2 { font-size: 40px; margin-bottom: 0; }
.icon-button { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: transparent; font-size: 25px; line-height: 1; }
.cart-items { overflow: auto; padding: 12px 24px; }
.cart-row { display: grid; grid-template-columns: 1fr auto; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.cart-row h4 { font-family: Georgia, serif; font-size: 20px; font-weight: 400; margin: 0 0 5px; }
.cart-row__price { color: var(--muted); font-size: 14px; }
.qty { display: flex; align-items: center; gap: 8px; }
.qty button { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: white; }
.remove { border: 0; background: none; color: #9b665e; font-size: 12px; padding: 7px 0 0; }
.drawer__footer { padding: 20px 24px 28px; border-top: 1px solid var(--line); background: rgba(255,255,255,.72); }
.total-row { display: flex; justify-content: space-between; align-items: center; font-size: 19px; margin-bottom: 16px; }
.total-row strong { font-size: 24px; }
.text-button { width: 100%; background: none; border: 0; color: var(--muted); padding: 14px; }

.checkout-dialog {
  width: min(620px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  border: 0;
  border-radius: 28px;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 30px 90px rgba(35,25,22,.28);
}

.checkout-dialog::-webkit-scrollbar {
  display: none;
}
.checkout-dialog::backdrop { background: rgba(27,21,19,.5); backdrop-filter: blur(4px); }
.checkout-dialog form { padding: 28px; }
.dialog-head { display: flex; justify-content: space-between; align-items: start; gap: 18px; margin-bottom: 22px; }
.checkout-dialog h2 { font-size: 38px; margin-bottom: 0; }
.checkout-dialog label { display: grid; gap: 8px; font-size: 13px; font-weight: 800; margin: 15px 0; }
.checkout-dialog input, .checkout-dialog textarea { width: 100%; border: 1px solid var(--line); background: white; border-radius: 14px; padding: 14px 15px; outline: none; color: var(--ink); }
.checkout-dialog input:focus, .checkout-dialog textarea:focus { border-color: #a4716d; box-shadow: 0 0 0 3px rgba(164,113,109,.12); }
.optional { color: var(--muted); font-weight: 500; }
.checkout-summary { display: flex; justify-content: space-between; align-items: center; margin: 24px 0 16px; padding: 17px; border-radius: 16px; background: var(--rose-2); }
.checkout-summary strong { font-size: 22px; }
.secure-note { text-align: center; color: var(--muted); font-size: 12px; margin: 13px 0 0; }
.form-error { min-height: 18px; color: #a63f39; text-align: center; font-size: 13px; }

.toast { position: fixed; z-index: 60; left: 50%; bottom: 26px; transform: translate(-50%, 30px); opacity: 0; pointer-events: none; background: white; color: var(--ink); padding: 12px 18px; border-radius: 999px; box-shadow: var(--shadow); transition: .25s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.result-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at top, #f2e0dc, var(--paper) 50%); }
.result-card { width: min(580px, 100%); text-align: center; background: rgba(255,255,255,.76); border: 1px solid var(--line); border-radius: 30px; box-shadow: var(--shadow); padding: 48px 30px; }
.result-card__icon { font-size: 54px; }
.result-card h1 { font-family: Georgia, serif; font-size: clamp(38px, 7vw, 62px); font-weight: 400; line-height: 1; margin: 16px 0; }
.result-card p { color: var(--muted); line-height: 1.7; }
.result-status { display: inline-block; margin: 10px 0 24px; padding: 9px 13px; border-radius: 999px; background: var(--rose-2); font-size: 13px; font-weight: 800; }

@media (max-width: 820px) {
  .hero { min-height: 70vh; }
  .hero__content { margin-left: 18px; }
  .gift-grid { grid-template-columns: repeat(2, 1fr); }
  .section-heading { align-items: stretch; flex-direction: column; }
  .search { min-width: 0; width: 100%; }
}

@media (max-width: 560px) {
  .shell { width: min(100% - 24px, 1120px); }
  .hero__content { margin-left: 12px; width: calc(100% - 24px); }
  .hero h1 { font-size: 58px; }
  .hero__subtitle { font-size: 17px; }
  .intro { padding: 70px 12px 60px; }
  .gifts-section { padding-block: 62px 88px; }
  .gift-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .gift-card__art { min-height: 125px; }
  .gift-card__icon { font-size: 48px; }
  .gift-card__body { padding: 15px; }
  .gift-card h3 { font-size: 20px; }
  .gift-card p { min-height: 58px; font-size: 12px; }
  .gift-card__bottom { align-items: stretch; flex-direction: column; }
  .add-button { width: 100%; }
  .cart-fab { left: 12px; right: 12px; bottom: 12px; justify-content: space-between; }
  .drawer { top: auto; bottom: 0; width: 100%; height: min(82dvh, 700px); border-radius: 26px 26px 0 0; transform: translateY(105%); }
  .drawer.open { transform: translateY(0); }
  .drawer__header { padding: 22px 20px 14px; }
  .cart-items { padding-inline: 20px; }
  .drawer__footer { padding-inline: 20px; }
  .checkout-dialog form { padding: 22px; }
  .checkout-dialog h2 { font-size: 32px; }
}
.checkout-dialog input,
.checkout-dialog textarea {
  font-weight: 500;
}

.checkout-dialog input::placeholder,
.checkout-dialog textarea::placeholder {
  font-weight: 400;
}
