/* =========================================================
   GARAY Tractores y Equipos - Sistema de Diseño Moderno
   Paletas y tipografías por marca + Skeleton Loading
   ========================================================= */

@font-face {
  font-family: "Gill Sans Heavy";
  src: url("../../nhagricultura/font/Gill Sans Heavy.otf") format("opentype");
  font-display: swap;
}
@font-face {
  font-family: "Gill Sans Medium";
  src: url("../../nhagricultura/font/Gill Sans Medium.otf") format("opentype");
  font-display: swap;
}
@font-face {
  font-family: "Trade Gothic LT Condensed No. 18";
  src: url("../../caseagricultura/font/Trade-Gothic-LT-Condensed-No.-18.otf") format("opentype");
  font-display: swap;
}
@font-face {
  font-family: "Trade Gothic LT Bold";
  src: url("../../caseagricultura/font/Trade-Gothic-LT-Bold.otf") format("opentype");
  font-display: swap;
}
@font-face {
  font-family: "Trade-Gothic-LT-Light";
  src: url("../../caseagricultura/font/Trade-Gothic-LT-Light.otf") format("opentype");
  font-display: swap;
}

:root {
  --brand-primary: #ff831e;
  --brand-primary-hover: #e56f10;
  --brand-primary-contrast: #ffffff;
  --brand-text-accent: var(--brand-primary);
  --brand-accent: #8ac238;
  --brand-accent-contrast: #ffffff;
  --brand-font-heading: 'Montserrat', system-ui, -apple-system, sans-serif;
  --brand-font-body: 'Montserrat', system-ui, -apple-system, sans-serif;
  --brand-dark: #1f2328;
  --brand-sidebar-bg: #ffffff;
  --brand-footer-bg: #ffffff;
  --brand-surface: #f8fafc;
  --brand-card-bg: #ffffff;
  --brand-text: #1f2328;
  --brand-muted: #5f6672;
  --brand-border: #e5e7eb;
  --sidebar-width: 96px;
  --radius-lg: 1rem;
  --radius-md: 0.75rem;
  --btn-radius: 0.6rem;
  --shadow-sm: 0 4px 14px rgba(16, 24, 40, 0.05);
  --shadow-md: 0 10px 30px rgba(16, 24, 40, 0.08);
}

/* Paleta y Tipografía New Holland Agricultura */
html[data-brand="nh-agri"] {
  --brand-primary: #004b93;
  --brand-primary-hover: #003970;
  --brand-primary-contrast: #ffffff;
  --brand-accent: #ffd300;
  --brand-accent-contrast: #1b1e23;
  --brand-font-heading: 'Gill Sans Heavy', 'Montserrat', sans-serif;
  --brand-font-body: 'Gill Sans Medium', 'Montserrat', sans-serif;
}

/* Paleta y Tipografía Case IH Agricultura */
html[data-brand="case-agri"] {
  --brand-primary: #a71930;
  --brand-primary-hover: #881225;
  --brand-primary-contrast: #ffffff;
  --brand-accent: #3d3d3d;
  --brand-accent-contrast: #ffffff;
  --brand-font-heading: 'Trade Gothic LT Bold', 'Montserrat', sans-serif;
  --brand-font-body: 'Trade-Gothic-LT-Light', 'Montserrat', sans-serif;
}

/* Paleta y Tipografía New Holland Construcción */
html[data-brand="nh-const"] {
  --brand-primary: #ffd200;
  --brand-primary-hover: #e6bd00;
  --brand-primary-contrast: #1b1e23;
  --brand-text-accent: #1f2328;
  --brand-accent: #3d3d3d;
  --brand-accent-contrast: #ffffff;
  --brand-font-heading: 'Gill Sans Heavy', 'Montserrat', sans-serif;
  --brand-font-body: 'Gill Sans Medium', 'Montserrat', sans-serif;
}

html[data-brand="nh-const"] .btn-outline-brand {
  border-color: #2b2e34;
  color: #1f2328;
}

html[data-brand="nh-const"] .btn-outline-brand:hover,
html[data-brand="nh-const"] .btn-outline-brand:focus-visible {
  background-color: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #1b1e23;
}

html[data-brand="nh-const"] #equipment-grid .garay-card {
  border-top: 3px solid var(--brand-primary);
}

/* Paleta y Tipografía Case Construcción */
html[data-brand="case-const"] {
  --brand-primary: #e58e1a;
  --brand-primary-hover: #c97a11;
  --brand-primary-contrast: #ffffff;
  --brand-accent: #ffd200;
  --brand-accent-contrast: #1b1e23;
  --brand-font-heading: 'Trade Gothic LT Bold', 'Montserrat', sans-serif;
  --brand-font-body: 'Trade-Gothic-LT-Light', 'Montserrat', sans-serif;
}

/* Paleta DJI */
html[data-brand="dji"] {
  --brand-primary: #1b1e23;
  --brand-primary-hover: #000000;
  --brand-primary-contrast: #ffffff;
  --brand-accent: #2ea44f;
  --brand-accent-contrast: #ffffff;
}

/* Paleta HIAB */
html[data-brand="hiab"] {
  --brand-primary: #d71920;
  --brand-primary-hover: #b31218;
  --brand-primary-contrast: #ffffff;
  --brand-accent: #1b1e23;
  --brand-accent-contrast: #ffffff;
}

* {
  box-sizing: border-box;
}

body.garay-body {
  font-family: var(--brand-font-body);
  background-color: var(--brand-surface);
  color: var(--brand-text);
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.garay-brand-heading {
  font-family: var(--brand-font-heading);
}

.garay-shell {
  display: flex;
  flex-direction: column;
  flex: 1 0 auto;
  min-height: 100vh;
  width: 100%;
}

.garay-topbar {
  width: 100%;
  z-index: 1025;
}

/* ---- Sidebar Escritorio (Claro) ---- */
.garay-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--brand-sidebar-bg);
  color: var(--brand-text);
  font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
  border-right: 1px solid var(--brand-border);
  z-index: 1030;
  box-shadow: 4px 0 20px rgba(16, 24, 40, 0.04);
  overflow-y: auto;
}

.garay-brand-box {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  height: 82px;
  padding: 0.75rem 0.5rem;
  border-bottom: 3px solid var(--brand-primary);
}

.garay-brand-box img {
  max-height: 48px;
  width: auto;
  object-fit: contain;
}

.garay-nav {
  display: flex;
  flex-direction: column;
  padding: 0.65rem 0.45rem;
  gap: 0.25rem;
}

.garay-nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.65rem 0.3rem;
  color: var(--brand-muted);
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: 0.65rem;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.garay-nav-link i {
  font-size: 1.25rem;
  line-height: 1;
}

.garay-nav-link:hover,
.garay-nav-link:focus-visible {
  background-color: #f1f5f9;
  color: var(--brand-primary);
}

.garay-nav-link.is-active {
  background-color: var(--brand-primary);
  color: var(--brand-primary-contrast);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* ---- Contenido Principal ---- */
.garay-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

@media (min-width: 992px) {
  .garay-main,
  .garay-footer {
    margin-left: var(--sidebar-width);
  }
}

.garay-mobile-link {
  font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
  border-radius: 0.5rem;
  color: var(--brand-text);
  font-weight: 500;
  padding: 0.65rem 0.9rem;
}

.garay-mobile-link.is-active,
.garay-mobile-link:hover {
  background-color: var(--brand-primary);
  color: var(--brand-primary-contrast);
}

/* ---- Botones de Marca y Radio Unificado ---- */
.btn:not(.rounded-pill) {
  border-radius: var(--btn-radius);
}

.btn-brand {
  background-color: var(--brand-primary);
  border-color: var(--brand-primary);
  color: var(--brand-primary-contrast);
  font-weight: 600;
  transition: transform 0.15s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.btn-brand:hover,
.btn-brand:focus-visible {
  background-color: var(--brand-primary-hover);
  border-color: var(--brand-primary-hover);
  color: var(--brand-primary-contrast);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

.btn-outline-brand {
  border: 1.5px solid var(--brand-primary);
  color: var(--brand-primary);
  background: transparent;
  font-weight: 600;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.btn-outline-brand:hover,
.btn-outline-brand:focus-visible {
  background-color: var(--brand-primary);
  color: var(--brand-primary-contrast);
}

.btn-brand-accent {
  background-color: var(--brand-accent);
  border-color: var(--brand-accent);
  color: var(--brand-accent-contrast);
  font-weight: 600;
}

.btn-brand-accent:hover,
.btn-brand-accent:focus-visible {
  background-color: var(--brand-accent);
  border-color: var(--brand-accent);
  color: var(--brand-accent-contrast);
  filter: brightness(0.92);
}

.text-brand,
.text-primary {
  color: var(--brand-text-accent) !important;
}

.bg-primary {
  background-color: var(--brand-primary) !important;
}

.border-primary {
  border-color: var(--brand-primary) !important;
}

/* ---- Hero Visual Editorial (Inicio) ---- */
.garay-hero-editorial {
  position: relative;
  min-height: 76vh;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center right;
  color: #ffffff;
  overflow: hidden;
}

.garay-hero-editorial::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    95deg,
    rgba(15, 23, 42, 0.84) 0%,
    rgba(15, 23, 42, 0.58) 48%,
    rgba(15, 23, 42, 0.12) 100%
  );
}

@media (max-width: 991.98px) {
  .garay-hero-editorial {
    min-height: 62vh;
    background-position: center;
  }
  .garay-hero-editorial::before {
    background: linear-gradient(
      180deg,
      rgba(15, 23, 42, 0.72) 0%,
      rgba(15, 23, 42, 0.68) 100%
    );
  }
}

.garay-hero-editorial > .container {
  position: relative;
  z-index: 1;
}

.garay-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--brand-primary);
}

.garay-hero-eyebrow::before {
  content: "";
  width: 28px;
  height: 3px;
  background: var(--brand-primary);
  border-radius: 2px;
}

.garay-hero-title {
  font-size: clamp(2.1rem, 4.2vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: #ffffff;
}
.garay-hero {
  position: relative;
  min-height: 74vh;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  color: #ffffff;
  overflow: hidden;
}

.garay-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.60) 0%, rgba(15, 23, 42, 0.40) 55%, rgba(255, 131, 30, 0.22) 100%);
}

.garay-hero h1 {
  font-size: clamp(1.85rem, 4.5vw, 3.25rem);
  line-height: 1.15;
}

.garay-hero > .container {
  position: relative;
  z-index: 1;
}

.garay-badge-since {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #ffffff;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
}

/* ---- Tarjetas Modernas ---- */
.garay-card {
  background: var(--brand-card-bg);
  border: 1px solid rgba(16, 24, 40, 0.07);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  overflow: hidden;
}

.garay-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(0, 0, 0, 0.12);
}

.garay-catalog-header {
  background: #ffffff;
  min-height: 82px;
  display: flex;
  align-items: center;
  border-bottom: 3px solid var(--brand-primary);
  box-shadow: var(--shadow-sm);
  font-family: var(--brand-font-body);
  z-index: 1024;
}

.garay-catalog-header h1,
.garay-catalog-header .btn {
  font-family: var(--brand-font-heading);
  font-weight: 400 !important;
}

html[data-brand="nh-agri"] h1,
html[data-brand="nh-agri"] h2,
html[data-brand="nh-const"] h1,
html[data-brand="nh-const"] h2,
html[data-brand="case-agri"] h1,
html[data-brand="case-agri"] h2,
html[data-brand="case-const"] h1,
html[data-brand="case-const"] h2,
html[data-brand="nh-agri"] .btn-brand,
html[data-brand="nh-agri"] .btn-outline-brand,
html[data-brand="nh-const"] .btn-brand,
html[data-brand="nh-const"] .btn-outline-brand,
html[data-brand="case-agri"] .btn-brand,
html[data-brand="case-agri"] .btn-outline-brand,
html[data-brand="case-const"] .btn-brand,
html[data-brand="case-const"] .btn-outline-brand,
#model-selector .js-model-btn {
  font-weight: 400 !important;
}

.garay-equipment-img-wrap {
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: #fafbfc;
  border-bottom: 1px solid rgba(16, 24, 40, 0.05);
}

.garay-equipment-img-wrap img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  transition: transform 0.25s ease;
}

.garay-card:hover .garay-equipment-img-wrap img {
  transform: scale(1.04);
}

/* ---- Skeleton Loading ---- */
.skeleton-shimmer {
  position: relative;
  overflow: hidden;
  background-color: #e6e9ef;
  border-radius: 0.5rem;
}

.skeleton-shimmer::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.65), transparent);
  animation: garay-shimmer 1.35s infinite;
}

@keyframes garay-shimmer {
  100% {
    transform: translateX(100%);
  }
}

.skeleton-img {
  height: 220px;
  border-radius: 0;
}

.skeleton-title {
  height: 1.35rem;
  width: 68%;
  margin-bottom: 1rem;
}

.skeleton-btn {
  height: 2.35rem;
  width: 100%;
  border-radius: 0.65rem;
}

/* ---- Footer (Claro) ---- */
.garay-footer {
  background: var(--brand-footer-bg);
  color: var(--brand-text);
  border-top: 3px solid var(--brand-primary);
  box-shadow: 0 -4px 20px rgba(16, 24, 40, 0.04);
}

.garay-footer-link {
  color: var(--brand-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.garay-footer-link:hover {
  color: var(--brand-primary);
  text-decoration: underline;
}

.garay-social-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  color: var(--brand-text);
  text-decoration: none;
  font-size: 1.1rem;
  border: 1px solid var(--brand-border);
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.garay-social-btn:hover {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: var(--brand-primary-contrast);
  transform: translateY(-2px);
}

/* ---- Carrusel y Detalle de Equipo ---- */
.garay-gallery-stage {
  position: relative;
  background: radial-gradient(circle at center, #ffffff 0%, #f3f5f8 100%);
  height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  cursor: zoom-in;
}

@media (max-width: 767.98px) {
  .garay-gallery-stage {
    height: 250px;
    padding: 1rem;
  }
}

.garay-gallery-stage img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  transition: transform 0.25s ease;
}

.garay-gallery-stage:hover img {
  transform: scale(1.02);
}

.garay-zoom-hint {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  background: rgba(255, 255, 255, 0.9);
  color: var(--brand-text);
  border: 1px solid var(--brand-border);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
  font-size: 0.75rem;
  pointer-events: none;
  box-shadow: var(--shadow-sm);
}

.garay-carousel-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--brand-border);
  color: var(--brand-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.garay-carousel-btn:hover {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
  color: var(--brand-primary-contrast);
  transform: scale(1.06);
}

.garay-thumbs-strip {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding: 0.75rem 1rem;
  background: #ffffff;
  border-top: 1px solid var(--brand-border);
}

.garay-thumb-btn {
  flex: 0 0 74px;
  height: 56px;
  padding: 0.25rem;
  border-radius: 0.5rem;
  border: 2px solid transparent;
  background: #f8fafc;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.15s ease;
}

.garay-thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.garay-thumb-btn.is-active,
.garay-thumb-btn:hover {
  border-color: var(--brand-primary);
}

.garay-spec-card {
  background: #ffffff;
  border: 1px solid var(--brand-border);
  border-top: 3px solid var(--brand-primary);
  border-radius: var(--radius-md);
  padding: 1.1rem 1rem;
  text-align: center;
  height: 100%;
  box-shadow: var(--shadow-sm);
}

.garay-doc-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.9rem;
  border-radius: 0.65rem;
  border: 1px solid var(--brand-border);
  background: #f8fafc;
  color: var(--brand-text);
  text-decoration: none;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.garay-doc-link:hover {
  border-color: var(--brand-primary);
  background: #ffffff;
  color: var(--brand-primary);
}
