/* production-fixes.css - Correcciones y ajustes de producción */

/* Fix para imágenes que no cargan */
.product-image img {
    background: #ffffff;
}

.product-image img[src=""],
.product-image img[src*="placeholder"] {
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img[src=""]::after,
.product-image img[src*="placeholder"]::after {
    content: "🐠";
    font-size: 4rem;
    position: absolute;
}

/* Fix para botones deshabilitados */
.btn:disabled,
.btn[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Fix para scrollbar en Windows */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Fix para focus en inputs */
.filter-input:focus-visible,
.filter-select:focus-visible,
.btn:focus-visible {
    outline: 2px solid var(--brand-primary);
    outline-offset: 2px;
}

/* Fix para links sin estilos */
a {
    color: inherit;
}

/* Performance: reducir motion para usuarios que lo prefieran */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Accesibilidad: mejora de contraste */
@media (prefers-contrast: high) {
    .product-card {
        border: 2px solid var(--text-primary);
    }
    
    .btn-primary {
        background: #000;
    }
}

/* Fix para Safari */
@supports (-webkit-touch-callout: none) {
    .product-image {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
}

/* ===== SCROLL TO TOP BUTTON ===== */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #ff6a00 0%, #ff8533 100%);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(255, 106, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(100px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background: linear-gradient(135deg, #ff8533 0%, #ff6a00 100%);
    box-shadow: 0 6px 20px rgba(255, 106, 0, 0.5);
    transform: translateY(-3px);
}

.scroll-to-top:active {
    transform: translateY(-1px);
}

.scroll-to-top i {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-5px);
    }
    60% {
        transform: translateY(-3px);
    }
}

/* Responsive para móvil */
@media (max-width: 768px) {
    .scroll-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .scroll-to-top {
        width: 42px;
        height: 42px;
        bottom: 15px;
        right: 15px;
        font-size: 16px;
    }
}
