
:root {
    --color-primario: #007bff;
}

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

body {
    font-family: 'Segoe UI', sans-serif;
    background: #f5f5f5;
}
header {
    background-color: var(--color-primario);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    gap: 10px;
    flex-wrap: wrap; /* ← CAMBIADO: permite adaptarse */
}

.btn-volver {
    background: white;
    color: var(--color-primario);
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    white-space: nowrap;
    margin-left: auto; /* ← asegura que se mantenga a la derecha */
}




.logo_header img {
    height: 50px;
    width: auto;
}

.header-left {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: white;
}


.container {
    max-width: 1000px;
    margin: 30px auto;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

.galeria {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
}

.swiper {
    width: 100%;
    max-width: 480px;
    border-radius: 10px;
    overflow: hidden;
    flex: 1;
    min-width: 280px;
}

.swiper-slide img {
    width: 100%;
    height: auto;
    object-fit: contain;
    cursor: pointer;
}

.info {
    flex: 1;
    min-width: 280px;
}

.info h2 {
    margin-top: 0;
    margin-bottom: 8px;
}

.info p {
    margin-bottom: 12px;
}

.precios {
    margin: 10px 0 15px;
}

.precio-original {
    text-decoration: line-through;
    color: #888;
    font-size: 18px;
    margin-bottom: 4px;
}

.precio-promocion,
.precio-unico {
    color: #e74c3c;
    font-size: 22px;
    font-weight: bold;
}

.stock {
    font-size: 14px;
    color: #333;
    margin-bottom: 10px;
}

.btn-wsp {
    display: inline-block;
    padding: 10px 16px;
    background-color: #25D366;
    color: white;
    text-decoration: none;
    font-weight: 600;
    border-radius: 6px;
    font-size: 16px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    transition: background 0.3s ease, transform 0.2s ease;
}

.btn-wsp:hover {
    background-color: #1ebe5b;
    transform: scale(1.03);
}

.stock {
    font-size: 15px;
    font-weight: 500;
    color: #2c3e50;
    background: #eef2f3;
    padding: 6px 10px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 12px;
}


.promo {
    margin-top: 15px;
    padding: 12px;
    border-radius: 6px;
    background: linear-gradient(90deg, #f44336, #ff9800);
    color: #fff;
}

.promo strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.promo small {
    display: block;
    margin-top: 6px;
    font-size: 0.85rem;
    opacity: 0.9;
}

.swiper-thumb {
    margin-top: 20px;
}

.swiper-thumb .swiper-slide {
    opacity: 0.5;
    border-radius: 8px;
    overflow: hidden;
}

.swiper-thumb .swiper-slide-thumb-active {
    opacity: 1;
    border: 2px solid var(--color-primario);
}

.swiper-thumb img {
    width: 100%;
    height: 60px;
    object-fit: cover;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal.active {
    display: flex;
}

.modal .cerrar {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 30px;
    color: #fff;
    cursor: pointer;
}

.modal .swiper {
    width: 90%;
    max-width: 600px;
    border-radius: 8px;
    overflow: hidden;
}

.modal .swiper-slide img {
    width: 100%;
    max-height: 80vh;
    object-fit: contain;
}


/* RESPONSIVE */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .galeria {
        flex-direction: column;
        align-items: center;
    }

    .info {
        text-align: center;
    }

    .btn-wsp,

    .promo {
        text-align: center;
    }
}


footer {
    margin-top: 40px;
    background: var(--color-primario);
    color: #fff;
    text-align: center;
    padding: 15px;
    font-size: 14px;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.page-wrapper > footer {
    margin-top: auto;
    background-color: #f1f1f1;
    text-align: center;
    padding: 20px;
    font-size: 0.9em;
    color: #888;
}

