/* ═══════════════════════════════════════════════
   HIGHLAND ROASTERY — GLOBAL STYLES
   global.css
═══════════════════════════════════════════════ */

/* ─── RESET ─── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--ivory);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  overflow-x: hidden;
  cursor: none;
}
img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; }

/* ─── CSS VARIABLES ─── */
:root {
  --ivory:      #FAF6EF;
  --cream:      #F2EAD8;
  --parchment:  #E8DCC8;
  --linen:      #EDE4D3;
  --brown:      #2A1506;
  --espresso:   #3D1F0A;
  --roast:      #5C2D0F;
  --bark:       #7A3E18;
  --gold:       #A67C2A;
  --gold-mid:   #C4952E;
  --gold-bright:#D4A843;
  --text:       #2A1506;
  --text-mid:   #5C3A1E;
  --text-light: rgba(42,21,6,0.50);
  --text-muted: rgba(42,21,6,0.35);
  --border:     rgba(42,21,6,0.10);
  --border-gold:rgba(166,124,42,0.25);
  --success:    #2D6A4F;
  --danger:     #C0392B;
  --warning:    #D68910;
  --shadow:     0 4px 24px rgba(42,21,6,0.08);
  --shadow-lg:  0 12px 48px rgba(42,21,6,0.14);
  --nav-height: 72px;
  --radius:     0px;
}

/* ─── TYPOGRAPHY ─── */
.serif { font-family: 'Playfair Display', serif; }
.sec-label {
  font-size: 0.6rem;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.6rem;
  font-weight: 400;
  display: block;
}
.sec-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 400;
  line-height: 1.18;
  color: var(--brown);
}
.sec-title em { font-style: italic; color: var(--roast); }
.body-text { color: var(--text-mid); line-height: 1.9; font-size: 0.92rem; }

/* ─── BUTTONS ─── */
.btn {
  border: none;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: all 0.25s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.btn-primary  { background: var(--brown);    color: var(--ivory); padding: 0.9rem 2.2rem; font-size: 0.72rem; }
.btn-primary:hover  { background: var(--espresso); transform: translateY(-1px); }
.btn-gold     { background: var(--gold-mid); color: var(--ivory); padding: 0.9rem 2.2rem; font-size: 0.72rem; }
.btn-gold:hover     { background: var(--gold-bright); transform: translateY(-1px); }
.btn-outline  { background: transparent; color: var(--brown); border: 1px solid var(--border-gold); padding: 0.85rem 2rem; font-size: 0.7rem; }
.btn-outline:hover  { background: var(--brown); color: var(--ivory); border-color: var(--brown); }
.btn-ghost    { background: rgba(250,246,239,0.12); color: #FAF6EF; border: 1px solid rgba(250,246,239,0.4); padding: 0.9rem 2.2rem; font-size: 0.72rem; }
.btn-ghost:hover    { background: rgba(250,246,239,0.22); }
.btn-sm       { padding: 0.55rem 1.2rem !important; font-size: 0.62rem !important; }
.btn-danger   { background: var(--danger); color: #fff; padding: 0.55rem 1.2rem; font-size: 0.62rem; }
.btn-success  { background: var(--success); color: #fff; padding: 0.55rem 1.2rem; font-size: 0.62rem; }

/* ─── FORMS ─── */
.input {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--ivory);
  padding: 0.78rem 1rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem;
  color: var(--text);
  outline: none;
  transition: border 0.2s;
  border-radius: 0;
}
.input:focus { border-color: var(--gold-mid); }
.input::placeholder { color: var(--text-muted); }
.select {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--ivory);
  padding: 0.78rem 1rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem;
  color: var(--text);
  outline: none;
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23A67C2A' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}
.label {
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  display: block;
}
.form-group  { margin-bottom: 1rem; }
.form-grid   { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ─── BADGES ─── */
.badge {
  display: inline-block;
  padding: 0.22rem 0.75rem;
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border-radius: 20px;
  font-weight: 500;
}
.badge-gold    { background: rgba(196,149,46,0.12); color: var(--gold-mid); border: 1px solid var(--border-gold); }
.badge-green   { background: rgba(45,106,79,0.1);   color: var(--success); }
.badge-red     { background: rgba(192,57,43,0.1);   color: var(--danger); }
.badge-brown   { background: var(--brown);           color: var(--ivory); }
.badge-warning { background: rgba(214,137,16,0.1);  color: var(--warning); }

/* ─── LAYOUT HELPERS ─── */
.container     { max-width: 1400px; margin: 0 auto; padding: 0 3rem; }
.divider       { height: 1px; background: var(--border); margin: 1.5rem 0; }
.card          { background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow); }
.text-center   { text-align: center; }
.flex          { display: flex; }
.flex-col      { flex-direction: column; }
.items-center  { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1         { gap: 0.5rem; }
.gap-2         { gap: 1rem; }
.gap-3         { gap: 1.5rem; }
.mt-1          { margin-top: 0.5rem; }
.mt-2          { margin-top: 1rem; }
.mt-3          { margin-top: 1.5rem; }
.mt-4          { margin-top: 2rem; }
.mb-2          { margin-bottom: 1rem; }
.mb-3          { margin-bottom: 1.5rem; }
.hidden        { display: none !important; }
.w-full        { width: 100%; }

/* ─── CUSTOM CURSOR ─── */
.cursor {
  position: fixed; width: 7px; height: 7px;
  background: var(--gold); border-radius: 50%;
  pointer-events: none; z-index: 9999;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s;
}
.cursor-ring {
  position: fixed; width: 32px; height: 32px;
  border: 1px solid rgba(166,124,42,0.4); border-radius: 50%;
  pointer-events: none; z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s, opacity 0.3s;
}
.cursor-ring.expand { width: 54px; height: 54px; opacity: 0.3; }

/* ─── NAV ─── */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 800;
  background: rgba(250,246,239,0.97);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  height: var(--nav-height);
}
.nav-inner {
  max-width: 1400px; margin: 0 auto;
  padding: 0 3rem; height: 100%;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { display: flex; flex-direction: column; cursor: pointer; text-decoration: none; }
.nav-logo-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem; font-weight: 700;
  letter-spacing: 0.2em; color: var(--brown); text-transform: uppercase; line-height: 1;
}
.nav-logo-sub { font-size: 0.5rem; letter-spacing: 0.42em; color: var(--gold); text-transform: uppercase; margin-top: 3px; }
.nav-links { display: flex; gap: 2.2rem; list-style: none; align-items: center; }
.nav-links a {
  color: var(--text-mid); text-decoration: none;
  font-size: 0.68rem; letter-spacing: 0.15em; text-transform: uppercase;
  transition: color 0.3s; font-weight: 400; cursor: pointer;
}
.nav-links a:hover, .nav-links a.active { color: var(--gold); }
.nav-actions { display: flex; align-items: center; gap: 0.8rem; }
.cart-btn {
  position: relative; background: var(--brown); color: var(--ivory);
  border: none; padding: 0.6rem 1.3rem; cursor: pointer;
  font-family: 'DM Sans', sans-serif; font-size: 0.68rem;
  letter-spacing: 0.15em; text-transform: uppercase;
  display: flex; align-items: center; gap: 0.5rem; transition: background 0.3s;
}
.cart-btn:hover { background: var(--espresso); }
.cart-count {
  background: var(--gold-mid); color: #fff;
  border-radius: 50%; width: 18px; height: 18px;
  font-size: 0.55rem; display: flex; align-items: center;
  justify-content: center; font-weight: 700;
  position: absolute; top: -6px; right: -6px;
}

/* ─── TICKER ─── */
.ticker { background: var(--brown); padding: 0.78rem 0; overflow: hidden; }
.ticker-track { display: flex; white-space: nowrap; animation: marquee 26s linear infinite; }
.ticker-item {
  display: inline-flex; align-items: center; gap: 1.5rem;
  padding: 0 1.5rem;
  font-size: 0.6rem; letter-spacing: 0.38em; text-transform: uppercase;
  font-weight: 400; color: rgba(250,246,239,0.65); flex-shrink: 0;
}
.ticker-item::after { content: '◆'; color: var(--gold-mid); font-size: 0.4rem; }

/* ─── CART DRAWER ─── */
.cart-overlay {
  position: fixed; inset: 0; background: rgba(42,21,6,0.4);
  z-index: 900; opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.cart-overlay.open { opacity: 1; pointer-events: all; }
.cart-drawer {
  position: fixed; right: -490px; top: 0; bottom: 0;
  width: 490px; max-width: 95vw;
  background: var(--ivory); z-index: 901;
  transition: right 0.35s cubic-bezier(0.25,0.46,0.45,0.94);
  display: flex; flex-direction: column;
  border-left: 1px solid var(--border);
}
.cart-drawer.open { right: 0; }
.cart-header {
  padding: 1.4rem 2rem; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; flex-shrink: 0;
}
.cart-title { font-family: 'Playfair Display', serif; font-size: 1.3rem; font-weight: 500; color: var(--brown); }
.cart-close { background: none; border: none; font-size: 1.3rem; cursor: pointer; color: var(--text-light); transition: color 0.2s; }
.cart-close:hover { color: var(--brown); }
.cart-body { flex: 1; overflow-y: auto; padding: 1.5rem 2rem; }
.cart-empty { text-align: center; padding: 4rem 1rem; color: var(--text-muted); }
.cart-empty-icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.4; }
.cart-item { display: flex; gap: 1rem; padding: 1.2rem 0; border-bottom: 1px solid var(--border); }
.cart-item-img { width: 68px; height: 68px; object-fit: cover; flex-shrink: 0; border: 1px solid var(--border); }
.cart-item-info { flex: 1; }
.cart-item-name { font-family: 'Playfair Display', serif; font-size: 0.93rem; color: var(--brown); font-weight: 500; }
.cart-item-variant { font-size: 0.63rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--text-muted); margin-top: 0.2rem; }
.cart-item-price { font-size: 0.9rem; color: var(--roast); font-weight: 500; margin-top: 0.4rem; }
.cart-item-controls { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.6rem; }
.cart-remove { background: none; border: none; color: var(--danger); font-size: 0.68rem; cursor: pointer; letter-spacing: 0.12em; text-transform: uppercase; padding: 0; font-family: 'DM Sans', sans-serif; transition: opacity 0.2s; }
.cart-remove:hover { opacity: 0.7; }
.cart-footer { padding: 1.5rem 2rem; border-top: 1px solid var(--border); flex-shrink: 0; background: #fff; }
.cart-subtotal { display: flex; justify-content: space-between; margin-bottom: 0.5rem; font-size: 0.85rem; color: var(--text-mid); }
.cart-total { display: flex; justify-content: space-between; margin-bottom: 1.4rem; padding-top: 0.8rem; border-top: 1px solid var(--border); }
.cart-total-label { font-family: 'Playfair Display', serif; font-size: 1.1rem; color: var(--brown); }
.cart-total-val   { font-family: 'Playfair Display', serif; font-size: 1.3rem; color: var(--roast); font-weight: 500; }
.free-delivery-notice {
  background: rgba(45,106,79,0.07); border: 1px solid rgba(45,106,79,0.2);
  padding: 0.65rem 1rem; margin-bottom: 1rem;
  font-size: 0.75rem; color: var(--success); text-align: center;
}

/* ─── QTY CONTROL ─── */
.qty-ctrl { display: flex; align-items: center; gap: 0.5rem; }
.qty-btn {
  width: 28px; height: 28px; border: 1px solid var(--border-gold);
  background: transparent; cursor: pointer; font-size: 1rem;
  color: var(--gold); display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.qty-btn:hover { background: var(--gold); color: #fff; border-color: var(--gold); }
.qty-display { font-size: 0.9rem; font-weight: 500; min-width: 20px; text-align: center; }

/* ─── TOAST ─── */
.toast-container { position: fixed; bottom: 2rem; right: 2rem; z-index: 9999; display: flex; flex-direction: column; gap: 0.6rem; }
.toast {
  background: var(--brown); color: var(--ivory);
  padding: 0.9rem 1.4rem; font-size: 0.82rem;
  border-left: 4px solid var(--gold-mid);
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease;
  max-width: 320px; line-height: 1.5;
}
.toast.success { border-left-color: var(--success); }
.toast.error   { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }

/* ─── MODAL ─── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(42,21,6,0.5);
  z-index: 2000; display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.3s; padding: 2rem;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal { background: var(--ivory); max-width: 620px; width: 100%; max-height: 90vh; overflow-y: auto; border: 1px solid var(--border); }
.modal-header { padding: 1.4rem 2rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; background: var(--ivory); z-index: 1; }
.modal-header h3 { font-family: 'Playfair Display', serif; font-size: 1.15rem; color: var(--brown); }
.modal-body   { padding: 2rem; }
.modal-footer { padding: 1.2rem 2rem; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 0.8rem; background: #fff; }
.modal-close  { background: none; border: none; font-size: 1.3rem; cursor: pointer; color: var(--text-light); }

/* ─── FOOTER ─── */
.site-footer { background: var(--espresso); padding: 5rem 0 2.5rem; border-top: 1px solid rgba(250,246,239,0.08); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 4rem; margin-bottom: 4rem; padding-bottom: 4rem; border-bottom: 1px solid rgba(250,246,239,0.08); }
.footer-brand-name { font-family: 'Playfair Display', serif; font-size: 1.4rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-bright); margin-bottom: 0.4rem; }
.footer-tagline { font-family: 'Playfair Display', serif; font-style: italic; font-size: 0.85rem; color: rgba(212,168,67,0.5); margin-bottom: 1rem; }
.footer-desc { font-size: 0.8rem; color: rgba(250,246,239,0.35); line-height: 1.8; }
.footer-col-title { font-size: 0.58rem; letter-spacing: 0.42em; text-transform: uppercase; color: var(--gold-mid); margin-bottom: 1.4rem; display: block; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.7rem; }
.footer-links a { color: rgba(250,246,239,0.4); text-decoration: none; font-size: 0.8rem; transition: color 0.3s; }
.footer-links a:hover { color: var(--gold-bright); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; font-size: 0.65rem; color: rgba(250,246,239,0.2); letter-spacing: 0.1em; }

/* ─── ANIMATIONS ─── */
@keyframes fadeUp   { from { opacity:0; transform:translateY(22px); } to { opacity:1; transform:translateY(0); } }
@keyframes marquee  { from { transform:translateX(0); } to { transform:translateX(-50%); } }
@keyframes toastIn  { from { opacity:0; transform:translateX(20px); } to { opacity:1; transform:translateX(0); } }
@keyframes spin     { to { transform: rotate(360deg); } }
@keyframes fadeIn   { from { opacity:0; } to { opacity:1; } }

.spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff; border-radius: 50%; animation: spin 0.7s linear infinite; }
.anim-fade-up { animation: fadeUp 0.9s ease forwards; opacity: 0; }

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) { .container { padding: 0 2rem; } .footer-grid { grid-template-columns: 1fr 1fr; gap: 2.5rem; } }
@media (max-width: 768px)  { .nav-links { display: none; } .container { padding: 0 1.5rem; } .form-grid { grid-template-columns: 1fr; } .footer-grid { grid-template-columns: 1fr; gap: 2rem; } }
