/* ==========================================================================
   MYRTLE'S OILS AND MORE — CORE MAIN STYLESHEET
   Header, Navigation, Footer, Cart Drawer, Buttons & Utilities
   ========================================================================== */

/* 1. Global Reset & Box Sizing */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-black-700);
  background-color: var(--color-cream-100);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img, svg, picture {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: none;
  cursor: pointer;
}

/* Accessibility Focus Ring */
:focus-visible {
  outline: 3px solid var(--color-gold-500);
  outline-offset: 3px;
}

/* Typography Defaults */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--color-black-900);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.015em;
}

p {
  margin-bottom: var(--space-md);
  max-width: 72ch;
}

p:last-child {
  margin-bottom: 0;
}

.text-gold { color: var(--color-gold-600); }
.text-green { color: var(--color-green-700); }
.text-amber { color: var(--color-amber-700); }
.text-muted { color: var(--color-black-500); }

/* Containers */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}

.container-narrow {
  width: 100%;
  max-width: var(--container-narrow);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}

/* Section Spacing */
.section {
  padding-top: clamp(3rem, 6vw, var(--space-3xl));
  padding-bottom: clamp(3rem, 6vw, var(--space-3xl));
  position: relative;
}

.section-sand {
  background-color: var(--color-sand-200);
}

.section-cream {
  background-color: var(--color-cream-200);
}

.section-white {
  background-color: var(--color-white);
}

.section-dark {
  background-color: var(--color-black-900);
  color: var(--color-cream-100);
}

.section-dark h1, .section-dark h2, .section-dark h3 {
  color: var(--color-white);
}

/* Section Headings */
.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto var(--space-2xl) auto;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-green-700);
  background: var(--color-green-100);
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-pill);
  margin-bottom: var(--space-sm);
}

.section-tag-gold {
  color: #8A6400;
  background: var(--color-gold-100);
}

.section-title {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-sm);
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--color-black-600);
  margin: 0 auto;
}

.section-dark .section-subtitle {
  color: #B5B0A8;
}

/* --------------------------------------------------
   2. Buttons & Badges
   -------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  font-weight: 600;
  font-size: var(--text-sm);
  border-radius: var(--radius-pill);
  transition: all var(--transition-normal);
  white-space: nowrap;
  line-height: 1.2;
}

.btn-primary {
  background: var(--color-gold-gradient);
  color: var(--color-black-900);
  box-shadow: 0 4px 12px rgba(245, 184, 0, 0.28);
}

.btn-primary:hover {
  background: var(--color-gold-600);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.btn-green {
  background: var(--color-green-700);
  color: var(--color-white);
  box-shadow: 0 4px 12px rgba(46, 125, 50, 0.25);
}

.btn-green:hover {
  background: var(--color-green-800);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(46, 125, 50, 0.35);
}

.btn-outline {
  border: 2px solid var(--color-black-900);
  color: var(--color-black-900);
  background: transparent;
}

.btn-outline:hover {
  background: var(--color-black-900);
  color: var(--color-cream-100);
  transform: translateY(-2px);
}

.btn-outline-white {
  border: 2px solid var(--color-white);
  color: var(--color-white);
  background: transparent;
}

.btn-outline-white:hover {
  background: var(--color-white);
  color: var(--color-black-900);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: var(--text-xs);
}

.btn-lg {
  padding: 1rem 2.25rem;
  font-size: var(--text-base);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: var(--text-xs);
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
}

.badge-gold {
  background-color: var(--color-gold-100);
  color: #7E5B00;
}

.badge-green {
  background-color: var(--color-green-100);
  color: var(--color-green-900);
}

/* --------------------------------------------------
   3. Site Header & Navigation Bar
   -------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(250, 248, 245, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 100;
  border-bottom: 1px solid var(--color-border);
  transition: all var(--transition-normal);
}

.site-header.scrolled {
  background-color: rgba(250, 248, 245, 0.98);
  box-shadow: 0 4px 16px rgba(26, 26, 26, 0.06);
}

/* Top Notification / Trust Bar */
.top-notice-bar {
  background-color: var(--color-green-900);
  color: var(--color-cream-100);
  font-size: var(--text-xs);
  padding: 0.4rem 1rem;
  text-align: center;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.top-notice-bar span {
  color: var(--color-gold-500);
  font-weight: 700;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  gap: var(--space-md);
}

/* Brand Logo */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-black-900);
}

.brand-logo img {
  height: 52px;
  width: auto;
  object-fit: contain;
}

.brand-logo-text {
  display: flex;
  flex-direction: column;
}

.brand-logo-name {
  font-size: 1.15rem;
  line-height: 1.1;
  color: var(--color-green-900);
}

.brand-logo-sub {
  font-family: var(--font-body);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-amber-700);
  font-weight: 600;
}

/* Navigation Links */
.nav-menu {
  display: none;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}

@media (min-width: 992px) {
  .nav-menu {
    display: flex;
  }
}

.nav-link {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-black-700);
  position: relative;
  padding: 0.5rem 0;
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-green-700);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2.5px;
  background-color: var(--color-gold-500);
  border-radius: var(--radius-pill);
}

/* Nav Actions (Currency, Cart, Mobile Toggle) */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

/* Currency Switcher */
.currency-switcher {
  display: inline-flex;
  background: var(--color-sand-200);
  border-radius: var(--radius-pill);
  padding: 2px;
  border: 1px solid var(--color-border);
}

.currency-btn {
  padding: 0.25rem 0.55rem;
  font-size: var(--text-xs);
  font-weight: 700;
  border-radius: var(--radius-pill);
  color: var(--color-black-600);
  transition: all var(--transition-fast);
}

.currency-btn.active {
  background: var(--color-green-700);
  color: var(--color-white);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}


/* Mobile Menu Toggle Button */
.menu-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  color: var(--color-black-900);
}

@media (min-width: 992px) {
  .menu-toggle-btn {
    display: none;
  }
}

.menu-toggle-btn svg {
  width: 26px;
  height: 26px;
}

/* --------------------------------------------------
   4. Mobile Navigation Drawer
   -------------------------------------------------- */
.mobile-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 85%;
  max-width: 380px;
  height: 100vh;
  background: var(--color-cream-100);
  z-index: 200;
  box-shadow: -8px 0 32px rgba(26, 26, 26, 0.2);
  display: flex;
  flex-direction: column;
  padding: var(--space-lg);
  transition: right var(--transition-normal);
  overflow-y: auto;
}

.mobile-drawer.open {
  right: 0;
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--color-border);
}

.mobile-close-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  background: var(--color-sand-200);
}

.mobile-nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.mobile-nav-link {
  font-size: var(--text-lg);
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--color-black-900);
  display: block;
}

.mobile-nav-link.active,
.mobile-nav-link:hover {
  color: var(--color-green-700);
}

.mobile-drawer-footer {
  margin-top: auto;
  padding-top: var(--space-xl);
  border-top: 1px solid var(--color-border);
}

.mobile-drawer-contact {
  font-size: var(--text-sm);
  color: var(--color-black-600);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: var(--space-md);
}

/* Backdrop */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(26, 26, 26, 0.5);
  backdrop-filter: blur(4px);
  z-index: 150;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-normal);
}

.drawer-backdrop.active {
  opacity: 1;
  visibility: visible;
}


/* --------------------------------------------------
   6. Trust Bar Component
   -------------------------------------------------- */
.trust-bar {
  background-color: var(--color-white);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: 1.25rem 0;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .trust-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.trust-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--color-green-100);
  color: var(--color-green-700);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.trust-icon-box svg {
  width: 22px;
  height: 22px;
}

.trust-text h4 {
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--color-black-900);
  line-height: 1.2;
}

.trust-text p {
  font-size: 0.78rem;
  color: var(--color-black-500);
  margin: 0;
}

/* --------------------------------------------------
   7. Site Footer
   -------------------------------------------------- */
.site-footer {
  background-color: var(--color-green-900);
  color: #DDE7DF;
  margin-top: auto;
  border-top: 4px solid var(--color-gold-500);
}

.footer-top {
  padding: clamp(3rem, 5vw, var(--space-3xl)) 0 var(--space-2xl) 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 992px) {
  .footer-grid {
    grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  }
}

.footer-col h4 {
  color: var(--color-white);
  font-size: 1.15rem;
  margin-bottom: var(--space-md);
  position: relative;
  padding-bottom: 0.4rem;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 32px;
  height: 2px;
  background-color: var(--color-gold-500);
}

.footer-brand p {
  font-size: 0.92rem;
  color: #BAC7BC;
  margin-bottom: var(--space-md);
}

.footer-contact-list,
.footer-links-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  font-size: 0.92rem;
}

.footer-links-list a:hover {
  color: var(--color-gold-500);
  padding-left: 4px;
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  color: #BAC7BC;
}

.footer-contact-item svg {
  width: 18px;
  height: 18px;
  color: var(--color-gold-500);
  flex-shrink: 0;
  margin-top: 3px;
}

.footer-contact-item a:hover {
  color: var(--color-gold-500);
}

.footer-bsj-box {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-top: 1rem;
}

.footer-bsj-box h5 {
  color: var(--color-gold-500);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.footer-bsj-box p {
  font-size: 0.78rem;
  margin: 0;
  color: #D2DCD4;
}

/* Footer Bottom Bar */
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.25rem 0;
  font-size: 0.82rem;
  color: #A2B2A5;
}

.footer-bottom-flex {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  text-align: center;
}

@media (min-width: 768px) {
  .footer-bottom-flex {
    flex-direction: row;
    text-align: left;
  }
}

/* --------------------------------------------------
   8. Toast Notification System
   -------------------------------------------------- */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 300;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--color-black-900);
  color: var(--color-white);
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  font-size: 0.9rem;
  font-weight: 600;
  border-left: 4px solid var(--color-gold-500);
  animation: slideInUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  max-width: 360px;
}

.toast.toast-success {
  border-left-color: #25D366;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Reduced Motion Override */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
