/* ================================
   Foundation: variables globales
   ================================ */
:root {
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Source Sans Pro', sans-serif;
  --color-primary: #52331d;
  --color-secondary: #cd8b3d;
  --color-accent: #a45c1b;
  --color-light: #f7f3ee;
  --color-dark: #2a2a2a;
  --color-muted: #6c6c6c;
  --shadow-light: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Global typography & links */
html {
  font-family: var(--font-body);
  color: var(--color-dark);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-primary);
  margin: 1.2em 0 0.6em;
}

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

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

/* Buttons */
.btn-primary {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-light);
  box-shadow: var(--shadow-light);
}

.btn-primary:hover {
  background-color: var(--color-secondary);
  border-color: var(--color-secondary);
}

/* Cards base */
.card {
  border: none;
  border-radius: 0.5rem;
  box-shadow: var(--shadow-light);
}

/* Navbar */
.navbar-nav .nav-link {
  font-weight: 500;
}

.navbar-brand {
  font-weight: bold;
  font-size: 1.75rem;
  color: var(--color-primary) !important;
}

/* Ajustes para dispositivos móviles */
@media (max-width: 768px) {
  .navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .navbar-brand {
    font-size: 1.4rem;
    margin-right: auto;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 0.2rem 0.5rem;
    border-radius: 0.3rem;
  }
}

/* Banner adjustments */
.banner-container {
  overflow: hidden;
  width: 100vw;
  margin-left: calc((100vw - 100%) / -2);
}

.banner-img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  object-position: center;
}

@media (min-width: 768px) {
  .banner-img {
    height: 350px;
  }
}

/* Carousel captions */
.carousel-caption h5 {
  color: #fff !important;
  font-size: 3rem;
  background: rgba(0, 0, 0, 0.5);
  padding: 0.4rem 0.8rem;
  border-radius: 0.3rem;
}

.carousel-caption p {
  color: #fff !important;
  font-size: 1.25rem;
}

/* Mantener texto de carousel visible en móvil */
@media (max-width: 768px) {
  .carousel-caption {
    display: block !important;
    text-align: center;
    padding: 1rem;
  }

  .carousel-caption h5 {
    font-size: 1.5rem;
    background: rgba(0, 0, 0, 0.4);
    padding: 0.3rem 0.6rem;
  }

  .carousel-caption p {
    font-size: 1rem;
  }
}

/* Institutional sections */
.history-img {
  max-height: 300px;
  object-fit: cover;
}

.institucional-section,
.beneficios-section {
  padding: 1.5rem 0;
}

/* Category cards */
.category-card {
  border: 1px solid var(--color-muted);
  box-shadow: var(--shadow-medium);
  border-radius: 0.5rem;
  transition: transform 0.2s;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.category-card:hover {
  transform: translateY(-4px);
}

.row.gx-3.gy-4 > .col-6,
.row.gx-3.gy-4 > .col-md-4 {
  display: flex;
}

.category-card .card-img-top {
  width: 100%;
  height: 180px;
  object-fit: cover;
  object-position: center;
}

.category-card .card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.category-card .card-title {
  width: 100%;
  margin-bottom: 1rem;
}

.category-card .btn {
  margin-top: auto;
}

/* WhatsApp floating icon */
.whatsapp-float {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 2000;
  width: 3.5rem;
  height: 3.5rem;
  background-color: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s, box-shadow 0.2s;
}

.whatsapp-float img {
  width: 1.75rem;
  height: 1.75rem;
}

.whatsapp-float:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

/* Fade-in animation */
.fade-in-section {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ================================
   CampoBravo Visual Enhancements
   ================================ */

/* Product card */
.product-card {
  overflow: hidden;
  transition: transform 0.2s;
  position: relative;
  border-radius: 8px;
  background-color: #fff;
  box-shadow: var(--shadow-light);
}

.product-card:hover {
  transform: translateY(-5px);
}

/* Product image */
.product-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: var(--shadow-light);
}

/* Ribbons */
.ribbon {
  position: absolute;
  top: 0.5rem;
  left: -1rem;
  padding: 0.25rem 1rem;
  color: #fff;
  font-size: 0.75rem;
  transform: rotate(-45deg);
  box-shadow: var(--shadow-light);
  z-index: 10;
}

.ribbon-new {
  background-color: #28a745;
}

.ribbon-sale {
  background-color: #dc3545;
}

/* Swatches */
.swatch {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  margin-right: 6px;
  border: 1px solid #ccc;
  vertical-align: middle;
}

/* Quick info overlay */
.quick-info {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,0.95);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  opacity: 0;
  transition: opacity 0.2s;
}

.product-card:hover .quick-info {
  opacity: 1;
}
