/* =========================================================
   COLORES PRINCIPALES JC CAP
========================================================= */

:root {
    --jc-black: #0b0b0b;
    --jc-black-light: #171717;
    --jc-black-soft: #222222;

    --jc-blue: #0057b8;
    --jc-blue-dark: #003f88;
    --jc-blue-light: #eaf3ff;

    --jc-red: #d90429;
    --jc-red-dark: #a90320;
    --jc-red-light: #ffecef;

    --jc-white: #ffffff;

    --jc-gray: #f5f5f5;
    --jc-gray-dark: #666666;
}


/* =========================================================
   ESTILOS GENERALES
========================================================= */

html,
body {
    margin: 0;
    padding: 0;

    min-height: 100%;

    background: var(--jc-black);
    color: var(--jc-white);
}

body {
    overflow-x: hidden;
}

main {
    min-height: 100vh;
    background: var(--jc-black);
}

section,
.container {
    position: relative;
}


/* =========================================================
   NAVBAR
========================================================= */

.navbar {
    position: absolute;

    top: 0;
    left: 0;

    width: 100%;

    z-index: 1030;

    padding-top: 25px;
    padding-bottom: 25px;

    background: transparent !important;

    border: none !important;

    transition: .3s ease;
}


/* =========================================================
   LOGO / MARCA
========================================================= */

.navbar-brand {
    color: #fff !important;

    font-size: 1.35rem;
    font-weight: 800;

    letter-spacing: 1px;

    transition: .2s;
}

.navbar-brand:hover {
    color: var(--jc-blue) !important;
}


/* =========================================================
   LINKS DEL MENÚ
========================================================= */

.navbar .nav-link {
    color: #fff !important;

    font-weight: 500;

    transition: .2s;
}

.navbar .nav-link:hover {
    color: #3d8eea !important;
}

.navbar .nav-link.active {
    color: var(--jc-red) !important;
}


/* =========================================================
   CARRITO
========================================================= */

.navbar .cart-link {
    color: #fff !important;

    transition: .2s;
}

.navbar .cart-link:hover {
    color: #3d8eea !important;
}


/* =========================================================
   BOTÓN HAMBURGUESA
========================================================= */

.navbar-toggler {
    position: relative;

    z-index: 1102;

    padding: 6px 8px;

    background: rgba(0, 0, 0, .25);

    border: 1px solid rgba(255, 255, 255, .7);

    border-radius: 7px;
}

.navbar-toggler:hover {
    border-color: var(--jc-blue);
}

.navbar-toggler:focus {
    box-shadow:
        0 0 0 .15rem rgba(0, 87, 184, .35);
}


/* =========================================================
   HERO
========================================================= */

.hero {
    position: relative;

    width: 100%;
    min-height: 100vh;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 120px 0 80px;

    overflow: hidden;

    color: #fff;

    background-image:
        linear-gradient(
            120deg,
            rgba(0, 0, 0, .88),
            rgba(0, 45, 100, .68),
            rgba(180, 0, 30, .48)
        ),
        url('../../images/fondo.jpeg');

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}


/* =========================================================
   CAPA OSCURA DEL HERO
========================================================= */

.hero::after {
    content: "";

    position: absolute;

    inset: 0;

    background:
        radial-gradient(
            circle at center,
            transparent 20%,
            rgba(0, 0, 0, .35) 100%
        );

    pointer-events: none;
}


/* =========================================================
   CONTENIDO HERO
========================================================= */

.hero .container {
    position: relative;
    z-index: 2;
}


/* =========================================================
   LOGO DEL HERO
========================================================= */

.hero-logo {
    width: 400px;

    max-width: 90%;

    height: auto;

    object-fit: contain;

    filter:
        drop-shadow(
            0 8px 20px rgba(0, 0, 0, .6)
        );
}


/* =========================================================
   TÍTULOS DEL HERO
========================================================= */

.hero h1,
.hero h2,
.hero h3 {
    color: #fff;

    text-shadow:
        0 3px 10px rgba(0, 0, 0, .65);
}


/* =========================================================
   TEXTO DEL HERO
========================================================= */

.hero p {
    color: rgba(255, 255, 255, .92);

    text-shadow:
        0 2px 6px rgba(0, 0, 0, .6);
}


/* =========================================================
   TÍTULOS GENERALES
========================================================= */

main h1,
main h2,
main h3,
main h4 {
    color: #fff;
}

main .text-muted {
    color: #aaa !important;
}


/* =========================================================
   BOTONES GENERALES
========================================================= */

.btn-dark {
    background-color: var(--jc-black);

    border-color: var(--jc-black);

    color: #fff;
}

.btn-dark:hover {
    background-color: var(--jc-blue);

    border-color: var(--jc-blue);

    color: #fff;
}


.btn-primary {
    background-color: var(--jc-blue);

    border-color: var(--jc-blue);

    color: #fff;
}

.btn-primary:hover {
    background-color: var(--jc-blue-dark);

    border-color: var(--jc-blue-dark);

    color: #fff;
}


.btn-danger {
    background-color: var(--jc-red);

    border-color: var(--jc-red);

    color: #fff;
}

.btn-danger:hover {
    background-color: var(--jc-red-dark);

    border-color: var(--jc-red-dark);

    color: #fff;
}


/* =========================================================
   BOTONES OUTLINE
========================================================= */

.btn-outline-dark {
    color: var(--jc-black);

    border-color: var(--jc-black);
}

.btn-outline-dark:hover {
    background: var(--jc-black);

    color: #fff;
}


.btn-outline-primary {
    color: var(--jc-blue);

    border-color: var(--jc-blue);
}

.btn-outline-primary:hover {
    background: var(--jc-blue);

    border-color: var(--jc-blue);

    color: #fff;
}


.btn-outline-danger {
    color: var(--jc-red);

    border-color: var(--jc-red);
}

.btn-outline-danger:hover {
    background: var(--jc-red);

    border-color: var(--jc-red);

    color: #fff;
}


/* =========================================================
   ENLACES
========================================================= */

a {
    color: var(--jc-blue);
}

a:hover {
    color: var(--jc-red);
}


/* =========================================================
   PRECIOS GENERALES
========================================================= */

.price {
    font-size: 1.5rem;

    font-weight: 700;

    color: var(--jc-red);
}


/* =========================================================
   GALERÍA DEL PRODUCTO
========================================================= */

.detail-img {
    width: 100%;

    height: 520px;

    object-fit: cover;

    background: var(--jc-gray);

    border-radius: 10px;
}


/* =========================================================
   MINIATURAS
========================================================= */

.thumb {
    width: 80px;
    height: 80px;

    object-fit: cover;

    cursor: pointer;
}


/* =========================================================
   MINIATURAS DE LA GALERÍA
========================================================= */

.product-thumbnails {
    width: 85px;

    display: flex;

    flex-direction: column;

    gap: 10px;
}

.product-thumb {
    width: 75px;
    height: 75px;

    object-fit: cover;

    cursor: pointer;

    border: 2px solid transparent;

    border-radius: 6px;

    transition: .2s;
}

.product-thumb:hover {
    opacity: .8;

    border-color: var(--jc-blue);
}

.product-thumb.active {
    border-color: var(--jc-red);
}


/* =========================================================
   FORMULARIOS GENERALES
========================================================= */

.form-control,
.form-select {
    border-color: #444;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--jc-blue);

    box-shadow:
        0 0 0 .2rem rgba(0, 87, 184, .15);
}


/* =========================================================
   BADGES
========================================================= */

.badge.bg-dark {
    background-color: var(--jc-black) !important;
}

.badge.bg-primary {
    background-color: var(--jc-blue) !important;
}

.badge.bg-danger {
    background-color: var(--jc-red) !important;
}


/* =========================================================
   FILTROS DE TALLAS
========================================================= */

.catalog-filters {
    margin-bottom: 35px;
}

.filter-title {
    color: #888;

    font-size: .85rem;

    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: 1px;

    margin-bottom: 10px;
}


.size-filters {
    display: flex;

    flex-wrap: wrap;

    gap: 8px;
}


.size-filter {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-width: 55px;

    padding: 8px 13px;

    background: #111;

    border: 1px solid #2b2b2b;

    border-radius: 5px;

    color: #aaa;

    text-decoration: none;

    font-size: .85rem;

    font-weight: 500;

    transition: .2s ease;
}


.size-filter:hover {
    color: #fff;

    background: #1a1a1a;

    border-color: var(--jc-blue);

    transform: translateY(-1px);
}


.size-filter.active {
    background: rgba(0, 87, 184, .18);

    border-color: var(--jc-blue);

    color: #fff;

    box-shadow:
        0 0 0 1px rgba(0, 87, 184, .15);
}


.size-filter.all {
    min-width: 65px;
}


/* =========================================================
   PANEL ADMINISTRATIVO
========================================================= */

.admin-sidebar {
    min-height: 100vh;

    background: var(--jc-black);
}

.admin-sidebar .nav-link {
    color: #fff;

    transition: .2s;
}

.admin-sidebar .nav-link:hover {
    background: var(--jc-blue);

    color: #fff;
}

.admin-sidebar .nav-link.active {
    background: var(--jc-red);

    color: #fff;
}


/* =========================================================
   ESTADÍSTICAS ADMIN
========================================================= */

.stat {
    border: 0;

    border-left: 4px solid var(--jc-blue);

    background: #fff;

    color: var(--jc-black);
}

.stat:hover {
    border-left-color: var(--jc-red);
}


/* =========================================================
   TABLAS
========================================================= */

.table {
    color: #fff;
}

.table thead {
    background: var(--jc-black);

    color: #fff;
}

.table tbody tr {
    color: #fff;
}

.table tbody tr:hover {
    background: rgba(0, 87, 184, .15);
}


/* =========================================================
   ALERTAS
========================================================= */

.alert-danger {
    background: var(--jc-red-light);

    border-color: var(--jc-red);

    color: var(--jc-red-dark);
}

.alert-primary {
    background: var(--jc-blue-light);

    border-color: var(--jc-blue);

    color: var(--jc-blue-dark);
}


/* =========================================================
   MÓVIL
========================================================= */

@media (max-width: 768px) {

    /* -----------------------------------------------------
       NAVBAR
    ----------------------------------------------------- */

    .navbar {
        position: absolute;

        top: 0;
        left: 0;

        width: 100%;

        padding-top: 12px;
        padding-bottom: 12px;

        background: transparent !important;

        border: none !important;

        z-index: 1030;
    }


    /* -----------------------------------------------------
       LOGO NAVBAR
    ----------------------------------------------------- */

    .navbar-brand {
        position: relative;

        z-index: 1101;

        margin-left: 50px;

        font-size: 1.15rem;
    }


    /* -----------------------------------------------------
       HERO
    ----------------------------------------------------- */

    .hero {
        width: 100%;

        min-height: 100vh;
        height: 100vh;

        padding:
            90px 20px 50px;

        display: flex;

        align-items: center;
        justify-content: center;

        text-align: center;

        background-position: center;
    }


    .hero-logo {
        width: 330px;

        max-width: 88%;

        filter:
            drop-shadow(
                0 8px 18px rgba(0, 0, 0, .7)
            );
    }


    .hero h1 {
        font-size: 2rem;

        line-height: 1.15;
    }


    .hero p {
        font-size: 1rem;

        line-height: 1.5;
    }


    /* -----------------------------------------------------
       DETALLE DE PRODUCTO
    ----------------------------------------------------- */

    .detail-img {
        height: 400px;
    }


    /* -----------------------------------------------------
       GALERÍA
    ----------------------------------------------------- */

    .product-thumbnails {
        width: 100%;

        flex-direction: row;

        overflow-x: auto;

        padding-bottom: 5px;
    }

    .product-thumb {
        flex-shrink: 0;
    }


    /* -----------------------------------------------------
       HAMBURGUESA
    ----------------------------------------------------- */

    .navbar-toggler {
        position: fixed !important;

        top: 12px;
        left: 15px;

        width: 44px;
        height: 44px;

        padding: 6px;

        margin: 0 !important;

        z-index: 1200 !important;

        border:
            1px solid rgba(255, 255, 255, .7);

        border-radius: 8px;

        background:
            rgba(0, 0, 0, .55);

        backdrop-filter: blur(5px);
    }

    .navbar-toggler:hover {
        border-color: var(--jc-blue);

        background:
            rgba(0, 87, 184, .25);
    }


    /* -----------------------------------------------------
       CARRITO
    ----------------------------------------------------- */

    .navbar .cart-link {
        position: fixed !important;

        top: 13px;
        right: 15px;

        width: 42px;
        height: 42px;

        display: flex !important;

        align-items: center;
        justify-content: center;

        padding: 0 !important;
        margin: 0 !important;

        z-index: 1200 !important;

        background:
            rgba(0, 0, 0, .55) !important;

        border: none !important;

        border-radius: 8px !important;

        color: #fff !important;

        font-size: 1.4rem;

        visibility: visible !important;
        opacity: 1 !important;

        box-shadow: none !important;

        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
    }

    .navbar .cart-link:hover {
        background:
            rgba(0, 87, 184, .4) !important;

        color: #fff !important;
    }


    /* -----------------------------------------------------
       CONTADOR CARRITO
    ----------------------------------------------------- */

    .navbar .cart-link .cart-count {
        position: absolute;

        top: -5px;
        right: -6px;

        min-width: 19px;
        height: 19px;

        display: flex;

        align-items: center;
        justify-content: center;

        padding: 3px 5px;

        background-color: var(--jc-red) !important;

        color: #fff;

        border-radius: 50%;

        font-size: .65rem;

        line-height: 1;

        font-weight: 700;
    }


    /* -----------------------------------------------------
       MENÚ LATERAL
    ----------------------------------------------------- */

    .navbar-collapse {
        position: fixed !important;

        top: 0;
        left: 0;

        width: 290px;
        max-width: 85vw;

        height: 100vh !important;

        display: block !important;

        margin: 0 !important;

        padding:
            85px 20px 30px;

        overflow-y: auto;

        background:
            linear-gradient(
                180deg,
                #050505 0%,
                #0b0b0b 50%,
                #111 100%
            ) !important;

        border-right:
            1px solid rgba(0, 87, 184, .35);

        box-shadow:
            8px 0 35px rgba(0, 0, 0, .65);

        transform: translateX(-105%);

        visibility: hidden;

        opacity: 0;

        transition:
            transform .35s ease,
            opacity .25s ease,
            visibility .35s ease;

        z-index: 1150 !important;
    }


    /* -----------------------------------------------------
       MARCA DENTRO DEL MENÚ
    ----------------------------------------------------- */

    .navbar-collapse::before {
        content: "JC CAP";

        display: block;

        padding:
            0 10px 25px;

        margin-bottom: 10px;

        color: #fff;

        font-size: 1.45rem;

        font-weight: 800;

        letter-spacing: 2px;

        border-bottom:
            1px solid rgba(255, 255, 255, .12);
    }


    /* -----------------------------------------------------
       MENÚ ABIERTO
    ----------------------------------------------------- */

    .navbar-collapse.show {
        transform: translateX(0);

        visibility: visible;

        opacity: 1;
    }


    .navbar-collapse.collapsing {
        height: 100vh !important;

        overflow: hidden;

        transform: translateX(-105%);

        visibility: visible;

        opacity: 1;

        transition:
            transform .35s ease,
            opacity .25s ease;
    }


    /* -----------------------------------------------------
       LISTA
    ----------------------------------------------------- */

    .navbar-collapse .navbar-nav {
        width: 100%;

        display: flex;

        flex-direction: column;

        align-items: stretch !important;

        gap: 8px;
    }

    .navbar-collapse .nav-item {
        width: 100%;
    }


    /* -----------------------------------------------------
       LINKS DEL MENÚ
    ----------------------------------------------------- */

    .navbar-collapse .nav-link {
        display: flex;

        align-items: center;

        width: 100%;

        padding: 14px 15px;

        color: #fff !important;

        font-size: 1.05rem;

        font-weight: 600;

        border-radius: 9px;

        border-left: 3px solid transparent;

        transition:
            background .2s ease,
            color .2s ease,
            border-color .2s ease,
            padding-left .2s ease;
    }


    .navbar-collapse .nav-link:hover {
        background:
            rgba(0, 87, 184, .20);

        color: #4b9cff !important;

        border-left-color: var(--jc-blue);

        padding-left: 20px;
    }


    .navbar-collapse .nav-link.active {
        background:
            linear-gradient(
                90deg,
                rgba(0, 87, 184, .35),
                rgba(0, 87, 184, .08)
            );

        color: #fff !important;

        border-left-color: var(--jc-red);
    }


    /* -----------------------------------------------------
       FONDO DETRÁS DEL MENÚ
    ----------------------------------------------------- */

    .navbar-collapse.show::after {
        content: "";

        position: fixed;

        top: 0;
        left: 290px;

        width: calc(100vw - 290px);
        height: 100vh;

        background:
            rgba(0, 0, 0, .55);

        z-index: -1;

        pointer-events: none;
    }


    /* -----------------------------------------------------
       CARRITO SIEMPRE VISIBLE
    ----------------------------------------------------- */

    .navbar .cart-link,
    .navbar .cart-link i,
    .navbar .cart-link svg {
        visibility: visible !important;

        opacity: 1 !important;
    }


    /* -----------------------------------------------------
       FILTROS DE TALLAS
    ----------------------------------------------------- */

    .size-filters {
        gap: 6px;
    }

    .size-filter {
        min-width: 48px;

        padding: 7px 10px;

        font-size: .78rem;
    }

}


/* =========================================================
   PANTALLAS GRANDES
========================================================= */

@media (min-width: 769px) {

    .navbar {
        position: absolute;
    }

    .navbar .cart-link {
        position: relative;
    }

}

/* =========================
   HERO
========================= */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Capa oscura para mejorar la lectura */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(0, 0, 0, 0.75),
        rgba(0, 0, 0, 0.40),
        rgba(0, 0, 0, 0.65)
    );
    z-index: 0;
}

/* Contenido encima de la capa */
.hero .container {
    position: relative;
    z-index: 2;
}

/* Logo */
.hero-logo {
    width: 280px;
    max-width: 90%;
    filter:
        drop-shadow(0 10px 25px rgba(0, 0, 0, 0.8))
        drop-shadow(0 0 25px rgba(255, 255, 255, 0.15));
    transition: transform 0.4s ease;
}

.hero-logo:hover {
    transform: scale(1.05);
}

/* Título */
.hero h1 {
    color: #fff;
    font-size: 4rem;
    letter-spacing: 3px;

    text-shadow:
        0 4px 10px rgba(0, 0, 0, 0.9),
        0 0 25px rgba(0, 0, 0, 0.8);
}

/* Texto */
.hero p {
    color: #fff;
    font-size: 1.3rem;
    text-shadow: 0 3px 8px rgba(0, 0, 0, 0.9);
    margin-bottom: 30px;
}

/* =========================
   BOTÓN DEL HERO
========================= */

.hero .btn {
    position: relative;
    display: inline-block;

    padding: 14px 34px;

    border: none;
    border-radius: 50px;

    background: linear-gradient(
        135deg,
        #0057b8,
        #003f88
    );

    color: #fff;
    font-size: 1.05rem;
    font-weight: 600;

    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.6),
        0 0 20px rgba(0, 87, 184, 0.35);

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease,
        background 0.3s ease;
}

/* Efecto al pasar el mouse */
.hero .btn:hover {
    color: #fff;

    background: linear-gradient(
        135deg,
        #0070e8,
        #0057b8
    );

    transform: translateY(-4px);

    box-shadow:
        0 12px 28px rgba(0, 0, 0, 0.7),
        0 0 30px rgba(0, 87, 184, 0.65);
}

/* Efecto al presionar */
.hero .btn:active {
    transform: translateY(0);
}

/* =========================
   EFECTO DE LUZ DEL BOTÓN
========================= */

.hero .btn::after {
    content: "";
    position: absolute;
    inset: 0;

    border-radius: 50px;

    background: linear-gradient(
        120deg,
        transparent,
        rgba(255, 255, 255, 0.25),
        transparent
    );

    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.hero .btn:hover::after {
    transform: translateX(100%);
}

@media (max-width: 768px) {

    .hero {
        min-height: 100vh;
        text-align: center;
        padding-top: 80px;
    }

    .hero-logo {
        width: 210px;
        margin-bottom: 25px;
    }

    .hero h1 {
        font-size: 2.6rem;
        letter-spacing: 2px;
    }

    .hero p {
        font-size: 1.05rem;
    }

    .hero .btn {
        padding: 13px 30px;
        font-size: 1rem;
    }

    
    /* Fondo del menú desplegable */
    #nav.navbar-collapse {
        background: linear-gradient(145deg, #171717, #252525);
        padding: 18px;
        margin-top: 14px;
        border: 1px solid rgba(212, 168, 67, 0.35);
        border-radius: 16px;
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
    }

    /* Separación de las opciones */
    #nav .navbar-nav {
        gap: 9px;
        align-items: stretch !important;
    }

    /* Enlaces */
    #nav .nav-link {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 13px 15px;
        color: #eeeeee;
        font-size: 0.97rem;
        font-weight: 600;
        border: 1px solid transparent;
        border-radius: 10px;
        transition: all 0.25s ease;
    }

    /* Iconos de cada opción */
    #nav .nav-link::before {
        font-family: "bootstrap-icons";
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        flex-shrink: 0;
        color: #e0b653;
        background: rgba(212, 168, 67, 0.12);
        border-radius: 9px;
        font-size: 1.15rem;
    }

    /* Inicio */
    #nav .nav-item:nth-child(1) .nav-link::before {
        content: "\f425";
    }

    /* Gorras */
    #nav .nav-item:nth-child(2) .nav-link::before {
        content: "\f5a0";
    }

    /* Otros productos */
    #nav .nav-item:nth-child(3) .nav-link::before {
        content: "\f1c8";
    }

    /* Administración */
    #nav .nav-item:nth-child(4) .nav-link::before {
        content: "\f4d7";
    }

    /* Efecto al tocar */
    #nav .nav-link:hover,
    #nav .nav-link:focus {
        color: #e8c568;
        background: rgba(212, 168, 67, 0.09);
        border-color: rgba(212, 168, 67, 0.25);
        transform: translateX(3px);
    }

    #nav .nav-link:hover::before,
    #nav .nav-link:focus::before {
        background: #d4a843;
        color: #171717;
    }

    /* Carrito */
    .cart-link {
        border-radius: 10px;
        transition: all 0.25s ease;
    }

    .cart-link:hover {
        background: rgba(212, 168, 67, 0.12);
        color: #e4bd61;
    }

    /* Botón hamburguesa */
    .navbar-toggler {
        width: 44px;
        height: 42px;
        padding: 8px;
        border: 1px solid rgba(212, 168, 67, 0.55);
        border-radius: 10px;
        background: rgba(212, 168, 67, 0.08);
        box-shadow: none !important;
    }

    .navbar-toggler:focus {
        box-shadow: 0 0 0 3px rgba(212, 168, 67, 0.18) !important;
    }

    .navbar-toggler-icon {
        width: 23px;
        height: 23px;
    }

    /* Animación al desplegar */
    #nav.collapsing {
        transition: height 0.3s ease;
    }
}


/* =====================================
   ESTILO DEL MENÚ MÓVIL JC CAP
   No modifica el menú de computadora
===================================== */
