/* ==========================================
   REIVEN STORE — STYLE.CSS FINAL V3.1 (ajustes anti-expansión)
========================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: #000;
    font-family: Arial, sans-serif;
    color: #fff;
    position: relative;
    overflow-x: hidden;
}

/* ===== FONDO DIAGONAL DEBAJO ===== */
body::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: repeating-linear-gradient(
        135deg,
        rgba(255,255,255,0.03),
        rgba(255,255,255,0.03) 2px,
        transparent 2px,
        transparent 14px
    );
}

/* ===== LOADER ===== */
#loader {
    position: fixed;
    inset: 0;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 9999;
    transition: opacity .4s ease;
}

.loader-logo {
    width: 240px;
    margin-bottom: 18px;
}

#loader-text {
    font-size: 20px;
    margin-bottom: 12px;
    color: #caa8ff;
}

.loader-bar-container {
    width: 65%;
    height: 10px;
    background: #111;
    border-radius: 10px;
    overflow: hidden;
}

.loader-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg,#7b00ff,#ff00aa);
    transition: width .2s linear;
}

/* ===== CARRUSEL ===== */
.logo-slider {
    width: 100%;
    overflow: hidden;
    padding: 18px 0;
    background: rgba(255,255,255,0.05);
}

.logo-track {
    display: flex;
    gap: 60px;
    animation: scroll 14s linear infinite;
    width: max-content;
}

.logo-slider img {
    height: 32px;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

@keyframes scroll {
    0% {transform: translateX(0);}
    100% {transform: translateX(-50%);}
}

/* ===== BUSCADOR ===== */
.search-wrapper {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

#searchInput {
    width: 85%;
    padding: 12px 20px;
    background: #111;
    border: none;
    border-radius: 20px;
    color: #ccc;
    font-size: 16px;
}

/* ===== CATEGORÍAS ===== */
.categories {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding-bottom: 20px;
    flex-wrap: wrap;
}

.category {
    background: #1a1a1a;
    border: 1px solid #333;
    padding: 8px 18px;
    border-radius: 20px;
    color: #ccc;
    cursor: pointer;
    transition: .25s;
}

.category.active {
    background: #7b00ff;
    color: white;
    box-shadow: 0 0 10px #7b00ff;
}

.category:hover {
    background: #5a00c9;
    color: white;
}

/* ===== CARDS (PRODUCTOS) ===== */
.cards-container {
    padding: clamp(16px, 4vw, 28px);
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 260px));
    justify-content: center;
    justify-items: center;
}

.card {
    width: 100%;
    max-width: 260px;
    min-width: 220px;
    padding: 15px;
    border-radius: 15px;
    background: #111;
    border: 1px solid #222;
    cursor: pointer;
    text-align: center;
    transition: .25s;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 0 12px #7b00ff;
}

.card img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    border-radius: 12px;
}

.card h3 {
    margin-top: 10px;
    font-size: 17px;
}

.stars {
    margin-top: 4px;
    font-size: 14px;
    color: #ffc400;
}

/* ===== LIMITAR TAMAÑO EN PC ===== */
@media (min-width: 1024px) {
    .cards-container {
        grid-template-columns: repeat(auto-fit, minmax(220px, 260px));
        justify-content: center;
        justify-items: center;
    }
}

/* ===== MODAL ===== */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.70);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

.modal-content {
    width: 90%;
    max-width: 390px;
    background: #111;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    animation: modalIn .25s ease;
}

@keyframes modalIn {
    from {transform: scale(.9); opacity: 0;}
    to   {transform: scale(1); opacity: 1;}
}

.modal-img-wrapper {
    position: relative;
    width: 100%;
    height: 210px;
    overflow: hidden;
}

.modal-img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(1.05);
}

.modal-img-blur {
    position: absolute;
    inset: 0;
    z-index: 0;
    filter: blur(18px);
    transform: scale(1.1);
    opacity: 0.4;
    background: rgba(0,0,0,0.15);
}

.close {
    position: absolute;
    right: 18px;
    top: 10px;
    font-size: 30px;
    cursor: pointer;
    z-index: 2;
}

.modal-content h2 {
    margin: 15px;
}

.stars-modal {
    margin: -8px 15px 8px;
    color: #ffc400;
}

#modalDesc {
    margin: 0 15px 15px;
    opacity: .85;
    font-size: 15px;
}

.plan {
    display: flex;
    justify-content: space-between;
    background: #1b1b1b;
    margin: 10px 15px;
    padding: 12px;
    border-radius: 12px;
}

.plan strong {
    color: #ffcc49;
}

/* ===== BOTÓN WHATSAPP ===== */
.whatsapp-area {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.btn-wa {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #25D366;
    padding: 12px 18px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: bold;
    color: #000;
}

.btn-wa img {
    height: 22px;
    filter: brightness(0) invert(1);
}

/* ===== FOOTER ===== */
footer {
    margin-top: 40px;
    padding: 25px;
    text-align: center;
    background: #050505;
    opacity: .8;
    font-size: 15px;
}

.footer-wa {
    color: #25D366;
    font-weight: bold;
    text-decoration: none;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    #searchInput { width: 92%; }
    .modal-img-wrapper { height: 190px; }
}

@media (max-width: 480px) {
    .modal-img-wrapper { height: 170px; }
}
