/* ===== CSS Variables ===== */
:root {
  --primary-color: #8B4513;
  --secondary-color: #333333;
  --accent-color: #C9302C;
  --bg-light: #F5F5F5;
  --bg-white: #FFFFFF;
  --text-dark: #222222;
  --text-light: #666666;
  --border-color: #E0E0E0;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.15);
  --transition: all 0.3s ease;
}

/* ===== Reset & Base ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text-dark);
  background-color: var(--bg-white);
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--bg-white);
  box-shadow: var(--shadow);
  z-index: 1000;
  padding: 0 40px;
  height: 140px;
  display: flex;
  align-items: center;
}

.header-container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-img {
  width: 100px;
  height: auto;
  object-fit: contain;
}

.logo-text {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--secondary-color);
}

.logo-subtitle {
  font-size: 0.65rem;
  color: var(--text-light);
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ===== Navigation ===== */
.nav-menu {
  display: flex;
  gap: 35px;
}

.nav-item {
  position: relative;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--secondary-color);
  padding: 28px 0;
  display: block;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-color);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 20px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* ===== Dropdown Menu ===== */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg-white);
  min-width: 200px;
  box-shadow: var(--shadow);
  border-radius: 0 0 8px 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition);
  z-index: 100;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  font-size: 0.9rem;
  color: var(--secondary-color);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

.dropdown-item:last-child {
  border-bottom: none;
}

.dropdown-item:hover {
  background: var(--bg-light);
  color: var(--primary-color);
  padding-left: 25px;
}

.dropdown-item .arrow {
  font-size: 0.7rem;
  color: var(--text-light);
}

/* Submenu */
.has-submenu {
  position: relative;
}

.submenu {
  position: absolute;
  left: 100%;
  top: 0;
  background: var(--bg-white);
  min-width: 220px;
  box-shadow: var(--shadow);
  border-radius: 0 8px 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateX(10px);
  transition: var(--transition);
}

.has-submenu:hover .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

/* ===== Header Actions ===== */
.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.action-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--secondary-color);
  font-size: 1.2rem;
  transition: var(--transition);
  position: relative;
}

.action-btn:hover {
  background: var(--bg-light);
  color: var(--primary-color);
}



/* ===== Hero Slider ===== */
.hero {
  margin-top: 140px;
  position: relative;
  height: 70vh;
  min-height: 500px;
  overflow: hidden;
}

.slider {
  width: 100%;
  height: 100%;
  position: relative;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.8s ease;
  background: #1a1a1a;
  /* Color sólido profesional y estable */
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide.active {
  opacity: 1;
}

.slide-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.slide-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.1) 100%);
}

.slide-content {
  position: absolute;
  top: 50%;
  left: 80px;
  transform: translateY(-50%);
  color: white;
  max-width: 500px;
}

.slide-content h2 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.2;
}

.slide-content p {
  font-size: 1.1rem;
  margin-bottom: 30px;
  opacity: 0.9;
}

.btn-primary {
  display: inline-block;
  padding: 15px 40px;
  background: var(--primary-color);
  color: white;
  font-weight: 600;
  border-radius: 30px;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: var(--transition);
}

.btn-primary:hover {
  background: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Slider Controls */
.slider-controls {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  padding: 0 20px;
  pointer-events: none;
}

.slider-btn {
  width: 50px;
  height: 50px;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--secondary-color);
  transition: var(--transition);
  pointer-events: all;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.slider-btn:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.slider-dots {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: var(--transition);
}

.dot.active {
  background: var(--primary-color);
  transform: scale(1.2);
}

/* ===== Categories Section ===== */
.categories {
  padding: 80px 40px;
  background: var(--bg-light);
}

.section-title {
  text-align: center;
  margin-bottom: 60px;
}

.section-title h2 {
  font-size: 2.5rem;
  color: var(--secondary-color);
  margin-bottom: 15px;
}

.section-title p {
  color: var(--text-light);
  font-size: 1.1rem;
}

.categories-grid {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.category-card {
  background: var(--bg-white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  cursor: pointer;
}

.category-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-hover);
}

.category-image {
  height: 280px;
  overflow: hidden;
  background-color: #f9f9f9;
  /* Soft background for contained images */
  display: flex;
  align-items: center;
  justify-content: center;
}

.category-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: var(--transition);
  padding: 10px;
  /* Space around the image */
}

.category-card:hover .category-image img {
  transform: scale(1.1);
}

.category-info {
  padding: 25px;
  text-align: center;
}

.category-info h3 {
  font-size: 1.4rem;
  color: var(--secondary-color);
  margin-bottom: 10px;
}

.category-info p {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* ===== Featured Products ===== */
.featured {
  padding: 80px 40px;
}

.products-grid {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
}

.product-card {
  background: var(--bg-white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.product-image {
  height: 220px;
  overflow: hidden;
  position: relative;
  background-color: #f9f9f9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: var(--transition);
  padding: 5px;
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

.product-actions {
  position: absolute;
  top: 15px;
  right: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  opacity: 0;
  transform: translateX(20px);
  transition: var(--transition);
}

.product-card:hover .product-actions {
  opacity: 1;
  transform: translateX(0);
}

.product-action-btn {
  width: 40px;
  height: 40px;
  background: var(--bg-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.product-action-btn:hover {
  background: var(--primary-color);
  color: white;
}

.product-info {
  padding: 20px;
}

.product-category {
  font-size: 0.8rem;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.product-name {
  font-size: 1.1rem;
  color: var(--secondary-color);
  font-weight: 600;
  margin-bottom: 10px;
}

.product-description {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.5;
}

/* ===== About Section ===== */
.about-section {
  padding: 100px 40px;
  background: linear-gradient(135deg, var(--secondary-color) 0%, #1a1a1a 100%);
  color: white;
}

.about-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-content h2 {
  font-size: 2.5rem;
  margin-bottom: 25px;
}

.about-content p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 20px;
  line-height: 1.8;
}

.about-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 30px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 15px;
}

.feature-icon {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.about-image {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== Footer ===== */
.footer {
  background: var(--secondary-color);
  color: white;
  padding: 60px 40px 30px;
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer-brand .logo-text {
  color: white;
  margin-bottom: 20px;
}

.footer-brand p {
  opacity: 0.7;
  line-height: 1.8;
  margin-bottom: 20px;
}



.footer-column h4 {
  font-size: 1.1rem;
  margin-bottom: 25px;
  position: relative;
  padding-bottom: 10px;
}

.footer-column h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--primary-color);
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  opacity: 0.7;
  transition: var(--transition);
}

.footer-links a:hover {
  opacity: 1;
  color: var(--primary-color);
}

.footer-bottom {
  max-width: 1400px;
  margin: 40px auto 0;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  opacity: 0.7;
  font-size: 0.9rem;
}

/* ===== WhatsApp Button ===== */
.whatsapp-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2rem;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  transition: var(--transition);
  z-index: 999;
}

.whatsapp-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 25px rgba(37, 211, 102, 0.5);
}

/* ===== Image Modal ===== */
.image-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  padding-top: 100px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.9);
}

.modal-content {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 900px;
  max-height: 80vh;
  object-fit: contain;
  animation-name: zoom;
  animation-duration: 0.6s;
}

@keyframes zoom {
  from {
    transform: scale(0)
  }

  to {
    transform: scale(1)
  }
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
  cursor: pointer;
}

.close-modal:hover,
.close-modal:focus {
  color: #bbb;
  text-decoration: none;
  cursor: pointer;
}

#caption {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 700px;
  text-align: center;
  color: #ccc;
  padding: 10px 0;
  height: 150px;
  font-size: 1.2rem;
}

/* ===== Animations ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.8s ease forwards;
}

/* ===== Page Header & Breadcrumbs ===== */
.page-header {
  margin-top: 80px;
  padding: 60px 40px;
  background: linear-gradient(135deg, var(--bg-light) 0%, #e8e8e8 100%);
  text-align: center;
}

.page-header h1 {
  font-size: 2.5rem;
  color: var(--secondary-color);
  margin-bottom: 15px;
}

.page-header p {
  color: var(--text-light);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

.breadcrumb {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
  font-size: 0.9rem;
}

.breadcrumb a {
  color: var(--primary-color);
}

.breadcrumb span {
  color: var(--text-light);
}

/* ===== Products Page (Sidebar & Grid) ===== */
.products-section {
  padding: 60px 40px;
}

.products-container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
}

.sidebar {
  background: var(--bg-white);
  padding: 30px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  height: fit-content;
  position: sticky;
  top: 100px;
}

.sidebar h3 {
  font-size: 1.2rem;
  color: var(--secondary-color);
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--border-color);
}

.filter-group {
  margin-bottom: 25px;
}

.filter-group h4 {
  font-size: 1rem;
  color: var(--secondary-color);
  margin-bottom: 15px;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  cursor: pointer;
  transition: var(--transition);
}

.filter-option:hover {
  color: var(--primary-color);
}

.filter-option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary-color);
}

.filter-btn {
  display: block;
  width: 100%;
  padding: 12px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover {
  background: var(--accent-color);
}

.products-main {
  flex: 1;
}

.products-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding: 15px 20px;
  background: var(--bg-white);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.results-count {
  color: var(--text-light);
}

.sort-select {
  padding: 10px 15px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
}

.products-grid-full {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

.category-tabs {
  display: flex;
  gap: 15px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.category-tab {
  padding: 12px 25px;
  background: var(--bg-white);
  border: 2px solid var(--border-color);
  border-radius: 30px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.category-tab:hover,
.category-tab.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

/* ===== Responsive Design ===== */
@media (max-width: 1200px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 992px) {
  .nav-menu {
    display: none;
  }

  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-container {
    grid-template-columns: 1fr;
  }

  .slide-content h2 {
    font-size: 2rem;
  }
}

@media (max-width: 768px) {
  .header {
    padding: 0 20px;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero {
    height: 50vh;
  }

  .slide-content {
    left: 40px;
    right: 40px;
  }

  .categories,
  .featured {
    padding: 60px 20px;
  }

  .footer-container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-column h4::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .social-links {
    justify-content: center;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}

@media (max-width: 480px) {

  .products-grid,
  .categories-grid {
    grid-template-columns: 1fr;
  }

  .logo-text {
    font-size: 1.4rem;
  }

  .section-title h2 {
    font-size: 1.8rem;
  }
}

/* ===== Animations ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeInUp 0.6s ease forwards;
}

/* ===== Loading States ===== */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}