/* =====================================================
   RODAMEL — Estilos del portal de rastreo
   Extraído de rastreo.php | Kondory Tecnología S.A.S
   ===================================================== */

:root {
  --rodamel-orange: #E94E1B;
  --rodamel-wine: #490102;
  --rodamel-black: #000000;
  --rodamel-white: #FFFFFF;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Montserrat', sans-serif;
  color: #333;
  line-height: 1.6;
  background: #f8f9fa;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
}

/* HERO Section - Buscador */
#hero-rastreo {
  background: linear-gradient(135deg, #0d0d0d 0%, #1a1a1a 50%, #2d2d2d 100%);
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 140px 0 80px 0;
  position: relative;
  overflow: hidden;
}

#hero-rastreo::before {
  content: '';
  position: absolute;
  top: 50%;
  right: 10%;
  transform: translate(50%, -50%);
  width: 400px;
  height: 400px;
  border: 3px solid #E94E1B;
  border-radius: 50%;
  opacity: 0.08;
  pointer-events: none;
}

#hero-rastreo h1 {
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--rodamel-white);
  margin-bottom: 1rem;
  text-align: center;
}

#hero-rastreo p.subtitle {
  font-family: 'Montserrat', sans-serif;
  font-style: italic;
  font-weight: 500;
  font-size: 1.2rem;
  color: var(--rodamel-orange);
  margin-bottom: 3rem;
  text-align: center;
}

.search-box {
  background: var(--rodamel-white);
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  max-width: 600px;
  margin: 0 auto;
}

.search-box label {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  color: var(--rodamel-wine);
  margin-bottom: 15px;
  display: block;
  font-size: 1.1rem;
}

.search-box input {
  width: 100%;
  padding: 15px 20px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.search-box input:focus {
  outline: none;
  border-color: var(--rodamel-orange);
  box-shadow: 0 0 0 0.2rem rgba(233, 78, 27, 0.15);
}

.btn-buscar {
  width: 100%;
  background: var(--rodamel-orange);
  color: var(--rodamel-white);
  border: none;
  padding: 15px 40px;
  border-radius: 50px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-buscar:hover:not(:disabled) {
  background: #d43e0b;
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(233, 78, 27, 0.3);
}

.btn-buscar:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Resultado Section */
#resultado {
  padding: 60px 0;
  display: none;
}

.result-card {
  background: var(--rodamel-white);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.1);
  max-width: 900px;
  margin: 0 auto;
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #f0f0f0;
}

.result-header h2 {
  color: var(--rodamel-wine);
  font-size: 1.8rem;
  margin: 0;
}

.badge-estado {
  padding: 10px 25px;
  border-radius: 50px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  text-transform: uppercase;
}

.badge-recepcionada { background: #0d6efd; color: white; }
.badge-clasificada { background: #ffc107; color: #333; }
.badge-en_espera { background: #E94E1B; color: white; }
.badge-en_despacho { background: #6f42c1; color: white; }
.badge-entregada { background: #198754; color: white; }
.badge-devuelta, .badge-novedad { background: #dc3545; color: white; }

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.info-item {
  padding: 15px;
  background: #f8f9fa;
  border-radius: 10px;
}

.info-item label {
  font-weight: 600;
  color: var(--rodamel-wine);
  font-size: 0.9rem;
  display: block;
  margin-bottom: 5px;
}

.info-item p {
  color: #333;
  margin: 0;
  font-size: 1rem;
}

.historial-section h3 {
  color: var(--rodamel-wine);
  font-size: 1.5rem;
  margin-bottom: 25px;
}

.timeline {
  position: relative;
  padding-left: 40px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, var(--rodamel-orange), #f0f0f0);
}

.timeline-item {
  position: relative;
  margin-bottom: 30px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 10px;
  border-left: 4px solid var(--rodamel-orange);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -44px;
  top: 20px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--rodamel-orange);
  border: 3px solid var(--rodamel-white);
  box-shadow: 0 0 0 3px #f8f9fa;
}

.timeline-item .estado {
  font-weight: 700;
  color: var(--rodamel-wine);
  font-size: 1.1rem;
  margin-bottom: 5px;
}

.timeline-item .fecha {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 10px;
}

.timeline-item .observacion {
  color: #333;
  font-size: 0.95rem;
}

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #25D366;
  color: white;
  padding: 15px 30px;
  border-radius: 50px;
  text-decoration: none;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  margin-top: 30px;
}

.btn-whatsapp:hover {
  background: #128C7E;
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.3);
}

.btn-nueva-busqueda {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--rodamel-wine);
  color: white;
  padding: 15px 30px;
  border-radius: 50px;
  text-decoration: none;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  margin-top: 30px;
  margin-left: 15px;
  border: none;
  cursor: pointer;
}

.btn-nueva-busqueda:hover {
  background: #6b0102;
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(73, 1, 2, 0.3);
}

.error-message {
  text-align: center;
  padding: 40px;
}

.error-message i {
  font-size: 4rem;
  color: var(--rodamel-orange);
  margin-bottom: 20px;
}

.error-message h3 {
  color: var(--rodamel-wine);
  font-size: 1.8rem;
  margin-bottom: 15px;
}

.error-message p {
  color: #666;
  font-size: 1.1rem;
}

.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--rodamel-orange);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
  #hero-rastreo h1 {
    font-size: 2rem;
  }

  #hero-rastreo p.subtitle {
    font-size: 1rem;
  }

  .search-box {
    padding: 30px 20px;
  }

  .result-header {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .btn-whatsapp, .btn-nueva-busqueda {
    width: 100%;
    margin-left: 0;
    margin-top: 15px;
  }
}

html {
  scroll-behavior: smooth;
}