/* Estilos modernos para productos */

/* Search Box Principal */
.search-box-main .input-group-text {
    background-color: white;
    padding: 0.75rem 1rem;
}

.search-box-main input:focus {
    border-color: #24b540;
    box-shadow: none;
}

.search-box-main .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(36, 181, 64, 0.4);
}

/* Breadcrumbs */
.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: #6c757d;
    font-size: 1.2rem;
}

/* Product Cards con hover effects */
.product-card {
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15) !important;
}

.product-card img {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Overlays mejorados */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.25rem;
    font-weight: bold;
    z-index: 10;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.overlay span {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1.5rem;
    border-radius: 0.5rem;
    backdrop-filter: blur(10px);
}

/* Overlay de Oferta Web */
.overlay-ofertas {
    position: absolute;
    top: 12px;
    left: -35px;
    width: 140px;
    padding: 6px 0;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transform: rotate(-45deg);
    z-index: 15;
    box-shadow: 0 3px 10px rgba(220, 53, 69, 0.4);
}

.overlay-ofertas span {
    display: block;
    padding: 0;
    background: transparent;
}

/* Banner "Solo hasta agotar stock" */
.stock-banner-productos {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    padding: 8px 12px;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 50%, #ff6b35 100%);
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
    pointer-events: none;
    box-shadow: 0 -2px 10px rgba(255, 107, 53, 0.4);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Filtros Sidebar */
.filtros-sidebar .accordion {
    max-height: calc(100vh - 450px);
    overflow-y: auto;
}

.filtros-sidebar .accordion::-webkit-scrollbar {
    width: 6px;
}

.filtros-sidebar .accordion::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.filtros-sidebar .accordion::-webkit-scrollbar-thumb {
    background: #24b540;
    border-radius: 10px;
}

.filtros-sidebar .accordion::-webkit-scrollbar-thumb:hover {
    background: #1e9535;
}

/* Categorías */
.menu-container .accordion-item {
    border: none;
    margin-bottom: 0.5rem;
}

.menu-container .accordion-button {
    background-color: #f8f9fa;
    color: #2c3e50;
    font-weight: 600;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.menu-container .accordion-button:hover {
    background-color: #e9ecef;
    border-color: #24b540;
    color: #24b540;
}

.menu-container .accordion-button:not(.collapsed) {
    background: linear-gradient(135deg, #24b540 0%, #1e9535 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(36, 181, 64, 0.3);
}

/* Productos Grid Responsive */
@media (max-width: 1400px) {
    .row-cols-xl-4 > * {
        width: 33.333333%;
    }
}

@media (max-width: 992px) {
    .filtros-sidebar {
        position: static !important;
    }
    
    .row-cols-lg-3 > * {
        width: 50%;
    }
}

@media (max-width: 768px) {
    .row-cols-md-2 > * {
        width: 100%;
    }
    
    .productos-section {
        padding-top: 1rem !important;
    }
}

/* Botones mejorados */
.btn-outline-success:hover {
    background: linear-gradient(135deg, #24b540 0%, #1e9535 100%);
    border-color: #24b540;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(36, 181, 64, 0.3);
}

.btn-success {
    transition: all 0.3s ease;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(36, 181, 64, 0.4);
}

/* Loading states */
.product-card.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Empty state */
#error_producto:empty {
    display: none;
}

/* Legacy styles */
.card-producto-carrito {
    position: relative;
    background-color: rgb(255, 255, 255);
    margin-top: 110px;
}

.modal-body{
    max-height: 90vh;
    border-radius: 6px;
}
.card-text{
    color: green;
}
.modal-detalle-img{
    cursor: pointer;
    position: absolute;
    top: 10px;
    right: 10px;
    color: white;
    background-color: black;
    border-radius: 20px;
    z-index: 1050;
    font-weight: bold;
    width: 25px;
    height: 25px;
    text-align: center;
}
.ofertass{
    position: absolute;
  top: 25px;
  right: -30px;
  width: 150px;
  height: 30px;
  background: rgba(255, 0, 0, 0.8);
  color: #ffea00;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 14px;
  font-weight: bold;
  z-index: 10;
  transform: rotate(45deg);
  transform-origin: center;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.ofertass span{
    margin-left: 10px;

}


.card-producto-carrito.stock-0 .overlay {
    opacity: 1;
    /* Muestra el overlay cuando la clase stock-0 está presente */
}


.card-producto-carrito .btn:disabled {
    background-color: grey !important;
    cursor: not-allowed !important;
}

button.disabled {
    background-color: grey !important;
    cursor: not-allowed !important;
    opacity: 0.7; /* Hace que el botón parezca deshabilitado */
}

.contenedor-productos-scroll {
    /* border-radius   : 16px;
    background-color: white; */
    padding         : 0%;
    /* margin-top      : 3rem; */
    box-shadow      : 0 4px 6px rgba(0, 0, 0, 0.1);
    max-height      : 100vh;
    overflow-y      : auto;
    max-width       : 150vh;
}

/* Modal de Detalle Producto - Diseño Moderno */
.modal-content-popup-productos {
    border-radius: 20px;
    overflow: hidden;
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-content-popup-productos .modal-body {
    padding: 0;
    position: relative;
}

.modal-content-popup-productos img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    background: #ffffff;
    padding: 40px;
    border-radius: 20px 20px 0 0;
}

.modal-content-popup-productos .card-body {
    padding: 2rem;
    background: white;
}

.modal-content-popup-productos h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.modal-content-popup-productos .card-text:first-of-type {
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.modal-content-popup-productos button {
    width: 100%;
    max-width: 300px;
    display: block;
    margin: 1.5rem auto 0;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, #24b540 0%, #1e9535 100%);
    border: none;
    transition: all 0.3s ease;
}

.modal-content-popup-productos button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(36, 181, 64, 0.3);
}

.modal-login {
    max-width: 600px;
}

@media (max-width: 576px) {
    .modal-content-popup-productos img {
        padding: 20px;
        max-height: 250px;
    }
    
    .modal-content-popup-productos .card-body {
        padding: 1.5rem;
    }
    
    .modal-content-popup-productos button {
        max-width: 100%;
    }
}
