/* =========================================
   CONTACT PAGE CSS
   ========================================= */

/* Encabezado (Pulido experto: sube el bloque de contacto al máximo) */
.page-header {
    padding-top: 8px !important;
    padding-bottom: 20px !important;
}

.page-subtitle {
    margin-bottom: 0 !important;
}

/* Layout Principal */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    max-width: 1040px;
    /* Reducido para un diseño más íntimo y profesional */
    margin: 0 auto;
    padding: 0 20px;
    justify-items: center;
}

@media (min-width: 960px) {
    .contact-layout {
        grid-template-columns: 1fr 380px;
        align-items: start;
    }
}

.main-contact-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 580px;
    margin: 0 auto;
    /* Ajuste preciso: el formulario ahora es mucho más compacto */
}

/* --- FORMULARIO CUSTOM --- */
.form-wrapper {
    background: #fff;
    padding: 32px;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
    border: 1px solid #f0f0f0;
}

.form-wrapper h3 {
    margin-bottom: 20px;
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a1a1a;
}

.rr-contact-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.rr-form-group {
    display: flex;
    flex-direction: column;
    position: relative;
}

.rr-label {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
    color: #333;
}

.text-error {
    color: #e53935;
}

.rr-input,
.rr-select,
.rr-textarea {
    width: 100%;
    padding: 13px 18px;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    color: #1f2937;
    transition: all 0.3s ease;
    outline: none;
}

.rr-input::placeholder,
.rr-textarea::placeholder {
    color: #9ca3af;
}

.rr-input:focus,
.rr-select:focus,
.rr-textarea:focus {
    background-color: #fff;
    border-color: #e91e8c;
    box-shadow: 0 0 0 4px rgba(233, 30, 140, 0.1);
}

/* Select Estilizado (Apariencia de la imagen provista) */
.custom-select-wrapper {
    position: relative;
}

.rr-select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234b5563' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 20px center;
    background-size: 16px;
    padding-right: 45px;
    /* Espacio para el chevron */
}

/* Para que cambie el borde del dropdown nativo */
.rr-select option {
    font-weight: normal;
    background-color: #fff;
    color: #333;
}

.rr-textarea {
    resize: vertical;
    min-height: 100px;
}

.char-counter {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 8px;
    text-align: left;
}

.btn-submit {
    background-color: #1a1a1a;
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 10px;
    font-family: inherit;
    display: flex;
    justify-content: center;
    align-items: center;
}

@media (hover: hover) {
    .btn-submit:hover {
        background-color: #000;
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    }
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit:disabled {
    background-color: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.form-feedback {
    margin-top: 15px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    animation: fadeIn 0.4s ease;
}

.form-feedback.success {
    background-color: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

/* --- SIDEBAR INFO --- */
.info-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Tarjetas Contacto Sidebar Rápidas */
.sidebar-contact-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@media (min-width: 960px) {
    .sidebar-contact-cards.horizontal-cards {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
}

.sc-card {
    display: flex;
    align-items: center;
    background: #fff;
    padding: 15px 18px;
    border-radius: 20px;
    text-decoration: none;
    color: inherit;
    border: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

@media (hover: hover) {
    .sc-card:hover {
        transform: translateX(5px);
        border-color: #e5e7eb;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
    }
}

.sc-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 12px;
}

.sc-content {
    display: flex;
    flex-direction: column;
}

.sc-title {
    font-weight: 600;
    font-size: 15px;
    color: #111;
    margin-bottom: 2px;
}

.sc-text {
    font-size: 14px;
    color: #666;
}

/* Ticker de Noticias Global (Estilo Breaking News) */
.contact-news-ticker {
    width: 100%;
    margin: 0;
    background: #000;
    color: #fff;
    padding: 14px 0;
    overflow: hidden;
    position: relative;
    border-radius: 0 !important;
}

/* Gradientes laterales para el efecto de desvanecimiento 'fade' */
.contact-news-ticker::before,
.contact-news-ticker::after {
    content: "";
    position: absolute;
    top: 0;
    width: 80px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.contact-news-ticker::before {
    left: 0;
    background: linear-gradient(to right, #000 20%, transparent 100%);
}

.contact-news-ticker::after {
    right: 0;
    background: linear-gradient(to left, #000 20%, transparent 100%);
}

.ticker-content {
    display: flex;
    white-space: nowrap;
    animation: ticker-slide 6s linear infinite;
    /* Velocidad máxima profesional */
}

.ticker-content span {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Estado error del formulario */
.form-feedback.error {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

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

@keyframes ticker-slide {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }

    /* Animación suave e infinita */
}

@media (max-width: 768px) {
    .contact-news-ticker {
        margin: 0;
        width: 100%;
        position: sticky; /* Mantener siempre a la vista al hacer scroll */
        top: 0;
        z-index: 999;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); /* Sombra para separar del contenido al bajar */
    }
    
    .contact-news-ticker::before,
    .contact-news-ticker::after {
        width: 40px;
    }

    .ticker-content span {
        font-size: 11.5px;
    }
}

/* Horario Tienda */
.horario-tienda {
    background: #fff;
    padding: 20px 25px;
    border-radius: 24px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.02);
    border: 1px solid #f0f0f0;
}

.encabezado-horario {
    margin-bottom: 20px;
}

.encabezado-horario h2 {
    font-size: 17px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-weight: 600;
    color: #111;
}

.encabezado-horario h2 svg {
    width: 20px;
    height: 20px;
    stroke: #666;
}

.horario-tienda ul {
    padding: 0;
    margin: 0;
    list-style: none;
}

.horario-tienda li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px dashed #e5e7eb;
    font-size: 14px;
}

.horario-tienda li:last-child {
    border-bottom: none;
}

.dia {
    font-weight: 500;
    color: #4b5563;
}

.horas.cerrado {
    color: #dc2626;
    font-weight: 600;
    background: #fef2f2;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.horario-footer-msg {
    text-align: center;
    font-size: 12px;
    color: #9ca3af;
    margin-top: 20px;
    margin-bottom: 0;
    font-weight: 500;
}

/* Espaciador de seguridad profesional */
.contact-footer-spacer {
    height: 60px;
    width: 100%;
}

/* Ajustes responsive optimizados */
@media (max-width: 600px) {
    .contact-layout {
        padding: 0 10px;
        /* Menos margen lateral para el contenedor */
    }

    .form-wrapper {
        padding: 24px 16px;
        /* Reducción de padding para máximo ancho de inputs */
        border-radius: 16px;
    }

    .main-contact-column {
        gap: 10px;
    }

    .sidebar-contact-cards {
        flex-direction: row !important;
        /* Forzar fila en móvil */
        gap: 10px;
    }

    /* Ocultar número y email en tarjetas de contacto para limpieza total */
    .sc-text {
        display: none !important;
    }

    .sc-card {
        padding: 10px 8px;
        /* Reducido para que quepa en media pantalla */
        flex: 1;
        /* Mitad de pantalla para cada uno */
        flex-direction: column;
        /* Icono arriba, texto abajo para un look de app */
        justify-content: center;
        text-align: center;
        gap: 6px;
        border-radius: 16px;
    }

    .sc-title {
        font-size: 12px;
        margin-bottom: 0;
    }

    .sc-icon {
        width: 32px;
        height: 32px;
        margin-right: 0;
        background: transparent !important;
        /* Eliminar el fondo de color */
        box-shadow: none !important;
        /* Eliminar cualquier sombra interna */
    }

    .sc-icon svg {
        width: 28px;
        /* Iconos un poco más grandes para compensar la falta de fondo */
        height: 28px;
    }

    .moving-banner,
    .horario-tienda {
        padding: 20px 15px;
        border-radius: 16px;
    }

    .moving-icon {
        font-size: 32px;
    }

    .moving-banner h3 {
        font-size: 1.2rem;
    }
}