/* Modern Products Page Styles */

/* CSS Custom Properties for Enhanced Theming */
:root {
    --primary-color: #EEC225;
    --primary-dark: #d4a91a;
    --primary-gradient: linear-gradient(135deg, #EEC225 0%, #d4a91a 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --warning-gradient: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);

    --card-shadow: 0 4px 12px rgba(0,0,0,0.1);
    --card-shadow-hover: 0 15px 35px rgba(0,0,0,0.15);
    --card-border-radius: 16px;
    --card-padding: 20px;

    --animation-duration: 0.3s;
    --animation-easing: cubic-bezier(0.25, 0.8, 0.25, 1);

    --text-primary: #334155;
    --text-secondary: #64748b;
    --text-light: #ffffff;

    --border-color: #e9ecef;
    --border-color-focus: var(--primary-color);

    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
}





/* Dark Mode Support for Loading Screen */
[data-theme=dark] .products-loading-overlay {
    background: var(--bs-dark, #212529);
    color: var(--bs-light, #f8f9fa);
}

[data-theme=dark] .loading-content {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
}

[data-theme=dark] .loading-spinner {
    border-color: rgba(255, 255, 255, 0.2);
    border-top-color: var(--bs-primary, #0d5afd);
}

[data-theme=dark] .loading-text {
    color: var(--bs-light, #f8f9fa);
}

/* Prefers-color-scheme support */
@media (prefers-color-scheme: dark) {
    .products-loading-overlay {
        background: #1a1a1a;
        color: #ffffff;
    }

    .loading-content {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.2);
    }

    .loading-spinner {
        border-color: rgba(255, 255, 255, 0.2);
        border-top-color: #0d5afd;
    }

    .loading-text {
        color: #ffffff;
    }
}

/* Enhanced Search Section */
.products-search-section .search-input-wrapper {
    position: relative;
}

.products-search-section .search-icon {
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    z-index: 10;
}

.products-search-section .form-control {
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 12px 16px 12px 45px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.products-search-section .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(238, 194, 37, 0.25);
}

.products-search-section .form-select {
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 14px;
    background-color: #fff;
    transition: all 0.3s ease;
}

.products-search-section .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(238, 194, 37, 0.25);
}

/* Search Suggestions */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e9ecef;
    border-top: none;
    border-radius: 0 0 12px 12px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.search-suggestions.show {
    display: block;
}

.suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f8f9fa;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
}

.suggestion-item:hover,
.suggestion-item.active {
    background-color: #f8f9fa;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-icon {
    margin-right: 8px;
    color: var(--text-secondary);
    font-size: 14px;
}

.suggestion-text {
    font-size: 14px;
    color: var(--text-primary);
}

.suggestion-type {
    font-size: 12px;
    color: var(--text-secondary);
    margin-left: auto;
}

/* Advanced Filters */
.advanced-filters-toggle .btn-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.advanced-filters-toggle .btn-link:hover {
    color: #0d5afd;
}

.advanced-filters-toggle .bi-chevron-down {
    transition: transform 0.3s ease;
}

.advanced-filters-toggle .btn-link[aria-expanded="true"] .bi-chevron-down {
    transform: rotate(180deg);
}

/* Active Filters */
.active-filters {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.filter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-tag {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    color: #1976d2;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    animation: fadeInScale 0.3s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.filter-tag .remove-filter {
    margin-left: 6px;
    cursor: pointer;
    color: #1976d2;
    font-size: 14px;
    transition: color 0.2s ease;
}

.filter-tag .remove-filter:hover {
    color: #d32f2f;
}

/* Search Results Info */
.search-results-info {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 16px;
    border: 1px solid #e9ecef;
    animation: fadeInUp 0.3s ease-out;
}

.search-results-info .results-count {
    font-weight: 600;
    color: var(--text-primary);
}

.search-results-info .results-query {
    color: #0d5afd;
    font-weight: 500;
}

.search-results-info .clear-search {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    margin-left: 12px;
    transition: color 0.3s ease;
}

.search-results-info .clear-search:hover {
    color: #0d5afd;
}

/* Filter Animation */
.filter-transition {
    transition: all 0.3s ease;
}

.filter-transition.filtering {
    opacity: 0.6;
    transform: scale(0.98);
}

/* No Results State */
.no-results-state {
    text-align: center;
    padding: 60px 20px;
    animation: fadeInUp 0.5s ease-out;
}

.no-results-icon {
    font-size: 48px;
    color: #dee2e6;
    margin-bottom: 16px;
}

.no-results-title {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 8px;
}

.no-results-description {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 20px;
}

/* Enhanced Responsive Grid System */

/* Extra Small Devices (phones, less than 576px) */
@media (max-width: 575.98px) {
    .products-search-section .row {
        gap: 8px;
    }

    .products-search-section .col-md-6,
    .products-search-section .col-md-3 {
        margin-bottom: 12px;
    }

    .search-suggestions {
        max-height: 120px;
        font-size: 13px;
    }

    .suggestion-item {
        padding: 8px 12px;
    }

    .stat-card {
        padding: 12px;
        margin-bottom: 8px;
    }

    .stat-number {
        font-size: 18px;
    }

    .stat-label {
        font-size: 11px;
    }

    .type-header {
        padding: 12px;
    }

    .type-icon {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }

    .type-title {
        font-size: 14px;
    }

    .type-description {
        font-size: 12px;
    }

    .modern-product-card {
        margin-bottom: 12px;
    }

    .product-card-header,
    .product-card-body,
    .product-card-footer {
        padding: 12px;
    }

    .product-name {
        font-size: 14px;
    }

    .product-meta {
        flex-direction: column;
        gap: 4px;
    }

    .meta-item {
        font-size: 11px;
    }

    .filter-tags {
        gap: 4px;
    }

    .filter-tag {
        font-size: 10px;
        padding: 2px 8px;
    }


}

/* Small Devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .products-search-section .row {
        gap: 10px;
    }

    .stat-card {
        padding: 14px;
    }

    .type-header {
        padding: 14px;
    }

    .modern-product-card {
        margin-bottom: 14px;
    }

    .product-meta {
        flex-direction: row;
        justify-content: space-between;
    }
}

/* Medium Devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .products-grid-section .row {
        margin: 0 -8px;
    }

    .products-grid-section .col-12,
    .products-grid-section .col-md-6,
    .products-grid-section .col-lg-4 {
        padding: 0 8px;
        margin-bottom: 16px;
    }

    .modern-product-card {
        height: auto;
        min-height: 280px;
    }
}

/* Large Devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .products-grid-section .row {
        margin: 0 -10px;
    }

    .products-grid-section .col-12,
    .products-grid-section .col-md-6,
    .products-grid-section .col-lg-4 {
        padding: 0 10px;
        margin-bottom: 20px;
    }

    .modern-product-card {
        min-height: 300px;
    }
}

/* Extra Large Devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .products-grid-section .row {
        margin: 0 -12px;
    }

    .products-grid-section .col-12,
    .products-grid-section .col-md-6,
    .products-grid-section .col-lg-4 {
        padding: 0 12px;
        margin-bottom: 24px;
    }

    .modern-product-card {
        min-height: 320px;
    }

    /* Show more columns on very large screens */
    .products-grid-section .col-lg-4 {
        flex: 0 0 auto;
        width: 33.333333%;
    }
}

/* Ultra Wide Screens (1400px and up) */
@media (min-width: 1400px) {
    .products-grid-section .col-lg-4 {
        flex: 0 0 auto;
        width: 25%; /* 4 columns on ultra-wide screens */
    }

    .container {
        max-width: 1320px;
    }
}

/* Responsive Typography */
@media (max-width: 575.98px) {
    .products-search-section .form-control,
    .products-search-section .form-select {
        font-size: 14px;
        padding: 10px 14px 10px 40px;
    }

    .products-search-section .search-icon {
        left: 12px;
    }
}

/* Responsive Spacing */
.responsive-spacing {
    padding: 1rem;
}

@media (min-width: 576px) {
    .responsive-spacing {
        padding: 1.5rem;
    }
}

@media (min-width: 768px) {
    .responsive-spacing {
        padding: 2rem;
    }
}

@media (min-width: 992px) {
    .responsive-spacing {
        padding: 2.5rem;
    }
}

/* Responsive Grid Utilities */
.grid-auto-fit {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

@media (max-width: 575.98px) {
    .grid-auto-fit {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

@media (min-width: 1400px) {
    .grid-auto-fit {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.5rem;
    }
}

/* Responsive Visibility */
.d-xs-none {
    display: none !important;
}

@media (min-width: 576px) {
    .d-xs-none {
        display: block !important;
    }
}

.d-xs-block {
    display: block !important;
}

@media (min-width: 576px) {
    .d-xs-block {
        display: none !important;
    }
}

/* Touch-friendly interactions for mobile */
@media (hover: none) and (pointer: coarse) {
    .modern-product-card {
        transition: none;
    }

    .modern-product-card:hover {
        transform: none;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }



    .product-card-footer .btn {
        min-height: 44px;
        padding: 12px 16px;
    }
}

/* Enhanced Stats Cards */
.stat-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    color: var(--text-primary);
    text-align: center;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-color);
    pointer-events: none;
    transition: all 0.3s ease;
    border-radius: 16px 16px 0 0;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    transform: scale(0);
    transition: transform 0.6s ease;
    pointer-events: none;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(238, 194, 37, 0.15), 0 4px 12px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}

.stat-card:hover::after {
    transform: scale(1);
}

.stat-card:active {
    transform: translateY(-4px) scale(0.98);
}

.stat-card:nth-child(1)::before {
    background: linear-gradient(135deg, #EEC225 0%, #d4a91a 100%);
}

.stat-card:nth-child(2)::before {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.stat-card:nth-child(3)::before {
    background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
}

.stat-card:nth-child(4)::before {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
}

.stat-icon {
    font-size: 28px;
    margin-bottom: 12px;
    color: var(--primary-color);
    opacity: 0.9;
}

.stat-number {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Product Type Sections */
.product-type-section {
    margin-bottom: 2rem;
}

.type-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid #e9ecef;
}

.type-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #0d5afd 0%, #1e40af 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.type-title {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 18px;
}

.type-description {
    color: var(--text-secondary);
    font-size: 14px;
}

.type-count .badge {
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 20px;
}

/* Enhanced Modern Product Cards */
.modern-product-card {
    background: white;
    border-radius: 16px;
    border: 1px solid #e9ecef;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.modern-product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(238, 194, 37, 0.05) 0%, rgba(212, 169, 26, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.modern-product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(238, 194, 37, 0.15), 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.modern-product-card:hover::before {
    opacity: 1;
}

.modern-product-card:active {
    transform: translateY(-3px);
    transition: all 0.1s ease;
}

.product-card-header {
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f8f9fa;
}

.product-type-badge {
    display: flex;
    align-items: center;
    background: rgba(238, 194, 37, 0.1);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    color: var(--primary-dark);
    font-weight: 600;
}

/* Light mode badge styling */
[data-theme=light] .product-type-badge,
.product-type-badge {
    background: rgba(238, 194, 37, 0.1);
    color: var(--primary-dark);
}

/* Dark mode badge styling */
[data-theme=dark] .product-type-badge {
    background: rgba(238, 194, 37, 0.15);
    color: var(--primary-color);
}

.product-type-badge i {
    margin-right: 6px;
    font-size: 14px;
}

.product-actions .btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.product-actions .btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.product-actions .btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #1e293b;
}

.product-card-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-preview {
    text-align: center;
    margin-bottom: 16px;
}

.product-qr-placeholder {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: var(--text-secondary);
    font-size: 24px;
    border: 2px dashed #dee2e6;
}

.product-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    text-align: center;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
}

.meta-item {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: var(--text-secondary);
}

.meta-item i {
    margin-right: 4px;
    font-size: 12px;
}

.product-card-footer {
    padding: 16px;
    border-top: 1px solid #f8f9fa;
    margin-top: auto;
}

.product-card-footer .btn {
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
    padding: 8px 12px;
}

.product-card-footer .btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #1e293b;
}

.product-card-footer .btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #1e293b;
}

/* Product Action Information */
.product-action-info {
    margin-top: 12px;
    margin-bottom: 12px;
}

.action-badge {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(238, 194, 37, 0.1) 0%, rgba(212, 169, 26, 0.1) 100%);
    border: 1px solid rgba(238, 194, 37, 0.2);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    color: var(--primary-dark);
    transition: all 0.3s ease;
}

.action-badge i {
    margin-right: 6px;
    font-size: 12px;
}

.action-badge:hover {
    background: linear-gradient(135deg, rgba(238, 194, 37, 0.15) 0%, rgba(212, 169, 26, 0.15) 100%);
    border-color: rgba(238, 194, 37, 0.3);
    transform: translateY(-1px);
}

/* Product Performance Indicators */
.product-performance {
    margin-top: 12px;
}

.performance-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.performance-badge i {
    margin-right: 4px;
    font-size: 12px;
}

.high-performance {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border: 1px solid #c3e6cb;
}

.medium-performance {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
    border: 1px solid #ffeaa7;
}

.low-performance {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.performance-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Product Analytics Enhancements */
.product-analytics-summary {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    padding: 8px 12px;
    margin-top: 8px;
    border: 1px solid #e9ecef;
}

.analytics-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.analytics-row:last-child {
    margin-bottom: 0;
}

.analytics-label {
    font-size: 10px;
    color: var(--text-secondary);
    font-weight: 500;
}

.analytics-value {
    font-size: 11px;
    color: var(--text-primary);
    font-weight: 600;
}

.analytics-trend {
    font-size: 10px;
    margin-left: 4px;
}

.trend-up {
    color: #28a745;
}

.trend-down {
    color: #dc3545;
}

.trend-neutral {
    color: #6c757d;
}

/* Empty State */
.empty-state {
    padding: 60px 20px;
}

.empty-icon {
    font-size: 64px;
    color: #dee2e6;
}

.empty-title {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 12px;
}

.empty-description {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 24px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .stat-card {
        padding: 16px;
        margin-bottom: 12px;
    }
    
    .stat-number {
        font-size: 24px;
    }

    .stat-icon {
        font-size: 24px;
    }

    .action-badge {
        font-size: 10px;
        padding: 4px 8px;
    }

    .action-badge i {
        font-size: 10px;
        margin-right: 4px;
    }
    
    .type-header {
        padding: 16px;
    }
    
    .type-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .type-title {
        font-size: 16px;
    }
    
    .modern-product-card {
        margin-bottom: 16px;
    }
    
    .product-meta {
        flex-direction: column;
        gap: 8px;
    }
}

/* Advanced Animations and Visual Effects */

/* Core Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(13, 90, 253, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(13, 90, 253, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(13, 90, 253, 0);
    }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0, 0, 0);
    }
    40%, 43% {
        transform: translate3d(0, -8px, 0);
    }
    70% {
        transform: translate3d(0, -4px, 0);
    }
    90% {
        transform: translate3d(0, -2px, 0);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-2px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(2px);
    }
}

@keyframes glow {
    0% {
        box-shadow: 0 0 5px rgba(13, 90, 253, 0.2);
    }
    50% {
        box-shadow: 0 0 20px rgba(13, 90, 253, 0.4);
    }
    100% {
        box-shadow: 0 0 5px rgba(13, 90, 253, 0.2);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-6px);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Micro-interactions */
.micro-bounce {
    animation: bounce 0.6s ease-out;
}

.micro-shake {
    animation: shake 0.5s ease-in-out;
}

.micro-glow {
    animation: glow 2s ease-in-out infinite;
}

.micro-float {
    animation: float 3s ease-in-out infinite;
}

.micro-shimmer {
    background: linear-gradient(90deg, transparent, rgba(238, 194, 37, 0.3), transparent);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

/* Staggered Animations */
.stagger-animation {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease-out forwards;
}

.stagger-animation:nth-child(1) { animation-delay: 0.1s; }
.stagger-animation:nth-child(2) { animation-delay: 0.2s; }
.stagger-animation:nth-child(3) { animation-delay: 0.3s; }
.stagger-animation:nth-child(4) { animation-delay: 0.4s; }
.stagger-animation:nth-child(5) { animation-delay: 0.5s; }
.stagger-animation:nth-child(6) { animation-delay: 0.6s; }

/* Hover Effects */
.hover-lift {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-rotate {
    transition: transform 0.3s ease;
}

.hover-rotate:hover {
    transform: rotate(5deg);
}

.hover-glow {
    transition: all 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(13, 90, 253, 0.3);
    border-color: rgba(13, 90, 253, 0.5);
}

/* Morphing Buttons */
.morph-button {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.morph-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.5s ease;
}

.morph-button:hover::before {
    width: 300px;
    height: 300px;
}

/* Gradient Animations */
.animated-gradient {
    background: linear-gradient(-45deg, #667eea, #764ba2, #f093fb, #f5576c);
    background-size: 400% 400%;
    animation: gradientShift 4s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Particle Effects */
.particle-container {
    position: relative;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(13, 90, 253, 0.6);
    border-radius: 50%;
    pointer-events: none;
    animation: particleFloat 3s linear infinite;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-10vh) rotate(360deg);
        opacity: 0;
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.scale-in {
    animation: scaleIn 0.5s ease-out;
}

.slide-in-left {
    animation: slideInLeft 0.5s ease-out;
}

/* Enhanced Product Card Interactions */
.modern-product-card {
    position: relative;
    overflow: hidden;
}

.modern-product-card .shimmer-effect {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(238, 194, 37, 0.2), transparent);
    transition: left 0.5s;
    pointer-events: none;
}

.modern-product-card:hover .shimmer-effect {
    left: 100%;
}

.modern-product-card .product-card-footer .btn {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.modern-product-card .product-card-footer .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(238, 194, 37, 0.3), transparent);
    transition: left 0.3s;
    z-index: -1;
}

.modern-product-card .product-card-footer .btn:hover::before {
    left: 100%;
}



/* Product Statistics Enhancement */
.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(238, 194, 37, 0.05) 0%, transparent 70%);
    transform: scale(0);
    transition: transform 0.5s ease;
}

.stat-card:hover::after {
    transform: scale(1);
}

/* Mini Stat Cards */
.mini-stat-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 16px 20px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.mini-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(238, 194, 37, 0.12), 0 3px 8px rgba(0,0,0,0.08);
    border-color: var(--primary-color);
}

.mini-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-color);
    border-radius: 16px 16px 0 0;
}

.mini-stat-card:nth-child(1)::before {
    background: linear-gradient(135deg, #EEC225 0%, #d4a91a 100%);
}

.mini-stat-card:nth-child(2)::before {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.mini-stat-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mini-stat-number {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
    display: block;
}

.mini-stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Animated counters */
.stat-number,
.mini-stat-number {
    transition: all 0.3s ease;
}

.stat-number.counting,
.mini-stat-number.counting {
    color: #0d5afd;
    transform: scale(1.1);
}

/* Loading States */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-card {
    height: 200px;
    border-radius: 20px;
    margin-bottom: 20px;
}

.skeleton-text {
    height: 16px;
    border-radius: 8px;
    margin-bottom: 8px;
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-text.medium {
    width: 80%;
}

/* Search Section Theme Support */
[data-theme=light] .products-search-section .card,
.products-search-section .card {
    background: white;
    border-color: #e9ecef;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

[data-theme=light] .type-header,
.type-header {
    background: #f8fafc;
    border-color: #e9ecef;
}

[data-theme=light] .type-title,
.type-title {
    color: #1e293b;
}

/* Dark Mode Support */
[data-theme=dark] .products-search-section .card {
    background-color: #242644;
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
}

[data-theme=dark] .products-search-section .form-control,
[data-theme=dark] .products-search-section .form-select {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.1);
    color: white;
}

[data-theme=dark] .type-header {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme=dark] .type-title {
    color: #e2e8f0;
}

/* Light mode card styling */
[data-theme=light] .modern-product-card,
.modern-product-card {
    background: white;
    border-color: #e9ecef;
    color: #334155;
}

[data-theme=light] .products-search-section .card,
.products-search-section .card {
    background: white;
    border-color: #e9ecef;
}

[data-theme=light] .product-name,
.product-name {
    color: #1e293b;
}

[data-theme=light] .product-meta,
.product-meta {
    color: #64748b;
}

[data-theme=light] .modern-product-card:hover {
    box-shadow: 0 20px 40px rgba(238, 194, 37, 0.15), 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

[data-theme=light] .modern-product-card:hover::before {
    background: linear-gradient(135deg, rgba(238, 194, 37, 0.08) 0%, rgba(212, 169, 26, 0.08) 100%);
}

/* Dark mode styling */
[data-theme=dark] .modern-product-card {
    background-color: #242644;
    border-color: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
}

[data-theme=dark] .product-card-header,
[data-theme=dark] .product-card-footer {
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme=dark] .product-name {
    color: #ffffff;
}

[data-theme=dark] .product-meta {
    color: #a0aec0;
}

[data-theme=dark] .empty-title {
    color: #e2e8f0;
}

[data-theme=dark] .empty-state-text {
    color: #a0aec0;
}

[data-theme=light] .empty-state-text,
.empty-state-text {
    color: #64748b;
}

/* Light mode mini-stat cards */
[data-theme=light] .mini-stat-card,
.mini-stat-card {
    background: white;
    border-color: #e2e8f0;
    color: var(--text-primary);
}

[data-theme=light] .mini-stat-card:hover,
.mini-stat-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 6px 20px rgba(238, 194, 37, 0.12), 0 3px 8px rgba(0,0,0,0.08);
}

[data-theme=light] .mini-stat-number,
.mini-stat-number {
    color: var(--text-primary);
}

[data-theme=light] .mini-stat-label,
.mini-stat-label {
    color: var(--text-secondary);
}

[data-theme=dark] .modern-product-card:hover {
    box-shadow: 0 20px 40px rgba(238, 194, 37, 0.2), 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    border-color: var(--primary-color);
}

[data-theme=dark] .modern-product-card::before {
    background: linear-gradient(135deg, rgba(238, 194, 37, 0.03) 0%, rgba(212, 169, 26, 0.03) 100%);
}

[data-theme=dark] .modern-product-card:hover::before {
    background: linear-gradient(135deg, rgba(238, 194, 37, 0.1) 0%, rgba(212, 169, 26, 0.1) 100%);
}

/* Dark mode stat cards */
[data-theme=dark] .stat-card {
    background-color: #242644;
    border-color: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
}

[data-theme=dark] .stat-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 8px 25px rgba(238, 194, 37, 0.2), 0 4px 12px rgba(0,0,0,0.3);
}

[data-theme=dark] .stat-number {
    color: #e2e8f0;
}

[data-theme=dark] .stat-label {
    color: #a0aec0;
}

[data-theme=dark] .stat-icon {
    color: var(--primary-color);
}

/* Dark mode mini-stat cards */
[data-theme=dark] .mini-stat-card {
    background-color: #242644;
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme=dark] .mini-stat-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 6px 20px rgba(238, 194, 37, 0.15), 0 3px 8px rgba(0,0,0,0.2);
}

[data-theme=dark] .mini-stat-number {
    color: #e2e8f0;
}

[data-theme=dark] .mini-stat-label {
    color: #a0aec0;
}

/* Dark mode action badge */
[data-theme=dark] .action-badge {
    background: linear-gradient(135deg, rgba(238, 194, 37, 0.15) 0%, rgba(212, 169, 26, 0.15) 100%);
    border-color: rgba(238, 194, 37, 0.3);
    color: #EEC225;
}

[data-theme=dark] .action-badge:hover {
    background: linear-gradient(135deg, rgba(238, 194, 37, 0.2) 0%, rgba(212, 169, 26, 0.2) 100%);
    border-color: rgba(238, 194, 37, 0.4);
}

[data-theme=dark] .loading-skeleton {
    background: linear-gradient(90deg, #333 25%, #444 50%, #333 75%);
    background-size: 200% 100%;
}
