/* ============================================================
   NuffCookie - Stylesheet
   Aesthetic: warm artisanal bakery — chocolate, butter cream, hand-crafted
   ============================================================ */

:root {
  --choc:       #3B1F0E;       /* deep chocolate */
  --choc-mid:   #6B3A1F;       /* mid chocolate */
  --caramel:    #C47B2B;       /* caramel gold accent */
  --caramel-lt: #E8A94D;       /* light caramel */
  --cream:      #FDF6EC;       /* butter cream background */
  --cream-dark: #F2E8D5;       /* slightly darker cream */
  --card:       #FFFCF7;       /* card surface */
  --text:       #2A160A;       /* body text */
  --muted:      #8C6A50;       /* muted text */
  --border:     #E8D8C4;       /* borders */
  --input-bg:   #F7F0E6;       /* input backgrounds */
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  background-image:
    radial-gradient(ellipse at 15% 10%, rgba(196,123,43,0.13) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 85%, rgba(59,31,14,0.07) 0%, transparent 50%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 36px 16px 70px;
}

/* ── Header ─────────────────────────────────────────────── */
.header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 28px;
  animation: fadeUp 0.6s ease both;
}

.logo-ring {
  width: 120px; height: 120px;
  border-radius: 50%;
  background: var(--cream-dark);
  border: 3px solid var(--caramel);
  box-shadow:
    0 0 0 8px rgba(196,123,43,0.10),
    0 10px 36px rgba(59,31,14,0.18);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  margin-bottom: 16px;
  font-size: 3.2rem;
  line-height: 1;
}
.logo-ring img {
  width: 110px; height: 110px;
  border-radius: 50%; object-fit: cover;
}

.brand-name {
  font-family: 'Fraunces', serif;
  font-size: 2.2rem;
  color: var(--choc);
  letter-spacing: -0.5px;
  line-height: 1;
}

.brand-sub {
  font-size: 0.72rem;
  color: var(--caramel);
  letter-spacing: 2.5px;
  text-transform: uppercase;
  font-weight: 600;
  margin-top: 5px;
}

.ig-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 12px;
  padding: 5px 12px;
  background: var(--cream-dark);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--choc-mid);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.ig-badge:hover {
  background: var(--caramel);
  color: white;
  border-color: var(--caramel);
}
.ig-badge svg { flex-shrink: 0; }

/* ── Notices ─────────────────────────────────────────────── */
.notice-banner {
  max-width: 520px; width: 100%;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 12px;
  font-size: 0.82rem;
  line-height: 1.65;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  animation: fadeUp 0.6s 0.1s ease both;

  background: #FFF8E6;
  border: 1.5px solid var(--caramel-lt);
  color: #5C3A10;
}
.notice-payment {
  background: #FFF0F0;
  border-color: #E8A090;
  color: #7A2A1F;
}
.notice-icon { font-size: 1rem; flex-shrink: 0; margin-top: 2px; }

/* ── Card ────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border-radius: 22px;
  width: 100%; max-width: 520px;
  box-shadow:
    0 2px 0 var(--border),
    0 8px 48px rgba(59,31,14,0.11);
  overflow: hidden;
  animation: fadeUp 0.6s 0.2s ease both;
}
.card-section {
  padding: 26px 28px;
  border-bottom: 1px solid var(--border);
}
.card-section:last-child { border-bottom: none; }

.section-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--caramel);
  margin-bottom: 18px;
}

/* ── Form Elements ───────────────────────────────────────── */
label.field-label {
  display: block;
  font-size: 0.77rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 5px;
  margin-top: 14px;
}
label.field-label:first-of-type { margin-top: 0; }
.optional { font-weight: 400; color: #B09070; font-size: 0.70rem; }

input, select, textarea {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.92rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--caramel);
  box-shadow: 0 0 0 3px rgba(196,123,43,0.14);
}
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238C6A50' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.row { display: flex; gap: 12px; }
.row > div { flex: 1; }
.hidden-field { display: none !important; }

/* ── Price Preview ───────────────────────────────────────── */
.price-preview-box {
  background: var(--cream-dark);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 46px;
  margin-top: 14px; /* align with input since it has field-label above */
}
.price-preview-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2px;
}
.price-preview-value {
  font-family: 'Fraunces', serif;
  font-size: 1.15rem;
  color: var(--caramel);
  font-weight: 700;
}

/* ── Fee Note ────────────────────────────────────────────── */
.fee-note {
  margin-top: 8px;
  padding: 8px 12px;
  background: #FFF8E6;
  border: 1px solid var(--caramel-lt);
  border-radius: 8px;
  font-size: 0.79rem;
  color: var(--choc-mid);
  font-weight: 500;
}

/* ── Cart ────────────────────────────────────────────────── */
.cart-box {
  background: var(--cream-dark);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  margin-top: 18px;
}
.cart-title {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--choc);
  margin-bottom: 12px;
}
.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
  color: var(--text);
}
.cart-item:last-child { border-bottom: none; }
.cart-item-label { flex: 1; padding-right: 8px; }
.remove-btn {
  color: #C0503A;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 700;
  margin-left: 10px;
  line-height: 1;
  transition: transform 0.15s, color 0.15s;
}
.remove-btn:hover { transform: scale(1.3); color: #A03020; }
.cart-total {
  text-align: right;
  font-weight: 700;
  color: var(--choc);
  margin-top: 12px;
  font-size: 1rem;
  padding-top: 10px;
  border-top: 1.5px solid var(--border);
}
.cart-total span { color: var(--caramel); font-family: 'Fraunces', serif; }

/* ── Delivery total line ─────────────────────────────────── */
.cart-fee-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.84rem;
  color: var(--muted);
  margin-top: 6px;
  padding-top: 6px;
}
.cart-grand-line {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 1rem;
  color: var(--choc);
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1.5px solid var(--border);
}
.cart-grand-line span { color: var(--caramel); font-family: 'Fraunces', serif; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn-add {
  background: var(--choc-mid);
  color: white;
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  margin-top: 16px;
  transition: background 0.2s, transform 0.15s;
}
.btn-add:hover { background: var(--choc); transform: translateY(-1px); }

.btn-submit {
  background: var(--choc);
  color: var(--cream);
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 12px;
  font-family: 'Fraunces', serif;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.2px;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 16px rgba(59,31,14,0.22);
}
.btn-submit:hover {
  background: var(--choc-mid);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(59,31,14,0.30);
}
.btn-submit:disabled {
  background: #C5C0B8;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ── Footer ──────────────────────────────────────────────── */
.footer {
  margin-top: 32px;
  text-align: center;
  font-size: 0.76rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-ig {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--caramel);
  font-weight: 600;
  text-decoration: none;
}
.footer-ig:hover { text-decoration: underline; }

/* ── Animations ──────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Order Closed Banner ─────────────────────────────────── */
.closed-banner {
  padding: 32px 28px;
  text-align: center;
  border-top: 1px solid var(--border);
  animation: fadeUp 0.5s ease both;
}
.closed-icon  { font-size: 2.6rem; margin-bottom: 10px; }
.closed-title {
  font-family: 'Fraunces', serif;
  font-size: 1.4rem;
  color: var(--choc);
  margin-bottom: 10px;
}
.closed-msg {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.65;
  max-width: 320px;
  margin: 0 auto 12px;
}
.closed-next {
  display: inline-block;
  margin-top: 4px;
  padding: 7px 14px;
  background: #FFF8E6;
  border: 1.5px solid var(--caramel-lt);
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--choc-mid);
}

/* ── Mobile tweaks ───────────────────────────────────────── */
@media (max-width: 420px) {
  .card-section { padding: 22px 18px; }
  .brand-name   { font-size: 1.9rem; }
  body          { padding: 24px 12px 60px; }
}
