/* 
=========================================================
  ESTILOS GLOBALES - MARCA DE ESPECIAS ARTESANALES
=========================================================
*/

/* --- VARIABLES --- */
:root {
  --color-primary: #2D6A2D;
  --color-accent: #C8960C;
  --color-bg-light: #E8F5E8;
  --color-bg-warm: #FFF8E7;
  --color-white: #FFFFFF;
  --color-text: #1A1A1A;
  --color-muted: #555555;

  /* Typography */
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Lato', sans-serif;
}

/* --- RESET & GLOBALS --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-white);
  line-height: 1.6;
  font-size: clamp(14px, 1.5vw, 16px);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-primary);
  line-height: 1.2;
}

h1 {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
}

h2 {
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 600;
  margin-bottom: 2rem;
}

h3 {
  font-size: clamp(20px, 3vw, 24px);
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

ul {
  list-style: none;
}

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

/* --- UTILITIES --- */
.marca-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.marca-text-center {
  text-align: center;
}

/* Botones */
.marca-btn {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 4px;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
  text-align: center;
}

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

.marca-btn-primary:hover {
  background-color: #1B4D1B;
  box-shadow: 0 4px 12px rgba(45, 106, 45, 0.3);
}

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

.marca-btn-accent:hover {
  background-color: #a37909;
  box-shadow: 0 4px 12px rgba(200, 150, 12, 0.3);
}

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

.marca-btn-white:hover {
  background-color: #f0f0f0;
}

.marca-btn-ghost {
  background-color: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

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

.marca-btn-block {
  display: block;
  width: 100%;
}

/* --- SECCIONES COMUNES --- */
.marca-section {
  padding: 5rem 0;
}

.marca-bg-light { background-color: var(--color-bg-light); }
.marca-bg-warm { background-color: var(--color-bg-warm); }
.marca-bg-primary { background-color: var(--color-primary); color: var(--color-white); }
.marca-bg-primary h2 { color: var(--color-white); }

/* --- HEADER --- */
.marca-header {
  position: absolute;
  top: 36px; /* Space for social bar */
  left: 0;
  width: 100%;
  background-color: transparent;
  z-index: 100;
  transition: all 0.3s ease;
  padding: 1rem 0;
}

.marca-header.scrolled {
  position: fixed;
  top: 0;
  background-color: var(--color-white);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  padding: 0.5rem 0;
}

.marca-header.scrolled .marca-nav-link {
  color: var(--color-text);
}

.marca-header.scrolled .marca-logo {
  color: var(--color-primary);
}

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

.marca-logo {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  color: var(--color-white); /* Assuming starts transparent over dark hero */
  text-transform: uppercase;
  letter-spacing: 2px;
}

.marca-header:not(.marca-hero-transparent) .marca-logo,
.marca-header:not(.marca-hero-transparent) .marca-nav-link {
  color: var(--color-text);
}

.marca-header:not(.marca-hero-transparent) .marca-logo {
  color: var(--color-primary);
}

.marca-nav-menu {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.marca-nav-link {
  font-weight: 700;
  color: var(--color-white);
  text-transform: uppercase;
  font-size: 14px;
}

.marca-nav-link:hover {
  color: var(--color-accent);
}

.marca-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
}

.marca-hamburger-line {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--color-primary);
  margin: 5px 0;
  transition: 0.3s;
}

.marca-header.scrolled .marca-hamburger-line {
  background-color: var(--color-primary);
}
.marca-header-transparent .marca-hamburger-line {
  background-color: var(--color-white);
}
.marca-header.scrolled .marca-hamburger-line {
  background-color: var(--color-primary);
}

/* Barra Social Superior */
.marca-topbar {
  background-color: var(--color-primary);
  color: var(--color-white);
  padding: 0.5rem 0;
  position: absolute;
  top: 0;
  width: 100%;
  z-index: 101;
}

.marca-topbar-content {
  display: flex;
  justify-content: flex-end;
  gap: 1.5rem;
}

.marca-topbar a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 14px;
}

.marca-topbar a:hover {
  color: var(--color-accent);
}

.marca-topbar svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* --- HERO CARRUSEL --- */
.marca-hero-slider {
  position: relative;
  height: 85vh;
  overflow: hidden;
  background-color: #111;
}

.marca-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
  display: flex;
  align-items: center;
  z-index: 1;
}

.marca-slide.active {
  opacity: 1;
  z-index: 2;
}

/* Gradientes de slides */
.marca-slide-1 { background: linear-gradient(135deg, #1B4D1B, #2D6A2D); }
.marca-slide-2 { background: linear-gradient(135deg, #7A5C00, #C8960C); }
.marca-slide-3 { background: linear-gradient(135deg, #1A3D1A, #3D7A3D); }
.marca-slide-4 { background: linear-gradient(135deg, #1A1A2E, #2D2D4E); }

.marca-slide-content {
  max-width: 600px;
  color: var(--color-white);
}

.marca-slide-title {
  color: var(--color-white);
  margin-bottom: 1rem;
}

.marca-slide-subtitle {
  font-size: clamp(16px, 2vw, 20px);
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 2rem;
}

.marca-slide-img {
  width: 100%;
  max-width: 400px;
  aspect-ratio: 4/5;
  background-color: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.5);
  margin-left: auto;
  border-radius: 8px;
}

.marca-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 2rem;
}

/* Controles carrusel */
.marca-slider-dots {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 1rem;
  z-index: 10;
}

.marca-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

.marca-dot.active {
  background-color: var(--color-accent);
  transform: scale(1.2);
}

.marca-slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.2);
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}

.marca-slider-arrow:hover {
  background: rgba(0,0,0,0.5);
}

.marca-slider-prev { left: 2rem; }
.marca-slider-next { right: 2rem; }

/* --- GRILLAS Y CARDS --- */
.marca-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.marca-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* Card Línea */
.marca-linea-card {
  background: var(--color-white);
  padding: 2rem 1.5rem;
  border-radius: 8px;
  text-align: center;
  transition: all 0.3s ease;
  border: 1px solid transparent;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.marca-linea-icon {
  width: 60px;
  height: 60px;
  background-color: var(--color-bg-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: var(--color-primary);
}

.marca-linea-card h3 {
  margin-bottom: 1rem;
}

.marca-linea-card p {
  color: var(--color-muted);
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.marca-linea-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
  border-color: var(--color-accent);
}

/* Card Producto */
.marca-product-card {
  background: var(--color-white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.03);
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  flex-direction: column;
}

.marca-product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.08);
}

.marca-product-img {
  width: 100%;
  aspect-ratio: 1/1;
  background-color: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aaa;
  position: relative;
}

.marca-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.3rem 0.8rem;
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
  border-radius: 20px;
  z-index: 2;
}

.marca-badge-destacado {
  background-color: var(--color-accent);
  color: var(--color-white);
}

.marca-badge-linea {
  background-color: var(--color-bg-light);
  color: var(--color-primary);
  top: 1rem;
  left: 1rem;
  right: auto;
}

.marca-product-info {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.marca-product-title {
  margin-bottom: 0.5rem;
  font-size: 18px;
  color: var(--color-text);
}

.marca-product-desc {
  color: var(--color-muted);
  font-size: 14px;
  margin-bottom: 1rem;
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.marca-product-price {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 1rem;
}

/* --- SECCIÓN MAYORISTAS HOME --- */
.marca-b2b-section {
  position: relative;
  background-color: #222; /* Placeholder color if image fails */
  color: var(--color-white);
  padding: 6rem 0;
  text-align: center;
  background-image: linear-gradient(rgba(0,0,0,0.65), rgba(0,0,0,0.65)), url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect fill="%23333" width="100" height="100"/></svg>'); /* Placeholder background */
  background-size: cover;
  background-position: center;
}

.marca-b2b-section h2 {
  color: var(--color-white);
}

.marca-b2b-benefits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin: 3rem 0;
}

.marca-b2b-benefit-item {
  padding: 1.5rem;
  background: rgba(255,255,255,0.1);
  border-radius: 8px;
  backdrop-filter: blur(5px);
}

/* --- TESTIMONIOS --- */
.marca-testimonial-card {
  background: var(--color-white);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.marca-testimonial-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.marca-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--color-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 20px;
}

.marca-stars {
  color: var(--color-accent);
  margin-bottom: 1rem;
}

.marca-testimonial-text {
  font-style: italic;
  color: var(--color-muted);
}

/* --- NEWSLETTER --- */
.marca-newsletter-form {
  display: flex;
  gap: 1rem;
  max-width: 500px;
  margin: 2rem auto 0;
}

.marca-input {
  flex: 1;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.1);
  color: var(--color-white);
  border-radius: 4px;
  font-family: var(--font-body);
}

.marca-input::placeholder {
  color: rgba(255,255,255,0.7);
}

.marca-input:focus {
  outline: none;
  border-color: var(--color-white);
}

/* --- FOOTER --- */
.marca-footer {
  background-color: #1A1A1A;
  color: #AAAAAA;
  padding: 4rem 0 2rem;
}

.marca-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.marca-footer-logo {
  color: var(--color-white);
  font-family: var(--font-heading);
  font-size: 24px;
  margin-bottom: 1rem;
  display: block;
}

.marca-footer h4 {
  color: var(--color-white);
  margin-bottom: 1.5rem;
  font-family: var(--font-body);
  font-size: 16px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.marca-footer ul li {
  margin-bottom: 0.8rem;
}

.marca-footer ul li a:hover {
  color: var(--color-white);
}

.marca-footer-social {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.marca-footer-social a {
  color: var(--color-white);
  background: rgba(255,255,255,0.1);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.marca-footer-social a:hover {
  background: var(--color-primary);
}

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

/* --- PÁGINA: PRODUCTOS --- */
.marca-page-hero {
  background-color: var(--color-primary);
  color: var(--color-white);
  padding: 6rem 0 3rem; /* Extra top padding for header */
  text-align: center;
  margin-top: 36px; /* Offset for topbar */
}

.marca-page-hero h1 {
  color: var(--color-white);
  margin-bottom: 0.5rem;
}

.marca-breadcrumb {
  font-size: 14px;
  opacity: 0.8;
}

.marca-filters-bar {
  background: var(--color-white);
  padding: 1rem 0;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 70px; /* Below header */
  z-index: 90;
}

.marca-filters-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.marca-filter-buttons {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
  padding-bottom: 5px;
}
.marca-filter-buttons::-webkit-scrollbar {
  display: none; /* Chrome */
}

.marca-filter-btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--color-primary);
  background: transparent;
  color: var(--color-primary);
  border-radius: 20px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.marca-filter-btn:hover {
  background: var(--color-bg-light);
}

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

.marca-search-box {
  display: flex;
  align-items: center;
  position: relative;
  min-width: 250px;
}

.marca-search-input {
  width: 100%;
  padding: 0.6rem 1rem 0.6rem 2.5rem;
  border: 1px solid #ccc;
  border-radius: 20px;
  font-family: var(--font-body);
}

.marca-search-icon {
  position: absolute;
  left: 10px;
  color: #888;
  width: 16px;
  height: 16px;
}

.marca-results-count {
  margin-bottom: 2rem;
  color: var(--color-muted);
  font-weight: bold;
}

.marca-no-results {
  display: none;
  text-align: center;
  padding: 3rem;
  background: var(--color-bg-light);
  border-radius: 8px;
  grid-column: 1 / -1;
}

/* Animaciones para filtro */
.marca-product-card.hide {
  display: none;
}
.marca-product-card.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- PÁGINA: MAYORISTAS --- */
.marca-hero-b2b {
  background: linear-gradient(rgba(26, 46, 26, 0.8), rgba(26, 46, 26, 0.9)), url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"><rect fill="%232D6A2D" width="100" height="100"/></svg>');
  background-size: cover;
  background-position: center;
  color: var(--color-white);
  padding: 8rem 0 6rem;
  text-align: center;
  margin-top: 36px;
}

.marca-hero-b2b h1 {
  color: var(--color-white);
}

.marca-steps-container {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  margin-top: 3rem;
  position: relative;
}

.marca-steps-container::before {
  content: '';
  position: absolute;
  top: 30px;
  left: 10%;
  right: 10%;
  height: 2px;
  background-color: var(--color-bg-light);
  z-index: 1;
}

.marca-step {
  text-align: center;
  position: relative;
  z-index: 2;
  flex: 1;
  background: var(--color-white); /* To cover the line */
}

.marca-step-number {
  width: 60px;
  height: 60px;
  background-color: var(--color-primary);
  color: var(--color-white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: bold;
  margin: 0 auto 1rem;
  border: 4px solid var(--color-white);
}

.marca-form-container {
  background: var(--color-bg-warm);
  padding: 3rem;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
  max-width: 800px;
  margin: 0 auto;
}

.marca-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

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

.marca-form-group.full-width {
  grid-column: 1 / -1;
}

.marca-form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
  color: var(--color-text);
}

.marca-form-control {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 15px;
}

.marca-form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(45, 106, 45, 0.1);
}

textarea.marca-form-control {
  resize: vertical;
}

.marca-form-success {
  display: none;
  background: var(--color-bg-light);
  color: var(--color-primary);
  padding: 1rem;
  border-radius: 4px;
  margin-top: 1rem;
  text-align: center;
  font-weight: bold;
}

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
  .marca-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .marca-hero-slider { height: 60vh; }
  .marca-hero-grid { grid-template-columns: 1fr; text-align: center; }
  .marca-slide-img { margin: 0 auto; max-width: 300px; display: none; /* Hide on smaller screens for simplicity */ }
  .marca-slide-content { margin: 0 auto; }
}

@media (max-width: 768px) {
  .marca-grid-3, .marca-grid-4, .marca-b2b-benefits {
    grid-template-columns: 1fr;
  }
  
  .marca-footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .marca-footer-social {
    justify-content: center;
  }
  
  /* Mobile Menu */
  .marca-hamburger { display: block; }
  
  .marca-nav-menu {
    position: fixed;
    top: 70px; /* approx header height */
    left: 0;
    width: 100%;
    background-color: var(--color-white);
    flex-direction: column;
    padding: 2rem 0;
    box-shadow: 0 10px 10px rgba(0,0,0,0.1);
    clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
    transition: clip-path 0.4s ease-in-out;
    gap: 1.5rem;
  }
  
  .marca-nav-menu.open {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }
  
  .marca-nav-link {
    color: var(--color-text) !important;
  }
  
  .marca-header.marca-hero-transparent .marca-logo {
    color: var(--color-white);
  }
  .marca-header.scrolled .marca-logo,
  .marca-header.menu-open .marca-logo {
    color: var(--color-primary);
  }
  .marca-header.menu-open {
    background-color: var(--color-white);
  }
  .marca-header.menu-open .marca-hamburger-line {
    background-color: var(--color-primary);
  }
  
  .marca-topbar-content {
    justify-content: center;
  }
  .marca-topbar-text { display: none; }
  
  .marca-hero-slider { height: 55vh; }
  
  .marca-filters-container {
    flex-direction: column;
    align-items: stretch;
  }
  
  .marca-steps-container {
    flex-direction: column;
  }
  .marca-steps-container::before { display: none; }
  
  .marca-form-grid { grid-template-columns: 1fr; }
}
