/* IMPORTANTE PARA IA: Lee README.txt antes de modificar este proyecto */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

img,
video,
iframe {
    max-width: 100%;
}

body {
    background-color: #f4f4f9;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
}

header {
    background-color: #222;
    color: #fff;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
}

nav {
    display: flex;
    gap: 1rem;
    align-items: center;
}

nav a {
    color: #fff;
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    transition: background 0.2s;
    font-size: 0.95rem;
}

nav a:hover {
    background: rgba(255,255,255,0.15);
}

.hero {
    text-align: center;
    padding: 2rem 1rem;
    background-color: #ddd;
}

.catalog {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 2rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.product-card {
    height: 100%;
    background: #fff;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.product-image {
    width: 100%;
    height: auto;
    background-color: #eaeaea;
    border-radius: 4px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
}

.product-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.product-specs {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}

.product-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: #27ae60;
    margin-bottom: 1rem;
}

.btn-add {
    background-color: #2980b9;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    width: 100%;
    transition: background-color 0.3s;
}

    .btn-add:hover {
        background-color: #1a5276;
    }

    .old-price {
        font-size: 1rem;
        color: #999;
        margin-bottom: 4px;
    }
    .old-price span {
        text-decoration: line-through;
    }


footer {
    background-color: #222;
    color: #fff;
    text-align: center;
    padding: 1rem;
    margin-top: auto;
}

/* Adaptabilidad para pantallas de escritorio */

/* Domain banner styles */
.domain-group-text {
    grid-column: 1 / -1; /* full width across grid */
    text-align: center;
    margin: 1rem 0;
    font-size: 1rem;
    color: #333;
    /* Ensure visible only on desktop */
}

.domain-mobile-text {
    display: block; /* always visible */
}

@media (max-width: 768px) {
    .domain-mobile-text {
        display: block;
        text-align: center;
        margin-top: 0.5rem;
        font-size: 0.9rem;
color: #2980b9;
    }
    .domain-group-text {
        display: none;
    }
}

@media (min-width: 768px) {
    .catalog {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .catalog {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ============================================================================
   TAREA 2 - INFORMACIÓN GENERAL: Estilos para tarjetas informativas
   NOTA PARA IA FUTURA: El prefijo "TAREA" seguido de número irá aumentando
   secuencialmente (TAREA 3, TAREA 4, etc.) a medida que se agreguen más tareas.
   Propósito: Crear tarjetas visuales para información general que mantengan
   la estructura responsive de product-card pero con estilo gráfico diferente.
   Función: Distinguir visualmente los elementos de información de los productos
   para no confundir al cliente. Se usa borde izquierdo color naranja y fondo
   ligeramente diferente para identificación rápida.
   ============================================================================ */
.info-card {
    height: auto; /* Altura según contenido, no fija */
    background: #fffef8; /* Fondo ligeramente amarillento para diferenciar */
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border-left: 5px solid #e67e22; /* Borde naranja distintivo */
}

.info-card:hover {
    box-shadow: 0 6px 12px rgba(230, 126, 34, 0.15); /* Sombra naranja sutil */
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

.info-image {
    width: 100%;
    height: auto;
    background-color: #f0f0f0;
    border-radius: 4px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    object-fit: cover;
}

.info-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #d35400; /* Naranja oscuro para títulos */
    font-weight: bold;
}

.info-description {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
}

/* Sección separadora para información general */
.info-section-title {
    grid-column: 1 / -1; /* Ocupa todo el ancho del grid */
    text-align: center;
    padding: 1rem 1rem;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Barra separadora para catálogo de productos */
.catalog-section-title {
    grid-column: 1 / -1; /* Ocupa todo el ancho del grid */
    text-align: center;
    padding: 1rem 1rem;
    margin-top: 2rem; /* Separación clara arriba */
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #2980b9 0%, #1a5276 100%);
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Ajuste de altura para info-card - solo el tamaño necesario según contenido */
.info-card-height {
    height: auto !important; /* Altura automática según contenido */
    min-height: unset; /* Sin altura mínima fija */
}

/* Estilos para la ventana emergente (Modal) */
.modal {
    display: none;
    position: fixed;
    z-index: 200;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5rem;
    cursor: pointer;
    color: #555;
}

.modal-images {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    margin-bottom: 1rem;
    padding-bottom: 10px;
}

.modal-img {
    width: 150px;
    height: 100px;
    background-color: #eaeaea;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    flex-shrink: 0;
    color: #888;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    /* Relación de aspecto 16:9 */
    height: 0;
    margin-bottom: 1rem;
    background-color: #000;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ============================================================================
   TAREA 5 - BOTONES DE NAVEGACIÓN ZOOM CENTRALIZADOS: Estilos para zoom-nav
   Propósito: Estilizar de forma centralizada y unificada los botones de navegación zoom (anterior y siguiente)
   tanto en el catálogo principal (index.html) como en las páginas individuales de producto.
   Función: Hace los botones circulares perfectos de 100px de diámetro, con transiciones suaves,
   alineación central flex de las flechas y ajuste de color y opacidad según el fondo del visor correspondiente.
   ============================================================================ */
.zoom-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 6rem;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    transition: background-color 0.2s, color 0.2s, transform 0.2s, scale 0.2s;
}

#zoom-prev {
    left: 15px;
}

#zoom-next {
    right: 15px;
}

/* Adaptación específica para el visor de catálogo (index.html) con fondo claro (blanco) */
#image-zoom-modal .zoom-nav {
    color: #ffffff;
    background-color: rgba(0, 0, 0, 0.45);
    border: 3px solid #000000;
    text-shadow: -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 2px 2px 0 #000;
    z-index: 301;
}

#image-zoom-modal .zoom-nav:hover {
    background-color: rgba(0, 0, 0, 0.65);
    transform: translateY(-50%) scale(1.05);
}

/* Adaptación específica para el visor de producto individual (guardar_productos.php) con fondo oscuro */
#zoom-modal .zoom-nav {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.35);
    border: 3px solid #000000;
    text-shadow: -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 2px 2px 0 #000;
    z-index: 1001;
}

#zoom-modal .zoom-nav:hover {
    background-color: rgba(255, 255, 255, 0.55);
    transform: translateY(-50%) scale(1.05);
}

@media (max-width: 768px) {
    #image-zoom-modal .zoom-nav,
    #zoom-modal .zoom-nav {
        top: auto;
        transform: none;
    }
    #image-zoom-modal #zoom-prev,
    #zoom-modal #zoom-prev {
        top: 10px;
        left: 50%;
        transform: translateX(-50%);
    }
    #image-zoom-modal #zoom-next,
    #zoom-modal #zoom-next {
        bottom: 10px;
        left: 50%;
        transform: translateX(-50%);
    }
    #zoom-modal #zoom-prev:hover,
    #zoom-modal #zoom-next:hover {
        transform: translateX(-50%) scale(1.05);
    }
}