*, *::before, *::after {
  box-sizing: border-box;
}

:root {
  --primary: #4A6741;
  --primary-dark: #3A5233;
  --accent: #C4913B;
  --accent-dark: #A67B32;
  --background: #FDF8F0;
  --card-bg: #FFFFFF;
  --text-primary: #2D2A26;
  --text-secondary: #6B6560;
  --border: #E5DDD5;
  --success: #5B8A2E;
  --warning: #C4913B;
  --error: #B54A3A;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 12px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.12);
  --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
  margin: 0;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Georgia', serif;
  color: var(--primary-dark);
  margin-top: 0;
  letter-spacing: -0.02em;
}

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

a:hover {
  color: var(--primary-dark);
}

/* Layout */
main {
  min-height: calc(100vh - 400px);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Buttons */
.btn-primary {
  background-color: var(--primary);
  color: white;
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  border: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background-color: var(--primary-dark);
  z-index: -1;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.btn-primary:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.btn-primary:hover {
  color: white;
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background-color: transparent;
  color: var(--primary);
  padding: 12px 30px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--primary);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-outline:hover {
  background-color: var(--primary);
  color: white;
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* Cards */
.card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 30px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

/* Badge */
.badge {
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-stock { background: #E8F5E9; color: #2E7D32; }
.badge-low { background: #FFF3E0; color: #EF6C00; }
.badge-out { background: #FFEBEE; color: #C62828; }

/* Navigation */
.navbar {
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: var(--transition);
}

.navbar.scrolled {
  padding: 0.5rem 0;
  box-shadow: var(--shadow-sm);
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-logo-img {
  height: 100px;
  width: auto;
  mix-blend-mode: multiply;
}

.nav-logo {
  font-family: 'Georgia', serif;
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--primary-dark);
  letter-spacing: -1px;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-weight: 500;
  color: var(--text-primary);
  font-size: 0.95rem;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; width: 0; height: 2px;
  background-color: var(--accent);
  transition: var(--transition);
}

.nav-links a:hover::after, .nav-links a.active::after {
  width: 100%;
}

.nav-links a:hover, .nav-links a.active {
  color: var(--primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.cart-icon {
  position: relative;
  font-size: 1.3rem;
  color: var(--primary);
  display: flex;
  align-items: center;
}

.cart-badge {
  position: absolute;
  top: -8px;
  right: -12px;
  background-color: var(--accent);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

/* Footer */
footer {
  background-color: #262320;
  color: #FDF8F0;
  padding: 80px 0 40px;
  margin-top: 100px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 60px;
  margin-bottom: 60px;
}

.footer-col h4 {
  color: var(--accent);
  margin-bottom: 25px;
  font-size: 1.2rem;
  font-weight: 600;
}

.footer-col ul {
  list-style: none;
  padding: 0;
}

.footer-col ul li {
  margin-bottom: 12px;
}

.footer-col ul a {
  color: #A2A09D;
  font-size: 0.95rem;
}

.footer-col ul a:hover {
  color: white;
  padding-left: 5px;
}

.footer-bottom {
  border-top: 1px solid #3d3a37;
  padding-top: 40px;
  text-align: center;
  font-size: 0.85rem;
  color: #777;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Forms */
.form-group {
  margin-bottom: 25px;
}

.form-group label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.form-control {
  width: 100%;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background-color: white;
  transition: var(--transition);
  font-family: inherit;
  font-size: 1rem;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(74, 103, 65, 0.08);
}

/* Responsive */
@media (max-width: 992px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 20px;
  }
}

@media (max-width: 992px) {
    .checkout-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .order-summary-card {
        position: static;
    }
}
@media (max-width: 600px) {
    .checkout-section div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    .method-toggle {
        flex-direction: column;
        gap: 15px;
    }
}
