/* =========================================
   PRODUCTOS.CSS - COMPLETO + CORREGIDO
========================================= */

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

html,
body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

#footer {
    width: 100vw;
    margin: 0;
    padding: 60px 0 20px 0;
    background: #111;
    position: relative;
    left: 0;
}

#footer .container-fluid {
    width: 100%;
    max-width: 100%;
}
/* ========================================= */
/* MAIN */
/* ========================================= */

main{

    margin-bottom: 0 !important;
    padding-bottom: 0 !important;

}

/* ========================================= */
/* ULTIMA SECTION */
/* ========================================= */

section:last-of-type{

    margin-bottom:0 !important;
    padding-bottom:0 !important;

}

/* SECCIONES */

section{

    margin-bottom:0 !important;

}


/* ==================================================
   TOPBAR
================================================== */

.topbar{
    background:#ff0000;
    color:white;
    text-align:center;
    padding:12px;
    font-size:.9rem;
    font-weight:600;
    letter-spacing:.5px;
}

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

.custom-navbar{
    background:white;
    padding:16px 0;
    box-shadow:0 3px 15px rgba(0,0,0,.06);
}

.logo img{
    width:180px;
}

/* LINKS */

.navbar-nav{
    gap:10px;
}

.nav-link{
    color:#111 !important;
    font-weight:700;
    font-size:.95rem;
    transition:.3s;
}

.nav-link:hover{
    color:#c1121f !important;
}

/* DROPDOWN */

.custom-dropdown{
    border:none;
    border-radius:18px;
    padding:10px;
    box-shadow:0 10px 30px rgba(0,0,0,.1);
}

.dropdown-item{
    border-radius:10px;
    padding:12px 15px;
    transition:.2s;
    font-weight:600;
}

.dropdown-item:hover{
    background:#f5f5f5;
    padding-left:20px;
}

/* ==================================================
   SEARCH
================================================== */

.search-input{
    border-radius:14px 0 0 14px !important;
    border:1px solid #ddd;
    padding:13px;
    box-shadow:none !important;
}

.search-button{
    border:none;
    background:#111;
    color:white;
    width:60px;
    border-radius:0 14px 14px 0;
    transition:.3s;
}

.search-button:hover{
    background:#c1121f;
}

/* ==================================================
   HEADER ICONS
================================================== */

.header-icons{
    display:flex;
    align-items:center;
    gap:25px;
}

.icon-box{
    text-decoration:none;
    color:#111;
    display:flex;
    align-items:center;
    gap:10px;
    font-weight:700;
    transition:.3s;
}

.icon-box:hover{
    color:#c1121f;
}

.logged-user{
    display:flex;
    align-items:center;
    gap:10px;
}

.hello-user{
    font-weight:700;
    font-size:.95rem;
}

.logout-link{
    font-size:.85rem;
    color:#6c2bd9;
    text-decoration:none;
}

.logout-link:hover{
    color:black;
}

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

.hero-section{
    padding:90px 0;
    background:white;
}

.hero-content h1{
    font-size:4rem;
    font-weight:900;
    line-height:1.1;
    margin:20px 0;
}

.hero-content p{
    color:#666;
    font-size:1.1rem;
    line-height:1.7;
    margin-bottom:30px;
}

.hero-label{
    background:#111;
    color:white;
    padding:10px 18px;
    border-radius:999px;
    font-size:.85rem;
    font-weight:700;
    display:inline-block;
}

.hero-buttons{
    display:flex;
    gap:15px;
    margin-bottom:40px;
}

.hero-btn{
    background:#111;
    color:white;
    padding:15px 28px;
    border-radius:14px;
    text-decoration:none;
    font-weight:700;
    transition:.3s;
}

.hero-btn:hover{
    background:#c1121f;
    color:white;
}

.hero-outline{
    border:2px solid #111;
    color:#111;
    padding:15px 28px;
    border-radius:14px;
    text-decoration:none;
    font-weight:700;
    transition:.3s;
}

.hero-outline:hover{
    background:#111;
    color:white;
}

.hero-image-wrapper{
    position:relative;
}

.hero-image{
    border-radius:30px;
    box-shadow:0 20px 40px rgba(0,0,0,.12);
}

/* ==================================================
   FEATURES
================================================== */

.hero-features{
    display:flex;
    gap:20px;
    flex-wrap:wrap;
}

.feature-box{
    background:#fff;
    border-radius:14px;
    padding:12px 18px;
    box-shadow:0 5px 15px rgba(0,0,0,.08);
    display:flex;
    align-items:center;
    gap:10px;
    font-weight:600;
}

/* ==================================================
   SECTION HEADER
================================================== */

.section-header span{
    color:#c1121f;
    font-weight:800;
    letter-spacing:1px;
}

.section-header h2{
    font-size:2.8rem;
    font-weight:900;
    margin-top:10px;
}
.main-header{
    width:100%;
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:22px 60px;
    background:white;
    gap:40px;
}

/* IZQUIERDA */

.header-left{
    display:flex;
    align-items:center;
    gap:30px;
}

.mobile-top { display: flex; align-items: center; gap: 10px; }
.mobile-cart { font-size: 22px; color: #000; text-decoration: none; }
.cart-box{

    display:flex;

    align-items:flex-start;

    gap:10px;

    text-decoration:none;

    color:#111;

}

.cart-box i{

    font-size:18px;

    margin-top:4px;

}

.cart-info-nav{

    display:flex;

    flex-direction:column;

    line-height:1;

}

.cart-count-text{

    font-size:14px;

    font-weight:700;

}

#cart-total{

    font-size:14px;

    font-weight:700;

    margin-top:5px;

}
/* PRODUCT CARDS */
.product-card {
    background: white;
    border-radius: 18px;
    padding: 18px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid #e5e5e5;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    height: 100%;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}

.product-card img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    border-radius: 14px;
    margin-bottom: 15px;
}

.product-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #111;
}

.price {
    font-size: 1.3rem;
    font-weight: 800;
    color: #111;
    margin-bottom: 12px;
}

.category-badge {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 999px;
    background: #f1f1f1;
    color: #555;
    display: inline-block;
    margin-bottom: 10px;
    font-weight: 600;
}

/* =========================================
   COLORES Y TALLES CENTRADOS (Cards + Modal)
========================================= */

.mate-colors,
.modal-color-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 15px 0;
}

.mate-color-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 3px solid #ddd;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.mate-color-circle:hover {
    transform: scale(1.15);
    border-color: #c1121f;
}

.mate-color-circle.active {
    border-color: #111;
    transform: scale(1.2);
    box-shadow: 0 0 0 4px rgba(193, 18, 31, 0.2);
}

.mate-black  { background: #000; }
.mate-bordo  { background: #800020; }
.mate-brown  { background: #5d4037; }
.mate-purple { background: #7b3fe4; }
.mate-white  { background: #fff; border: 2px solid #ccc; }
.mate-red    { background: #d61f26; }

.sizes,
.modal-size-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 15px 0;
}

.modal-size-btn {
    width: 48px;
    height: 48px;
    border: 2px solid #ddd;
    background: white;
    color: #333;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-size-btn:hover {
    border-color: #c1121f;
    color: #c1121f;
}

.modal-size-btn.selected {
    background: #111;
    color: white;
    border-color: #111;
    transform: scale(1.05);
}

.size-select {
    width: 100%;
    max-width: 160px;
    padding: 10px 14px;
    border: 2px solid #ddd;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
}

.size-select:focus {
    border-color: #c1121f;
    outline: none;
    box-shadow: 0 0 0 3px rgba(193, 18, 31, 0.15);
}

/* =========================================
   MODAL OSCURO (igual que mates y camisetas)
========================================= */
.product-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 20px;
}

.product-modal.active {
    display: flex;
}

.product-modal-content {
    width: 100%;
    max-width: 1050px;
    background: #0d0d0d;
    border: 1px solid rgba(214, 31, 38, 0.25);
    border-radius: 28px;
    padding: 0;
    display: flex;
    position: relative;
    color: white;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(214,31,38,.15);
    animation: modalShow .28s cubic-bezier(.34,1.56,.64,1);
    overflow: hidden;
    max-height: 90vh;
}

@keyframes modalShow {
    from { transform: scale(.88) translateY(20px); opacity: 0; }
    to   { transform: scale(1) translateY(0);      opacity: 1; }
}

.close-modal {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 50%;
    color: white;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: .25s;
    z-index: 10;
}

.close-modal:hover {
    background: #d61f26;
    border-color: #d61f26;
}

.modal-left {
    flex: 1.1;
    background: linear-gradient(145deg, #1a0000 0%, #111 60%, #0d0d0d 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 30px;
    min-height: 480px;
}

.modal-img-wrapper {
    position: relative;
    width: 100%;
    max-width: 380px;
}

.modal-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: #d61f26;
    color: white;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    padding: 5px 12px;
    border-radius: 999px;
    text-transform: uppercase;
    z-index: 2;
}

.modal-left img {
    width: 100%;
    border-radius: 20px;
    object-fit: cover;
    box-shadow: 0 20px 50px rgba(0,0,0,.6);
    display: block;
}

.modal-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 40px 35px 35px 35px;
    overflow-y: auto;
}

.modal-brand-tag {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(214, 31, 38, .12);
    border: 1px solid rgba(214, 31, 38, .3);
    color: #e84040;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 5px 14px;
    border-radius: 999px;
    text-transform: uppercase;
    margin-bottom: 18px;
    width: fit-content;
}

.modal-right h2 {
    font-size: 2rem;
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 16px;
    letter-spacing: -.5px;
    color: #fff;
}

.modal-price-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 4px;
}

.modal-price-label {
    font-size: .8rem;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.modal-right h3 {
    font-size: 2rem;
    font-weight: 900;
    color: #d61f26;
    margin: 0;
}

.modal-divider {
    height: 1px;
    background: rgba(255,255,255,.08);
    margin: 20px 0;
}

.modal-add-btn {
    width: 100%;
    height: 58px;
    border: none;
    border-radius: 14px;
    background: #d61f26;
    color: white;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    transition: .25s;
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    letter-spacing: .5px;
    text-transform: uppercase;
}

.modal-add-btn:hover:not(:disabled) {
    background: #ff2a2a;
    box-shadow: 0 8px 28px rgba(214,31,38,.5);
    transform: translateY(-2px);
}

.modal-add-btn:disabled {
    background: rgba(255,255,255,.08);
    color: #555;
    cursor: not-allowed;
}

.modal-cart-preview {
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 16px;
    padding: 18px;
    max-height: 220px;
    overflow-y: auto;
}

.preview-item {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255,255,255,.06);
}

.preview-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.preview-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
}

.preview-info {
    flex: 1;
}

.preview-info h4 {
    font-size: .9rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: #eee;
}


#toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #16a34a;
    color: white;
    padding: 14px 24px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 15px;
    z-index: 999999;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    display: none;
    text-align: center;
    max-width: 90%;
}

#toast.show {
    display: block;
    animation: toastSlideDown 0.4s ease forwards;
}

@keyframes toastSlideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* RESPONSIVE */
@media (max-width: 576px) {
    .product-card img { height: 200px; }
    .product-modal-content { width: 96%; margin: 10px; }
    
    .mate-color-circle {
        width: 34px;
        height: 34px;
    }
    
    .modal-size-btn {
        width: 44px;
        height: 44px;
    }
}
footer{

    background:#111;

    width:100%;

    margin:0 !important;

    padding-top:60px;

    padding-bottom:25px;

}

/* HOVER */

.footer-links a:hover{

    color:#c62828;

    padding-left:5px;

}

/* ICONOS */

.social-icon{

    width:45px;

    height:45px;

    border-radius:50%;

    background:#1f1f1f;

    display:flex;

    align-items:center;

    justify-content:center;

    color:white;

    text-decoration:none;

    transition:.3s;

    font-size:1.1rem;

}

/* HOVER */

.social-icon:hover{

    background:#c62828;

    transform:translateY(-3px);

}
footer{

    width:100%;

}

/* LINKS */

.footer-links a{

    color:#d7d7d7;

    text-decoration:none;

    transition:.3s;

    font-weight:600;

}

/* HOVER */

.footer-links a:hover{

    color:#c62828;

    padding-left:5px;

}

/* ICONOS */

.social-icon{

    width:45px;

    height:45px;

    border-radius:50%;

    background:#1f1f1f;

    display:flex;

    align-items:center;

    justify-content:center;

    color:white;

    text-decoration:none;

    transition:.3s;

    font-size:1.1rem;

}

/* HOVER */

.social-icon:hover{

    background:#c62828;

    transform:translateY(-3px);

}
footer .container{

    margin-bottom:0 !important;

}
@media (max-width: 576px) {

    .mobile-top {
        padding-left: 8px;
        padding-right: 6px;
        gap: 8px;
        justify-content: flex-start;
        align-items: center;
    }

    /* === PELOTA (LOGO) SIN ESTIRAR - COMO EN INDEX === */
    .mobile-top .logo img {
        width: auto !important;        /* Ancho automático */
        height: 34px !important;       /* Altura fija */
        max-height: 34px;
        object-fit: contain !important; /* Mantiene proporciones (no se estira) */
        display: block;
    }

    /* Buscador más alargado */
    .search-container.mobile-search {
        flex: 1;
        margin-left: 4px;
        margin-right: 8px;
    }

    .search-input {
        font-size: 14.5px;
        padding: 10px 15px !important;
        height: 42px;
        border-radius: 12px 0 0 12px !important;
    }

    .search-button {
        width: 46px;
        height: 42px;
        border-radius: 0 12px 12px 0;
    }

    /* Iconos del carrito y candado */
    .mobile-cart {
        font-size: 20px;
        margin-right: 6px;
    }
}
/* =========================================
   MENÚ HAMBURGUESA CENTRADO + LETRAS MÁS CHICAS
========================================= */

@media (max-width: 576px) {

    /* Menú hamburguesa centrado y limpio */
    .navbar-collapse {
        background: white;
        border-radius: 18px;
        margin-top: 8px;
        padding: 10px 0;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    }

    .navbar-nav {
        align-items: center;
    }

    .navbar-nav .nav-link {
        font-size: 0.95rem;
        padding: 12px 0;
        font-weight: 600;
        color: #111 !important;
        width: 100%;
        text-align: center;
    }

    /* Sección de usuario abajo */
    .d-lg-none.mt-4 {
        border-top: 1px solid #eee;
        padding-top: 15px;
        margin-top: 10px !important;
        text-align: center;
    }

    .d-lg-none.mt-4 .btn {
        width: 70%;
        max-width: 200px;
        font-size: 0.85rem;
        padding: 8px 0;
    }
}
@media (max-width: 576px) {

    .product-modal {
        padding: 30px 12px;           /* Más espacio arriba y abajo */
        align-items: center;
        justify-content: center;
    }

    .product-modal-content {
        flex-direction: column;
        width: 90%;                    /* Un poco más estrecho = más centrado */
        max-width: 370px;              /* No se estira demasiado */
        margin: 20px auto;             /* Centrado con margen */
        border-radius: 20px;
        max-height: 82vh;              /* Un poco más corto para que no toque los bordes */
        box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    }

    .modal-left {
        padding: 25px 20px;
        min-height: auto;
        background: #111;
    }

    .modal-left img {
        max-width: 230px;
        margin: 0 auto;
        display: block;
    }

    .modal-right {
        padding: 25px 20px 30px 20px;
    }

    .modal-right h2 {
        font-size: 1.35rem;
    }

    .modal-add-btn {
        height: 50px;
        font-size: 0.92rem;
    }

    /* Quitar scrollbar feo */
    .modal-right::-webkit-scrollbar {
        display: none;
    }
}
/* =========================================
   BUSCADOR PREMIUM (igual que en el index)
========================================= */

.search-dropdown.premium-search {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    font-size: 14.5px;
    z-index: 99999;
}

.search-result-item,
.search-recent-item {
    padding: 11px 16px;
    cursor: pointer;
    transition: background 0.15s ease;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-result-item:last-child,
.search-recent-item:last-child {
    border-bottom: none;
}

.search-result-item:hover,
.search-result-item.active,
.search-recent-item:hover {
    background: #f8fafc;
}

.search-result-content {
    display: flex;
    align-items: center;
    gap: 13px;
    flex: 1;
}

.search-result-img {
    width: 46px;
    height: 46px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #f1f5f9;
}

.search-result-name {
    font-weight: 600;
    color: #1e2937;
    line-height: 1.3;
}

.search-result-name mark.search-highlight {
    background: #fef08c;
    padding: 1px 4px;
    border-radius: 3px;
    font-weight: 700;
    color: #1e2937;
}

.search-result-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 3px;
    width: 100%;
}

.search-result-category {
    font-size: 12.5px;
    color: #64748b;
}

.search-result-price {
    font-weight: 700;
    color: #c1121f;
    font-size: 14.5px;
}

.search-section-title {
    padding: 10px 16px;
    font-size: 12.5px;
    font-weight: 700;
    color: #64748b;
    background: #f8fafc;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-no-results {
    padding: 18px 16px;
    color: #64748b;
    text-align: center;
    font-size: 14px;
}
