/* =======================================================
   KamalaTreats Global Stylesheet: Base, Layout, Header, Footer
   ======================================================= */

/* =======================================================
   ROOT VARIABLES (From base.css)
   ======================================================= */
:root {
  /* LUXURY COLOR PALETTE - Rich & Captivating */
  --deep-emerald: #1A5D3A;
  --rich-emerald: #216B45;
  --vibrant-emerald: #2E8B57;
  --premium-gold: #D4AF37;
  --warm-gold: #E6C158;
  --soft-gold: #F4D880;
  --platinum: #E5E4E2;
  --champagne: #F7E7CE;
  --ivory: #FFFDF5;
  --charcoal: #1A1A1A;
  --dark-charcoal: #2B2B2B;
  --maroon: #A300000;
  --max-width: 8192px;
  
  /* Luxury Gradients */
  --emerald-gradient: linear-gradient(135deg, var(--deep-emerald) 0%, var(--vibrant-emerald) 100%);
  --gold-gradient: linear-gradient(135deg, var(--premium-gold) 0%, var(--soft-gold) 100%);
  --luxury-overlay: linear-gradient(45deg, rgba(212, 175, 55, 0.1) 0%, rgba(255, 255, 255, 0.05) 50%, rgba(46, 139, 87, 0.1) 100%);
}

/* =======================================================
   GLOBAL BASE & RESETS (From base.css)
   ======================================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Playfair Display', 'Poppins', 'Georgia', serif;
}

html {
  scroll-behavior: smooth;
  height: 100%;
}

body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  color: var(--charcoal);
  background: linear-gradient(135deg, var(--ivory) 0%, var(--champagne) 100%);
  background-attachment: fixed; /* makes the gradient fixed and not repeat */
  background-size: cover;       /* ensures it covers entire area */
  background-repeat: no-repeat;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--luxury-overlay);
  pointer-events: none;
  z-index: -1;
}

main {
  flex: 1;
  margin: 0;
  padding: 0;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0px 20px;
}

/* =======================================================
   GLOBAL UTILITY STYLING (From base.css)
   ======================================================= */

/* Ensures all buttons have consistent luxury font styling */
.btn, .cart, .cartpage {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
}

@keyframes luxuryPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

section.container h2 {
  text-align: center;
  font-size: 42px;
  color: var(--deep-emerald);
  margin-bottom: 30px;
  font-weight: 700;
  position: relative;
  padding-bottom: 15px;
}

section.container h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 3px;
  background: var(--gold-gradient);
  border-radius: 2px;
}

/* =======================================================
   HEADER (From layout.css)
   ======================================================= */
.site-header {
  background: var(--emerald-gradient);
  color: #fff;
  margin: 0;
  padding: 5px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(26, 29, 58, 0.3);
  border-bottom: 3px solid var(--premium-gold);
  backdrop-filter: blur(10px);
}

.site-header .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0px;
  position: relative;
  min-height: 130px;
  margin: 0 auto;
  padding: 0px 20px;
  padding-top: 15px; 
  padding-bottom: 15px;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--premium-gold);
  font-weight: 800;
  font-size: 52px;
  letter-spacing: 1.5px;
  transition: all 0.4s ease;
  margin-bottom: 12px;
  text-align: center;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  position: relative;
}

.brand:hover {
  color: var(--soft-gold);
  transform: translateY(-2px);
  text-shadow: 2px 4px 8px rgba(0, 0, 0, 0.4);
}

.brand::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--soft-gold);
  transition: width 0.4s ease;
}

.brand:hover::after {
  width: 235%;
}

.logo {
  height: 85px;
  margin-left: 15px;
  filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.6));
  transition: transform 0.3s ease;
}

.brand:hover .logo {
  transform: scale(1.05);
}

.brand-name {
  color: var(--premium-gold);
  background: linear-gradient(45deg, var(--premium-gold), var(--soft-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-left: 0px;
}

/* Nav */
.nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  border-top: 2px solid rgba(212, 175, 55, 0.3);
  border-bottom: 2px solid rgba(212, 175, 55, 0.3);
  padding: 12px 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(5px);
}

.nav a {
  color: var(--platinum);
  text-decoration: none;
  font-weight: 600;
  font-size: 18px;
  position: relative;
  transition: all 0.3s ease;
  padding: 8px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nav a:hover {
  color: var(--premium-gold);
  transform: translateY(-2px);
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold-gradient);
  transition: width 0.4s ease;
  border-radius: 2px;
}

.nav a:hover::after {
  width: 100%;
}

/* Cart Link */
.cart-link {
  position: absolute;
  right: 20px;
  top: 76%;
  transform: translateY(-50%);
}

.cart-link a {
  background: linear-gradient(90deg, #d4af37 0%, #ffea70 50%, #d4af37 100%);
  color: var(--deep-emerald);
  padding: 12px 24px;
  border-radius: 30px;
  text-decoration: none;
  transition: all 0.4s ease;
  display: inline-block;
  font-weight: bold;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 16px;
  margin-top: auto;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
  background-size: 200% auto; /* smooth gradient scaling */
  background-position: center;
}

.cart-link a::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.5s ease;
}

.cart-link a:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
}

.cart-link a:hover::before {
  left: 100%;
}

/* Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 32px;
  height: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.hamburger span {
  display: block;
  height: 3px;
  width: 100%;
  background: var(--gold-gradient);
  border-radius: 3px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* =======================================================
   MOBILE ADJUSTMENTS (Header/Nav)
   ======================================================= */
@media (max-width: 768px) {
  .site-header .container {
    flex-direction: row;
    justify-content: center;
    padding-top: 0px;
    padding-bottom: 20px;
    min-height: 110px;
    flex-wrap: wrap;
  }
  
  .brand {
    margin-bottom: 0;
    font-size: 0px;
    order: 1;
    width: 20%;
    justify-content: center;
    margin-top: 0px;
    z-index: 1000;
    display: flex;
  }
  
  .logo {
    height: 100px;
    font-size: initial;
    display: block;
    z-index: 1000;
  }
  
  .hamburger {
    display: flex;
    order: 0;
    top: 45px;
    transform: translateY(0);
  }
  
  .nav {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%; 
    max-width: 100%;
    height: 100vh;
    background: var(--emerald-gradient);
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 100px;
    transition: left 0.4s ease;
    z-index: 999;
    border: none;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
    order: 3;
    gap: 0;
    align-items: flex-start;
  }
  
  .nav.active {
    left: 0;
    width: 100%;
  }
  
  .nav a {
    font-size: 20px;
    padding: 20px 30px;
    width: 100%;
    text-align: center;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    margin: 0;
  }
  
  .nav a:last-child {
    border-bottom: none;
  }
  
  .cart-link {
    position: absolute;
    right: 20px;
    top: 45px;
    transform: translateY(0);
    order: 2;
  }
  
  .cart-link a {
    padding: 10px 20px;
    font-size: 14px;
  }
  
  .overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 29, 58, 0.8);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease;
    backdrop-filter: blur(5px);
  }
  
  .overlay.active {
    opacity: 1;
    visibility: visible;
  }
}

/* =========================================
   MOBILE FONT SCALING
   ========================================= */
@media (max-width: 768px) {
  h1, h2, h3 {
    font-size: clamp(8px, 4vw, 26px);
  }

  .card h3 {
    font-size: clamp(8px, 4vw, 22px);
  }

  .card .price {
    font-size: clamp(12px, 5vw, 30px);
  }

  .nav a {
    font-size: clamp(10px, 5vw, 20px);
  }
}

/* =======================================================
   FOOTER (From layout.css)
   ======================================================= */
.site-footer {
  background: var(--emerald-gradient);
  color: var(--champagne);
  padding: 40px 20px;
  text-align: center;
  border-top: 3px solid var(--premium-gold);
  box-shadow: 0 -4px 20px rgba(26, 29, 58, 0.3);
  margin-top: 80px;
  position: relative;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--luxury-overlay);
  pointer-events: none;
}
