/* Exótico Coffee — Volcanic Theme
 * Shared design tokens. Import on every page.
 */

:root {
  /* Core palette */
  --noir:     #0f0d0b;  /* volcanic black, deepest surface */
  --espresso: #2a1810;  /* darkest roast */
  --bark:     #3d2817;  /* rich brown */
  --cream:    #f4ecd8;  /* primary background */
  --ivory:    #faf6ec;  /* elevated surfaces */
  --ash:      #e8dfc9;  /* soft borders */
  --ember:    #d4562a;  /* primary accent — volcanic glow */
  --ember-d:  #b94620;  /* accent hover */
  --moss:     #5a6b4d;  /* secondary accent — jungle */
  --clay:     #a67458;  /* warm neutral */
  --smoke:    #6b5f50;  /* muted body text */

  /* Legacy token aliases — keep mega-menu.css compatible */
  --argent:    var(--ash);
  --charbon:   var(--espresso);
  --or:        var(--ember);
  --parchment: var(--ivory);
  --sage:      var(--moss);
  --dor:       var(--clay);

  /* Type */
  --font-display: 'Fraunces', 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--espresso);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Shared toast for cart notifications */
.cart-notification {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translate(-50%, 100px);
  background: var(--noir);
  color: var(--cream);
  padding: 0.9rem 1.8rem;
  border-radius: 999px;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 9999;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}
.cart-notification.show {
  transform: translate(-50%, 0);
  opacity: 1;
}

/* Shared header primitives */
.ex-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(244, 236, 216, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(232, 223, 201, 0.6);
  transition: all 0.3s ease;
}
.ex-header.scrolled {
  background: rgba(244, 236, 216, 0.98);
  box-shadow: 0 2px 20px rgba(15, 13, 11, 0.04);
}
.ex-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 5%;
  max-width: 1600px;
  margin: 0 auto;
}
.ex-logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--noir);
  text-decoration: none;
  text-transform: uppercase;
}
.ex-logo-mark {
  font-weight: 300;
  color: var(--ember);
}

.ex-nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}
.ex-nav-links a {
  text-decoration: none;
  color: var(--espresso);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  position: relative;
  padding: 0.3rem 0;
  transition: color 0.2s ease;
}
.ex-nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 1px;
  background: var(--ember);
  transition: width 0.3s ease;
}
.ex-nav-links a:hover::after,
.ex-nav-links a.active::after { width: 100%; }
.ex-nav-links a:hover { color: var(--ember); }

.ex-nav-icons {
  display: flex;
  gap: 1.4rem;
  align-items: center;
}
.ex-icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--espresso);
  padding: 0.4rem;
  position: relative;
  transition: color 0.2s ease;
}
.ex-icon-btn:hover { color: var(--ember); }
.ex-icon-btn svg { width: 20px; height: 20px; display: block; }
.cart-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--ember);
  color: var(--cream);
  font-size: 0.65rem;
  font-weight: 600;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  font-family: var(--font-body);
}

/* Shared footer */
.ex-footer {
  background: var(--noir);
  color: var(--cream);
  padding: 5rem 5% 2.5rem;
}
.ex-footer-grid {
  max-width: 1600px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(244, 236, 216, 0.12);
}
.ex-footer h4 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  color: var(--ember);
}
.ex-footer ul { list-style: none; display: flex; flex-direction: column; gap: 0.75rem; }
.ex-footer a {
  color: rgba(244, 236, 216, 0.7);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s ease;
}
.ex-footer a:hover { color: var(--ember); }
.ex-footer-brand p {
  font-size: 0.9rem;
  line-height: 1.8;
  color: rgba(244, 236, 216, 0.65);
  max-width: 32ch;
  margin-top: 1rem;
}
.ex-footer-brand .ex-logo {
  color: var(--cream);
  font-size: 1.6rem;
}
.ex-footer-bottom {
  max-width: 1600px;
  margin: 2.5rem auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: rgba(244, 236, 216, 0.5);
  letter-spacing: 0.1em;
}

/* Mobile nav */
.ex-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 0.5rem;
}
.ex-menu-toggle span {
  width: 22px;
  height: 1.5px;
  background: var(--noir);
  transition: all 0.3s ease;
}
.ex-menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(4px, 5px); }
.ex-menu-toggle.active span:nth-child(2) { opacity: 0; }
.ex-menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }

.ex-mobile-menu {
  position: fixed;
  top: 64px; left: 0; right: 0; bottom: 0;
  background: var(--cream);
  z-index: 999;
  padding: 2rem;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: none;
}
.ex-mobile-menu.active { display: block; transform: translateX(0); }
.ex-mobile-menu a {
  display: block;
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--ash);
  color: var(--noir);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.3rem;
  letter-spacing: 0.05em;
}

@media (max-width: 900px) {
  .ex-nav-links { display: none; }
  .ex-menu-toggle { display: flex; }
  .ex-footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .ex-footer-bottom { flex-direction: column; gap: 1rem; }
}
@media (max-width: 560px) {
  .ex-footer-grid { grid-template-columns: 1fr; }
}
