/* Base styles and resets */
:root {
  --primary-color: #e63946;
  --secondary-color: #1d3557;
  --accent-color: #f1faee;
  --dark-color: #2b2d42;
  --light-color: #f8f9fa;
  --gray-color: #6c757d;
  --success-color: #28a745;
  --warning-color: #ffc107;
  --max-width: 1200px;
}

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

html {
  scroll-behavior: smooth;
}

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

a {
  text-decoration: none;
  color: var(--secondary-color);
  transition: color 0.3s ease;
}

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

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
}

.container {
  width: 90%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 15px;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: 2.5rem;
  color: var(--secondary-color);
  margin-bottom: 1rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.section-header h2::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background-color: var(--primary-color);
}

.section-header p {
  font-size: 1.1rem;
  color: var(--gray-color);
  max-width: 600px;
  margin: 0 auto;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: 600;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: #c61a2b;
  color: white;
}

.btn-more {
  display: inline-block;
  padding: 0.5rem 1rem;
  margin-top: 1rem;
  background-color: transparent;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-more:hover {
  background-color: var(--primary-color);
  color: white;
}

/* Header styles */
header {
  background-color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1rem 0;
}

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

.logo h1 {
  font-size: 1.8rem;
  color: var(--secondary-color);
}

.logo span {
  color: var(--primary-color);
}

.nav-menu {
  display: flex;
}

.nav-menu li {
  margin-left: 2rem;
}

.nav-menu a {
  font-weight: 500;
  position: relative;
}

.nav-menu a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}

.nav-menu a:hover::after {
  width: 100%;
}

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
}

.mobile-menu-btn span {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px 0;
  background-color: var(--secondary-color);
  transition: all 0.3s ease;
}

/* Hero section */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('images/cover.jpg');
  background-size: cover;
  background-position: center;
  color: #fff;
  margin-top: 70px;
}

.hero-content {
  max-width: 700px;
}

.hero-content h1 {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

/* Services section */
.services {
  padding: 5rem 0;
  background-color: var(--light-color);
}

.service-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.service-card {
  background-color: #fff;
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.service-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(230, 57, 70, 0.1);
  border-radius: 50%;
  color: var(--primary-color);
}

.service-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--secondary-color);
}

.service-card p {
  color: var(--gray-color);
  margin-bottom: 1rem;
}

/* Products section */
.products {
  padding: 5rem 0;
  background-color: #fff;
}

.product-filters {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.5rem 1.5rem;
  background-color: var(--light-color);
  border: 1px solid #ddd;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.filter-btn.active,
.filter-btn:hover {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.product-card {
  background-color: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.product-image {
  position: relative;
  height: 200px;
  overflow: hidden;
  justify-content: center;  /* Centra la imagen horizontalmente */
  align-items: center;  
}

.product-image img {
  width: auto;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
  transform: scale(1.1);
}

.product-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: var(--primary-color);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 30px;
  font-size: 0.8rem;
  font-weight: bold;
}

.product-info {
  padding: 1.5rem;
}

.product-info h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--secondary-color);
}

.product-description {
  color: var(--gray-color);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  line-height: 1.4;
  height: 60px;
  overflow: hidden;
}

.product-price {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.price {
  font-weight: bold;
  color: var(--secondary-color);
  font-size: 1.2rem;
}

.btn-product-details {
  padding: 0.5rem 1rem;
  background-color: transparent;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.btn-product-details:hover {
  background-color: var(--primary-color);
  color: white;
}

/* Product Modal Styles */
.product-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary-color);
}

.modal-price {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-color);
}

/* About section */
.about {
  padding: 5rem 0;
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.about-text h3 {
  font-size: 1.5rem;
  color: var(--secondary-color);
  margin-bottom: 1rem;
}

.about-text p {
  margin-bottom: 1.5rem;
  color: var(--gray-color);
}

.about-text ul {
  margin-bottom: 1.5rem;
}

.about-text li {
  margin-bottom: 0.5rem;
  position: relative;
  padding-left: 1.5rem;
}

.about-text li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--success-color);
  font-weight: bold;
}

.about-image {
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Contact section */
.contact {
  padding: 5rem 0;
  background-color: var(--light-color);
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.contact-item {
  display: flex;
  margin-bottom: 2rem;
}

.contact-icon {
  width: 50px;
  height: 50px;
  background-color: rgba(230, 57, 70, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  color: var(--primary-color);
}

.contact-icon svg {
  width: 24px;
  height: 24px;
}

.contact-item h3 {
  margin-bottom: 0.5rem;
  color: var(--secondary-color);
}

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

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

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

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

/* Footer */
footer {
  background-color: var(--secondary-color);
  color: #fff;
  padding: 4rem 0 1rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer-logo h2 {
  margin-bottom: 1rem;
}

.footer-logo span {
  color: var(--primary-color);
}

.footer-links h3,
.footer-contact h3 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-links h3::after,
.footer-contact h3::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 50px;
  height: 2px;
  background-color: var(--primary-color);
}

.footer-links ul li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: #adb5bd;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: #fff;
}

.footer-contact p {
  margin-bottom: 0.5rem;
  color: #adb5bd;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Modal styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: #fff;
  padding: 2rem;
  border-radius: 8px;
  width: 90%;
  max-width: 700px;
  position: relative;
  max-height: 80vh;
  overflow-y: auto;
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 1.8rem;
  color: var(--gray-color);
  cursor: pointer;
}

.close-modal:hover {
  color: var(--primary-color);
}

#modalTitle {
  font-size: 1.8rem;
  color: var(--secondary-color);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary-color);
}

.modal-list {
  margin: 1.5rem 0;
  padding-left: 1.5rem;
}

.modal-list li {
  margin-bottom: 0.75rem;
  position: relative;
  padding-left: 1.5rem;
}

.modal-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--success-color);
}

/* Media queries for responsiveness */
@media (max-width: 992px) {
  .hero-content h1 {
    font-size: 2.5rem;
  }

  .about-content,
  .contact-content {
    grid-template-columns: 1fr;
  }

  .about-image {
    order: -1;
  }
}

@media (max-width: 768px) {
  .mobile-menu-btn {
    display: block;
  }

  .nav-menu {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    background-color: #fff;
    flex-direction: column;
    text-align: center;
    transition: left 0.3s ease;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    padding: 2rem 0;
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-menu li {
    margin: 1.5rem 0;
  }

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

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
}

@media (max-width: 576px) {
  .hero-content h1 {
    font-size: 1.8rem;
  }

  .section-header h2 {
    font-size: 2rem;
  }

  .service-cards {
    grid-template-columns: 1fr;
  }

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

  .product-filters {
    gap: 0.5rem;
  }

  .filter-btn {
    padding: 0.4rem 1rem;
    font-size: 0.9rem;
  }
}
