/* ============================================
   VARIABLES DE MARCA - W Boxes PTY
   ============================================ */
:root {
    /* Colores de la marca */
    --brand-primary: #00204A;
    --brand-secondary: #64B5F6;
    --brand-emphasis: #FF8B00;
    
    /* Textos */
    --text-primary: #7A7A7A;
    --text-dark: #333333;
    --text-light: #999999;
    --white: #ffffff;
    
    /* Otros colores */
    --border-color: #e0e0e0;
    --bg-light: #f8f9fa;
    --error-color: #ff6b6b;
    --success-color: #51cf66;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
}

.page-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Logo centrado */
.logo-section {
    text-align: center;
    margin-bottom: 40px;
}

.logo-section a {
    display: inline-block;
    transition: transform 0.3s;
}

.logo-section a:hover {
    transform: scale(1.05);
}

.main-logo {
    max-width: 300px;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
}

/* Contenedor principal con dos columnas */
.main-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

/* Columna izquierda */
.left-column {
    display: flex;
    flex-direction: column;
}

.tracking-section {
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 40px;
}

h1 {
    color: var(--brand-primary);
    font-size: 2rem;
    margin-bottom: 10px;
    text-align: center;
}

.subtitle {
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 30px;
    font-size: 0.95rem;
}

.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

#tracking-input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
    color: var(--text-dark);
}

#tracking-input:focus {
    outline: none;
    border-color: var(--brand-secondary);
    box-shadow: 0 0 0 3px rgba(100, 181, 246, 0.1);
}

#search-button {
    padding: 14px 30px;
    background: var(--brand-emphasis);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

#search-button:hover {
    background: #e67d00;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 139, 0, 0.4);
}

#search-button:active {
    transform: translateY(0);
}

#search-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Columna derecha - Información */
.right-column {
    display: flex;
}

.info-notice {
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 40px;
    border-left: 6px solid var(--brand-emphasis);
}

.info-notice h2 {
    color: var(--brand-primary);
    font-size: 1.3rem;
    margin-bottom: 20px;
    line-height: 1.4;
}

.info-notice p {
    color: var(--text-primary);
    margin-bottom: 15px;
    line-height: 1.6;
}

.info-notice .greeting {
    font-style: italic;
    color: var(--text-dark);
}

.info-notice strong {
    color: var(--brand-primary);
    font-weight: 700;
}

.info-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 20px;
}

.info-list li {
    padding-left: 25px;
    position: relative;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.info-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--brand-secondary);
    font-weight: bold;
    font-size: 1.2rem;
}

.warning-title {
    font-weight: 600;
    color: var(--text-dark);
    margin-top: 20px;
}

.warning-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 20px;
}

.warning-list li {
    padding-left: 25px;
    position: relative;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.warning-list li:before {
    content: "✗";
    position: absolute;
    left: 0;
    color: var(--error-color);
    font-weight: bold;
    font-size: 1.2rem;
}

.important-note {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--brand-emphasis);
    margin: 15px 0;
    color: var(--text-dark);
}

.important-note a {
    color: var(--brand-primary);
    text-decoration: none;
    font-weight: 600;
}

.important-note a:hover {
    color: var(--brand-emphasis);
    text-decoration: underline;
}

.thanks {
    margin-top: 20px;
    font-style: italic;
    color: var(--text-dark);
    text-align: center;
    font-size: 1.05rem;
}

/* Resultados del tracking */
#result-container {
    margin-top: 20px;
}

.tracking-result {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 24px;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-header {
    margin-bottom: 20px;
}

.result-header h3 {
    color: var(--brand-primary);
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    background: var(--white);
    border-radius: 8px;
    margin-bottom: 10px;
}

.info-label {
    font-weight: 600;
    color: var(--text-dark);
}

.info-value {
    color: var(--text-primary);
    text-align: right;
}

.status-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--white);
}

.status-RECEIVED {
    background: var(--brand-emphasis);
}

.status-IN_TRANSIT {
    background: var(--brand-secondary);
}

.status-ARRIVED {
    background: #43e97b;
}

.status-WAREHOUSED {
    background: var(--brand-primary);
}

.status-DELIVERED {
    background: var(--success-color);
}

.history-section {
    margin-top: 30px;
}

.history-section h4 {
    color: var(--brand-primary);
    font-size: 1.1rem;
    margin-bottom: 15px;
}

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

.history-timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--brand-primary), var(--brand-secondary));
}

.history-item {
    position: relative;
    padding: 15px;
    background: var(--white);
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.history-item::before {
    content: '';
    position: absolute;
    left: -22px;
    top: 20px;
    width: 12px;
    height: 12px;
    background: var(--brand-secondary);
    border-radius: 50%;
    border: 3px solid var(--white);
    box-shadow: 0 0 0 2px var(--brand-secondary);
}

.history-date {
    color: var(--text-primary);
    font-size: 0.85rem;
    margin-top: 8px;
}

.error-message {
    background: linear-gradient(135deg, var(--error-color) 0%, #ee5a6f 100%);
    color: var(--white);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.error-message strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-primary);
}

.loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* Botón de regreso */
.back-section {
    text-align: center;
    margin-bottom: 40px;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 30px;
    background: var(--white);
    border: 2px solid var(--brand-primary);
    color: var(--brand-primary);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
}

.back-button:hover {
    background: var(--brand-primary);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 32, 74, 0.3);
}

/* Footer */
.footer {
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 30px;
    margin-top: 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.contact-info {
    flex: 1;
}

.contact-info p {
    margin-bottom: 8px;
    color: var(--text-primary);
}

.contact-info strong {
    color: var(--brand-primary);
}

.contact-info a {
    color: var(--brand-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

.contact-info a:hover {
    color: var(--brand-emphasis);
}

.footer-credits {
    text-align: right;
    flex: 1;
}

.footer-credits p {
    margin-bottom: 5px;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.footer-credits a {
    color: var(--brand-primary);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-credits a:hover {
    color: var(--brand-emphasis);
}

/* Responsive */
@media (max-width: 1024px) {
    .main-container {
        grid-template-columns: 1fr;
    }
    
    .left-column {
        order: 1;
    }
    
    .right-column {
        order: 2;
    }
}

@media (max-width: 768px) {
    .page-wrapper {
        padding: 20px 15px;
    }
    
    .main-logo {
        max-width: 200px;
    }
    
    .tracking-section,
    .info-notice {
        padding: 24px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .info-notice h2 {
        font-size: 1.1rem;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    #search-button {
        width: 100%;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-credits {
        text-align: center;
    }
    
    .info-row {
        flex-direction: column;
        gap: 5px;
    }
    
    .info-value {
        text-align: left;
    }
}