/* Mobile-First Responsive Design */
/* Product filters styling (theme-safe CSP refactor) */
.product-filters-panel {
    border-color: #e5e7eb;
}

.product-filters-search-input {
    border-color: #d1d5db;
    color: #1f2937;
}

.product-filters-toggle-btn {
    border-color: #d1d5db;
    color: #374151;
    padding-left: 2.5rem;
    padding-right: 2.5rem;
    height: 56px;
}

.product-filters-panel-body {
    border-color: #e5e7eb;
}

.product-filter-label {
    color: #4b5563;
}

.product-filter-select {
    border-color: #d1d5db;
    color: #1f2937;
    background-image: url('data:image/svg+xml;utf8,<svg fill=\'%236b7280\' height=\'24\' viewBox=\'0 0 24 24\' width=\'24\' xmlns=\'http://www.w3.org/2000/svg\'><path d=\'M7 10l5 5 5-5z\'/></svg>');
    background-position: right 0.5rem center;
    background-size: 1.5rem;
    background-repeat: no-repeat;
    padding-right: 2rem;
}

.product-filter-price-input-wrap {
    border-color: #d1d5db;
}

.product-filter-price-input {
    color: #1f2937;
}

.product-filters-footer {
    border-color: #e5e7eb;
}

.product-filter-checkbox {
    border-color: #9ca3af;
}

.product-filter-on-sale-label {
    color: #374151;
}

.product-filter-clear-link {
    color: #6b7280;
    border-color: #d1d5db;
}

.product-filter-apply-btn {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}

@media (max-width: 575.98px) {
    .px-3 {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    .card {
        margin-bottom: 1rem;
    }

    .card-body {
        padding: 1rem 0.75rem;
    }

    .action-buttons {
        gap: 0.5rem;
    }

    .action-buttons .btn {
        border-radius: 0.375rem !important;
    }

    .add-to-cart-btn {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
    }

    .social-share-mini {
        gap: 0.5rem !important;
    }

    .share-btn-mini {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .share-btn-mini i {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100%;
        height: 100%;
    }

    .card-title {
        font-size: 1.1rem;
        line-height: 1.3;
    }

    .card-text {
        font-size: 0.9rem;
        line-height: 1.4;
    }

    .text-muted {
        font-size: 1rem;
        font-weight: 600;
    }

    .btn-sm {
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
    }

    .action-buttons {
        flex-wrap: nowrap;
    }

    .action-buttons .btn {
        flex: 1;
        white-space: nowrap;
    }
}

/* Tablet optimizations */
@media (min-width: 576px) and (max-width: 991.98px) {
    .card-title {
        font-size: 1.2rem;
    }

    .card-text {
        font-size: 0.95rem;
    }

    .btn-sm {
        font-size: 0.85rem;
        padding: 0.5rem 0.75rem;
    }
}

/* Desktop optimizations */
@media (min-width: 992px) {
    .card:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
        transition: all 0.3s ease;
    }

    .card-title a:hover {
        color: #667eea !important;
    }

    .btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
}

/* Social share button hover effects */
.share-btn-mini:hover {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

.share-btn-mini {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px;
    height: 32px;
}

.share-btn-mini i {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100%;
    height: 100%;
}

/* Loading states for add to cart buttons */
.add-to-cart-list-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.add-to-cart-list-btn.loading .btn-text {
    display: none;
}

.add-to-cart-list-btn.loading::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.add-to-cart-list-btn.success {
    background-color: #198754 !important;
    border-color: #198754 !important;
    color: white !important;
}

.add-to-cart-list-btn.error {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    color: white !important;
}

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