.bg-productos {
    position: relative;
    overflow: hidden;
    background: linear-gradient(rgba(0, 18, 72, 0.393)), url(../img/banner03.jpeg);
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    padding: 60px 0 60px 0;
}

.bg-productos .productos {
    position: relative;
}

.bg-productos .breadcrumb-item a {
    color: #ffffff !important;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.bg-productos .breadcrumb-item a:hover {
    color: #cccccc !important;
}

.marcas-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.marcas-grid a:nth-child(5) {
    grid-column: 2 / 3;
}

@media (max-width: 768px) {
    .marcas-grid {
        grid-template-columns: 1fr;
    }
}

/* Contenedor principal de la grilla (Mantiene la responsividad) */
.marcas-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px; /* Espacio entre las imágenes */
}

.marcas-grid a:nth-child(5) {
    grid-column: 2 / 3;
}

@media (max-width: 768px) {
    .marcas-grid {
        grid-template-columns: 1fr;
    }
}

/* Estilos del contenedor de la imagen (Sin bordes ni fondos) */
.btn-marca {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 70px; /* Puedes ajustar esta altura dependiendo de qué tan grandes quieras los logos */
    background: transparent;
    border: none;
    text-decoration: none;
    padding: 0; 
}

/* Comportamiento de la imagen para que se vea completa */
.btn-marca img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Esta es la clave para que la imagen nunca se recorte ni se deforme */
}

/* Efecto Hover moderno y sutil */
.btn-marca:hover {
    border-color: rgb(20, 85, 160); /* Borde con tu color principal al pasar el ratón */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.btn-marca:hover img {
    transform: scale(1.05); /* Pequeño acercamiento del logo al hacer hover */
}

#thumbContainer {
    gap: 8px;
}

/* MINIATURAS */
.thumb-img {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border: 2px solid #ddd;
    cursor: pointer;
    transition: 0.2s;
    border-radius: 6px;
}

.thumb-img:hover {
    border-color: #6f42c1;
    transform: scale(1.05);
}

.thumb-img.active {
    border-color: #6f42c1;
}

.product-main-image {
    max-height: 480px;
    object-fit: contain;
}

.d-flex.gap-3 {
    gap: 10px !important;
}

@media (max-width: 991.98px) {
    .mobile-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 300px;
        max-width: 85%;
        height: 100vh;
        background-color: #ffffff;
        z-index: 1050;
        padding: 20px;
        overflow-y: auto;
        transition: left 0.3s ease-in-out;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    }

    .mobile-sidebar.show {
        left: 0;
    }

    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1040;
        display: none;
        transition: opacity 0.3s ease;
    }

    .sidebar-overlay.show {
        display: block;
    }
}

@media (max-width: 575.98px) {
    .product-card {
        padding: 10px;
    }

    .product-title {
        font-size: 0.9rem;
    }

    .product-card .btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.5rem;
    }

    .price {
        font-size: 1rem;
    }
}

.product-card {
    background: #ffffff;
    border: 1px solid #f0f2f5;
    padding: 24px 20px;
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
    transform: translateY(-6px);
    border-color: #e2e8f0;
}

.product-link {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 20px;
}

.product-card img {
    max-height: 200px;
    width: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.product-card:hover img {
    transform: scale(1.06);
}

.product-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #64748b;
    margin-bottom: 10px;
    font-weight: 600;
}

.product-title {
    margin-bottom: 15px;
    flex-grow: 1;
}

.product-title a {
    color: #0f172a;
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    line-clamp: initial;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.product-title a:hover {
    color: #0d6efd;
}

.product-card .price {
    display: block;
    font-size: 1.4rem;
    font-weight: 800;
    color: #0054a0;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}


.product-card .btn {
    border-radius: 10px;
    font-weight: 600;
    padding: 12px 15px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.product-card .btn-primary {
    background-color: #0054a0; 
    border-color: #0f172a;
    color: #ffffff;
}

.product-card .btn-primary:hover {
    background-color: #334155;
    border-color: #334155;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.2);
}

.product-card .btn-success {
    background-color: #25D366;
    border-color: #25D366;
    color: #ffffff;
}

.product-card .btn-success:hover {
    background-color: #1ea952;
    border-color: #1ea952;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.25);
}

.zoom-icon {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    border: none;
    color: #fff;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.zoom-icon:hover {
    background: rgba(15, 23, 42, 0.9);
    transform: scale(1.1);
}

/* === PRODUCT IMAGE BOX === */
.product-image-box {
    position: relative;
    background: #f8fafc;
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    border: 1px solid #f0f2f5;
}

.main-product-image {
    max-height: 380px;
    object-fit: contain;
}

/* === ZOOM BUTTON === */
.zoom-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.zoom-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* === ZOOM MODAL === */
.zoom-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(5px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.zoom-modal img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

/* === QTY === */
.qty-box {
    display: inline-flex;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
}

.qty-box button {
    width: 45px;
    height: 45px;
    border: none;
    background: #f8fafc;
    font-size: 1.2rem;
    color: #475569;
    cursor: pointer;
    transition: background 0.2s;
}

.qty-box button:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.qty-box span {
    width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #0f172a;
    border-left: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
}

@media (max-width: 768px) {
    .product-card {
        padding: 15px 12px;
        border-radius: 12px;
    }

    .product-card img {
        max-height: 130px;
        margin-bottom: 12px;
    }

    .product-category {
        font-size: 0.65rem;
        margin-bottom: 6px;
    }

    .product-title {
        margin-bottom: 10px;
    }

    .product-title a {
        font-size: 0.85rem;
        line-height: 1.3;
    }

    .product-card .price {
        font-size: 1.15rem;
        margin-bottom: 12px;
    }

    .product-card .btn {
        padding: 8px 10px;
        font-size: 0.8rem;
        gap: 5px;
    }
    
    .product-card .mb-2 {
        margin-bottom: 6px !important;
    }
}

@media (max-width: 400px) {
    .product-card {
        padding: 12px 10px;
    }

    .product-card img {
        max-height: 110px;
    }

    .product-card .price {
        font-size: 1.05rem;
    }

    .product-card .btn {
        font-size: 0.75rem;
        padding: 6px 8px;
    }
}