@charset "UTF-8";

/* ==========================================================================
   TRILLION - HERRAJES & SOLUCIONES PARA EL HOGAR
   SISTEMA DE DISEÑO ARQUITECTÓNICO & ELEGANTE - TEMA CLARO OFICIAL 2026
   ========================================================================== */

:root {
  /* Paleta Oficial Trillion Claro */
  --tr-bg: #f5f6f8;
  --tr-card: #ffffff;
  --tr-card-hover: #ffffff;
  --tr-text-primary: #012a4f;
  --tr-text-secondary: #33475b;
  --tr-text-muted: #5b6b7f;
  --tr-border: #dde3ea;
  --tr-border-light: #edf2f7;
  --tr-cyan: #32c2e5;
  --tr-cyan-dark: #0a85a8;
  --tr-cyan-light: #e0f7fc;
  --tr-cyan-glow: rgba(50, 194, 229, 0.25);
  --tr-navy-deep: #012a4f;
  --tr-navy-dark: #001f3b;

  /* Variables compatibles */
  --tr-navy-bg: #f5f6f8;
  --tr-text: #012a4f;
  --tr-muted: #5b6b7f;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--tr-bg);
  color: var(--tr-text-primary);
  scroll-behavior: smooth;
  overflow-x: hidden;
}

h1, h2, h3, .font-heading {
  font-family: 'Barlow Semi Condensed', 'Inter', sans-serif;
  letter-spacing: -0.01em;
}

/* Barra superior de Marcas */
.sister-brands-bar {
  background: #ffffff;
  border-bottom: 1px solid var(--tr-border);
}

.brand-pill-active-tr {
  background: #32c2e5;
  color: #012a4f;
  font-weight: 800;
}

.brand-pill-inactive {
  background: rgba(1, 42, 79, 0.05);
  color: #5b6b7f;
  border: 1px solid var(--tr-border);
  transition: all 0.2s ease;
}

.brand-pill-inactive:hover {
  background: rgba(1, 42, 79, 0.1);
  color: #012a4f;
  border-color: #32c2e5;
}

/* Navbar */
.glass-nav-tr {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--tr-border);
}

/* Hero Trillion & Carrusel Imponente (Se mantiene oscuro como marco de marca) */
.hero-carousel-container-tr {
  position: relative;
  width: 100%;
  height: 620px;
  background: #06101d;
  overflow: hidden;
}

@media (max-width: 768px) {
  .hero-carousel-container-tr {
    height: 520px;
  }
}

.hero-slide-tr {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.8s;
  z-index: 1;
}

.hero-slide-tr.active {
  opacity: 1;
  visibility: visible;
  z-index: 10;
}

.hero-slide-bg-tr {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  transition: transform 6s ease-out;
}

.hero-slide-tr.active .hero-slide-bg-tr {
  transform: scale(1.04);
}

.hero-slide-overlay-tr {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(6, 16, 29, 0.96) 0%, rgba(6, 16, 29, 0.85) 45%, rgba(6, 16, 29, 0.45) 100%);
}

@media (max-width: 768px) {
  .hero-slide-overlay-tr {
    background: linear-gradient(180deg, rgba(6, 16, 29, 0.6) 0%, rgba(6, 16, 29, 0.92) 65%, rgba(6, 16, 29, 0.98) 100%);
  }
}

.carousel-arrow-tr {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 25;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(10, 23, 40, 0.85);
  border: 1px solid rgba(50, 194, 229, 0.3);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  backdrop-filter: blur(8px);
}

@media (max-width: 768px) {
  .carousel-arrow-tr {
    display: none !important;
  }
}

.carousel-arrow-tr:hover {
  background: #32c2e5;
  border-color: #32c2e5;
  color: #012a4f;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 0 20px rgba(50, 194, 229, 0.6);
}

.carousel-dot-tr {
  height: 8px;
  width: 12px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-dot-tr:hover {
  background: rgba(50, 194, 229, 0.7);
}

.carousel-dot-tr.active {
  width: 32px;
  background: #32c2e5;
  box-shadow: 0 0 12px rgba(50, 194, 229, 0.7);
}

/* Gradientes de texto Trillion */
.text-gradient-cyan {
  background: linear-gradient(135deg, #0284c7 0%, #0a85a8 55%, #012a4f 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-slide-tr .text-gradient-cyan {
  background: linear-gradient(135deg, #bcf0fa 0%, #32c2e5 55%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Botones Trillion */
.btn-cyan, .btn-gold {
  background: linear-gradient(135deg, #38bdf8 0%, #32c2e5 100%);
  color: #012a4f;
  font-weight: 800;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 14px rgba(50, 194, 229, 0.25);
}

.btn-cyan:hover, .btn-gold:hover {
  background: linear-gradient(135deg, #7dd3fc 0%, #38bdf8 100%);
  color: #012a4f;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(50, 194, 229, 0.4);
}

.btn-secondary-tr {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  transition: all 0.25s ease;
}

.btn-secondary-tr:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(50, 194, 229, 0.6);
  transform: translateY(-2px);
}

/* Tarjetas de Producto Trillion */
.product-card-tr {
  background-color: var(--tr-card);
  border: 1px solid var(--tr-border);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card-tr:hover {
  transform: translateY(-4px);
  border-color: var(--tr-cyan);
  box-shadow: 0 14px 28px rgba(1, 42, 79, 0.08), 0 0 16px var(--tr-cyan-glow);
}

/* Tarjetas de Rubro Trillion */
.rubro-card-tr {
  position: relative;
  border-radius: 1.25rem;
  overflow: hidden;
  background: var(--tr-card);
  border: 1px solid var(--tr-border);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.rubro-card-tr:hover {
  transform: translateY(-5px);
  border-color: var(--tr-cyan);
  box-shadow: 0 14px 28px rgba(1, 42, 79, 0.08), 0 0 16px var(--tr-cyan-glow);
}

.rubro-card-tr .rubro-img-tr {
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.rubro-card-tr:hover .rubro-img-tr {
  transform: scale(1.06);
}

/* Lightbox */
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(1, 20, 38, 0.95);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-img-container {
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.lightbox-img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 0.75rem;
  transition: transform 0.3s ease;
  cursor: zoom-in;
}

.lightbox-img.zoomed {
  transform: scale(1.8);
  cursor: zoom-out;
}

.lightbox-nav-btn {
  backdrop-filter: blur(8px);
  user-select: none;
}

/* WhatsApp Flotante */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  background: #25d366;
  color: white;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
  transition: all 0.3s ease;
}

.whatsapp-float:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.6);
}

.whatsapp-float.hidden {
  display: none !important;
}

/* Modales */
.modal-backdrop {
  background: rgba(1, 20, 38, 0.85);
  backdrop-filter: blur(8px);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--tr-bg);
}
::-webkit-scrollbar-thumb {
  background: #c5cbd5;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--tr-cyan-dark);
}

/* Carrusel de Opiniones Trillion */
.review-dot-tr {
  cursor: pointer;
  border: none;
  padding: 0;
  outline: none;
}
.review-card-tr {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.review-card-tr:hover {
  transform: translateY(-4px);
}

/* Pestaña desplegable inline de Rubros Trillion */
.rubro-card-btn-tr {
  background: var(--tr-card);
  border: 1px solid var(--tr-border);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.rubro-card-btn-tr:hover {
  transform: translateY(-4px);
  border-color: var(--tr-cyan);
  box-shadow: 0 14px 28px rgba(1, 42, 79, 0.08), 0 0 16px var(--tr-cyan-glow);
}

.rubro-card-btn-tr.rubro-active-tr {
  border-color: var(--tr-cyan) !important;
  box-shadow: 0 0 20px rgba(50, 194, 229, 0.35) !important;
  background: #ffffff;
}

.rubro-card-btn-tr.rubro-active-tr::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-bottom: 12px solid var(--tr-cyan);
  z-index: 30;
}

.rubro-inline-drawer-tr {
  animation: drawerSlideDownTr 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes drawerSlideDownTr {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================================================================
 * REGLAS DE ANULACIÓN OBLIGATORIA PARA TAILWIND (.hidden)
 * ========================================================================= */
.lightbox-modal.hidden,
.lightbox-img-container.hidden,
.app-modal.hidden,
.insta-overlay.hidden,
.carousel-arrow.hidden,
.carousel-arrow-tr.hidden,
.lightbox-nav-btn.hidden {
  display: none !important;
}

/* =========================================================================
 * SCROLL MARGIN PARA SECCIONES CON NAVBAR FIJO / STICKY
 * ========================================================================= */
section[id],
a[id],
#productos,
#canales,
#nosotros,
#contacto,
#contacto-trillion,
#inicio {
  scroll-margin-top: calc(var(--header-h, 80px) + 12px);
}

@media (max-width: 768px) {
  .hero-carousel-container-tr { height: 540px; }
  .hero-slide-bg-tr { height: 56%; object-position: 72% center; }
  .hero-slide-overlay-tr {
    background: linear-gradient(180deg, rgba(6,16,29,0.10) 0%, rgba(6,16,29,0) 30%,
      rgba(6,16,29,0.75) 50%, #06101d 56%, #06101d 100%);
  }
  .hero-slide-tr > .max-w-7xl { align-items: flex-end; padding-bottom: 3.25rem; }
  .hero-slide-tr h1, .hero-slide-tr h2 { font-size: 1.7rem; }
  .hero-slide-tr p { display: none; }
  .hero-slide-tr .space-y-5 > * + * { margin-top: 0.8rem; }
}
