/* Custom styles for POSTES Y SUPERPOSTES COOPERMEX */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

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

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

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

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-out;
}

.animate-slide-in {
    animation: slideInRight 0.4s ease-out;
}

/* Button transitions */
button, .btn {
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.3s ease;
}

button:active, .btn:active {
    transform: scale(0.98);
}

/* Card hover effects */
.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Image zoom on hover */
.img-zoom-container {
    overflow: hidden;
}

.img-zoom {
    transition: transform 0.5s ease;
}

.img-zoom-container:hover .img-zoom {
    transform: scale(1.1);
}

/* Line clamp utilities */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Toast notifications */
.toast {
    min-width: 300px;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    margin-bottom: 0.5rem;
    animation: slideInRight 0.3s ease-out;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.toast.success {
    border-left: 4px solid #10b981;
}

.toast.error {
    border-left: 4px solid #ef4444;
}

.toast.info {
    border-left: 4px solid #3b82f6;
}

/* Loading spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #1E3A5F;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Form focus styles */
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #FF8C42;
    ring: 2px;
    ring-color: rgba(255, 140, 66, 0.3);
}

/* Responsive utilities */
@media (max-width: 640px) {
    .hero-text {
        font-size: 2rem;
    }
}

/* Custom gradient backgrounds */
.gradient-primary {
    background: linear-gradient(135deg, #1E3A5F 0%, #3E4C59 100%);
}

.gradient-accent {
    background: linear-gradient(135deg, #FF8C42 0%, #FF8C42 100%);
}

/* Badge styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
}

.badge-primary {
    background-color: #1E3A5F;
    color: white;
}

.badge-accent {
    background-color: #FF8C42;
    color: white;
}

/* Product image aspect ratio */
.product-img {
    aspect-ratio: 4/3;
    object-fit: cover;
}

/* Hero image overlay */
.hero-overlay {
    position: relative;
}

.hero-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(30, 58, 95, 0.95), rgba(30, 58, 95, 0.7));
}

/* Mobile menu transition */
.mobile-menu-enter {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.mobile-menu-enter-active {
    max-height: 500px;
}