/**
 * Shop CSS - Estilos para la tienda
 * Complementa main.css para páginas de tienda y productos
 */

/* Estilos adicionales para la tienda */
.tienda-container {
    padding: var(--spacing-xl) 0;
}

.tienda-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

/* Buscador de Tienda */
.tienda-search-form {
    width: 100%;
    max-width: 600px;
    margin: 1.5rem auto 0 auto;
}

.tienda-search-container {
    display: flex;
    align-items: center;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 30px;
    padding: 0.75rem 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    gap: 0.75rem;
    transition: all 0.2s ease;
}

.tienda-search-container:focus-within {
    border-color: #000000;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

.tienda-search-icon {
    color: #999999;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.tienda-search-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 0.9375rem;
    color: var(--color-text);
    font-weight: 400;
    font-family: var(--font-primary);
}

.tienda-search-input::placeholder {
    color: #999999;
    font-weight: 400;
}


/* Pestañas de Categorías */
.categorias-tabs-container {
    margin-bottom: 2.5rem;
    display: flex;
    justify-content: center;
}

.categorias-tabs {
    display: flex;
    gap: 0.75rem;
    background-color: #f8f9fa;
    padding: 0.5rem;
    border-radius: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.categoria-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background-color: transparent;
    color: #333333;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 400;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    white-space: nowrap;
}

.categoria-tab:hover {
    background-color: #ffffff;
    color: #000000;
    border-color: #e0e0e0;
}

.categoria-tab.active {
    background-color: #000000;
    color: #ffffff;
    border-color: #000000;
    font-weight: 500;
}

.categoria-tab.active:hover {
    background-color: #1a1a1a;
    border-color: #1a1a1a;
}

.categoria-tab-count {
    background-color: rgba(255, 255, 255, 0.2);
    color: inherit;
    padding: 0.125rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8125rem;
    font-weight: 500;
    min-width: 24px;
    text-align: center;
}

.categoria-tab.active .categoria-tab-count {
    background-color: rgba(255, 255, 255, 0.25);
}

.categoria-tab:not(.active) .categoria-tab-count {
    background-color: #e0e0e0;
    color: #666666;
}

/* Menú Desplegable de Filtros */
.filtros-dropdown-container {
    margin-bottom: 2rem;
    display: flex;
    justify-content: flex-end;
}

.filtros-dropdown {
    position: relative;
    display: inline-block;
}

.filtros-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0.25rem;
    background-color: transparent;
    border: none;
    border-radius: 0;
    font-size: 0.875rem;
    font-weight: 400;
    color: #666666;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: auto;
    justify-content: flex-end;
    box-shadow: none;
}

.filtros-dropdown-btn:hover {
    border: none;
    background-color: transparent;
    color: #333333;
}

.filtros-dropdown.active .filtros-dropdown-btn {
    border: none;
    background-color: transparent;
    color: #333333;
}

.filtros-dropdown-arrow {
    font-size: 0.625rem;
    transition: transform 0.2s ease;
    color: #666666;
}

.filtros-dropdown.active .filtros-dropdown-arrow {
    transform: rotate(180deg);
}

.filtros-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    left: auto;
    min-width: 200px;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
}

.filtros-dropdown.active .filtros-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.filtros-dropdown-group {
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.filtros-dropdown-group:last-child {
    border-bottom: none;
}

.filtros-dropdown-group-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #666666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
}

.filtros-dropdown-options {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.filtros-dropdown-option {
    display: block;
    padding: 0.625rem 0.875rem;
    color: #333333;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
}

.filtros-dropdown-option:hover {
    background-color: #f8f9fa;
    color: #000000;
}

.filtros-dropdown-option.active {
    background-color: #000000;
    color: #ffffff;
    font-weight: 500;
}

.filtros-dropdown-option.active:hover {
    background-color: #1a1a1a;
}

.tienda-header h1 {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
}

.productos-grid-tienda {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.producto-card-tienda {
    background-color: var(--color-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    min-height: 400px;
}

.producto-card-tienda:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.producto-imagen-tienda {
    width: 100%;
    height: 280px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.producto-imagen-tienda img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.producto-card-tienda:hover .producto-imagen-tienda img {
    transform: scale(1.05);
}

.producto-info-tienda {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: flex-start;
    min-height: auto;
}

.producto-categoria-tienda {
    display: none;
}

.producto-nombre-tienda {
    font-size: 1.0625rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--color-primary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 3rem;
}

.producto-subdetalle-tienda {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--color-text-light);
    margin: 0 0 0.75rem 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.producto-descripcion-tienda {
    display: none;
}

.producto-precio-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0;
    margin-top: auto;
}

.producto-precio-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.producto-precio-tienda {
    font-size: 1.125rem;
    font-weight: 400;
    color: var(--color-primary);
    margin: 0;
    line-height: 1.2;
}

.producto-precio-anterior {
    font-size: 0.9375rem;
    font-weight: 400;
    color: #999999;
    text-decoration: line-through;
    margin: 0;
    line-height: 1.2;
}

.producto-acciones {
    flex-shrink: 0;
}

.producto-acciones .btn {
    width: 50%;
    min-width: 100px;
    padding: 0.6875rem 1rem;
    font-size: 0.9375rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.producto-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background-color: #000000;
    color: #ffffff;
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
    line-height: 1.2;
}


.badge-stock {
    position: absolute;
    top: var(--spacing-xs);
    right: var(--spacing-xs);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 400;
    z-index: 10;
}

.badge-stock.agotado {
    background-color: #e74c3c;
    color: #ffffff;
}

.badge-stock.bajo-stock {
    background-color: #f39c12;
    color: #ffffff;
}

/* Responsive para productos-grid-tienda */
@media (max-width: 1023px) and (min-width: 768px) {
    .productos-grid-tienda {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 767px) {
    .tienda-search-form {
        max-width: 100%;
        margin: 1rem auto 0 auto;
    }
    
    .tienda-search-container {
        padding: 0.625rem 0.875rem;
    }
    
    .tienda-search-input {
        font-size: 0.875rem;
    }
    
    .tienda-search-icon {
        width: 18px;
        height: 18px;
    }
    
    .productos-grid-tienda {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .producto-card-tienda {
        min-height: 360px;
    }
    
    .producto-imagen-tienda {
        height: 220px;
    }
    
    .producto-info-tienda {
        padding: 1.25rem;
        min-height: auto;
    }
    
    .producto-nombre-tienda {
        font-size: 1rem;
        min-height: 2.8rem;
        margin-bottom: 0.5rem;
    }
    
    .producto-subdetalle-tienda {
        font-size: 0.8125rem;
        margin-bottom: 0.625rem;
    }
    
    .producto-precio-container {
        margin-bottom: 0;
        margin-top: auto;
        gap: 0.75rem;
        align-items: center;
    }
    
    .producto-precio-wrapper {
        gap: 0.2rem;
    }
    
    .producto-precio-tienda {
        font-size: 1.0625rem;
        margin: 0;
    }
    
    .producto-precio-anterior {
        font-size: 0.875rem;
    }
    
    .producto-acciones .btn {
        width: 50%;
        min-width: 90px;
        padding: 0.625rem 0.875rem;
        font-size: 0.875rem;
        font-weight: 400;
        text-transform: none;
        letter-spacing: 0.3px;
        border-radius: 6px;
    }
    
    .producto-acciones .btn .icono-bolsa,
    .producto-acciones .btn svg {
        font-size: 0.8125rem;
    }
    
    .producto-acciones .btn svg {
        width: 14px;
        height: 14px;
    }
    
    .producto-badge {
        font-size: 0.6875rem;
        padding: 0.3125rem 0.625rem;
        top: 0.5rem;
        left: 0.5rem;
    }
}

@media (max-width: 480px) {
    .tienda-search-form {
        margin: 0.75rem auto 0 auto;
    }
    
    .tienda-search-container {
        padding: 0.5625rem 0.75rem;
        border-radius: 25px;
    }
    
    .tienda-search-input {
        font-size: 0.8125rem;
    }
    
    .tienda-search-icon {
        width: 16px;
        height: 16px;
    }
    
    .productos-grid-tienda {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .producto-card-tienda {
        min-height: 340px;
    }
    
    .producto-imagen-tienda {
        height: 200px;
    }
    
    .producto-info-tienda {
        padding: 1.25rem;
        min-height: auto;
    }
    
    .producto-nombre-tienda {
        font-size: 1rem;
        min-height: 2.8rem;
        margin-bottom: 0.5rem;
    }
    
    .producto-subdetalle-tienda {
        font-size: 0.8125rem;
        margin-bottom: 0.625rem;
    }
    
    .producto-precio-container {
        margin-bottom: 0;
        margin-top: auto;
        gap: 0.625rem;
        flex-wrap: wrap;
        align-items: center;
    }
    
    .producto-precio-wrapper {
        gap: 0.2rem;
        width: 100%;
    }
    
    .producto-precio-tienda {
        font-size: 1rem;
        margin: 0;
    }
    
    .producto-precio-anterior {
        font-size: 0.8125rem;
    }
    
    .producto-acciones {
        width: 100%;
    }
    
    .producto-acciones .btn {
        width: 50%;
        min-width: 85px;
        padding: 0.625rem 0.875rem;
        font-size: 0.875rem;
        font-weight: 400;
        text-transform: none;
        letter-spacing: 0.3px;
        border-radius: 6px;
    }
    
    .producto-acciones .btn .icono-bolsa,
    .producto-acciones .btn svg {
        font-size: 0.8125rem;
    }
    
    .producto-acciones .btn svg {
        width: 14px;
        height: 14px;
    }
    
    /* Pestañas de categorías responsive */
    .categorias-tabs-container {
        margin-bottom: 2rem;
    }
    
    .categorias-tabs {
        gap: 0.5rem;
        padding: 0.375rem;
    }
    
    .categoria-tab {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }
    
    .categoria-tab-count {
        font-size: 0.75rem;
        padding: 0.125rem 0.375rem;
    }
}

@media (max-width: 480px) {
    .categorias-tabs-container {
        margin-bottom: 1.5rem;
    }
    
    .categorias-tabs {
        gap: 0.375rem;
        padding: 0.25rem;
    }
    
    .categoria-tab {
        padding: 0.5625rem 1rem;
        font-size: 0.8125rem;
        flex: 1;
        min-width: 0;
        justify-content: center;
    }
    
    .categoria-tab-count {
        font-size: 0.6875rem;
        padding: 0.125rem 0.3125rem;
    }
}

/* ============================================
   PAGINACIÓN
   ============================================ */
.pagination-container {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem 0;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0.5rem 0.75rem;
    border: 1px solid #e0e0e0;
    background-color: #ffffff;
    color: #333333;
    border-radius: 6px;
    font-size: 0.9375rem;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.pagination-btn:hover:not(:disabled):not(.active) {
    background-color: #f5f5f5;
    border-color: #d0d0d0;
    color: #000000;
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
    background-color: #f5f5f5 !important;
    border-color: #e0e0e0 !important;
    color: #999999 !important;
}

.pagination-btn.active {
    background-color: #000000;
    color: #ffffff;
    border-color: #000000;
    font-weight: 500;
    text-decoration: underline;
}

.pagination-arrow {
    padding: 0.5rem;
}

.pagination-arrow svg {
    width: 16px;
    height: 16px;
}

.pagination-arrow:disabled svg {
    stroke: #999999;
}

.pagination-numbers {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-number {
    min-width: 40px;
}

.pagination-dots {
    padding: 0 0.25rem;
    color: #999999;
    font-size: 0.9375rem;
}

/* Responsive para paginación */
@media (max-width: 767px) {
    .pagination-container {
        margin-top: 2rem;
        padding: 0.75rem 0;
    }
    
    .pagination {
        gap: 0.375rem;
    }
    
    .pagination-btn {
        min-width: 36px;
        height: 36px;
        padding: 0.375rem 0.625rem;
        font-size: 0.875rem;
    }
    
    .pagination-arrow {
        padding: 0.375rem;
    }
    
    .pagination-arrow svg {
        width: 14px;
        height: 14px;
    }
    
    .pagination-arrow:disabled svg {
        stroke: #999999;
    }
    
    .pagination-numbers {
        gap: 0.375rem;
    }
}

@media (max-width: 480px) {
    .pagination-btn {
        min-width: 32px;
        height: 32px;
        padding: 0.25rem 0.5rem;
        font-size: 0.8125rem;
    }
    
    .pagination-arrow svg {
        width: 12px;
        height: 12px;
    }
    
    .pagination-arrow:disabled svg {
        stroke: #999999;
    }
}

/* Estilos para botón negro */
.btn-negro,
.btn.btn-negro,
.btn-agregar-carrito.btn-negro {
    background-color: #000000 !important;
    color: #FFFFFF !important;
    border: none !important;
    border-radius: 6px;
    padding: 0.6875rem 1rem;
    font-weight: 400;
    font-size: 0.9375rem;
    text-transform: none;
    letter-spacing: 0.3px;
    cursor: pointer;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-negro:hover,
.btn.btn-negro:hover,
.btn-agregar-carrito.btn-negro:hover {
    background-color: #1a1a1a !important;
    color: #FFFFFF !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.btn-negro:active,
.btn.btn-negro:active,
.btn-agregar-carrito.btn-negro:active {
    transform: translateY(0);
    background-color: #000000 !important;
    color: #FFFFFF !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

/* Asegurar que el icono dentro del botón sea blanco y más pequeño */
.btn-negro .icono-bolsa,
.btn.btn-negro .icono-bolsa,
.btn-agregar-carrito.btn-negro .icono-bolsa,
.btn-agregar-carrito.btn-negro svg {
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    line-height: 1;
    color: #FFFFFF !important;
    margin-right: 0.5rem;
    vertical-align: middle;
}

.btn-agregar-carrito.btn-negro svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    flex-shrink: 0;
}

/* Responsive para menú desplegable */
@media (max-width: 767px) {
    .filtros-dropdown-container {
        margin-bottom: 1.5rem;
        justify-content: flex-end;
    }
    
    .filtros-dropdown-btn {
        min-width: auto;
        padding: 0.5rem 0.25rem;
        font-size: 0.875rem;
        background-color: transparent;
        border: none;
        color: #666666;
    }
    
    .filtros-dropdown-btn:hover {
        background-color: transparent;
        border: none;
        color: #333333;
    }
    
    .filtros-dropdown.active .filtros-dropdown-btn {
        background-color: transparent;
        border: none;
        color: #333333;
    }
    
    .filtros-dropdown-menu {
        right: 0;
        left: auto;
        transform: translateY(-10px);
        min-width: 200px;
    }
    
    .filtros-dropdown.active .filtros-dropdown-menu {
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .filtros-dropdown-container {
        margin-bottom: 1rem;
        justify-content: flex-end;
    }
    
    .filtros-dropdown-btn {
        width: auto;
        min-width: auto;
        padding: 0.5rem 0.25rem;
        font-size: 0.8125rem;
        background-color: transparent;
        border: none;
        color: #666666;
    }
    
    .filtros-dropdown-btn:hover {
        background-color: transparent;
        border: none;
        color: #333333;
    }
    
    .filtros-dropdown.active .filtros-dropdown-btn {
        background-color: transparent;
        border: none;
        color: #333333;
    }
    
    .filtros-dropdown-menu {
        right: 0;
        left: auto;
        min-width: 200px;
        width: auto;
        transform: translateY(-10px);
    }
    
    .filtros-dropdown.active .filtros-dropdown-menu {
        transform: translateY(0);
    }
}

/* ============================================
   VISTA INDIVIDUAL DE PRODUCTO
   ============================================ */
.producto-detalle-container {
    padding: var(--spacing-lg) 0;
}

.producto-detalle-main {
    display: grid;
    grid-template-columns: 500px 1fr;
    gap: var(--spacing-lg);
    align-items: start;
    margin-bottom: var(--spacing-xl);
}

.producto-imagen-detalle {
    width: 100%;
    height: 500px;
    border-radius: 12px;
    overflow: hidden;
    background-color: var(--color-bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.producto-imagen-detalle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.producto-info-detalle {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 0;
}

.producto-nombre-detalle {
    font-size: 2rem;
    font-weight: 600;
    color: var(--color-primary);
    margin: 0 0 0.75rem 0;
    line-height: 1.3;
}

.producto-subdetalle-detalle {
    font-size: 1.125rem;
    font-weight: 400;
    color: var(--color-text-light);
    margin: 0 0 1.5rem 0;
    line-height: 1.5;
}

/* Badge de Últimas unidades */
.ultimas-unidades-badge {
    display: inline-block;
    background-color: #FFA500;
    color: #ffffff;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-align: center;
    line-height: 1.5;
    width: fit-content;
    max-width: 100%;
    flex-shrink: 0;
}

.producto-precios-detalle {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    width: fit-content;
}

.precio-actual {
    display: inline-block;
    font-size: 2rem;
    font-weight: 900;
    color: var(--color-primary);
    line-height: 1.2;
    width: fit-content;
    flex-shrink: 0;
}

.precio-anterior {
    display: inline-block;
    font-size: 1.125rem;
    font-weight: 400;
    color: #999999;
    text-decoration: line-through;
    line-height: 1.2;
    width: fit-content;
}

.producto-descripcion-detalle {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text);
}

.producto-descripcion-detalle p {
    margin: 0;
}

.producto-acciones-detalle {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: 0.5rem;
}

.producto-cantidad-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.cantidad-label {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-text);
    min-width: 80px;
}

.cantidad-controls-detalle {
    display: flex;
    align-items: center;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    overflow: hidden;
    background-color: var(--color-bg);
}

.btn-cantidad-detalle {
    width: 36px;
    height: 36px;
    border: none;
    background-color: var(--color-bg-light);
    color: var(--color-text);
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.btn-cantidad-detalle:hover {
    background-color: var(--color-bg-dark);
    color: var(--color-secondary);
}

.btn-cantidad-detalle:active {
    transform: scale(0.95);
}

.input-cantidad-detalle {
    width: 60px;
    height: 36px;
    text-align: center;
    border: none;
    border-left: 1px solid var(--color-border);
    border-right: 1px solid var(--color-border);
    outline: none;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-primary);
    background-color: var(--color-bg);
    -moz-appearance: textfield;
}

.input-cantidad-detalle::-webkit-outer-spin-button,
.input-cantidad-detalle::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.input-cantidad-detalle:focus {
    background-color: var(--color-bg-light);
}

.stock-info-detalle {
    font-size: 0.875rem;
    color: var(--color-text-light);
    margin-left: auto;
}

.producto-botones-wrapper {
    display: flex;
    gap: 0;
    align-items: center;
    width: 100%;
}

.btn-agregar-bolsa {
    background-color: #000000;
    color: #ffffff;
    border: none;
    padding: 1.25rem 1.5rem;
    border-radius: 8px;
    font-size: 1.125rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    text-decoration: none;
    width: 100%;
    min-height: 65px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-agregar-bolsa:hover {
    background-color: #1a1a1a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.btn-agregar-bolsa:active {
    transform: translateY(0);
}

.btn-agregar-bolsa svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    flex-shrink: 0;
}

.btn-whatsapp {
    background-color: #25D366;
    color: #ffffff;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    flex: 1;
}

.btn-whatsapp:hover {
    background-color: #20BA5A;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:active {
    transform: translateY(0);
}

.btn-whatsapp svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.btn-disabled {
    background-color: #e0e0e0;
    color: #999999;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: not-allowed;
    opacity: 0.6;
    flex: 1;
}

/* Responsive para vista de producto */
@media (max-width: 1023px) {
    .producto-detalle-main {
        grid-template-columns: 400px 1fr;
        gap: var(--spacing-md);
    }
    
    .producto-imagen-detalle {
        height: 400px;
    }
    
    .producto-nombre-detalle {
        font-size: 1.75rem;
    }
    
    .precio-actual {
        font-size: 1.75rem;
        font-weight: 900;
    }
}

@media (max-width: 767px) {
    .producto-detalle-container {
        padding: var(--spacing-md) 0;
    }
    
    .producto-detalle-main {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .producto-imagen-detalle {
        height: 350px;
        width: 100%;
    }
    
    .producto-info-detalle {
        gap: 1.25rem;
    }
    
    .producto-nombre-detalle {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .producto-subdetalle-detalle {
        font-size: 1rem;
        margin-bottom: 1.25rem;
    }
    
    .precio-actual {
        font-size: 1.5rem;
        font-weight: 900;
    }
    
    .precio-anterior {
        font-size: 1rem;
    }
    
    .producto-acciones-detalle {
        gap: 1rem;
    }
    
    .producto-cantidad-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .cantidad-label {
        min-width: auto;
    }
    
    .stock-info-detalle {
        margin-left: 0;
    }
    
    .producto-botones-wrapper {
        flex-direction: column;
        width: 100%;
        gap: 0.625rem;
    }
    
    .btn-agregar-bolsa,
    .btn-disabled {
        width: 100%;
        padding: 1rem 1.25rem;
        font-size: 1.0625rem;
        font-weight: 700;
        min-height: 60px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Evitar cambios de color en móvil al hacer clic */
    .btn-agregar-bolsa:active,
    .btn-agregar-bolsa:focus {
        background-color: #000000 !important;
        color: #ffffff !important;
        transform: none !important;
        box-shadow: none !important;
        outline: none !important;
    }
}

@media (max-width: 480px) {
    .producto-imagen-detalle {
        height: 300px;
    }
    
    .producto-nombre-detalle {
        font-size: 1.375rem;
        margin-bottom: 0.5rem;
    }
    
    .producto-subdetalle-detalle {
        font-size: 0.9375rem;
        margin-bottom: 1rem;
    }
    
    .precio-actual {
        font-size: 1.375rem;
        font-weight: 900;
    }
    
    .cantidad-controls-detalle {
        width: 100%;
        max-width: 200px;
    }
    
    .btn-cantidad-detalle {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
    
    .input-cantidad-detalle {
        width: 50px;
        height: 32px;
        font-size: 0.875rem;
    }
    
    .producto-botones-wrapper {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }
    
    .btn-agregar-bolsa,
    .btn-disabled {
        width: 100%;
        padding: 0.9375rem 1rem;
        font-size: 1rem;
        font-weight: 700;
        min-height: 55px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .btn-agregar-bolsa svg {
        width: 18px;
        height: 18px;
    }
    
    .ultimas-unidades-badge {
        font-size: 0.8125rem;
        padding: 0.25rem 0.5rem;
        width: fit-content;
    }
    
    /* Evitar cambios de color en móvil al hacer clic */
    .btn-agregar-bolsa:active,
    .btn-agregar-bolsa:focus {
        background-color: #000000 !important;
        color: #ffffff !important;
        transform: none !important;
        box-shadow: none !important;
        outline: none !important;
    }
}

/* ============================================
   PRODUCTOS RELACIONADOS / RECOMENDACIONES
   ============================================ */
.productos-relacionados {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--color-border);
}

.recomendaciones-titulo {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: var(--spacing-md);
    text-align: left;
}

@media (max-width: 767px) {
    .recomendaciones-titulo {
        font-size: 1.875rem;
        margin-bottom: var(--spacing-sm);
    }
}

@media (max-width: 480px) {
    .recomendaciones-titulo {
        font-size: 1.625rem;
    }
}

/* Resultados del buscador */
#searchResults {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  max-height: 400px;
  overflow-y: auto;
  margin-top: 0.5rem;
}

#searchResults.active {
  display: block;
}

.search-results-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.search-result-item {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.2s ease;
}

.search-result-item:hover {
  background-color: #f9f9f9;
}

.search-result-image {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 4px;
  margin-right: 1rem;
}

.search-result-info {
  flex: 1;
}

.search-result-name {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0;
  color: #333333;
}

.search-result-category,
.search-result-price {
  font-size: 0.85rem;
  color: #777777;
  margin: 0.25rem 0 0 0;
}

