/* Fondo general mejorado */
body {
    background: linear-gradient(135deg, #f0f2f5 0%, #e2e6ea 100%);
    min-height: 100vh;
}

.productos-holcim {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.producto-card-moderno {
    background: white;
    border-radius: 16px;
    margin-bottom: 24px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.producto-card-moderno:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.12);
}

.producto-horizontal {
    display: flex;
    gap: 24px;
    align-items: center;
    flex-wrap: wrap;
}

.producto-imagen {
    flex-shrink: 0;
}

.producto-imagen img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    border-radius: 12px;
}

.producto-info {
    flex: 1;
}

.producto-info h3 {
    color: #1e3a5f;
    font-size: 1.5rem;
    margin: 0 0 8px 0;
}

.producto-info p {
    color: #4a5568;
    margin: 0 0 12px 0;
}

.producto-acciones {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.mas-info {
    color: #F97316;
    font-weight: bold;
    cursor: pointer;
    text-decoration: underline;
}

.pdf-link {
    color: #3b82f6;
    text-decoration: none;
}

.pdf-link:hover {
    text-decoration: underline;
}

@media (max-width: 600px) {
    .producto-horizontal {
        flex-direction: column;
        text-align: center;
    }
    .producto-acciones {
        justify-content: center;
    }
}

/* Panel lateral */
.sidebar-panel {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 500px;
    height: 100%;
    background-color: white;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    z-index: 1000;
    transition: right 0.3s ease-in-out;
    overflow-y: auto;
    padding: 20px;
}

.sidebar-panel.open {
    right: 0;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 999;
    display: none;
}

.overlay.active {
    display: block;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    background: none;
    border: none;
}

.panel-content {
    margin-top: 40px;
}

.panel-content h2 {
    color: #1a3a6f;
    margin-bottom: 10px;
}

.panel-content h3 {
    color: #2c3e50;
    margin-top: 20px;
    margin-bottom: 10px;
}

.panel-content ul {
    padding-left: 20px;
}

.panel-content li {
    margin-bottom: 8px;
}

.btn-pdf {
    display: inline-block;
    background-color: #1a3a6f;
    color: white;
    padding: 10px 15px;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .sidebar-panel {
        max-width: 100%;
    }
}

/* ===== SECCIÓN OBRAS ===== */
.categorias-obras-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.categoria-obra-item {
  background: white;
  border-radius: 1rem;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.categoria-obra-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.categoria-obra-item h3 {
  color: #e67e22;
  margin-bottom: 0.75rem;
}

.categoria-obra-item ul {
  margin-top: 0.75rem;
  padding-left: 1.25rem;
}

.categoria-obra-item li {
  margin: 0.25rem 0;
  color: #555;
}

.categoria-icono {
  font-size: 3rem;
  display: block;
  margin-bottom: 1rem;
}

.obras-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.obra-card {
  background: white;
  border-radius: 0.75rem;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.3s;
  border-left: 4px solid #e67e22;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.obra-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transform: translateX(5px);
}

.obra-card h4 {
  color: #1a3a5c;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.obra-ubicacion {
  color: #666;
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.btn-volver {
  background: none;
  border: none;
  color: #1a3a5c;
  cursor: pointer;
  font-size: 1rem;
  padding: 0.5rem 0;
  margin-bottom: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-volver:hover {
  color: #e67e22;
  text-decoration: underline;
}

.detalle-obra {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  margin-top: 1rem;
}

.detalle-entidad {
  background: #f0f0f0;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  font-weight: bold;
  color: #1a3a5c;
}

.detalle-presupuesto {
  font-size: 1.75rem;
  color: #e67e22;
  font-weight: bold;
  margin: 1rem 0;
}

.detalle-descripcion {
  margin: 1.5rem 0;
}

.detalle-descripcion ul {
  list-style: none;
  padding: 0;
}

.detalle-descripcion li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #eee;
}

.detalle-descripcion li:before {
  content: "✓ ";
  color: #e67e22;
  font-weight: bold;
}

.galeria-fotos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.foto-placeholder {
  background: #f0f0f0;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  color: #999;
  font-size: 0.9rem;
  border: 1px dashed #ccc;
}

#titulo-categoria-seleccionada {
  font-size: 2rem !important;
  font-weight: bold !important;
  text-align: center !important;
  color: #1a3a5c !important;
  margin-bottom: 2rem !important;
  padding: 0.5rem !important;
  background: #f0f0f0 !important;
  border-radius: 0.5rem !important;
}

/* Estilos para el nuevo formato de detalle de obra */
.detalle-obra-formato {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  line-height: 1.6;
}

.detalle-linea {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #eee;
}

.detalle-linea strong {
  color: #1a3a5c;
  font-size: 1.1rem;
  display: block;
  margin-bottom: 0.5rem;
}

.detalle-linea ul {
  margin: 0.5rem 0 0 1.5rem;
  padding: 0;
}

.detalle-linea li {
  margin: 0.25rem 0;
}

.presupuesto-destacado {
  font-size: 1.5rem;
  font-weight: bold;
  color: #e67e22;
  display: inline-block;
  background: #fff3e6;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
}
