/* ============================================================
   Crown Heights Florist — Stylesheet
   Editorial Brooklyn-florist aesthetic.
   Palette: forest green, warm cream, blush, brass gold.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,300;9..144,400;9..144,500;9..144,600;9..144,700&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  /* These five are overridden at runtime from config.js theme block.
     Edit config.js → theme to recolor a whole site. */
  --theme-primary:      #1a3a2e;
  --theme-primary-dark: #11261d;
  --theme-accent:       #b8893f;
  --theme-blush:        #e8c5b8;
  --theme-cream:        #faf6ef;

  --green-900: var(--theme-primary-dark);
  --green-800: var(--theme-primary);
  --green-700: #25513f;
  --green-500: #4a7c5f;
  --green-100: #d8e4dc;

  --cream:     var(--theme-cream);
  --cream-2:   #f1ead9;
  --paper:     #fffdf8;

  --blush:     var(--theme-blush);
  --blush-deep:#c47b6a;

  --gold:      var(--theme-accent);
  --gold-soft: #d9b075;

  --ink:       #1c1a17;
  --ink-soft:  #5a544c;
  --line:      #e8e0d0;

  --display: 'Fraunces', 'Cormorant Garamond', Georgia, serif;
  --body:    'Inter', -apple-system, 'Helvetica Neue', sans-serif;

  --container: 1280px;
  --shadow-card: 0 14px 40px -22px rgba(17,38,29,.35);
  --shadow-soft: 0 6px 24px -12px rgba(17,38,29,.18);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a {
  color: inherit;
  text-decoration: none;
  transition: opacity .2s;
}
a:hover { opacity: .7; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: -.01em;
  line-height: 1.1;
  margin: 0 0 .5em;
}

h1 { font-size: clamp(2.4rem, 5.5vw, 4.4rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); }
h3 { font-size: 1.5rem; }

.eyebrow {
  font-family: var(--body);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .22em;
  color: var(--gold);
  font-weight: 500;
  margin-bottom: 1rem;
  display: inline-block;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  max-width: var(--container);
  margin: 0 auto;
  gap: 24px;
}

.brand {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: -.01em;
  color: var(--green-900);
  line-height: 1.05;
}
.brand span {
  display: block;
  font-family: var(--body);
  font-size: .62rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 4px;
  font-weight: 500;
}

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: .82rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 500;
}
.nav-links a {
  color: var(--green-900);
  position: relative;
  padding-bottom: 4px;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  height: 1px;
  width: 0;
  background: var(--gold);
  transition: width .3s ease;
}
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

.nav-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.phone-cta {
  font-size: .82rem;
  letter-spacing: .08em;
  font-weight: 500;
  color: var(--green-900);
}
.phone-cta strong {
  font-weight: 600;
}

.cart-button {
  position: relative;
  background: var(--green-900);
  color: var(--cream);
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 1rem;
  transition: background .2s;
}
.cart-button:hover { background: var(--green-700); }
.cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--gold);
  color: var(--ink);
  font-size: .65rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--green-900);
}

@media (max-width: 880px) {
  .nav-links, .phone-cta { display: none; }
  .mobile-toggle { display: block; }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--cream);
    flex-direction: column;
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--line);
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  font-family: var(--body);
  font-size: .82rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  font-weight: 500;
  border: 1px solid var(--green-900);
  background: var(--green-900);
  color: var(--cream);
  cursor: pointer;
  transition: all .25s;
  border-radius: 0;
}
.btn:hover { background: var(--green-700); border-color: var(--green-700); opacity: 1; }

.btn-outline {
  background: transparent;
  color: var(--green-900);
}
.btn-outline:hover { background: var(--green-900); color: var(--cream); }

.btn-gold {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--cream);
}
.btn-gold:hover { background: var(--ink); border-color: var(--ink); }

/* ---------- Hero (home) ---------- */
.hero {
  position: relative;
  padding: 80px 24px 100px;
  background:
    radial-gradient(circle at 80% 20%, rgba(216,228,220,.6), transparent 50%),
    var(--cream);
  overflow: hidden;
}
.hero-grid {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 64px;
  align-items: center;
}
.hero-text h1 {
  font-weight: 300;
  letter-spacing: -.02em;
}
.hero-text h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--green-700);
}
.hero-text p.lede {
  font-size: 1.12rem;
  color: var(--ink-soft);
  max-width: 480px;
  margin: 18px 0 36px;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-image-wrap {
  position: relative;
  aspect-ratio: 4/5;
}
.hero-image-wrap::before {
  content: '';
  position: absolute;
  inset: 18px -18px -18px 18px;
  background: var(--blush);
  z-index: 0;
}
.hero-image {
  position: relative;
  z-index: 1;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(.95);
}
.hero-badge {
  position: absolute;
  bottom: -28px;
  left: -28px;
  z-index: 2;
  background: var(--cream);
  border: 1px solid var(--line);
  padding: 18px 22px;
  font-family: var(--display);
  font-size: 1.15rem;
  font-style: italic;
  box-shadow: var(--shadow-soft);
}
.hero-badge strong {
  display: block;
  font-style: normal;
  font-family: var(--body);
  font-size: .65rem;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 4px;
  font-weight: 600;
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-image-wrap { aspect-ratio: 1; max-width: 480px; margin: 0 auto; }
}

/* ---------- Section header ---------- */
.section { padding: 90px 0; }
.section-tight { padding: 60px 0; }
.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}
.section-head p {
  color: var(--ink-soft);
  font-size: 1.05rem;
}

/* ---------- Marquee / fun divider ---------- */
.marquee {
  background: var(--green-900);
  color: var(--cream);
  padding: 14px 0;
  overflow: hidden;
  font-family: var(--display);
  font-style: italic;
  font-size: 1.05rem;
  letter-spacing: .02em;
}
.marquee-inner {
  display: inline-block;
  white-space: nowrap;
  animation: scroll 35s linear infinite;
  padding-left: 100%;
}
.marquee-inner span { margin: 0 24px; }
.marquee-inner em { color: var(--gold-soft); font-style: normal; }
@keyframes scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* ---------- Categories grid ---------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.cat-card {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
  background: var(--green-100);
  cursor: pointer;
}
.cat-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .8s;
}
.cat-card:hover img { transform: scale(1.06); }
.cat-card .cat-label {
  position: absolute;
  inset: auto 0 0 0;
  padding: 24px;
  background: linear-gradient(transparent, rgba(17,38,29,.85));
  color: var(--cream);
}
.cat-card .cat-label h3 {
  font-style: italic;
  margin: 0;
  font-size: 1.6rem;
  font-weight: 400;
}
.cat-card .cat-label span {
  display: inline-block;
  margin-top: 6px;
  font-size: .72rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold-soft);
}
@media (max-width: 900px) { .cat-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Product grid ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 32px;
}

.product-card {
  background: var(--paper);
  display: flex;
  flex-direction: column;
  transition: transform .3s, box-shadow .3s;
  border: 1px solid transparent;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
  border-color: var(--line);
}
.product-image {
  aspect-ratio: 4/5;
  background: var(--cream-2);
  overflow: hidden;
  position: relative;
}
.product-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .6s;
}
.product-card:hover .product-image img { transform: scale(1.05); }
.product-info {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.product-info .category {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .2em;
  color: var(--gold);
}
.product-info h3 {
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 400;
  margin: 0;
}
.product-info p.description {
  font-size: .88rem;
  color: var(--ink-soft);
  flex: 1;
  margin: 4px 0 16px;
}
.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}
.product-footer .price {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--green-900);
}
.add-btn {
  background: var(--green-900);
  color: var(--cream);
  border: none;
  padding: 10px 16px;
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .2s;
  font-weight: 500;
  font-family: var(--body);
}
.add-btn:hover { background: var(--gold); color: var(--ink); }

/* ---------- Promo strip ---------- */
.promo-strip {
  background: var(--blush);
  padding: 60px 24px;
  text-align: center;
}
.promo-strip h2 {
  font-style: italic;
  margin-bottom: .3em;
}
.promo-strip p { color: var(--ink); margin-bottom: 24px; }

/* ---------- Reviews ---------- */
.reviews-section {
  background: var(--green-900);
  color: var(--cream);
  padding: 100px 0;
}
.reviews-section .eyebrow { color: var(--gold-soft); }
.reviews-section h2 { color: var(--cream); }
.reviews-section .section-head p { color: var(--green-100); }

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  margin-top: 60px;
}
.review-card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(216,228,220,.18);
  padding: 32px;
  position: relative;
}
.review-card::before {
  content: '“';
  position: absolute;
  top: -6px; left: 18px;
  font-family: var(--display);
  font-size: 5rem;
  color: var(--gold);
  line-height: 1;
  font-style: italic;
}
.review-text {
  font-family: var(--display);
  font-style: italic;
  font-size: 1.08rem;
  line-height: 1.55;
  margin-top: 24px;
  color: var(--cream);
}
.review-author {
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-top: 18px;
  font-weight: 500;
}
@media (max-width: 760px) { .reviews-grid { grid-template-columns: 1fr; } }

/* ---------- Feature row (50 years etc.) ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-top: 24px;
}
.feature {
  text-align: center;
  padding: 28px 18px;
}
.feature .num {
  font-family: var(--display);
  font-size: 3.2rem;
  font-weight: 400;
  color: var(--gold);
  line-height: 1;
  font-style: italic;
}
.feature h4 {
  font-family: var(--display);
  font-size: 1.1rem;
  margin: 12px 0 8px;
}
.feature p { color: var(--ink-soft); font-size: .9rem; }
@media (max-width: 800px) { .features { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Sympathy callout ---------- */
.sympathy-block {
  background: var(--cream-2);
  padding: 90px 0;
}
.sympathy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.sympathy-grid img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
}
@media (max-width: 800px) {
  .sympathy-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* ---------- Cart drawer ---------- */
.cart-drawer {
  position: fixed;
  top: 0; right: 0;
  height: 100vh;
  width: 420px;
  max-width: 100vw;
  background: var(--cream);
  z-index: 200;
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  box-shadow: -20px 0 60px -20px rgba(0,0,0,.3);
  display: flex;
  flex-direction: column;
}
.cart-drawer.open { transform: translateX(0); }
.cart-backdrop {
  position: fixed; inset: 0;
  background: rgba(17,38,29,.5);
  z-index: 199;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
.cart-backdrop.open { opacity: 1; pointer-events: auto; }

.cart-header {
  padding: 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cart-header h3 {
  font-family: var(--display);
  font-size: 1.4rem;
  margin: 0;
}
.cart-close {
  background: none; border: none;
  font-size: 1.4rem; cursor: pointer;
  color: var(--ink);
}
.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}
.cart-empty {
  text-align: center;
  padding: 60px 24px;
  color: var(--ink-soft);
  font-style: italic;
}
.cart-item {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  align-items: center;
}
.cart-item img {
  width: 70px; height: 70px;
  object-fit: cover;
  background: var(--cream-2);
}
.cart-item-name {
  font-family: var(--display);
  font-size: 1rem;
}
.cart-item-meta {
  font-size: .82rem;
  color: var(--ink-soft);
  margin-top: 4px;
}
.qty-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.qty-control button {
  width: 22px; height: 22px;
  border: 1px solid var(--line);
  background: var(--paper);
  cursor: pointer;
  font-size: .85rem;
}
.cart-item-price {
  font-family: var(--display);
  font-weight: 500;
}
.cart-remove {
  background: none; border: none;
  font-size: .72rem;
  color: var(--ink-soft);
  text-decoration: underline;
  cursor: pointer;
  margin-top: 4px;
  padding: 0;
}
.cart-footer {
  padding: 24px;
  border-top: 1px solid var(--line);
}
.cart-subtotal {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
  font-family: var(--display);
  font-size: 1.2rem;
}
.cart-footer .btn { width: 100%; justify-content: center; }
.cart-footer p {
  font-size: .76rem;
  color: var(--ink-soft);
  text-align: center;
  margin: 12px 0 0;
}

/* ---------- Checkout form ---------- */
.checkout-wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 60px 24px 100px;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 60px;
}
@media (max-width: 900px) { .checkout-wrap { grid-template-columns: 1fr; } }

.checkout-form .section-title {
  font-family: var(--display);
  font-size: 1.4rem;
  font-weight: 500;
  margin: 36px 0 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.checkout-form .section-title:first-child { margin-top: 0; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 14px;
}
.form-row.full { grid-template-columns: 1fr; }

.field label {
  display: block;
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 6px;
  font-weight: 500;
}
.field input, .field textarea, .field select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-family: var(--body);
  font-size: .95rem;
  color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--green-700);
  box-shadow: 0 0 0 3px rgba(74,124,95,.15);
}
.field textarea { min-height: 90px; resize: vertical; font-family: var(--body); }

.order-summary {
  background: var(--paper);
  padding: 32px;
  border: 1px solid var(--line);
  height: fit-content;
  position: sticky;
  top: 100px;
}
.order-summary h3 {
  font-family: var(--display);
  font-size: 1.4rem;
  margin: 0 0 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.summary-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  font-size: .92rem;
}
.summary-totals {
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding-top: 14px;
}
.summary-totals .row {
  display: flex;
  justify-content: space-between;
  margin: 6px 0;
  font-size: .92rem;
}
.summary-totals .row.total {
  font-family: var(--display);
  font-size: 1.35rem;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

#card-container {
  border: 1px solid var(--line);
  padding: 18px;
  background: var(--paper);
  min-height: 90px;
}
#card-container.sq-focus { border-color: var(--green-700); }

#payment-status {
  margin-top: 16px;
  padding: 12px;
  font-size: .9rem;
  display: none;
}
#payment-status.success { background: var(--green-100); color: var(--green-900); display: block; }
#payment-status.error   { background: #f8e0db; color: #8a2b1a; display: block; }
#payment-status.info    { background: var(--cream-2); color: var(--ink); display: block; }

#pay-button {
  margin-top: 24px;
  width: 100%;
  justify-content: center;
  padding: 18px;
  font-size: .92rem;
}
#pay-button:disabled { opacity: .55; cursor: wait; }

/* ---------- Footer ---------- */
.footer {
  background: var(--green-900);
  color: var(--green-100);
  padding: 80px 24px 30px;
}
.footer-grid {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
}
.footer h4 {
  font-family: var(--body);
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin: 0 0 18px;
  font-weight: 600;
}
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 10px; font-size: .9rem; }
.footer a { color: var(--green-100); }
.footer .brand-foot {
  font-family: var(--display);
  font-size: 1.8rem;
  color: var(--cream);
  margin-bottom: 14px;
  font-style: italic;
}
.footer-bottom {
  max-width: var(--container);
  margin: 60px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(216,228,220,.15);
  display: flex;
  justify-content: space-between;
  font-size: .78rem;
  color: var(--green-100);
}
@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
}

/* ---------- Page header (interior pages) ---------- */
.page-header {
  background:
    radial-gradient(circle at 20% 30%, rgba(216,228,220,.5), transparent 50%),
    var(--cream);
  padding: 80px 0 60px;
  text-align: center;
}
.page-header h1 {
  font-style: italic;
  font-weight: 300;
}
.page-header p {
  color: var(--ink-soft);
  max-width: 560px;
  margin: 12px auto 0;
}

/* ---------- About page specifics ---------- */
.about-narrative {
  max-width: 760px;
  margin: 0 auto;
  font-size: 1.05rem;
  color: var(--ink-soft);
}
.about-narrative p { margin: 1em 0; }
.about-narrative h2 {
  font-style: italic;
  color: var(--green-900);
  margin-top: 2em;
}

/* ---------- Confirmation ---------- */
.confirmation {
  max-width: 640px;
  margin: 80px auto;
  text-align: center;
  padding: 0 24px;
}
.confirmation .checkmark {
  width: 70px; height: 70px;
  border-radius: 50%;
  background: var(--green-700);
  color: var(--cream);
  display: grid; place-items: center;
  font-size: 2rem;
  margin: 0 auto 24px;
}
.confirmation h1 { font-style: italic; }
.confirmation .order-ref {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 24px;
  margin: 32px 0;
  font-family: var(--display);
  font-size: 1.1rem;
}

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.hidden { display: none !important; }

/* ---------- Tiny reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .8s ease, transform .8s ease;
}
.reveal.in { opacity: 1; transform: translateY(0); }
