:root {
    --primary-color: #E21D48;
    --secondary-color: #3B141C;
    --text-color: #fff;
    --background-color: #0A0A0A;
    --background-color-2: #212121;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--background-color);
}

header {
    background-color: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    height: 81px;
    display: flex;
    flex-wrap: wrap;
    border-bottom: 1px solid #535353;
    place-items: center;
    justify-content: space-around;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
}

header .logo img {
    display: block;
    height: 50px;
}

.logo {
    display: flex;
    align-items: center;
    color: var(--text-color);
    gap: 10px;
    font-size: 1.2em;
    font-weight: bold;
}

header #nav {
    display: flex;
    gap: 20px;
}

header #nav a {
    text-transform: uppercase;
    font-size: 1em;
    color: var(--text-color);
    text-decoration: none;
    position: relative;
}

header #nav a:hover {
    color: var(--primary-color);
    font-weight: bold;
}

header #nav .sub {
    position: relative;
}



header #nav .sub ul {
    padding: 20px;
    background: var(--background-color-2);
    position: absolute;
    top: 100%;
    left: 0;
    border-top: 20px solid var(--background-color);
    display: none;
    width: 250px;
    border-radius: 15px;
}


header #nav .sub ul li {
    margin-bottom: 10px;
    font-size: 1em;
    color: var(--text-color);
    text-decoration: none;
    list-style: none;

}

header #nav .sub:hover ul {
    display: block;
}


header #nav .sub ul li a:hover {
    color: var(--primary-color);
}


header .btn_contac {
    text-decoration: none;
    color: var(--text-color);
    font-size: 1em;
    text-transform: uppercase;
    background: var(--primary-color);
    padding: 10px 20px;
    border-radius: 5px;
}

header .btn_contac:hover {
    box-shadow: 0 0 20px var(--primary-color);
}


::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    background: #000000;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 1000px;
}

section {
    margin-top: 50px;
    max-width: 100%;
    width: 100%;
    height: auto;
    min-height: 100vh;
}

section h3 {
    font-size: 1em;
    font-weight: bold;
    color: var(--primary-color);
    text-transform: uppercase;
    margin-bottom: 20px;
}

.separador {
    width: 100%;
    display: block;
}



/* Botón hamburguesa oculto en desktop */
.menu-toggle {
    display: none;
    font-size: 28px;
    cursor: pointer;
}

.menu-toggle i {
    color: var(--text-color);
}

#x_x {
    display: none;
    color: var(--text-color);
}

#logo_2 {
    display: none;
}

/* 📱 MODO CELULAR */
@media (max-width: 920px) {

    .menu-toggle {
        display: block;
    }

    #nav {
        z-index: 100;
        width: 100%;
        height: 100vh;
        background: #000;
        top: 0;
        left: 0;
        position: fixed !important;
        flex-wrap: wrap;
        /* justify-content: center; */
        /* align-items: center; */
        flex-direction: column;
        padding: 20px;
        display: none !important;
    }

    #x_x {
        position: absolute;
        top: 20px;
        right: 20px;
        cursor: pointer;
        font-size: 2em;
        display: block;
    }

    #logo_2 {
        display: flex;
        width: 100%;
        justify-content: center;
        align-items: center;
        flex-wrap: wrap;
    }

    #logo_2::after {
        width: 100%;
        background: #fff;
        height: 2px;
        content: "";
        display: block;
        margin-top: 10px;
    }
}

.btn_contac2 {
    display: none;
}

@media (max-width: 600px) {
    .btn_contac {
        display: none;
    }

    .btn_contac2 {
        display: block;
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.btn_contac2 {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
    font-size: 2em;
    animation: pulse 2s infinite;
    text-decoration: none;
    color: var(--text-color);
}

h2 {
    font-size: 2.5em;
    font-weight: bold;
    color: var(--text-color);
    text-transform: uppercase;
    margin-bottom: 20px;
}

h2 span {
    font-size: 1em;
    font-weight: bold;
    color: var(--primary-color);
    text-transform: uppercase;
    margin-bottom: 20px;
}

.btn_min {
    padding: 10px 20px;
}


.btns_header {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    color: white;
    place-content: center;
    place-items: center;
}

.btns_header .btn_circular {
    width: 30px;
    height: 30px;
    padding: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    color: var(--text-color);
    margin: 0px;
    position: relative;
}

.btn_circular .sub {
    position: absolute;
    top: 100%;
    right: calc(100% - 40px);
    margin-top: 10px;
    /* border-top: 20px solid #000; */
    background: var(--background-color-2);
    border-radius: 15px;
    display: none;
    flex-wrap: wrap;
    /* gap: 10px; */
    padding-top: 20px;
    padding-bottom: 20px;
    border: 1px solid #fff;
    z-index: 3;
}


.btn_circular:hover .sub {
    display: flex;
}

.btn_circular .sub span {
    cursor: pointer;
    font-size: 1em;
    /* font-weight: bold; */
    color: var(--text-color);
    /* text-transform: uppercase; */
    /* margin-bottom: 20px; */
    width: 100%;
    padding: 10px;
    padding-left: 20px;
    padding-right: 20px;
}

.btn_circular .sub::before {
    content: "";
    position: absolute;
    right: -10px;
    top: -30px;
    width: calc(100% + 20px);
    height: calc(100% + 40px);
    z-index: -1;
    background: rgba(176, 255, 176, 0);
    border-radius: 15px;
}

.btn_circular .sub::after {
    content: "";
    margin-top: 20px;
}

#carrito {
    display: block;
    width: 100%;
}

#carrito .element {
    margin: 0 auto;
    width: calc(100% - 20px);
    display: flex;
    flex-wrap: wrap;
    overflow: hidden;
    border-radius: 15px;
    background: var(--background-color);
}

#carrito .element .img {
    width: 150px;
    height: 150px;
    display: flex;
    justify-content: center;
    overflow: hidden;
    
}

#carrito .element .img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

#carrito .element .textox{
    width: calc(100% - 160px);
    place-content: center;
    /* place-items: center; */
    margin-left: 10px;
}

#carrito .element .textox p{
    /* width: 100%; */
    /* height: 25px; */
    margin-bottom: 10px;
    padding: 0;
    font-size: 1em;
    color: var(--text-color);
    text-decoration: none;
    display: flex;
    /* place-content: center; */
    place-items: center;
}

#carrito .element .textox .nombre{
    max-width: 19ch;        /* Limita el ancho a unos 12 caracteres aproximadamente */
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    display: block;
}


#carrito .element .textox p i{
    margin-right: 5px;
}


#carrito .element span{
    padding: 0;
    text-align: left;
}

#carrito .element #bac{
    background: var(--primary-color);
    color: var(--text-color);
    padding: 4px 15px;
    border-radius: 1000px;
    cursor: pointer;
    place-content: center;
    place-items: center;
    width: 100px;
    text-align: center;
    margin-left: 20px;
}

#carrito .corto{
    width: 40px;
    text-align: left;
}

.sub.active {
    display: flex;
}

#total{
    background: var(--background-color);
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

#checkout{
    background: var(--primary-color);
    color: var(--text-color);
    width: 100%;
    border: none;
    outline: none;
    padding: 10px;
    cursor: pointer;
    font-size: 1em;
}


/* Correcciones estéticas exclusivas para el comportamiento responsivo de este header */
@media (max-width: 920px) {
    #nav {
        overflow-y: auto; /* Permite scroll si la pantalla del celular es muy pequeña */
    }

    #nav li {
        list-style: none; /* Elimina los puntos de lista por defecto si aparecen */
        width: 100%;
        margin-bottom: 15px;
    }

    #nav li a {
        display: block;
        font-size: 1.2em;
        width: 100%;
    }

    /* Asegura que el submenú de servicios se adapte verticalmente debajo del título */
    #nav .sub ul {
        position: static !important;
        width: 100% !important;
        box-shadow: none !important;
        border: none !important;
        padding-left: 20px !important;
        margin-top: 10px;
    }
    
    #nav .sub ul li {
        margin-bottom: 10px;
    }
    
    #nav .sub ul li a {
        font-size: 1em !important;
    }
}/* Estilos para los botones de paginación del catálogo.
   Pégalo en tu hoja de estilos principal (o inclúyelo aparte).
   Ajusta los colores a los de tu marca si no calzan con var(--accent-red). */

.paginacion-productos {
    font-family: inherit;
}

.pagina-btn {
    background: #1a1a1a;
    color: #e8e8e8;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 8px 14px;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.pagina-btn:hover:not(:disabled) {
    background: var(--accent-red, #e21d48);
    border-color: var(--accent-red, #e21d48);
    color: #fff;
}

.pagina-btn.active {
    background: var(--accent-red, #e21d48);
    border-color: var(--accent-red, #e21d48);
    color: #fff;
    font-weight: 600;
}

.pagina-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.pagina-nav {
    font-weight: 500;
}

/* ========================================
   Grupos de categorías (ej. "Laptops Gamer")
   ======================================== */
.categoria-grupo {
    margin: 40px 0;
    padding: 20px 20px 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
}

.categoria-grupo-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 6px;
}

.categoria-grupo-header h2 {
    margin: 0;
    color: #fff;
    font-size: 1.3em;
    letter-spacing: 0.5px;
    position: relative;
    padding-left: 12px;
    border-left: 4px solid var(--accent-red, #e21d48);
}

.categoria-grupo-sub {
    color: #888;
    font-size: 0.8em;
}

/* ========================================
   Secciones "por categoría" (dentro de un grupo)
   ======================================== */
.categoria-seccion {
    width: 100%;
    height: auto;
    display: flex;
    flex-wrap: wrap;
    margin: 22px 0;
    padding: 16px 16px 20px;
    background: #141414;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
}

.categoria-seccion-header {
    width: 100%;
    display: flex;
    /* align-items: baseline; */
    justify-content: space-between;
    margin-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 8px;
}

.categoria-seccion-header h3 {
    margin: 0;
    color: #f2f2f2;
    letter-spacing: 0.5px;
    font-size: 1.1em;
}

.categoria-total {
    color: #999;
    font-size: 0.8em;
}

.categoria-seccion-grid {
    /* display: grid; */
    display: flex;
    flex-wrap: wrap;
    /* grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); */
    gap: 18px;
}

.categoria-seccion-footer {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 16px;
}

.cargar-mas-categoria {
    padding: 8px 18px;
}

.cargar-mas-categoria:disabled {
    opacity: 0.6;
    cursor: wait;
}