/* Base styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #fdfdfd;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

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

/* Navigation */
.navbar {
  background-color: #ffffff;
  border-bottom: 1px solid #eee;
  padding: 0.7rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-weight: 700;
  font-size: 1.4rem;
  color: #2c3e50;
}
.nav-links a {
  margin-right: 1rem;
  color: #2c3e50;
  font-weight: 500;
}
.nav-links a.active {
  border-bottom: 2px solid #2c3e50;
}
.cart-icon a {
  font-size: 1.2rem;
  color: #2c3e50;
}

/* Buttons */
.btn-primary {
  display: inline-block;
  background-color: #2c7a7b;
  color: #fff;
  padding: 0.7rem 1.4rem;
  border-radius: 4px;
  font-weight: bold;
  margin-top: 1rem;
  transition: background-color 0.2s;
}
.btn-primary:hover {
  background-color: #246466;
}
.btn-secondary {
  display: inline-block;
  background-color: #ccc;
  color: #333;
  padding: 0.6rem 1.2rem;
  border-radius: 4px;
  font-weight: bold;
  margin-top: 1rem;
}

/* Hero section */
.hero {
  padding: 4rem 0 3rem;
  background-color: #f2f8f8;
}
.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  align-items: center;
  gap: 2rem;
}
.hero-content h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: #2c3e50;
}
.hero-content p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  color: #555;
}
.hero-image img {
  width: 100%;
  max-width: 400px;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* Features */
.features {
  padding: 3rem 0;
}
.features h2 {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 2rem;
  color: #2c3e50;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}
.feature-item {
  background-color: #f7fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 1.2rem;
  text-align: center;
}
.feature-item h3 {
  margin-bottom: 0.5rem;
  color: #2c3e50;
  font-size: 1.2rem;
}
.feature-item p {
  color: #555;
  font-size: 0.95rem;
}

/* Testimonials */
.testimonials {
  background-color: #fdf6f6;
  padding: 3rem 0;
}
.testimonials h2 {
  text-align: center;
  margin-bottom: 1rem;
  color: #2c3e50;
}
.testimonials blockquote {
  max-width: 700px;
  margin: 0 auto;
  font-style: italic;
  color: #444;
  font-size: 1rem;
  text-align: center;
}

/* Guarantee badges */
.guarantee {
  background-color: #eef9f7;
  padding: 2rem 0;
}
.guarantee-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  align-items: center;
  text-align: center;
}
.guarantee .badge img {
  width: 50px;
  height: 50px;
  margin-bottom: 0.5rem;
}
.guarantee .badge p {
  font-size: 0.9rem;
  color: #2c3e50;
}

/* Product page */
.product-page .product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
  align-items: start;
}
.product-images {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.product-images img {
  width: 100%;
  border-radius: 6px;
}
.product-images .thumb {
  width: 80%;
  align-self: center;
}
.product-details h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: #2c3e50;
}
.product-details .price {
  font-size: 1.6rem;
  font-weight: bold;
  color: #2c7a7b;
  margin-bottom: 1rem;
}
.product-details p {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: #555;
}
.product-features {
  margin-bottom: 1rem;
}
.product-features li {
  margin-bottom: 0.5rem;
  padding-left: 1.2rem;
  position: relative;
  font-size: 0.95rem;
  color: #444;
}
.product-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #2c7a7b;
}
.quantity-select {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
}
.quantity-select input {
  width: 60px;
  padding: 0.4rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}
.shipping-info {
  margin-top: 1.5rem;
  background-color: #f7fafc;
  padding: 1rem;
  border-radius: 4px;
  font-size: 0.9rem;
  color: #555;
}
.shipping-info h4 {
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  color: #2c3e50;
}

/* Checkout & Contact pages */
main.checkout-page,
main.contact-page,
main.policy-page {
  padding: 2rem 0;
}
main.checkout-page h1,
main.contact-page h1,
main.policy-page h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #2c3e50;
  text-align: center;
}
form {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
form label {
  font-size: 0.9rem;
  color: #2c3e50;
}
form input[type='text'],
form input[type='email'],
form input[type='number'],
form select,
form textarea {
  padding: 0.6rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
}
form textarea {
  resize: vertical;
}
form button {
  align-self: start;
}
.hidden {
  display: none;
}

/* Footer */
.footer {
  background-color: #2c3e50;
  color: #fff;
  padding: 2rem 0 1rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}
.footer h4 {
  margin-bottom: 0.6rem;
  font-size: 1.1rem;
  color: #fff;
}
.footer p {
  font-size: 0.9rem;
  color: #ddd;
}
.footer ul li {
  margin-bottom: 0.4rem;
}
.footer ul li a {
  color: #ddd;
  font-size: 0.9rem;
}
.social-icons a {
  margin-right: 0.5rem;
  font-size: 1.1rem;
  color: #ddd;
}
.copyright {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.8rem;
  color: #aaa;
}

/* Accessibility enhancements */
/* Skip link to jump to main content */
.skip-link {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  padding: 0.5rem 0.75rem;
  background: #2c7a7b;
  color: #fff;
  border-radius: 0.25rem;
  z-index: 1000;
}

/* Visible focus ring for keyboard navigation */
:focus-visible {
  outline: 3px solid #005fcc;
  outline-offset: 2px;
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: more) {
  body {
    background-color: #ffffff;
    color: #000000;
  }
  .navbar, .footer {
    background-color: #000000;
    color: #ffffff;
  }
  .btn-primary {
    background-color: #000000;
    color: #ffffff;
  }
  .btn-primary:hover {
    background-color: #333333;
  }
  .feature-item {
    background-color: #ffffff;
    border-color: #333333;
  }
}

/* Media queries */
@media (max-width: 600px) {
  .hero-content h1 {
    font-size: 2rem;
  }
  .hero-grid {
    gap: 1rem;
  }
  .product-details h1 {
    font-size: 1.6rem;
  }
  .product-details .price {
    font-size: 1.4rem;
  }
}