:root {
  /* Colors */
  --color-primary: #1E1E2E;       /* Obsidian Blue */
  --color-secondary: #2B2D42;     /* Dark Indigo */
  --color-dark: #121212;          /* Pure Deep Black */
  --color-gray-dark: #242424;     /* Carbon Gray */
  --color-gray: #3C3C3C;          /* Charcoal Ash */
  --color-light: #f8f9fa;
  --color-white: #ffffff;
  --color-accent: #7d9e78;        /* Soft Sage - added for floral accent */
  --color-accent-light: #a9c9a4;  /* Light Sage */
  
  /* Typography */
  --font-primary: 'Cormorant Garamond', serif;  /* Elegant serif for headings */
  --font-secondary: 'Montserrat', sans-serif;   /* Clean sans-serif for body */
  --font-size-xs: 0.75rem;    /* 12px */
  --font-size-sm: 0.875rem;   /* 14px */
  --font-size-md: 1rem;       /* 16px */
  --font-size-lg: 1.125rem;   /* 18px */
  --font-size-xl: 1.25rem;    /* 20px */
  --font-size-2xl: 1.5rem;    /* 24px */
  --font-size-3xl: 1.875rem;  /* 30px */
  --font-size-4xl: 2.25rem;   /* 36px */
  
  /* Spacing */
  --space-xs: 0.25rem;   /* 4px */
  --space-sm: 0.5rem;    /* 8px */
  --space-md: 1rem;      /* 16px */
  --space-lg: 1.5rem;    /* 24px */
  --space-xl: 2rem;      /* 32px */
  --space-2xl: 3rem;     /* 48px */
  --space-3xl: 4rem;     /* 64px */
  
  /* Borders */
  --border-radius-sm: 0.25rem;  /* 4px */
  --border-radius-md: 0.5rem;   /* 8px */
  --border-radius-lg: 1rem;     /* 16px */
  --border-width: 1px;
  --border-width-md: 2px;
  
  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
  --shadow-md: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
  --shadow-lg: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* ============= RESET ============= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-secondary);
  font-size: var(--font-size-md);
  line-height: 1.6;
  color: var(--color-light);
  background-color: var(--color-dark);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);
  line-height: 1.2;
  margin-bottom: var(--space-md);
  font-weight: 500;
}

h1 {
  font-size: var(--font-size-4xl);
}

h2 {
  font-size: var(--font-size-3xl);
}

h3 {
  font-size: var(--font-size-2xl);
}

h4 {
  font-size: var(--font-size-xl);
}

h5, h6 {
  font-size: var(--font-size-lg);
}

p {
  margin-bottom: var(--space-md);
}

a {
  color: var(--color-accent-light);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-accent);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  cursor: pointer;
  font-family: var(--font-secondary);
}

ul {
  list-style: none;
}

/* ============= UTILITIES ============= */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.text-center {
  text-align: center;
}

.btn {
  display: inline-block;
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--border-radius-md);
  background-color: var(--color-accent);
  color: var(--color-white);
  font-weight: 500;
  text-align: center;
  border: none;
  transition: all var(--transition-fast);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: var(--font-size-sm);
}

.btn:hover {
  background-color: var(--color-accent-light);
  color: var(--color-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background-color: transparent;
  border: var(--border-width) solid var(--color-accent);
  color: var(--color-accent);
}

.btn-outline:hover {
  background-color: var(--color-accent);
  color: var(--color-white);
}

.section {
  padding: var(--space-2xl) 0;
}

.section-title {
  position: relative;
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-sm);
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background-color: var(--color-accent);
}

.section-title.text-center::after {
  left: 50%;
  transform: translateX(-50%);
}

/* ============= HEADER ============= */
.header {
  background-color: var(--color-primary);
  padding: var(--space-md) 0;
  position: relative;
  transition: transform var(--transition-normal);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-primary);
  font-size: var(--font-size-xl);
  color: var(--color-white);
  font-weight: 600;
  letter-spacing: 1px;
}

.logo span {
  color: var(--color-accent);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--color-white);
  font-size: var(--font-size-xl);
  cursor: pointer;
}

.nav-list {
  display: flex;
  gap: var(--space-lg);
}

.nav-link {
  color: var(--color-white);
  font-weight: 500;
  position: relative;
  padding: var(--space-xs) 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-accent);
  transition: width var(--transition-normal);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Hide Header on Scroll Down, Show on Scroll Up */
.header-hidden {
  transform: translateY(-100%);
}

/* ============= HERO SECTION ============= */
.hero {
  height: 90vh;
  min-height: 500px;
  background: linear-gradient(rgba(18, 18, 18, 0.7), rgba(18, 18, 18, 0.9)), url('../images/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  position: relative;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: var(--space-lg);
  line-height: 1.1;
}

.hero-subtitle {
  font-size: clamp(var(--font-size-lg), 3vw, var(--font-size-2xl));
  margin-bottom: var(--space-xl);
  color: var(--color-accent-light);
}

.hero-btns {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

/* ============= FEATURED SECTION ============= */
.featured {
  background-color: var(--color-gray-dark);
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.featured-item {
  background-color: var(--color-primary);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-normal);
}

.featured-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.featured-img {
  height: 200px;
  object-fit: cover;
  width: 100%;
}

.featured-content {
  padding: var(--space-lg);
}

.featured-title {
  margin-bottom: var(--space-sm);
  font-size: var(--font-size-xl);
}

.featured-price {
  color: var(--color-accent);
  font-weight: 600;
  margin-bottom: var(--space-md);
  display: block;
}

.featured-text {
  margin-bottom: var(--space-lg);
  color: var(--color-light);
  font-size: var(--font-size-sm);
}

/* ============= ABOUT SECTION ============= */
.about {
  position: relative;
  overflow: hidden;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

.about-img-wrapper {
  position: relative;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.about-img {
  height: 100%;
  object-fit: cover;
}

.about-content {
  padding: var(--space-lg);
}

.about-subtitle {
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
  font-weight: 600;
}

.about-text {
  margin-bottom: var(--space-lg);
}

.about-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.feature {
  text-align: center;
}

.feature-icon {
  font-size: 2rem;
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
}

.feature-title {
  margin-bottom: var(--space-xs);
  font-size: var(--font-size-lg);
}

.feature-text {
  font-size: var(--font-size-sm);
  color: var(--color-light);
}

/* ============= PRODUCT SECTION ============= */
.products {
  background-color: var(--color-secondary);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-xl);
}

.product-card {
  background-color: var(--color-gray-dark);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.product-img-wrapper {
  height: 250px;
  overflow: hidden;
}

.product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-normal);
}

.product-card:hover .product-img {
  transform: scale(1.05);
}

.product-content {
  padding: var(--space-lg);
}

.product-title {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-xs);
}

.product-category {
  color: var(--color-accent);
  font-size: var(--font-size-sm);
  margin-bottom: var(--space-sm);
  display: block;
}

.product-description {
  margin-bottom: var(--space-md);
  font-size: var(--font-size-sm);
}

.product-price {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--color-accent-light);
  margin-bottom: var(--space-md);
  display: block;
}

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ============= TESTIMONIAL SECTION ============= */
.testimonials {
  position: relative;
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-lg);
}

.testimonial-card {
  background-color: var(--color-primary);
  padding: var(--space-xl);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-md);
  position: relative;
}

.testimonial-card::before {
  content: '"';
  font-size: 5rem;
  font-family: serif;
  position: absolute;
  top: -15px;
  left: 15px;
  color: rgba(125, 158, 120, 0.1);
}

.testimonial-text {
  font-style: italic;
  margin-bottom: var(--space-lg);
  position: relative;
  z-index: 1;
}

.testimonial-author {
  display: flex;
  align-items: center;
}

.testimonial-author-img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: var(--space-md);
}

.testimonial-author-name {
  font-weight: 600;
  margin-bottom: 0;
}

.testimonial-author-title {
  font-size: var(--font-size-xs);
  color: var(--color-accent);
}

/* ============= CONTACT SECTION ============= */
.contact {
  background-color: var(--color-gray-dark);
}

.contact-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-xl);
}

.contact-info {
  padding: var(--space-lg);
}

.contact-item {
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: flex-start;
}

.contact-icon {
  font-size: 1.5rem;
  color: var(--color-accent);
  margin-right: var(--space-md);
}

.contact-text {
  font-size: var(--font-size-sm);
}

.contact-title {
  margin-bottom: var(--space-xs);
}

.contact-form {
  background-color: var(--color-primary);
  padding: var(--space-xl);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-md);
}

.form-group {
  margin-bottom: var(--space-md);
}

.form-label {
  display: block;
  margin-bottom: var(--space-xs);
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: var(--space-sm);
  border: 1px solid var(--color-gray);
  border-radius: var(--border-radius-sm);
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--color-white);
  font-family: var(--font-secondary);
  font-size: var(--font-size-sm);
  transition: border-color var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-accent);
}

.form-control::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.form-checkbox {
  display: flex;
  align-items: flex-start;
  margin-bottom: var(--space-lg);
}

.form-checkbox input {
  margin-right: var(--space-sm);
  margin-top: 5px;
}

.form-checkbox label {
  font-size: var(--font-size-xs);
  line-height: 1.4;
}

.contact-map {
  height: 300px;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  margin-top: var(--space-xl);
}

/* ============= FOOTER ============= */
.footer {
  background-color: var(--color-primary);
  padding: var(--space-xl) 0 var(--space-md);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-lg);
}

.footer-col {
  padding: 0 var(--space-sm);
}

.footer-title {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-md);
}

.footer-links li {
  margin-bottom: var(--space-xs);
}

.footer-links a {
  color: var(--color-light);
  font-size: var(--font-size-sm);
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--color-accent);
}

.footer-social {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--color-gray-dark);
  color: var(--color-white);
  transition: all var(--transition-fast);
}

.social-link:hover {
  background-color: var(--color-accent);
  transform: translateY(-3px);
}

.footer-bottom {
  margin-top: var(--space-xl);
  padding-top: var(--space-md);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: var(--font-size-xs);
  color: rgba(255, 255, 255, 0.6);
}

.footer-bottom a {
  color: var(--color-accent-light);
}

/* ============= COOKIE POPUP ============= */
.cookie-popup {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--color-primary);
  padding: var(--space-lg);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  width: 90%;
  max-width: 400px;
  display: none;
}

.cookie-popup.show {
  display: block;
  animation: fadeIn 0.5s;
}

.cookie-title {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-sm);
}

.cookie-text {
  font-size: var(--font-size-sm);
  margin-bottom: var(--space-md);
}

.cookie-buttons {
  display: flex;
  gap: var(--space-sm);
}

/* ============= 404 PAGE ============= */
.error-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.error-content {
  max-width: 600px;
  padding: var(--space-xl);
}

.error-code {
  font-size: 8rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: var(--space-lg);
  color: var(--color-accent);
  text-shadow: 3px 3px 0 var(--color-primary);
}

.error-title {
  margin-bottom: var(--space-md);
}

.error-text {
  margin-bottom: var(--space-xl);
}

/* ============= THANK YOU PAGE ============= */
.thank-you-page {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-color: var(--color-gray-dark);
}

.thank-you-content {
  max-width: 700px;
  padding: var(--space-xl);
  background-color: var(--color-primary);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-lg);
}

.thank-you-icon {
  font-size: 4rem;
  color: var(--color-accent);
  margin-bottom: var(--space-lg);
}

.thank-you-title {
  margin-bottom: var(--space-md);
}

.thank-you-text {
  margin-bottom: var(--space-xl);
}

/* ============= ANIMATIONS ============= */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px) translateX(-50%);
  }
  to {
    opacity: 1;
    transform: translateY(0) translateX(-50%);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* ============= MEDIA QUERIES ============= */
@media (max-width: 992px) {
  .nav-toggle {
    display: block;
  }
  
  .nav {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: 250px;
    background-color: var(--color-primary);
    z-index: 100;
    padding: var(--space-2xl) var(--space-md);
    transition: right var(--transition-normal);
    box-shadow: var(--shadow-lg);
  }
  
  .nav.active {
    right: 0;
  }
  
  .nav-list {
    flex-direction: column;
    gap: var(--space-md);
  }
  
  .about-grid {
    grid-template-columns: 1fr;
  }
  
  .hero-btns {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 768px) {
  :root {
    --space-3xl: 3rem;
    --font-size-4xl: 2rem;
    --font-size-3xl: 1.75rem;
  }
  
  .section {
    padding: var(--space-xl) 0;
  }
  
  .hero {
    height: 80vh;
  }
  
  .featured-grid {
    grid-template-columns: 1fr;
  }
  
  .product-grid {
    grid-template-columns: 1fr;
  }
  
  .testimonial-grid {
    grid-template-columns: 1fr;
  }
  
  .contact-wrapper {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px) {
  :root {
    --space-2xl: 2rem;
    --space-xl: 1.5rem;
    --font-size-4xl: 1.75rem;
    --font-size-3xl: 1.5rem;
  }
  
  .logo {
    font-size: var(--font-size-lg);
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .footer-social {
    justify-content: center;
  }
}

/* ============= MICROCOSM: 320PX VIEWPORT ============= */
@media (max-width: 320px) {
  :root {
    /* Further compressed spatial rhythm */
    --space-xs: 0.2rem;    /* Reduced from 0.25rem */
    --space-sm: 0.4rem;    /* Reduced from 0.5rem */
    --space-md: 0.6rem;    /* Reduced from 0.75rem */
    --space-lg: 0.8rem;    /* Reduced from 1rem */
    --space-xl: 1.2rem;    /* Further reduced */
    
    /* Typography adjustments for legibility */
    --font-size-xs: 0.7rem;   /* Maintained minimum for readability */
    --font-size-sm: 0.8rem;   /* Slightly reduced */
    --font-size-md: 0.85rem;  /* Reduced for better space utilization */
    --font-size-lg: 0.95rem;  /* Streamlined headings */
    --font-size-xl: 1.1rem;   /* Compressed but maintains hierarchy */
  }
  
  /* Core layout adaptations */
  .container {
    padding: 0 var(--space-xs);  /* Maximize usable space */
  }
  
  /* Vertical space optimization */
  .section {
    padding: var(--space-lg) 0;  /* Tighter vertical rhythm */
  }
  
  .section-title {
    margin-bottom: var(--space-md);  /* Reduced spacing */
  }
  
  /* Hero adjustments for tiny viewports */
  .hero {
    height: 65vh;  /* Further reduced height */
    min-height: 400px;  /* Ensuring minimum usable space */
  }
  
  .hero-title {
    font-size: 1.8rem;  /* Direct size to ensure visibility */
  }
  
  .hero-subtitle {
    font-size: var(--font-size-md);  /* Scaled down for proportion */
    margin-bottom: var(--space-md);  /* Tighter spacing */
  }
  
  /* Element refinements */
  .btn {
    width: 100%;  /* Full-width buttons for easier touch targets */
    margin-bottom: var(--space-xs);  /* Slight breathing room */
  }
  
  .featured-content, 
  .product-content {
    padding: var(--space-sm);  /* Reduced padding in cards */
  }
  
  .featured-title,
  .product-title {
    font-size: var(--font-size-lg);  /* Smaller card headings */
  }
  
  /* Image containers */
  .featured-img {
    height: 160px;  /* Reduced height */
  }
  
  .product-img-wrapper {
    height: 180px;  /* Further reduced height */
  }
  
  /* Forms and interactive elements */
  .form-control {
    padding: 0.3rem;  /* Smaller input fields */
  }
  
  /* Footer adjustments */
  .footer-col {
    padding: 0;  /* Remove horizontal padding */
    margin-bottom: var(--space-md);  /* Add separation between stacked columns */
  }
  
  .social-link {
    width: 32px;  /* Smaller social icons */
    height: 32px;
  }
  
  /* Utility adjustments */
  .cookie-popup {
    width: 100%;  /* Full width */
    left: 0;  /* Aligned to edges */
    transform: none;  /* Remove transform */
    border-radius: 0;  /* Square corners */
    bottom: 0;  /* Stick to bottom */
  }
  
  /* Text content spacing */
  p {
    margin-bottom: var(--space-sm);  /* Tighter paragraph spacing */
  }
  
  /* Error and thank you pages */
  .error-code {
    font-size: 5rem;  /* Smaller error code */
  }
}