/* ====================================
   VARIABLES Y ESTILOS BASE
   ==================================== */

:root {
    /* Paleta de Colores de RP Playeras */
    --primary-color: #8c7ae6; /* Morado Primario (para botones y encabezados) */
    --secondary-color: #f9f4ff; /* Morado muy claro/casi blanco (para fondos) */
    --dark-color: #5d4a9f; /* Morado Oscuro (para textos y acentos) */
    --texto: #333; /* Color de texto principal */
    --background-light: #f5f5f5; /* Fondo general ligero */
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--background-light);
    color: var(--texto);
    line-height: 1.6;
}

h1, h2, h3 {
    color: var(--dark-color);
}

/* Contenedor principal para centrar el contenido (usado en Contacto, Nosotros, Carrito) */
.wrap {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.panel {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

/* Estilo para imágenes de banner */
.banner-con-imagen {
    width: 100%;
    overflow: hidden;
}

.banner-con-imagen img {
    width: 100%;
    height: auto;
    display: block;
}

/* ====================================
   ESTILOS DE NAVEGACIÓN (Menú Responsivo)
   ==================================== */

#menuSuperior {
    background-color: var(--dark-color);
    overflow: hidden;
    display: flex; /* Asegura que los enlaces estén en línea */
    justify-content: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

#menuSuperior a {
    color: white;
    padding: 14px 20px;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.3s;
}

#menuSuperior a:hover {
    background-color: var(--primary-color);
}

#menuSuperior .icon {
    display: none; /* Oculta el icono del menú en escritorio */
}

/* Media Query para pantallas pequeñas (Móvil) */
@media screen and (max-width: 768px) {
    #menuSuperior {
        flex-direction: column;
        align-items: flex-start;
    }
    
    #menuSuperior a:not(:first-child) {
        display: none; /* Oculta todos los enlaces excepto el primero por defecto */
    }
    
    #menuSuperior a.icon {
        float: right;
        display: block; /* Muestra el icono de la hamburguesa */
        position: absolute;
        right: 0;
        top: 0;
    }
    
    /* Muestra los enlaces cuando se activa el modo responsive (JavaScript) */
    #menuSuperior.responsive {
        position: relative;
    }
    
    #menuSuperior.responsive .icon {
        position: absolute;
        right: 0;
        top: 0;
    }
    
    #menuSuperior.responsive a {
        float: none;
        display: block;
        text-align: left;
        width: 100%;
        box-sizing: border-box;
    }
}


/* ====================================
   ESTILOS DE GALERÍA (Productos.html)
   ==================================== */

.gallery {
    display: grid;
    /* 3 columnas por defecto, ajusta según el tamaño de la pantalla */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 30px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.tarjeta-producto {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s;
}

.tarjeta-producto:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.tarjeta-producto img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 15px;
}

.tarjeta-producto h3 {
    color: var(--dark-color);
    margin-top: 0;
    margin-bottom: 5px;
}

.tarjeta-producto p {
    color: var(--texto);
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 15px;
}

/* Estilo para el botón de "Añadir al Carrito" */
.btn-comprar {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s;
    width: 100%;
}

.btn-comprar:hover {
    background-color: var(--dark-color);
}

/* ====================================
   ESTILOS DE CARRITO (Carrito.html)
   ==================================== */

.grid {
    display: grid;
    grid-template-columns: 2fr 1fr; /* Columna de lista más ancha que el resumen */
    gap: 20px;
    align-items: flex-start; /* Alinea paneles al inicio */
}

@media screen and (max-width: 900px) {
    .grid {
        grid-template-columns: 1fr; /* Una columna en móvil */
    }
}

.list {
    display: flex;
    flex-direction: column;
}

.list .empty {
    text-align: center;
    padding: 50px;
    color: #999;
}

.item {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    gap: 15px;
}

.item:last-child {
    border-bottom: none;
}

.item .img img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.item .name {
    flex-grow: 1;
    font-weight: bold;
    color: var(--dark-color);
}

.item .name .desc {
    font-weight: normal;
    color: #666;
    font-size: 0.9em;
}

.item .qty {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 0 10px;
}

.item .qty button {
    background: var(--secondary-color);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    cursor: pointer;
    width: 25px;
    height: 25px;
    border-radius: 3px;
    font-weight: bold;
}

.item .price {
    font-weight: bold;
    color: var(--primary-color);
    width: 80px; /* Ancho fijo para el precio */
    text-align: right;
}

.item .del button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2em;
    color: #d9534f;
}

/* Estilos de Resumen */
.summary {
    padding-bottom: 15px;
}

.summary .row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.summary .total {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--dark-color);
}

.summary hr {
    border: 0;
    border-top: 1px solid #ccc;
    margin: 15px 0;
}

.summary .muted {
    display: block;
    font-size: 0.8em;
    color: #999;
    margin-top: 15px;
}

.actions {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

/* Estilos para botones secundarios (outline) */
.btn.outline {
    background-color: white;
    color: var(--dark-color);
    border: 1px solid var(--dark-color);
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
}

.btn.outline:hover {
    background-color: var(--dark-color);
    color: white;
}

/* Estilo para el botón principal (Proceder al Pago, Enviar) */
.btn-submit {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
    transition: background-color 0.3s;
}

.btn-submit:hover {
    background-color: var(--dark-color);
}

/* Estilos para la sección de Métodos de Pago (NUEVO) */
.payment-method h3 {
    color: var(--dark-color);
    border-bottom: 1px solid #ccc;
    padding-bottom: 5px;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.payment-method label {
    cursor: pointer;
    font-size: 1em;
    padding: 8px 0;
    display: block; 
    transition: background-color 0.2s;
}

.payment-method input[type="radio"] {
    margin-right: 8px;
    transform: scale(1.1);
}

.payment-method i {
    margin-right: 5px;
    width: 20px; 
    text-align: center;
}

/* ====================================
   ESTILOS DE CONTACTO (Contacto.html)
   ==================================== */

.contact-form {
    max-width: 600px;
    width: 100%;
    padding: 20px 30px;
    /* Hereda .panel estilos */
}

/* Agrupación de Nombre y Correo */
.form-group-inline {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.form-group-inline > div {
    flex: 1;
}

.contact-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: var(--dark-color);
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box; 
}

.contact-form textarea {
    resize: vertical; 
}

/* Estilo para el Toggle de Aviso de Privacidad */
.aviso-toggle-btn {
    cursor: pointer;
    color: var(--primary-color);
    text-decoration: underline;
    margin-bottom: 10px;
    font-weight: bold;
    transition: color 0.3s;
}

.aviso-toggle-btn:hover {
    color: var(--dark-color);
}

.aviso-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out;
    padding: 0 15px; 
    margin-top: 5px;
}

.aviso-content.show {
    max-height: 1000px; 
    padding: 15px; 
}


/* ====================================
   PIE DE PÁGINA
   ==================================== */

.main-footer {
    background-color: var(--dark-color);
    color: white;
    padding: 20px;
    text-align: center;
    margin-top: 40px;
}

.footer-info {
    margin-bottom: 15px;
}

.footer-social a {
    color: white;
    font-size: 1.8em;
    margin: 0 10px;
    transition: color 0.3s;
    text-decoration: none;
}

.footer-social a:hover {
    color: var(--primary-color);
}