:root {
  --red: #e63946;
  --red-dark: #c1121f;
  --red-light: #ff6b6b;
  --bg: #f8f9fa;
  --bg-secondary: #e8e8e8;
  --bg-soft: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f0f0f0;
  --text: #1a1a1a;
  --text-secondary: #525252;
  --text-muted: #737373;
  --border: #e5e5e5;
  --success: #22c55e;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 0 50px rgba(230, 57, 70, 0.2);
  --radius: 16px;
  --radius-sm: 10px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --bg: #050505;
  --bg-secondary: #1a1a1a;
  --bg-soft: #0a0a0a;
  --bg-card: #111111;
  --bg-card-hover: #1a1a1a;
  --text: #ffffff;
  --text-secondary: #a3a3a3;
  --text-muted: #525252;
  --border: #262626;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 50px rgba(230, 57, 70, 0.3);
}

[data-theme="dark"] .hero h1 {
  color: #fff;
}

[data-theme="dark"] .hero-stat-num {
  color: #dc2626;
}

.loader {
  position: fixed;
  inset: 0;
  background: #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

#customAlert {
  display: none;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-content {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader-logo {
  width: 180px;
  height: 180px;
  object-fit: contain;
  animation: logoSpin 1.8s linear infinite, logoScale 1.8s ease-in-out infinite;
  filter: drop-shadow(0 0 30px rgba(230, 57, 70, 0.6));
}

.loader-ring {
  position: absolute;
  width: 220px;
  height: 220px;
  border: 3px solid transparent;
  border-top-color: #e63946;
  border-right-color: #e63946;
  border-radius: 50%;
  animation: ringSpin 1.2s linear infinite;
}

.loader-ring::before {
  content: '';
  position: absolute;
  inset: -8px;
  border: 2px solid transparent;
  border-top-color: #ff6b6b;
  border-bottom-color: #ff6b6b;
  border-radius: 50%;
  animation: ringSpin 0.8s linear infinite reverse;
}

@keyframes logoSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes logoScale {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.1) rotate(180deg); }
}

@keyframes ringSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

[data-theme="dark"] .loader {
  background: #000;
}

[data-theme="light"] .loader {
  background: #fff;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 0.3s, color 0.3s;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
}

input,
select,
textarea {
  font-family: inherit;
}

.progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--red), var(--red-light));
  z-index: 10000;
  transition: width 0.1s;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s var(--ease);
}

.btn-primary {
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: white;
  box-shadow: 0 8px 30px rgba(230, 57, 70, 0.35);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(230, 57, 70, 0.45);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--border);
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--red);
  color: var(--red);
}

.btn-danger {
  background: #dc2626;
  border: 2px solid #dc2626;
  color: white;
}

.btn-danger:hover {
  background: #b91c1c;
  border-color: #b91c1c;
}

.btn-sm {
  padding: 10px 20px;
  font-size: 0.85rem;
}

.btn-icon {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  display: grid;
  place-items: center;
  transition: all 0.3s;
}

.btn-icon:hover {
  border-color: var(--red);
  color: var(--red);
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 16px 0;
  background: var(--bg);
  transition: all 0.3s var(--ease);
}

.navbar.scrolled {
  background: var(--bg);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.5px;
}

.logo img {
  height: 44px;
  width: auto;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-links {
  display: flex;
  gap: 8px;
  list-style: none;
}

.nav-links a {
  padding: 10px 18px;
  color: var(--text-secondary);
  font-weight: 500;
  border-radius: 10px;
  transition: all 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: var(--bg-card);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle {
  font-size: 1.2rem;
}

.cart-btn {
  position: relative;
  width: 44px;
  height: 44px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--text);
  transition: all 0.3s;
}

.cart-btn:hover {
  border-color: var(--red);
  color: var(--red);
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 22px;
  height: 22px;
  background: var(--red);
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  color: white;
}

.admin-btn {
  padding: 10px 16px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.85rem;
  transition: all 0.3s;
}

.admin-btn:hover,
.admin-btn.active {
  border-color: var(--red);
  color: var(--red);
}

.admin-btn.active {
  background: var(--red);
  color: white;
}

.menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.menu-btn span {
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: all 0.3s;
}

.hero {
  min-height: 100vh;
  display: grid;
  align-items: center;
  position: relative;
  padding-top: 100px;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 100% 80% at 20% -20%, rgba(230, 57, 70, 0.15), transparent 50%), radial-gradient(ellipse 80% 60% at 80% 100%, rgba(230, 57, 70, 0.08), transparent 50%), linear-gradient(180deg, transparent 0%, var(--bg) 100%);
  pointer-events: none;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: url('../fondo.jpg') center/cover no-repeat;
}

.hero-content {
  position: relative;
  max-width: 720px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(230, 57, 70, 0.5);
  border-radius: 50px;
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.hero-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--red);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1)
  }

  50% {
    opacity: 0.5;
    transform: scale(1.2)
  }
}

.hero h1 {
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 1.05;
  margin-bottom: 24px;
  letter-spacing: -2px;
  color: #fff;
}

.hero h1 span {
  color: #fff;
}

.hero p {
  font-size: 1.25rem;
  color: #fff;
  margin-bottom: 36px;
  max-width: 540px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 50px;
}

.hero-actions .btn-outline {
  background: #22c55e;
  border-color: #22c55e;
  color: #fff;
}

.hero-actions .btn-outline:hover {
  background: #16a34a;
  border-color: #16a34a;
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(34, 197, 94, 0.45);
}

.hero-stats {
  display: flex;
  gap: 50px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}

.hero-stat-num {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--red);
  line-height: 1;
}

.hero-stat-label {
  color: #fff;
  font-size: 0.9rem;
  margin-top: 4px;
}

section {
  padding: 100px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 50px;
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -1px;
}

.section-title span {
  color: var(--red);
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 550px;
  margin: 0 auto;
}

.search-section {
  background: var(--bg-soft);
  padding: 30px 0;
  border-bottom: 1px solid var(--border);
}

.search-box {
  display: flex;
  max-width: 550px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50px;
  overflow: hidden;
}

.search-box input {
  flex: 1;
  padding: 14px 22px;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 1rem;
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.search-box input:focus {
  outline: none;
}

.search-box button {
  padding: 14px 26px;
  background: var(--red);
  color: white;
  font-weight: 600;
}

.category-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.category-tab {
  padding: 10px 22px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50px;
  color: var(--text-secondary);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
}

.category-tab:hover {
  border-color: var(--red);
  color: var(--text);
}

.category-tab.active {
  background: var(--red);
  border-color: var(--red);
  color: white;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 24px;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.4s var(--ease);
}

.product-card:hover {
  transform: translateY(-8px);
  border-color: var(--red);
  box-shadow: var(--shadow-glow);
}

.product-img {
  position: relative;
  height: 200px;
  overflow: hidden;
}

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

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

.product-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 7px 13px;
  background: rgba(5, 5, 5, 0.9);
  border: 1px solid var(--red);
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--red-light);
}

.product-body {
  padding: 22px;
}

.product-name {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.product-price {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--red-light);
  margin-bottom: 14px;
}

.product-specs {
  list-style: none;
  margin-bottom: 18px;
}

.product-specs li {
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 5px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.product-specs li::before {
  content: '▹';
  color: var(--red);
  font-weight: 700;
}

.product-actions {
  display: flex;
  gap: 10px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.product-actions .btn {
  flex: 1;
}

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

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  transition: all 0.4s var(--ease);
}

.service-card:hover {
  border-color: var(--red);
  transform: translateY(-6px);
}

.service-icon {
  width: 65px;
  height: 65px;
  margin: 0 auto 20px;
  background: rgba(230, 57, 70, 0.1);
  border: 1px solid rgba(230, 57, 70, 0.2);
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: var(--red);
  transition: all 0.3s;
}

.service-card:hover .service-icon {
  background: var(--red);
  color: white;
}

.service-card h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.service-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 22px;
}

.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--red);
  border-radius: var(--radius);
  padding: 28px;
  transition: all 0.3s;
}

.about-card:hover {
  border-left-color: var(--red-light);
}

.about-year {
  font-size: 2rem;
  font-weight: 800;
  color: var(--red);
  display: block;
  margin-bottom: 10px;
}

.about-card h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.about-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

.about-intro {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px;
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.about-timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding-left: 40px;
}

.about-timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, var(--red), var(--red-light));
  border-radius: 3px;
}

.timeline-item {
  position: relative;
  margin-bottom: 35px;
  padding-left: 30px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -34px;
  top: 5px;
  width: 14px;
  height: 14px;
  background: var(--red);
  border-radius: 50%;
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 3px var(--red);
}

.timeline-year {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--red);
  margin-bottom: 8px;
}

.timeline-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: all 0.3s;
}

.timeline-content:hover {
  border-color: var(--red);
  box-shadow: 0 8px 25px rgba(230, 57, 70, 0.12);
}

.timeline-content h3 {
  color: var(--red);
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.timeline-content p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 10px;
}

.timeline-list {
  margin: 10px 0;
  padding-left: 18px;
}

.timeline-list li {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 5px;
}

.timeline-final {
  color: var(--text) !important;
  font-weight: 500;
  font-size: 0.95rem !important;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  margin-top: 10px !important;
}

@media (max-width: 768px) {
  .about-timeline {
    padding-left: 30px;
  }
  
  .about-timeline::before {
    left: 8px;
  }
  
  .timeline-item {
    padding-left: 20px;
  }
  
  .timeline-item::before {
    left: -27px;
    width: 12px;
    height: 12px;
  }
}

.testimonials-wrap {
  max-width: 720px;
  margin: 0 auto;
  overflow: hidden;
}

.testimonials-track {
  display: flex;
  transition: transform 0.6s var(--ease);
}

.testimonial-card {
  min-width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 42px;
  text-align: center;
}

.testimonial-stars {
  color: #fbbf24;
  font-size: 1.3rem;
  letter-spacing: 5px;
  margin-bottom: 18px;
}

.testimonial-card>p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  font-style: italic;
  line-height: 1.75;
  margin-bottom: 22px;
}

.testimonial-author {
  font-weight: 700;
  font-size: 1.05rem;
}

.testimonial-company {
  color: var(--red-light);
  font-size: 0.9rem;
  margin-top: 3px;
}

.slider-dots {
  display: flex;
  justify-content: center;
  gap: 11px;
  margin-top: 24px;
}

.slider-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  transition: all 0.3s;
}

.slider-dot.active {
  background: var(--red);
  border-color: var(--red);
}

.videos-section {
  background: var(--bg-soft);
}

.video-slider {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: var(--radius);
}

.video-track {
  display: flex;
  transition: transform 0.5s var(--ease);
}

.video-slide {
  min-width: 100%;
}

.video-slide iframe {
  width: 100%;
  aspect-ratio: 16/9;
  display: block;
}

.video-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  z-index: 5;
  color: var(--text);
}

.video-nav:hover {
  background: var(--red);
  border-color: var(--red);
  color: white;
}

.video-prev {
  left: 16px;
}

.video-next {
  right: 16px;
}

.video-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.video-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  transition: all 0.3s;
}

.video-dot.active {
  background: var(--red);
  transform: scale(1.2);
}

.presence-section {
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 50%, var(--bg) 100%);
  position: relative;
}

.presence-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0L60 30L30 60L0 30z' fill='%23e63946' fill-opacity='0.02'/%3E%3C/svg%3E");
  pointer-events: none;
}

.presence-map {
  margin: 40px auto;
  max-width: 900px;
}

#ecuador-map {
  width: 100%;
  height: 450px;
  border-radius: var(--radius);
  box-shadow: 0 20px 40px rgba(230, 57, 70, 0.15);
  z-index: 1;
}

.leaflet-popup-content-wrapper {
  border-radius: var(--radius-sm);
}

.leaflet-container a.leaflet-popup-close-button {
  color: var(--text-secondary);
}

.leaflet-control-zoom a {
  background: var(--bg-card) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}

.leaflet-control-attribution {
  background: rgba(255,255,255,0.8) !important;
}

[data-theme="dark"] .leaflet-control-attribution {
  background: rgba(0,0,0,0.8) !important;
  color: #999 !important;
}

.presence-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  margin-top: 40px;
}

.presence-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  transition: all 0.4s var(--ease);
  position: relative;
  overflow: hidden;
}

.presence-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--red), var(--red-light));
  transform: scaleX(0);
  transition: transform 0.4s var(--ease);
}

.presence-card:hover {
  transform: translateY(-8px);
  border-color: var(--red);
  box-shadow: 0 20px 40px rgba(230, 57, 70, 0.15);
}

.presence-card:hover::before {
  transform: scaleX(1);
}

.presence-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, rgba(230, 57, 70, 0.15), rgba(230, 57, 70, 0.05));
  border: 1px solid rgba(230, 57, 70, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.presence-icon svg {
  width: 28px;
  height: 28px;
  color: var(--red);
}

.presence-card h3 {
  font-size: 1.1rem;
  margin-bottom: 6px;
}

.presence-card p {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.presence-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 4px 10px;
  background: var(--success);
  color: white;
  font-size: 0.65rem;
  font-weight: 600;
  border-radius: 20px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 36px;
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

.contact-card h3 {
  font-size: 1.4rem;
  margin-bottom: 10px;
}

.contact-card>p {
  color: var(--text-secondary);
  margin-bottom: 26px;
}

.contact-info {
  display: grid;
  gap: 16px;
  margin-bottom: 26px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-secondary);
}

.contact-item svg {
  color: var(--red);
  flex-shrink: 0;
}

.social-links {
  display: flex;
  gap: 10px;
}

.social-link {
  width: 44px;
  height: 44px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--text-secondary);
  transition: all 0.3s;
}

.social-link:hover {
  border-color: var(--red);
  color: var(--red);
}

#contactForm {
  display: grid;
  gap: 16px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field {
  display: grid;
  gap: 7px;
}

.field label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.field input,
.field select,
.field textarea {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 13px 15px;
  color: var(--text);
  font-size: 0.95rem;
  transition: all 0.3s;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.1);
}

.field .error {
  font-size: 0.75rem;
  color: var(--red-light);
  display: none;
}

.field.invalid input,
.field.invalid select,
.field.invalid textarea {
  border-color: var(--red-light);
}

.field.invalid .error {
  display: block;
}

.success-msg {
  display: none;
  padding: 13px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid var(--success);
  border-radius: 10px;
  color: var(--success);
  text-align: center;
}

.whatsapp-float {
  position: fixed;
  bottom: 26px;
  left: 26px;
  width: 56px;
  height: 56px;
  background: #25D366;
  border-radius: 16px;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 28px rgba(37, 211, 102, 0.4);
  z-index: 998;
  transition: all 0.3s;
}

.whatsapp-float:hover {
  transform: scale(1.1);
}

.whatsapp-float svg {
  width: 28px;
  height: 28px;
  fill: white;
}

footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  padding: 55px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 45px;
}

.footer-brand p {
  color: var(--text-secondary);
  margin-top: 14px;
  font-size: 0.9rem;
  line-height: 1.7;
}

.footer h4 {
  font-size: 1rem;
  margin-bottom: 20px;
}

.footer-links a {
  display: block;
  color: var(--text-secondary);
  padding: 7px 0;
  font-size: 0.9rem;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--red);
}

.footer p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  padding: 5px 0;
}

.footer-bottom {
  margin-top: 45px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.back-top {
  position: fixed;
  bottom: 26px;
  right: 26px;
  width: 50px;
  height: 50px;
  background: var(--red);
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: white;
  font-size: 1.2rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  z-index: 997;
}

.back-top.show {
  opacity: 1;
  visibility: visible;
}

.back-top:hover {
  transform: translateY(-3px);
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  z-index: 1100;
}

.modal.open {
  display: flex;
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  padding: 30px;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
}

.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 18px;
}

.modal-grid img {
  width: 100%;
  border-radius: 11px;
  max-height: 280px;
  object-fit: cover;
}

.modal h3 {
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.modal-price {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--red-light);
  margin-bottom: 18px;
}

.modal h4 {
  color: var(--red-light);
  margin-bottom: 10px;
  font-size: 0.95rem;
}

.cart-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  z-index: 1200;
}

.cart-modal.open {
  display: flex;
}

.cart-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 420px;
  width: 100%;
  max-height: 82vh;
  display: flex;
  flex-direction: column;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}

.cart-header h3 {
  font-size: 1.2rem;
}

.cart-close {
  width: 34px;
  height: 34px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text);
  cursor: pointer;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 18px 22px;
  display: grid;
  gap: 14px;
}

.cart-empty {
  text-align: center;
  padding: 45px 18px;
  color: var(--text-muted);
}

.cart-item {
  display: flex;
  gap: 12px;
  padding: 13px;
  background: var(--bg-soft);
  border-radius: 11px;
}

.cart-item img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 8px;
}

.cart-item-info {
  flex: 1;
}

.cart-item-name {
  font-weight: 600;
  font-size: 0.9rem;
}

.cart-item-price {
  color: var(--red-light);
  font-weight: 700;
  margin-top: 3px;
}

.cart-qty {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.cart-qty button {
  width: 26px;
  height: 26px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--text);
  cursor: pointer;
}

.cart-remove {
  background: transparent;
  border: none;
  color: var(--red-light);
  font-size: 0.8rem;
  cursor: pointer;
  align-self: flex-start;
}

.cart-footer {
  padding: 18px 22px;
  border-top: 1px solid var(--border);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.cart-total span:last-child {
  color: var(--red-light);
}

.cart-actions {
  display: flex;
  gap: 10px;
}

.cart-actions .btn {
  flex: 1;
}

.login-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  z-index: 1400;
}

.login-modal.open {
  display: flex;
}

.login-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 34px;
  max-width: 340px;
  width: 100%;
  text-align: center;
}

.login-content h3 {
  margin-bottom: 6px;
}

.login-content>p {
  color: var(--text-muted);
  margin-bottom: 22px;
}

.login-content input {
  width: 100%;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 13px;
  color: var(--text);
  text-align: center;
  margin-bottom: 10px;
}

.login-error {
  color: var(--red-light);
  font-size: 0.85rem;
  display: none;
  margin-bottom: 14px;
}

.login-actions {
  display: flex;
  gap: 10px;
}

.login-actions .btn {
  flex: 1;
}

.admin-panel {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: none;
  z-index: 1300;
  overflow-y: auto;
}

.admin-panel.open {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.admin-wrapper {
  flex: 1;
}

.admin-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.admin-logo img {
  height: 40px;
}

.admin-nav .btn {
  margin-left: auto;
}

.admin-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 30px 24px 68px;
}

.admin-header {
  margin-bottom: 30px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}

.admin-header h2 {
  color: var(--red);
  font-size: 1.7rem;
}

.admin-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 26px;
  flex-wrap: wrap;
}

.admin-tab {
  padding: 11px 22px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s;
}

.admin-tab.active {
  background: var(--red);
  border-color: var(--red);
  color: white;
}

.admin-content {
  display: none;
}

.admin-content.active {
  display: block;
}

.admin-table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 15px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.admin-table th {
  background: rgba(230, 57, 70, 0.1);
  color: var(--red-light);
  font-weight: 600;
}

.admin-table img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
}

.admin-actions {
  display: flex;
  gap: 7px;
}

.edit-btn,
.delete-btn {
  padding: 8px 14px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
}

.edit-btn {
  background: #f59e0b;
  color: white;
}

.edit-btn:hover {
  background: #d97706;
}

.delete-btn {
  background: #ef4444;
  color: white;
}

.delete-btn:hover {
  background: #dc2626;
}

.admin-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.admin-form h3 {
  margin-bottom: 22px;
}

.img-preview {
  width: 100%;
  height: 150px;
  background: var(--bg-soft);
  border: 2px dashed var(--border);
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  overflow: hidden;
}

.img-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.img-preview span {
  color: var(--text-muted);
}

.admin-footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  padding: 20px 0;
}

.admin-footer .admin-socials a:hover {
  color: var(--red) !important;
}

.toast {
  position: fixed;
  top: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: var(--bg-card);
  color: var(--text);
  padding: 16px 28px;
  border-radius: 12px;
  font-weight: 500;
  font-size: 0.95rem;
  z-index: 10000;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  display: none;
  align-items: center;
  gap: 12px;
  border: 2px solid var(--success);
  transition: all 0.4s var(--ease);
}

.toast-icon {
  font-size: 1.3rem;
  font-weight: bold;
}

.reveal {
  opacity: 0;
  transform: translateY(38px);
  transition: all 0.7s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1200px) {
  .presence-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 992px) {
  #ecuador-map {
    height: 380px;
  }
}

@media (max-width: 768px) {
  .presence-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 992px) {
  .container {
    padding: 0 16px;
  }

  .hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
  }

  .hero-stats {
    gap: 30px;
  }

  .presence-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .menu-btn {
    display: flex;
  }

  .nav-links.mobile {
    display: flex;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    padding: 18px;
    gap: 8px;
    border-bottom: 1px solid var(--border);
    z-index: 999;
  }

  .nav-links.mobile a {
    padding: 12px;
    border-radius: 8px;
  }

  .nav-links.mobile a:hover {
    background: var(--bg-card);
  }

  .hero {
    min-height: auto;
    padding: 120px 0 60px;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero h1 {
    font-size: 2rem;
    letter-spacing: -1px;
  }

  .hero p {
    font-size: 1rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
    text-align: center;
  }

  .hero-stats {
    flex-wrap: wrap;
    gap: 20px;
    padding-top: 30px;
  }

  .hero-stat-num {
    font-size: 1.8rem;
  }

  section {
    padding: 60px 0;
  }

  .section-header {
    margin-bottom: 30px;
  }

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

  .section-subtitle {
    font-size: 0.95rem;
  }

  .search-box {
    flex-direction: column;
    border-radius: 16px;
  }

  .search-box input {
    padding: 14px 18px;
  }

  .search-box button {
    padding: 14px;
    border-radius: 0;
  }

  .category-tabs {
    gap: 8px;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 10px;
  }

  .category-tab {
    padding: 8px 16px;
    font-size: 0.85rem;
    white-space: nowrap;
  }

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

  .product-card {
    max-width: 100%;
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .service-card {
    padding: 20px;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .testimonial-card {
    padding: 24px;
  }

  .testimonial-card>p {
    font-size: 1rem;
  }

  .presence-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .presence-card {
    padding: 20px;
  }

  .video-slider {
    border-radius: 12px;
  }

  .video-nav {
    width: 36px;
    height: 36px;
  }

  .video-prev {
    left: 8px;
  }

  .video-next {
    right: 8px;
  }

  .contact-card {
    padding: 20px;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .field input,
  .field select,
  .field textarea {
    padding: 12px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    text-align: center;
  }

  .footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .footer-links a {
    padding: 8px 0;
  }

  .social-links {
    justify-content: center;
  }

  .whatsapp-float {
    bottom: 80px;
    left: 16px;
    width: 50px;
    height: 50px;
  }

  .back-top {
    bottom: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
  }

  .admin-container {
    padding: 20px 16px;
  }

  .admin-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 10px;
  }

  .admin-tab {
    padding: 10px 16px;
    font-size: 0.85rem;
    white-space: nowrap;
  }

  .admin-table {
    font-size: 0.85rem;
  }

  .admin-table th,
  .admin-table td {
    padding: 10px 8px;
  }

  .admin-table img {
    width: 40px;
    height: 40px;
  }

  .edit-btn,
  .delete-btn {
    padding: 6px 10px;
    font-size: 0.75rem;
  }

  .modal-content {
    padding: 20px;
    margin: 10px;
  }

  .cart-content {
    max-height: 90vh;
  }

  .cart-item {
    flex-direction: column;
    text-align: center;
  }

  .cart-item img {
    width: 100%;
    height: auto;
  }
}

@media (max-width: 480px) {
  .logo img {
    height: 36px;
  }

  .nav-actions {
    gap: 8px;
  }

  .btn-icon,
  .cart-btn,
  .admin-btn {
    width: 38px;
    height: 38px;
    padding: 0;
  }

  .admin-btn {
    display: none;
  }

  .hero-badge {
    padding: 8px 14px;
    font-size: 0.8rem;
  }

  .hero-stat-num {
    font-size: 1.5rem;
  }

  .hero-stat-label {
    font-size: 0.8rem;
  }

  .btn {
    padding: 12px 20px;
    font-size: 0.9rem;
  }

  .btn-sm {
    padding: 10px 16px;
    font-size: 0.8rem;
  }

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

  .product-body {
    padding: 16px;
  }

  .product-price {
    font-size: 1.1rem;
  }

  .testimonial-stars {
    font-size: 1rem;
    letter-spacing: 3px;
  }

  .admin-footer .container {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }

  .admin-footer .admin-socials {
    justify-content: center;
  }

  #ecuador-map {
    height: 300px;
  }

  .about-intro {
    font-size: 1rem;
    padding: 0 10px;
  }

  .about-timeline {
    padding-left: 30px;
  }

  .timeline-year {
    font-size: 1.2rem;
  }

  .timeline-content {
    padding: 15px;
  }

  .timeline-content h3 {
    font-size: 1rem;
  }

  .timeline-content p,
  .timeline-list li {
    font-size: 0.85rem;
  }

  .loader-logo {
    width: 120px;
    height: 120px;
  }

  .loader-ring {
    width: 150px;
    height: 150px;
  }
}