/* ================================
   Most Bought Carousel – Full CSS
   (NO hover scaling / enlarging)
================================ */

/* Container */
.mbc-carousel {
    position: relative;
    padding: 40px 50px;
    background: #fff;
    margin: 20px 0;
}

.mbc-carousel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

/* Inner track */
.mbc-inner {
    display: flex;
    gap: 20px;
    align-items: stretch;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.mbc-inner::-webkit-scrollbar {
    display: none;
}

/* Card */
.mbc-item {
    position: relative;
    flex: 0 0 250px;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #f0f0f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}



/* Link */
.mbc-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

/* Image wrapper */
.mbc-image-wrap {
    position: relative;
    height: 220px;
    background: #fafafa;
    overflow: hidden;
}

/* Gradient overlay */
.mbc-image-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(102, 126, 234, 0.05) 0%,
        rgba(118, 75, 162, 0.05) 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.mbc-item:hover .mbc-image-wrap::after {
    opacity: 1;
}

/* Image */
.mbc-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    position: relative;
    z-index: 0;
}

/* Info */
.mbc-info {
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.mbc-name {
    font-size: 14px;
    font-weight: 500;
    color: #2d3748;
    line-height: 1.4;
    min-height: 40px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mbc-price {
    margin-top: auto;
    font-size: 18px;
    font-weight: 700;
    color: #002f8b;
}



.mbc-item:hover::after {
    opacity: 1;
}

/* Navigation buttons */
.mbc-prev,
.mbc-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: #fff;
    color: #002f8b;
    border: 2px solid #002f8b;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.mbc-prev:hover,
.mbc-next:hover {
    background: #002f8b;
    color: #fff;
}

.mbc-prev { left: 10px; }
.mbc-next { right: 10px; }

/* Badges */
.mbc-discount,
.mbc-new {
    position: absolute;
    top: 12px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    z-index: 4;
}

.mbc-discount {
    right: 12px;
    background: #ef4444;
}

.mbc-new {
    left: 12px;
    background: #10b981;
}

/* Add to cart (no motion) */
.mbc-item .add-to-cart {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mbc-item:hover .add-to-cart {
    opacity: 1;
}

/* Skeleton loading */
@keyframes shimmer {
    0% { background-position: -468px 0; }
    100% { background-position: 468px 0; }
}

.mbc-loading .mbc-item {
    background: linear-gradient(
        to right,
        #f0f0f0 8%,
        #f8f8f8 18%,
        #f0f0f0 33%
    );
    background-size: 800px 104px;
    animation: shimmer 1.5s infinite linear;
}

/* Responsive */
@media (max-width: 1200px) {
    .mbc-item { flex: 0 0 220px; }
    .mbc-image-wrap { height: 200px; }
}

@media (max-width: 992px) {
    .mbc-carousel { padding: 30px 45px; }
    .mbc-item { flex: 0 0 200px; }
    .mbc-image-wrap { height: 180px; }
}

@media (max-width: 768px) {
    .mbc-carousel { padding: 20px 40px; }
    .mbc-item { flex: 0 0 180px; }
    .mbc-image-wrap { height: 160px; }
    .mbc-name { font-size: 13px; }
    .mbc-price { font-size: 16px; }
}

@media (max-width: 576px) {
    .mbc-carousel { padding: 15px 35px; }
    .mbc-item { flex: 0 0 160px; }
    .mbc-image-wrap { height: 140px; }
}

/* Image wrapper takes almost full card height */
.mbc-image-wrap {
    position: relative;
    height: auto; /* auto so it grows with the image */
    flex-grow: 1; /* take remaining space above .mbc-info */
    background: #fafafa;
    overflow: hidden;
    padding: 0; /* remove extra padding */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Image fills wrapper */
.mbc-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Card */
.mbc-item {
    position: relative;
    flex: 0 0 250px;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #f0f0f0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

/* Info section stays at bottom */
.mbc-info {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Contenedor principal de botones flotantes */
.custom-actions-container {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    display: flex;
    gap: 10px;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
}

/* Mostrar al hacer hover en el producto */
.mbc-item:hover .custom-actions-container {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Estilo individual de cada botón circular */
.custom-btn-item a, 
.custom-btn-item button {
    width: 42px;
    height: 42px;
    background-color: #ffffff !important;
    border-radius: 50% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    color: #333 !important;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    padding: 0;
    margin: 0;
}

/* Iconos dentro de los botones */
.custom-btn-item i {
    font-size: 18px !important;
    line-height: 1;
}

/* Efecto Hover en el botón */
.custom-btn-item a:hover, 
.custom-btn-item button:hover {
    background-color: #002f8b !important; /* Color azul de tu precio */
    color: #ffffff !important;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

/* Asegurar que el botón del carrito no herede estilos de formulario molestos */
.custom-btn-item form {
    margin: 0;
    display: inline-block;
}

/* Ocultar cualquier texto que traiga LeoTheme por defecto */
.custom-btn-item span {
    display: none !important;
}