/* ============================
   Amy's Bakes — Global Styles
   Navy & Gold Artisan Theme
   ============================ */

@import url('https://fonts.googleapis.com/css2?family=Pinyon+Script&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Lato:wght@300;400;700&display=swap');

/* ── CSS Variables ── */
:root {
  --navy:        #1a2540;
  --navy-dark:   #111827;
  --navy-mid:    #1e2d4d;
  --navy-light:  #243358;
  --gold:        #c9a843;
  --gold-light:  #e0bf6a;
  --gold-dark:   #a07b28;
  --gold-glow:   rgba(201, 168, 67, 0.25);
  --cream:       #f5edd6;
  --cream-soft:  #f0e4c0;
  --text-light:  #d4c99a;
  --white:       #ffffff;

  --font-script:  'Pinyon Script', cursive;
  --font-serif:   'Playfair Display', serif;
  --font-body:    'Lato', sans-serif;

  --border-radius: 4px;
  --transition:    0.3s ease;
  --shadow-gold:   0 4px 30px rgba(201, 168, 67, 0.18);
  --shadow-card:   0 8px 40px rgba(0,0,0,0.45);
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background-color: var(--navy);
  color: var(--cream);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.7;
  min-height: 100vh;
}

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

a { color: var(--gold); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold-light); }

/* ── Ornate Border Utility ── */
.ornate-border {
  position: relative;
  border: 1.5px solid var(--gold-dark);
  border-radius: var(--border-radius);
}
.ornate-border::before {
  content: '';
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(201,168,67,0.3);
  border-radius: var(--border-radius);
  pointer-events: none;
}

/* ── Filigree Corner SVG Utility ── */
.filigree-corner {
  position: absolute;
  width: 60px;
  height: 60px;
  opacity: 0.65;
  color: var(--gold);
}
.filigree-corner.tl { top: -2px; left: -2px; }
.filigree-corner.tr { top: -2px; right: -2px; transform: scaleX(-1); }
.filigree-corner.bl { bottom: -2px; left: -2px; transform: scaleY(-1); }
.filigree-corner.br { bottom: -2px; right: -2px; transform: scale(-1); }

/* ── Navigation ── */
.navbar {
  position: sticky;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 2.5rem;
  height: 80px;
  background: linear-gradient(180deg, rgba(17,24,39,0.98) 0%, rgba(26,37,64,0.95) 100%);
  border-bottom: 1px solid rgba(201,168,67,0.3);
  backdrop-filter: blur(12px);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  z-index: 1001;
}
.navbar-brand-text {
  font-family: var(--font-script);
  font-size: 2.6rem;
  font-weight: 400;
  color: var(--gold);
  line-height: 1;
  text-shadow: 0 0 15px rgba(201,168,67,0.4);
  margin-top: 0.2rem;
  transition: all var(--transition);
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.navbar-brand:hover .navbar-brand-text {
  color: var(--gold-light);
  text-decoration-color: var(--gold-light);
  text-shadow: 0 0 25px rgba(201,168,67,0.7);
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  list-style: none;
  justify-self: center;
}
.navbar-nav a {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-light);
  transition: color var(--transition);
  position: relative;
}
.navbar-nav a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform var(--transition);
}
.navbar-nav a:hover,
.navbar-nav a.active { color: var(--gold); }
.navbar-nav a:hover::after,
.navbar-nav a.active::after { transform: scaleX(1); }

.navbar-cart {
  position: relative;
  background: none;
  border: 1.5px solid var(--gold-dark);
  color: var(--gold);
  width: 40px; height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  transition: all var(--transition);
}
.navbar-cart:hover { background: var(--gold-glow); border-color: var(--gold); }
.nav-icon-svg {
  width: 20px;
  height: 20px;
  stroke: var(--gold);
  transition: stroke var(--transition);
}
.navbar-cart:hover .nav-icon-svg {
  stroke: var(--gold-light);
}
.cart-badge {
  position: absolute;
  top: -4px; right: -4px;
  background: var(--gold);
  color: var(--navy-dark);
  font-size: 0.65rem;
  font-weight: 700;
  width: 18px; height: 18px;
  border-radius: 50%;
  align-items: center; justify-content: center;
  display: none;
}
.cart-badge.has-items { display: flex; }

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-self: end;
}
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--gold);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ── Page Wrapper ── */
.page-wrapper { padding-top: 0; }

/* ── Gold Section Divider ── */
.section-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 2rem auto;
  max-width: 340px;
}
.section-divider hr {
  flex: 1;
  border: none;
  border-top: 1px solid var(--gold-dark);
}
.section-divider .divider-icon { color: var(--gold); font-size: 1.1rem; }

/* ── Section Headers ── */
.section-header { text-align: center; margin-bottom: 3rem; }
.section-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 0.5rem;
}
.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--gold-light);
  line-height: 1.25;
  margin-bottom: 0.75rem;
}
.section-subtitle {
  font-size: 0.95rem;
  color: var(--text-light);
  max-width: 520px;
  margin: 0 auto;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 2rem;
  border-radius: var(--border-radius);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold), var(--gold-light));
  color: var(--navy-dark);
  box-shadow: 0 4px 20px rgba(201,168,67,0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(201,168,67,0.5);
  color: var(--navy-dark);
}
.btn-outline {
  background: transparent;
  color: var(--gold);
  border: 1.5px solid var(--gold-dark);
}
.btn-outline:hover {
  background: var(--gold-glow);
  border-color: var(--gold);
  color: var(--gold-light);
}
.btn-ghost {
  background: transparent;
  color: var(--cream);
  border: 1px solid rgba(255,255,255,0.2);
}
.btn-ghost:hover { background: rgba(255,255,255,0.15); color: var(--white); }

/* ── Container ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 5rem 0; }

/* ── Footer ── */
footer {
  background: var(--navy-dark);
  border-top: 1px solid rgba(201,168,67,0.25);
  padding: 3rem 0 1.5rem;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2rem;
}
.footer-brand .brand-name {
  font-family: var(--font-script);
  font-size: 2.8rem;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 0.75rem;
}
.footer-brand p { font-size: 0.85rem; color: var(--text-light); }
.footer-heading {
  font-family: var(--font-serif);
  font-size: 0.85rem;
  color: var(--gold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a { font-size: 0.88rem; color: var(--text-light); }
.footer-links a:hover { color: var(--gold); }
.footer-contact-item { font-size: 0.88rem; color: var(--text-light); margin-bottom: 0.4rem; display: flex; align-items: flex-start; gap: 0.5rem; }
.footer-contact-item span.ico { color: var(--gold); margin-top: 2px; }
.footer-bottom {
  border-top: 1px solid rgba(201,168,67,0.15);
  padding-top: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: rgba(212,201,154,0.5);
}
.footer-bottom .cat { color: var(--gold); }

/* ── Toast Notification ── */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: linear-gradient(135deg, var(--navy-light), var(--navy-mid));
  border: 1px solid var(--gold-dark);
  color: var(--cream);
  padding: 1rem 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-gold);
  font-size: 0.9rem;
  z-index: 9999;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 320px;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast-icon { color: var(--gold); font-size: 1.1rem; }

/* ── Cart Drawer ── */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,15,30,0.75);
  z-index: 2000;
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.cart-overlay.open { opacity: 1; pointer-events: all; }

.cart-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(420px, 100vw);
  background: var(--navy-dark);
  border-left: 1px solid rgba(201,168,67,0.25);
  z-index: 2100;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
  box-shadow: -8px 0 40px rgba(0,0,0,0.5);
}
.cart-drawer.open { transform: translateX(0); }

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid rgba(201,168,67,0.2);
}
.cart-header h2 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--gold-light);
}
.cart-close {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 1.3rem;
  cursor: pointer;
  transition: color var(--transition);
}
.cart-close:hover { color: var(--gold); }

.cart-items { flex: 1; overflow-y: auto; padding: 1rem 1.5rem; }
.cart-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-light);
}
.cart-empty .empty-icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.4; }
.cart-empty p { font-size: 0.9rem; }

.cart-item {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.cart-item img {
  width: 72px; height: 72px;
  object-fit: cover;
  border-radius: var(--border-radius);
  border: 1px solid rgba(201,168,67,0.2);
}
.cart-item-info { flex: 1; }
.cart-item-name { font-family: var(--font-serif); font-size: 0.95rem; color: var(--cream); margin-bottom: 0.2rem; }
.cart-item-price { font-size: 0.85rem; color: var(--gold); font-weight: 700; }
.cart-item-controls { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.5rem; }
.qty-btn {
  background: rgba(201,168,67,0.1);
  border: 1px solid var(--gold-dark);
  color: var(--gold);
  width: 26px; height: 26px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.9rem;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.qty-btn:hover { background: var(--gold-glow); }
.qty-display { font-size: 0.9rem; color: var(--cream); min-width: 20px; text-align: center; }
.cart-item-remove { margin-left: auto; background: none; border: none; color: rgba(255,100,100,0.5); cursor: pointer; font-size: 0.85rem; transition: color var(--transition); }
.cart-item-remove:hover { color: rgba(255,100,100,0.9); }

.cart-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid rgba(201,168,67,0.2);
}
.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-family: var(--font-serif);
  font-size: 1.05rem;
}
.cart-total-amount { color: var(--gold-light); font-weight: 700; font-size: 1.2rem; }

/* ── Checkout Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,15,30,0.85);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
  backdrop-filter: blur(6px);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--navy-dark);
  border: 1px solid rgba(201,168,67,0.3);
  border-radius: 8px;
  width: min(560px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  transform: scale(0.92);
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
.modal-overlay.open .modal { transform: scale(1); }
.modal-header {
  padding: 1.75rem 1.75rem 1rem;
  border-bottom: 1px solid rgba(201,168,67,0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-header h2 { font-family: var(--font-serif); font-size: 1.4rem; color: var(--gold-light); }
.modal-close { background: none; border: none; color: var(--text-light); font-size: 1.3rem; cursor: pointer; transition: color var(--transition); }
.modal-close:hover { color: var(--gold); }
.modal-body { padding: 1.75rem; }

/* ── Forms ── */
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 0.4rem;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(201,168,67,0.25);
  border-radius: var(--border-radius);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--gold-dark);
  box-shadow: 0 0 0 3px var(--gold-glow);
}
.form-group textarea { resize: vertical; min-height: 110px; }
.form-group select { appearance: none; cursor: pointer; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ── Success State ── */
.success-state {
  text-align: center;
  padding: 2rem;
}
.success-state .success-icon {
  font-size: 3.5rem;
  color: var(--gold);
  margin-bottom: 1rem;
  animation: scaleIn 0.5s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes scaleIn {
  from { transform: scale(0); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.success-state h3 { font-family: var(--font-serif); font-size: 1.5rem; color: var(--gold-light); margin-bottom: 0.5rem; }
.success-state p { color: var(--text-light); font-size: 0.92rem; }

/* ── Scroll Animations ── */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Construction Banner ── */
.construction-banner {
  background: var(--gold-dark);
  color: var(--navy-dark);
  text-align: center;
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  position: relative;
  z-index: 1100;
}
.construction-banner strong { text-transform: uppercase; margin-right: 0.5rem; }

/* ── Footer Link ── */
.footer-credit {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.footer-credit a {
  color: var(--gold);
  font-weight: 700;
  text-decoration: underline;
}
.footer-credit a:hover {
  color: var(--gold-light);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .navbar { 
    display: flex; 
    justify-content: space-between; 
    padding: 0 1.25rem; 
    height: 70px;
  }
  .navbar-brand-text { font-size: 1.6rem; }
  .construction-banner { font-size: 0.72rem; padding: 0.4rem 1rem; }
  .navbar-nav { 
    display: none; 
    flex-direction: column; 
    position: fixed; 
    top: 100px; 
    left: 0; right: 0; 
    background: rgba(17,24,39,0.98); 
    padding: 1.5rem; 
    gap: 1.25rem; 
    border-bottom: 1px solid rgba(201,168,67,0.2); 
  }
  .navbar-nav.open { display: flex; }
  .hamburger { display: flex; }
  .footer-inner { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
  .footer-credit { margin: 0.5rem auto 0; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .navbar-brand-text { font-size: 1.6rem; }
  .navbar-actions { gap: 0.75rem; }
  .navbar-cart { width: 36px; height: 36px; font-size: 0.9rem; }
}
