/* Ammo Filters Styling */

/* Filter select styling */
#ammoFilters select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Mobile responsive filters */
@media (max-width: 640px) {
    #ammoFilters {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }
    
    #ammoFilters select,
    #ammoFilters button {
        width: 100%;
        font-size: 14px;
    }
    
    #ammoReset {
        grid-column: span 2;
    }
}

/* Loading spinner animation */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Deal card hover effects */
#ammoDealsGrid > div {
    transition: all 0.3s ease;
}

#ammoDealsGrid > div:hover {
    transform: translateY(-4px);
}

/* Smooth transitions for grid */
#ammoDealsGrid {
    transition: opacity 0.3s ease-in-out;
}

/* Line clamp utility for product titles */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Filter dropdown focus styles */
#ammoFilters select:focus {
    outline: none;
    ring: 2px;
    ring-color: #3b82f6;
    border-color: #3b82f6;
}

/* Reset button hover state */
#ammoReset:hover {
    background-color: #d1d5db;
}

#ammoReset:active {
    transform: scale(0.98);
}

/* Loading overlay */
#ammoLoading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

/* Make section relative for loading positioning */
#ammoSection {
    position: relative;
}

/* Fade effect for content changes */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Mobile-friendly touch targets */
@media (hover: none) and (pointer: coarse) {
    #ammoFilters select,
    #ammoFilters button {
        min-height: 44px; /* iOS recommended touch target size */
    }
}