/* ==========================================================================
   PlanoCasa.cl — Estilo Oficial (Tema Claro / Corporativo Arquitectónico)
   Inspirado fielmente en la tipografía, colores e identidad de www.planocasa.cl
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&family=Open+Sans:wght@400;600;700&display=swap');

:root {
  /* Paleta Oficial www.planocasa.cl */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-tertiary: #f1f3f5;
  --bg-card: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.96);
  --bg-dark: #222529;

  /* Colores de Marca */
  --brand-blue: #0576ab;       /* Azul corporativo de PlanoCasa.cl */
  --brand-blue-hover: #045d88;
  --brand-blue-light: #e8f4f9;
  
  --accent-primary: #0576ab;
  --accent-secondary: #0088cc;
  --accent-gradient: #0576ab;
  --accent-hover: #045d88;
  --accent-gold: #0576ab;      /* Color destacado para precios */
  --accent-green: #65B307;     /* Verde corporativo oficial #65B307 */
  --accent-green-hover: #569906;
  --accent-whatsapp: #65B307;  /* Verde oficial PlanoCasa / WhatsApp #65B307 */
  --accent-whatsapp-hover: #569906;

  /* Tipografía y Textos */
  --text-primary: #222529;     /* Negro carbón oscuro para títulos y máxima legibilidad */
  --text-secondary: #555555;   /* Gris neutro para párrafos y descripciones */
  --text-muted: #777777;       /* Gris medio para etiquetas y subtítulos */
  --text-light: #999999;

  /* Bordes y Sombras */
  --border-color: #e7e7e7;
  --border-light: #f0f0f0;
  --border-active: #0576ab;

  --shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.09);
  --shadow-glow: 0 0 15px rgba(5, 118, 171, 0.15);

  /* Fuentes Oficiales */
  --font-heading: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Poppins', 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;

  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
}

/* Reset & Estilos Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-secondary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--brand-blue);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--brand-blue-hover);
}

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

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

/* Encabezados Globales */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.25;
}

/* Header & Barra de Navegación en 2 Niveles */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all var(--transition-normal);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 75px;
}

.header-nav-bar {
  background: #ffffff;
  border-top: 1px solid #f1f5f9;
}

.header-nav-bar .container {
  display: flex;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.logo:hover {
  color: var(--text-primary);
}

.logo-icon {
  width: 38px;
  height: 38px;
  background: var(--brand-blue);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(5, 118, 171, 0.3);
}

.logo span {
  color: var(--brand-blue);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.25rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  position: relative;
  padding: 0.75rem 0;
  display: inline-block;
}

.nav-link:hover, .nav-link.active {
  color: var(--brand-blue);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--brand-blue);
  transition: width var(--transition-fast);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-primary {
  background: var(--brand-blue);
  color: #ffffff !important;
  box-shadow: 0 3px 10px rgba(5, 118, 171, 0.25);
}

.btn-primary:hover {
  background: var(--brand-blue-hover);
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(5, 118, 171, 0.35);
}

.btn-ver-casa {
  background: #0088cc !important;
  color: #ffffff !important;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.88rem;
  padding: 0.55rem 1.05rem;
  border-radius: 8px;
  border: none;
  box-shadow: 0 3px 10px rgba(0, 136, 204, 0.35);
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.btn-ver-casa:hover {
  background: #0077b3 !important;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(0, 136, 204, 0.5);
}

.btn-secondary {
  background: #f4f4f4;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: #eaeaea;
  border-color: #d5d5d5;
  color: var(--text-primary) !important;
}

.btn-whatsapp {
  background: var(--accent-whatsapp);
  color: #ffffff !important;
  box-shadow: 0 3px 10px rgba(101, 179, 7, 0.3);
}

.btn-whatsapp:hover {
  background: var(--accent-whatsapp-hover);
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(101, 179, 7, 0.45);
}

/* Carro de Compras Trigger */
.cart-btn-trigger {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all var(--transition-fast);
}

.cart-btn-trigger:hover {
  border-color: var(--brand-blue);
  color: var(--brand-blue);
}

.cart-count {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--brand-blue);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.72rem;
  width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Hero Section */
.hero {
  position: relative;
  padding: 4.5rem 0 3.5rem;
  background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
  border-bottom: 1px solid var(--border-color);
  overflow: hidden;
}

/* Hero Background Slider */
.hero-slider {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 2.5s ease-in-out;
}

.hero-slide.active {
  opacity: 0.75; /* Imagen más visible */
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0.95) 100%);
  z-index: 1;
}

/* Page Header Banners (Inner Pages with Hero-Slider Backgrounds) */
.page-header-banner {
  position: relative;
  padding: 4.5rem 0 3.25rem;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-bottom: 1px solid var(--border-color);
  overflow: hidden;
}

.page-header-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, rgba(255, 255, 255, 0.96) 100%);
  z-index: 1;
}

.page-header-banner .container {
  position: relative;
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: var(--brand-blue-light);
  border: 1px solid #c9e6f4;
  color: var(--brand-blue);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 2.85rem;
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-weight: 400;
  line-height: 1.6;
}

/* Buscador y Filtro */
.search-filter-box {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
  margin-top: 1.5rem;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1rem;
  align-items: center;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  text-align: left;
}

.form-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #444444;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.form-select, .form-input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  background: #ffffff;
  border: 1px solid #ced4da;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.92rem;
  outline: none;
  transition: border-color var(--transition-fast);
}

.form-select:focus, .form-input:focus {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(5, 118, 171, 0.15);
}

/* Sección de Catálogo y Contenido */
.section {
  padding: 4.5rem 0;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 2.5rem;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 1rem;
}

.section-title-wrap {
  max-width: 650px;
}

.section-tag {
  color: var(--brand-blue);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

/* Grilla de Tarjetas de Casas */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 1.75rem;
}

.card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--brand-blue);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.card-image-wrap {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
  background: #f4f4f4;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.card-badge {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  background: var(--accent-green);
  color: #ffffff;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
  z-index: 2;
}

.card-discount-badge {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  background: #e11d48;
  color: #ffffff;
  padding: 3px 9px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 8px rgba(225, 29, 72, 0.4);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.card-content {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  transition: color var(--transition-fast);
}

.card:hover .card-title {
  color: var(--brand-blue);
}

.card-specs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 1rem;
  gap: 3px;
}

.spec-item {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 0.76rem;
  color: #555555;
  font-weight: 500;
  white-space: nowrap;
}

.spec-item svg {
  width: 14px;
  height: 14px;
  color: var(--brand-blue);
  flex-shrink: 0;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.price-wrap {
  display: flex;
  flex-direction: column;
}

.price-label {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.price-figures {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}

.price-old {
  font-size: 0.82rem;
  font-weight: 600;
  color: #94a3b8;
  text-decoration: line-through;
}

.price-discount-pill {
  background: #fee2e2;
  color: #e11d48;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
}

.price-amount {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--brand-blue);
}

/* Tarjetas Informativas / Beneficios */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 1.75rem;
  transition: all var(--transition-normal);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.feature-card:hover {
  border-color: var(--brand-blue);
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--brand-blue-light);
  color: var(--brand-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.feature-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.feature-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* Modales */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
  padding: 1.5rem;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  position: relative;
  transform: scale(0.96);
  transition: transform var(--transition-normal);
}

.modal-overlay.active .modal-container {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 32px;
  height: 32px;
  background: #f1f3f5;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  z-index: 10;
}

.modal-close:hover {
  background: var(--brand-blue);
  color: #ffffff;
}

/* Footer Corporativo Oficial PlanoCasa.cl */
.site-footer {
  background: #222529;
  color: #a0a0a0;
  border-top: 3px solid var(--brand-blue);
  padding: 4rem 0 2rem;
  margin-top: 5rem;
}

.site-footer a {
  color: #a0a0a0;
}

.site-footer a:hover {
  color: #ffffff;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-col-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-left: 3px solid var(--brand-blue);
  padding-left: 10px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-link {
  color: #a0a0a0;
  font-size: 0.9rem;
}

.footer-link:hover {
  color: #ffffff;
}

.footer-bottom {
  padding-top: 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #888888;
}

/* Botón Flotante WhatsApp */
.whatsapp-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 56px;
  height: 56px;
  background: var(--accent-whatsapp);
  color: #ffffff !important;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(101, 179, 7, 0.4);
  z-index: 90;
  transition: all var(--transition-fast);
  font-size: 1.75rem;
}

.whatsapp-float:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 22px rgba(101, 179, 7, 0.55);
}

/* Compatibilidad Páginas de Detalle y Secciones Interiores */
.product-detail-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

@media (max-width: 1024px) {
  .product-detail-grid {
    grid-template-columns: 1fr;
  }
}

.media-showcase-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 640px) {
  .media-showcase-split {
    grid-template-columns: 1fr;
  }
}

.product-detail-hero {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 1.25rem 0;
}

.spec-box-container {
  display: flex;
  gap: 1.5rem;
  background: #ffffff;
  border: 1px solid var(--border-color);
  padding: 1.25rem;
  border-radius: var(--radius-sm);
  margin-bottom: 2rem;
}

.spec-box-item {
  flex: 1;
}

.spec-box-item .num {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary);
}

.price-cta-box {
  background: #f8f9fa;
  border: 1px solid #e2e8f0;
  border-left: 4px solid var(--brand-blue);
  border-radius: var(--radius-sm);
  padding: 1.75rem;
  margin-bottom: 2.5rem;
}

/* Adaptabilidad Responsiva */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.15rem;
  }

  .header-container {
    height: 70px;
  }

  .nav-links {
    display: none;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .header-phone-link .phone-number {
    display: none;
  }

  .header-phone-link {
    padding: 6px 9px;
  }
}

/* ==========================================================================
   Admin Image Manager & Multi-Style Selector
   ========================================================================== */
.admin-img-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1rem;
  display: flex;
  gap: 1.25rem;
  align-items: center;
  transition: all 0.2s ease;
}
.admin-img-card:hover {
  border-color: #cbd5e1;
}
.admin-img-preview-box {
  width: 120px;
  height: 80px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}
.admin-img-preview-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.admin-img-preview-box.is-contain img {
  object-fit: contain;
  padding: 4px;
}
.admin-img-preview-empty {
  font-size: 0.75rem;
  color: #94a3b8;
  text-align: center;
  padding: 0.5rem;
}
.admin-img-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}
.admin-img-btn-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.btn-sm-upload {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #0088cc;
  color: #ffffff;
  border: none;
  padding: 0.45rem 0.85rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-sm-upload:hover {
  background: #0070a8;
}
.btn-sm-secondary {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #e2e8f0;
  color: #334155;
  border: none;
  padding: 0.45rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-sm-secondary:hover {
  background: #cbd5e1;
}
.btn-sm-danger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fee2e2;
  color: #dc2626;
  border: none;
  padding: 0.45rem 0.75rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-sm-danger:hover {
  background: #fecaca;
}

/* Gallery Grid in Admin */
.admin-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.admin-gallery-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  transition: transform 0.2s, box-shadow 0.2s;
}
.admin-gallery-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.admin-gallery-thumb {
  width: 100%;
  height: 85px;
  object-fit: cover;
  display: block;
}
.admin-gallery-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 6px;
  background: #f8fafc;
  border-top: 1px solid #f1f5f9;
}
.admin-gallery-idx {
  font-size: 0.7rem;
  font-weight: 700;
  color: #64748b;
}

/* Multi-Style Selector Pills */
.style-pills-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.4rem;
}
.style-pill-btn {
  background: #ffffff;
  color: #475569;
  border: 1.5px solid #cbd5e1;
  padding: 0.45rem 0.95rem;
  border-radius: 25px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}
.style-pill-btn:hover {
  border-color: #0088cc;
  color: #0088cc;
  background: #f0f9ff;
}
.style-pill-btn.active {
  background: #0088cc;
  color: #ffffff;
  border-color: #0088cc;
  box-shadow: 0 2px 6px rgba(0,136,204,0.3);
}

/* Catalog Card Style Pill */
.card-style-pill {
  display: inline-block;
  background: rgba(0, 136, 204, 0.08);
  color: #0088cc;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-right: 4px;
}

/* ==========================================================================
   PlanoCasa.cl — Header Direct Phone Link
   ========================================================================== */
.header-phone-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-primary) !important;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  transition: all var(--transition-fast);
  white-space: nowrap;
  text-decoration: none;
}

.header-phone-link:hover {
  background: #ffffff;
  border-color: var(--accent-green);
  color: var(--accent-green) !important;
  box-shadow: 0 2px 8px rgba(101, 179, 7, 0.15);
}

.header-phone-link .phone-icon {
  font-size: 0.95rem;
  display: flex;
  align-items: center;
}

.header-phone-link .phone-number {
  letter-spacing: 0.01em;
}

/* ==========================================================================
   PlanoCasa.cl — Currency & Country Switcher (Square Flags UI)
   ========================================================================== */
.currency-menu-container {
  position: relative;
  display: inline-block;
  user-select: none;
}

.currency-trigger {
  background: none;
  border: 1px solid transparent;
  padding: 4px 10px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transition: all 0.2s ease;
  outline: none;
}

.currency-trigger:hover,
.currency-menu-container.is-open .currency-trigger {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.currency-trigger-flag {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.currency-trigger-text {
  font-size: 0.78rem;
  font-weight: 700;
  color: #1e293b;
  letter-spacing: 0.02em;
  line-height: 1;
}

/* Dropdown Panel */
.currency-dropdown-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 295px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12), 0 2px 10px rgba(0, 0, 0, 0.04);
  border: 1px solid #e2e8f0;
  padding: 1.15rem 0.85rem 0.85rem;
  z-index: 1000;
  display: none;
  animation: currencyPanelFade 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes currencyPanelFade {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.currency-menu-container.is-open .currency-dropdown-panel {
  display: block;
}

.currency-dropdown-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  padding-left: 0.5rem;
}

.currency-dropdown-items {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.currency-option-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  background: transparent;
  border: 1px solid transparent;
}

.currency-option-row:hover {
  background: #f8fafc;
  border-color: #e2e8f0;
}

.currency-option-row.is-active {
  background: #eaf8ed; /* Match soft green from screenshot */
  border-color: #d1fae5;
}

.currency-option-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.currency-option-flag {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.currency-option-info {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.currency-option-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.25;
}

.currency-option-subtitle {
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.2;
  margin-top: 2px;
}

.currency-option-units {
  font-size: 0.72rem;
  color: #94a3af;
  line-height: 1.2;
  margin-top: 2px;
}

.currency-option-check {
  color: #16a34a;
  font-size: 1.15rem;
  font-weight: 800;
  margin-left: 0.5rem;
  flex-shrink: 0;
}

/* Materialidad Estructural Selector */
.materialidad-box {
  background: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 1.15rem 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.materialidad-box-title {
  display: block;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.75rem;
}

.material-option-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.material-option {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  font-size: 0.95rem;
  color: #334155;
  user-select: none;
  padding: 3px 6px;
  border-radius: 6px;
  transition: background-color 0.15s ease;
}

.material-option:hover {
  background-color: #f1f5f9;
}

.material-option input[type="radio"] {
  width: 17px;
  height: 17px;
  accent-color: #0088cc;
  cursor: pointer;
  margin: 0;
}

.material-option span {
  font-weight: 500;
  color: #334155;
}

.material-option input[type="radio"]:checked + span {
  color: #0088cc;
  font-weight: 600;
}

/* User Profile Dropdown Menu */
.user-dropdown-wrap {
  position: relative;
  display: inline-block;
}

.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 290px;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  z-index: 1000;
  display: none;
  overflow: hidden;
  animation: dropdownFadeIn 0.2s ease;
}

.user-dropdown-menu.active {
  display: block;
}

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

.user-dropdown-header {
  padding: 1rem 1.25rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.75rem 1.25rem;
  color: var(--text-primary);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  transition: background 0.15s ease;
}

.user-dropdown-item:hover {
  background: #f1f5f9;
  color: #0088cc;
}

.user-dropdown-divider {
  height: 1px;
  background: var(--border-color);
  margin: 4px 0;
}



