/* ===== Base Styles ===== */
:root {
  --primary: #2c3e50;
  --secondary: #e74c3c;
  --accent: #3498db;
  --light: #ecf0f1;
  --dark: #2c3e50;
  --success: #27ae60;
  --warning: #f39c12;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: #f5f7fa;
  color: #333;
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: var(--primary);
}

.container {
  width: 90%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 15px;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  background-color: var(--secondary);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  text-align: center;
}

.btn:hover {
  background-color: #c0392b;
  transform: translateY(-2px);
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--secondary);
  color: var(--secondary);
}

.btn-outline:hover {
  background-color: var(--secondary);
  color: white;
}

.btn-accent {
  background-color: var(--accent);
}

.btn-accent:hover {
  background-color: #2980b9;
}

/* ===== Header Styles ===== */
header {
  background-color: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 40px;
  margin-right: 10px;
}

.logo h1 {
  font-size: 24px;
  color: var(--primary);
  font-weight: 700;
}

.logo span {
  color: var(--secondary);
}

nav ul {
  display: flex;
  list-style: none;
}

nav ul li {
  margin-left: 25px;
}

nav ul li a {
  font-weight: 600;
  color: var(--dark);
  transition: color 0.3s;
}

nav ul li a:hover {
  color: var(--secondary);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--primary);
  cursor: pointer;
}

.header-actions {
  display: flex;
  align-items: center;
}

.header-actions .btn {
  margin-left: 15px;
}

.cart-icon, .user-icon {
  position: relative;
  margin-left: 20px;
  cursor: pointer;
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background-color: var(--secondary);
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
}

/* ===== Hero Section ===== */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, #34495e 100%);
  color: white;
  padding: 80px 0;
  text-align: center;
}

.hero h2 {
  font-size: 48px;
  margin-bottom: 20px;
  font-weight: 700;
}

.hero p {
  font-size: 20px;
  max-width: 700px;
  margin: 0 auto 30px;
}

.hero-btns {
  display: flex;
  justify-content: center;
  gap: 20px;
}

/* ===== Features Section ===== */
.features {
  padding: 80px 0;
  background-color: white;
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
}

.section-title h2 {
  font-size: 36px;
  color: var(--primary);
  margin-bottom: 15px;
}

.section-title p {
  color: #7f8c8d;
  max-width: 700px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.feature-card {
  background-color: var(--light);
  border-radius: 8px;
  padding: 30px;
  text-align: center;
  transition: transform 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-10px);
}

.feature-icon {
  font-size: 48px;
  color: var(--secondary);
  margin-bottom: 20px;
}

.feature-card h3 {
  font-size: 22px;
  margin-bottom: 15px;
  color: var(--primary);
}

/* ===== Products Section ===== */
.products {
  padding: 80px 0;
  background-color: #f5f7fa;
}

.products-filter {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-btn {
  padding: 8px 16px;
  background-color: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s;
}

.filter-btn.active, .filter-btn:hover {
  background-color: var(--primary);
  color: white;
  border-color: var(--primary);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
}

.product-card {
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.product-img {
  height: 200px;
  overflow: hidden;
  position: relative;
}

.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-card:hover .product-img img {
  transform: scale(1.05);
}

.product-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: var(--secondary);
  color: white;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
}

.product-info {
  padding: 20px;
}

.product-category {
  color: var(--accent);
  font-size: 14px;
  margin-bottom: 5px;
  display: block;
}

.product-title {
  font-size: 18px;
  margin-bottom: 10px;
  color: var(--dark);
}

.product-price {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.current-price {
  font-size: 20px;
  font-weight: bold;
  color: var(--primary);
}

.original-price {
  font-size: 16px;
  color: #95a5a6;
  text-decoration: line-through;
  margin-left: 10px;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 15px;
  font-size: 14px;
  color: #7f8c8d;
}

.product-rating {
  color: var(--warning);
}

.product-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 15px;
}

.quantity-control {
  display: flex;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
}

.quantity-btn {
  background-color: #f1f1f1;
  border: none;
  padding: 5px 10px;
  cursor: pointer;
}

.quantity-input {
  width: 40px;
  text-align: center;
  border: none;
  border-left: 1px solid #ddd;
  border-right: 1px solid #ddd;
  padding: 5px;
}

/* ===== Testimonials ===== */
.testimonials {
  padding: 80px 0;
  background-color: white;
}

.testimonials-slider {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.testimonial {
  text-align: center;
  padding: 0 20px;
}

.testimonial-text {
  font-size: 20px;
  font-style: italic;
  color: var(--dark);
  margin-bottom: 30px;
  line-height: 1.8;
}

.testimonial-author {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.author-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 15px;
}

.author-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-name {
  font-weight: bold;
  font-size: 18px;
  color: var(--primary);
  margin-bottom: 5px;
}

.author-title {
  color: #7f8c8d;
  font-size: 14px;
}

.slider-controls {
  display: flex;
  justify-content: center;
  margin-top: 30px;
}

.slider-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #ddd;
  margin: 0 5px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.slider-dot.active {
  background-color: var(--secondary);
}

/* ===== CTA Section ===== */
.cta {
  padding: 80px 0;
  background: linear-gradient(135deg, var(--secondary) 0%, #c0392b 100%);
  color: white;
  text-align: center;
}

.cta h2 {
  font-size: 36px;
  margin-bottom: 20px;
}

.cta p {
  font-size: 18px;
  max-width: 700px;
  margin: 0 auto 30px;
}

/* ===== Footer ===== */
footer {
  background-color: var(--dark);
  color: white;
  padding: 60px 0 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-col h3 {
  font-size: 18px;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

.footer-col h3::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 40px;
  height: 2px;
  background-color: var(--secondary);
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  color: #bdc3c7;
  transition: color 0.3s;
}

.footer-col ul li a:hover {
  color: white;
}

.footer-contact p {
  margin-bottom: 15px;
  color: #bdc3c7;
  display: flex;
  align-items: flex-start;
}

.footer-contact i {
  margin-right: 10px;
  color: var(--secondary);
}

.social-links {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: white;
  transition: all 0.3s;
}

.social-links a:hover {
  background-color: var(--secondary);
  transform: translateY(-3px);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #bdc3c7;
  font-size: 14px;
}

/* ===== Mobile Menu ===== */
.mobile-menu {
  position: fixed;
  top: 0;
  left: -100%;
  width: 80%;
  max-width: 300px;
  height: 100vh;
  background-color: white;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  transition: left 0.3s ease;
  overflow-y: auto;
}

.mobile-menu.active {
  left: 0;
}

.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  border-bottom: 1px solid #eee;
}

.close-menu {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--primary);
}

.mobile-nav ul {
  list-style: none;
  padding: 15px 0;
}

.mobile-nav ul li a {
  display: block;
  padding: 12px 20px;
  color: var(--dark);
  font-weight: 600;
  transition: background-color 0.3s;
}

.mobile-nav ul li a:hover {
  background-color: #f5f5f5;
  color: var(--secondary);
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ====================== */
/* === Responsive CSS === */
/* ====================== */

/* Large Desktop (1200px and up) */
@media (min-width: 1200px) {
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
  
  .feature-card {
    padding: 40px;
  }
}

/* Tablet Landscape / Small Desktop (992px - 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
  .hero h2 {
    font-size: 42px;
  }
  
  .section-title h2 {
    font-size: 32px;
  }
  
  .testimonial-text {
    font-size: 18px;
  }
}

/* Tablet Portrait (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
  /* Header adjustments */
  nav ul li {
    margin-left: 15px;
  }
  
  /* Hero section */
  .hero h2 {
    font-size: 36px;
  }
  
  .hero p {
    font-size: 18px;
  }
  
  /* Section titles */
  .section-title h2 {
    font-size: 30px;
  }
  
  /* Products grid */
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
  
  /* Features grid */
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* Footer */
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile Landscape / Small Tablet (576px - 767px) */
@media (min-width: 576px) and (max-width: 767px) {
  /* Header */
  .logo h1 {
    font-size: 20px;
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  nav ul {
    display: none;
  }
  
  /* Hero section */
  .hero {
    padding: 60px 0;
  }
  
  .hero h2 {
    font-size: 32px;
  }
  
  .hero-btns {
    flex-direction: column;
    gap: 10px;
  }
  
  .btn {
    width: 100%;
    max-width: 250px;
    margin: 0 auto;
  }
  
  /* Sections */
  .features, .products, .testimonials, .cta {
    padding: 60px 0;
  }
  
  .section-title h2 {
    font-size: 28px;
  }
  
  /* Features grid */
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  /* Products */
  .products-filter {
    justify-content: flex-start;
  }
  
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  
  /* Testimonials */
  .testimonial-text {
    font-size: 16px;
  }
  
  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile Portrait (up to 575px) */
@media (max-width: 575px) {
  /* Header */
  .logo h1 {
    font-size: 18px;
  }
  
  .header-actions .btn {
    display: none;
  }
  
  /* Hero section */
  .hero {
    padding: 50px 0;
  }
  
  .hero h2 {
    font-size: 28px;
  }
  
  .hero p {
    font-size: 16px;
  }
  
  /* Sections */
  .features, .products, .testimonials, .cta {
    padding: 50px 0;
  }
  
  .section-title h2 {
    font-size: 24px;
  }
  
  .section-title p {
    font-size: 14px;
  }
  
  /* Products */
  .products-grid {
    grid-template-columns: 1fr;
  }
  
  .product-actions {
    flex-direction: column;
    gap: 10px;
  }
  
  .product-actions .btn {
    width: 100%;
  }
  
  /* CTA */
  .cta h2 {
    font-size: 28px;
  }
  
  .cta p {
    font-size: 16px;
  }
  
  /* Footer */
  .footer-col h3 {
    font-size: 16px;
  }
  
  .footer-contact p {
    font-size: 14px;
  }
  
  .footer-bottom {
    font-size: 12px;
  }
}