@import url('https://fonts.googleapis.com/css2?family=Public+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  --primary: #d4764e;
  --primary-dark: #b85e38;
  --primary-light: #f0a17a;
  --accent: #8c6a4f;
  --accent-light: #9CAF88;
  --bg: #faf7f4;
  --bg-alt: #f3eee8;
  --text: #3a2a1e;
  --text-light: #7a6a5a;
  --border: #e5ddd5;
  --shadow: 0 2px 12px rgba(60, 40, 20, 0.08);
  --shadow-hover: 0 8px 30px rgba(60, 40, 20, 0.15);
  --radius: 12px;
  --radius-sm: 8px;
  --font-body: 'Public Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  --font-heading: 'Public Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

html {
  box-sizing: border-box;
  scroll-behavior: smooth;
}

*, *::before, *::after {
  box-sizing: inherit;
}

body {
  font-family: var(--font-body) !important;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6,
.titulo-producto h2,
.categoria-header .titulo-producto h2,
.variedad-titulo,
.project-category,
a.brand h3,
.navbar-nav > li > a {
  font-family: var(--font-heading) !important;
  font-weight: 600;
}

h3 {
  font-family: var(--font-heading) !important;
  font-weight: 600;
  color: var(--text);
}

a {
  color: var(--primary);
  transition: color 0.2s ease;
}

a:hover, a:focus {
  color: var(--primary-dark);
  text-decoration: none;
}

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

/* ─── Navbar ─── */

.navbar {
  min-height: 56px !important;
  border: none;
  border-bottom: 1px solid var(--border);
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

header .navbar {
  height: 56px;
  border-color: var(--border);
  margin-bottom: 0;
}

header .navbar .logo-container {
  overflow: visible;
}

a.brand {
  overflow: visible;
}

.logo-img {
  height: 36px;
  width: auto;
  display: block;
}

header .navbar .navbar-nav {
  margin-top: 0;
}

.navbar-nav > li > a {
  padding: 22px 14px 14px;
  line-height: 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text) !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: color 0.2s;
}

.navbar-nav > li > a:hover {
  color: var(--primary) !important;
}

.navbar-collapse.collapse {
  margin-top: 0;
  display: block !important;
}

.navbar-collapse.collapse .navbar-nav {
  margin-top: 0;
  margin-bottom: 0;
}

.navbar-nav > li,
.navbar-nav {
  float: left !important;
}

.navbar-nav.navbar-right:last-child {
  margin-right: -15px !important;
}

.navbar-right {
  float: right !important;
}

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

a.brand h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
  margin: 14px 0 0 16px;
  letter-spacing: -0.5px;
}

.dropdown-menu {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 6px 0;
}

.dropdown-menu > li > a {
  padding: 8px 20px;
  font-size: 14px;
  color: var(--text);
  transition: background 0.15s, color 0.15s;
}

.dropdown-menu > li > a:hover {
  background: var(--bg);
  color: var(--primary);
}

/* ─── Carousel ─── */

.carousel {
  width: auto;
  margin-top: 0;
  margin-left: -15px;
  margin-right: -15px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.carousel .slick-dots {
  bottom: 24px;
}

.carousel .slick-dots li button:before {
  font-size: 12px;
  color: #fff;
  opacity: 0.6;
}

.carousel .slick-dots li.slick-active button:before {
  opacity: 1;
  color: #fff;
}

.carousel div img {
  height: 500px;
  width: 100%;
  object-fit: cover;
}

/* ─── Portfolio Grid ─── */

.portfolio-box {
  display: block;
  position: relative;
  margin: 0 auto;
  max-width: 650px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portfolio-box:hover {
  box-shadow: var(--shadow-hover);
}

.portfolio-box img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.portfolio-box:hover img {
  transform: scale(1.05);
}

.portfolio-box .portfolio-box-caption {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  text-align: center;
  color: #fff;
  opacity: 0;
  background: rgba(212, 118, 78, 0.88);
  transition: opacity 0.35s ease;
}

.portfolio-box:hover .portfolio-box-caption {
  opacity: 1;
}

.portfolio-box .portfolio-box-caption .portfolio-box-caption-content {
  width: 100%;
  padding: 0 16px;
}

.portfolio-box .portfolio-box-caption .portfolio-box-caption-content .project-category,
.portfolio-box .portfolio-box-caption .portfolio-box-caption-content .project-name {
  padding: 0;
}

.portfolio-box .portfolio-box-caption .portfolio-box-caption-content .project-name {
  font-size: 18px;
  font-weight: 400;
  opacity: 0.9;
}

/* ─── Product / Category Pages ─── */

.producto {
  margin-top: 0;
  width: 100%;
  position: relative;
}

body {
  background-image: url("/images/fondo_panes.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.panes > .container-fluid {
  padding-left: 0;
  padding-right: 0;
  padding-top: 0;
}

.panes .producto.row {
  margin-left: 0;
  margin-right: 0;
  margin-top: 0;
}

.panes .producto {
  margin-top: 0;
}

.producto .background {
  height: 100%;
  z-index: -1;
}

.producto .content {
  margin-top: 0;
  padding: 32px 24px;
}

.producto .well {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: #fff;
  padding: 24px;
}

.categoria-header .header-producto {
  width: 100%;
  margin-top: 0;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.categoria-header .header-producto img {
  width: 100% !important;
  height: 360px;
  object-fit: cover;
}

.categoria-header .titulo-producto {
  margin-top: 24px;
}

.categoria-header .titulo-producto h2 {
  font-size: 40px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 1px;
}

.row .thin {
  margin-top: 0;
  margin-bottom: 0;
}

.categoria-contenido p {
  font-size: 17px;
  line-height: 1.8;
  color: var(--text-light);
  max-width: 720px;
  margin: 0 auto;
}

.categoria-contenido h3 {
  font-size: 22px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 8px;
}

.separador-img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  height: 300px;
  object-fit: cover;
}

.categoria-contenido h4 {
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  margin: 8px 0;
}

.variedades-grid {
  display: flex;
  gap: 24px;
  justify-content: center;
}

.variedad-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  height: 100%;
}

.variedad-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.variedad-titulo {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  margin: 0 0 16px 0;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary-light);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.variedad-lista {
  list-style: none;
  padding: 0;
  margin: 0;
}

.variedad-lista li {
  padding: 8px 0 8px 28px;
  position: relative;
  font-size: 15px;
  color: var(--text);
  border-bottom: 1px solid var(--bg-alt);
  transition: color 0.2s, padding-left 0.2s;
}

.variedad-lista li:last-child {
  border-bottom: none;
}

.variedad-lista li::before {
  content: '✓';
  position: absolute;
  left: 4px;
  color: var(--primary-light);
  font-weight: 700;
  transition: color 0.2s;
}

.variedad-lista li:hover {
  color: var(--primary);
  padding-left: 32px;
}

.variedad-lista li:hover::before {
  color: var(--primary);
}

/* ─── Footer ─── */

footer {
  width: 100%;
  padding: 48px 16px 24px;
  border-top: none;
  background: linear-gradient(to bottom, transparent 0%, #fff 50%);
  color: var(--text-light);
  font-size: 14px;
  position: relative;
}

footer p {
  margin: 0;
}

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

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

/* ─── Contact Form ─── */

.form-control {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 15px;
  font-family: var(--font-body);
  color: var(--text);
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.bigicon {
  font-size: 22px;
  color: var(--primary);
  vertical-align: middle;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(212, 118, 78, 0.15);
  outline: none;
}

.btn-primary {
  background: var(--primary);
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 32px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  transition: background 0.2s, transform 0.15s;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.well {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

/* ─── Utility ─── */

.no-gutter > [class*="col-"] {
  padding-right: 0;
  padding-left: 0;
}

.no-gutter.row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-left: 0;
  margin-right: 0;
}

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

.text-faded {
  opacity: 0.85;
}

hr {
  border: none;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--border), transparent);
  margin: 24px auto;
  max-width: 200px;
}

/* ─── Decorative Elements ─── */

.section-divider {
  text-align: center;
  font-size: 20px;
  color: var(--primary-light);
  letter-spacing: 12px;
  margin: 20px 0;
  user-select: none;
}

.portfolio-box .portfolio-box-caption .portfolio-box-caption-content .project-category {
  text-transform: uppercase;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
}

h3 {
  font-weight: 600;
  color: var(--text);
}

/* ─── Select2 overrides ─── */

.select2-results__option {
  color: #000;
}

.select2-selection__choice {
  color: #000;
}

/* ─── Responsive ─── */

@media (max-width: 768px) {
  .carousel div img {
    height: 300px;
    margin-left: 0;
  }

  .categoria-header .header-producto img {
    height: 200px;
  }

  .portfolio-box img {
    height: 180px;
  }

  .navbar-nav > li > a {
    padding: 22px 6px 14px;
    font-size: 11px;
  }

  a.brand h3 {
    font-size: 18px;
  }

  .producto .content {
    padding: 16px;
  }

  .categoria-contenido p {
    font-size: 15px;
  }

  .variedades-grid {
    flex-direction: column;
    gap: 16px;
  }

  .separador-img {
    height: 200px;
  }

  .logo-img {
    height: 24px;
    top: 0;
  }
}

@media (max-width: 520px) {
  header .navbar {
    height: auto;
    min-height: 0 !important;
    border-bottom: none;
  }

  header .navbar .navbar-nav {
    margin: 0;
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: flex-end;
  }

  .navbar-nav > li > a {
    padding: 4px 4px 4px;
    font-size: 8px;
    letter-spacing: 0;
    line-height: 1;
    white-space: nowrap;
  }

  .navbar-nav > li,
  .navbar-nav {
    float: none !important;
  }

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

  .navbar-header.header > .brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
  }

  .logo-img {
    height: 16px;
  }

  header .navbar .navbar-nav {
    margin-top: 0;
  }

  .carousel div img {
    height: 220px;
  }

  .portfolio-box img {
    height: 160px;
  }

  .categoria-header .header-producto img {
    height: 160px;
  }

  .categoria-contenido h3 {
    font-size: 18px;
  }

  .variedad-titulo {
    font-size: 15px;
  }

  .variedad-lista li {
    font-size: 13px;
    padding: 6px 0 6px 24px;
  }

  .whatsapp-float {
    width: 56px;
    height: 56px;
    bottom: 16px;
    right: 16px;
  }

  .whatsapp-icon {
    font-size: 30px;
  }

  .producto .content {
    padding: 12px;
  }

  footer p {
    font-size: 12px;
    line-height: 1.5;
  }
}

.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #25d366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(37, 211, 102, 0.5);
}

.whatsapp-icon {
  color: #fff;
  font-size: 40px;
  line-height: 1;
}
