/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #2c3e50;
  --secondary-color: #8b7355;
  --accent-color: #d4a574;
  --text-color: #333;
  --light-bg: #f8f9fa;
  --white: #fff;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary-color);
  color: var(--white);
  padding: 8px 16px;
  text-decoration: none;
  z-index: 100;
}

.skip-link:focus {
  top: 0;
}

/* Header and Navigation Styles */
header {
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Mobile Menu Toggle Button */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}

.menu-icon {
  display: block;
  width: 25px;
  height: 2px;
  background: var(--primary-color);
  position: relative;
  transition: var(--transition);
}

.menu-icon::before,
.menu-icon::after {
  content: '';
  position: absolute;
  width: 25px;
  height: 2px;
  background: var(--primary-color);
  transition: var(--transition);
}

.menu-icon::before {
  top: -8px;
}

.menu-icon::after {
  top: 8px;
}

.menu-toggle.active .menu-icon {
  background: transparent;
}

.menu-toggle.active .menu-icon::before {
  transform: rotate(45deg);
  top: 0;
}

.menu-toggle.active .menu-icon::after {
  transform: rotate(-45deg);
  top: 0;
}

/* Navigation Menu */
nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

nav a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  padding: 0.5rem 1rem;
  border-radius: 4px;
}

nav a:hover,
nav a:focus {
  color: var(--secondary-color);
  background: var(--light-bg);
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: var(--white);
  padding: 6rem 2rem;
  text-align: center;
}

.hero-content h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero-content h2 {
  font-size: 1.5rem;
  font-weight: 300;
  margin-bottom: 2rem;
}

.cta-button {
  display: inline-block;
  background: var(--accent-color);
  color: var(--white);
  padding: 1rem 2rem;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 600;
  transition: var(--transition);
  border: none;
  cursor: pointer;
}

.cta-button:hover,
.cta-button:focus {
  background: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Section Styles */
.section {
  padding: 4rem 2rem;
}

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

.section-title {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.section-description {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 3rem;
  color: #666;
}

/* Products Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.product-card {
  background: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Lazy Loading Image States */
.product-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
  background: var(--light-bg);
  transition: opacity 0.3s ease;
  opacity: 0.5;
}

.product-image.loaded {
  opacity: 1;
}

.product-image.error {
  opacity: 0.3;
  background: var(--light-bg);
}

.product-content {
  padding: 1.5rem;
}

.product-title {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.product-description {
  color: #666;
  margin-bottom: 1rem;
}

.product-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--secondary-color);
}

/* About Section */
.about-section {
  background: var(--light-bg);
}

.about-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.about-card {
  background: var(--white);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.about-card h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

/* Contact Section */
.contact-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
  margin-top: 2rem;
}

.contact-info h3,
.contact-form h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.contact-info h4 {
  color: var(--secondary-color);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.contact-info table {
  width: 100%;
  margin-bottom: 1rem;
}

.contact-info td {
  padding: 0.5rem 0;
}

.contact-info a {
  color: var(--secondary-color);
  text-decoration: none;
}

.contact-info a:hover {
  text-decoration: underline;
}

/* Form Styles */
fieldset {
  border: none;
  padding: 0;
}

legend {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--primary-color);
}

.required {
  color: #e74c3c;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 3px rgba(139, 115, 85, 0.1);
}

.error {
  color: #e74c3c;
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: block;
}

iframe {
  width: 100%;
  height: 400px;
  border: none;
  border-radius: 8px;
}

/* Footer */
footer {
  background: var(--primary-color);
  color: var(--white);
  text-align: center;
  padding: 2rem;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  nav ul {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    max-width: 300px;
    height: 100vh;
    background: var(--white);
    flex-direction: column;
    padding: 5rem 2rem 2rem;
    gap: 0;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
  }

  nav ul.active {
    right: 0;
  }

  nav ul li {
    width: 100%;
  }

  nav a {
    display: block;
    padding: 1rem;
    border-bottom: 1px solid var(--light-bg);
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-content h2 {
    font-size: 1.2rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }

  .contact-wrapper {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 4rem 1rem;
  }

  .hero-content h1 {
    font-size: 1.75rem;
  }

  .section {
    padding: 3rem 1rem;
  }

  .products-grid {
    gap: 1.5rem;
  }
}

/* Focus Visible for Accessibility */
:focus-visible {
  outline: 2px solid var(--secondary-color);
  outline-offset: 2px;
}

/* Smooth Scrolling Support */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}