[x-cloak] {
    display: none !important;
}

.product-card {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.product-card .fa,
.product-card [class^="fa-"],
.product-card [class*=" fa-"] {
    font-family: 'FontAwesome' !important;
}

.product-card-wrapper {
    height: 100%;
}

.product-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
    text-decoration: none !important;
    color: inherit;
    height: 100%;
    position: relative;
}

.product-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

.product-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f9fafb;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.product-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    color: #9ca3af;
    font-size: 2rem;
}

.product-badges {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 2;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1;
}

.badge-flash {
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: white;
    animation: pulse-flash 2s ease-in-out infinite;
}

.badge-flash i {
    font-size: 9px;
}

@keyframes pulse-flash {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.9;
        transform: scale(1.02);
    }
}

.badge-discount {
    background: #ef4444;
    color: white;
}

.badge-new {
    background: #10b981;
    color: white;
}

.badge-low-stock {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.95), rgba(220, 38, 38, 0.95));
    color: white;
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    padding: 6px 8px;
    border-radius: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.badge-low-stock i {
    font-size: 10px;
    animation: fire-flicker 0.5s ease-in-out infinite alternate;
}

@keyframes fire-flicker {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

.out-of-stock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
}

.out-of-stock-overlay span {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.quick-actions {
    position: absolute;
    bottom: 12px;
    right: 12px;
    display: flex;
    gap: 8px;
    z-index: 4;
}

.quick-action-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: white;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #4b5563;
}

.quick-action-btn:hover {
    background: var(--primary-color, #3b82f6);
    color: white;
    transform: scale(1.1);
}

.quick-action-btn.active {
    color: #ef4444;
}

.quick-action-btn.active:hover {
    background: #ef4444;
    color: white;
}

.quick-action-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.product-info {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    text-decoration: none !important;
    color: inherit;
}

.product-info:hover {
    text-decoration: none !important;
}

.product-name {
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
    margin: 0 0 8px 0;
    line-height: 1.45;
    letter-spacing: -0.01em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 40px;
    transition: color 0.2s ease;
}

.product-card:hover .product-name {
    color: var(--primary-color, #3b82f6);
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 8px;
}

.product-rating .stars {
    display: flex;
    gap: 1px;
}

.product-rating .stars i {
    font-size: 11px;
}

.product-rating .stars .star-filled {
    color: #f59e0b;
}

.product-rating .stars .star-empty {
    color: #e5e7eb;
}

.product-rating .review-count {
    font-size: 11px;
    color: #9ca3af;
}

.product-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: auto;
}

.price-current {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    letter-spacing: -0.02em;
}

.price-current.sale {
    color: #ef4444;
}

.price-original {
    font-size: 12px;
    font-weight: 400;
    color: #9ca3af;
    text-decoration: line-through;
}

@media (max-width: 575px) {
    .product-card {
        border-radius: 8px;
    }

    .product-info {
        padding: 10px;
    }

    .product-name {
        font-size: 12px;
        min-height: 34px;
    }

    .price-current {
        font-size: 14px;
    }

    .price-original {
        font-size: 11px;
    }

    .badge {
        font-size: 9px;
        padding: 3px 6px;
    }

    .badge-low-stock {
        font-size: 10px;
        padding: 5px 6px;
    }

    .quick-action-btn {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }

    .product-rating .stars i {
        font-size: 10px;
    }
}

@media (min-width: 576px) and (max-width: 767px) {
    .product-info {
        padding: 10px;
    }

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

    .price-current {
        font-size: 14px;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .product-info {
        padding: 10px;
    }

    .product-name {
        font-size: 12px;
        min-height: 34px;
    }

    .price-current {
        font-size: 14px;
    }

    .quick-action-btn {
        width: 34px;
        height: 34px;
        font-size: 13px;
    }
}
#products-grid-area .item-card {
    padding: 0.375rem !important;
}

.item-card .product-card {
    margin-bottom: 0;
    padding: 0 !important;
    margin: 0 !important;
}

@media (prefers-color-scheme: dark) {
    .product-card {
        background: #ffffff !important;
    }

    .product-name {
        color: #1f2937 !important;
    }

    .price-current {
        color: #1f2937 !important;
    }

    .product-placeholder {
        background: linear-gradient(135deg, #f3f4f6, #e5e7eb) !important;
    }
}

.transition {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.ease-out {
    transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
}

.ease-in {
    transition-timing-function: cubic-bezier(0.4, 0, 1, 1);
}

.duration-200 {
    transition-duration: 200ms;
}

.duration-150 {
    transition-duration: 150ms;
}

.opacity-0 {
    opacity: 0;
}

.opacity-100 {
    opacity: 1;
}

.translate-y-2 {
    transform: translateY(0.5rem);
}

.translate-y-0 {
    transform: translateY(0);
}

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

.product-card-wrapper {
    animation: fadeInUp 0.4s ease forwards;
}

.product-card-wrapper:nth-child(1) { animation-delay: 0.05s; }
.product-card-wrapper:nth-child(2) { animation-delay: 0.1s; }
.product-card-wrapper:nth-child(3) { animation-delay: 0.15s; }
.product-card-wrapper:nth-child(4) { animation-delay: 0.2s; }
.product-card-wrapper:nth-child(5) { animation-delay: 0.25s; }
.product-card-wrapper:nth-child(6) { animation-delay: 0.3s; }
.product-card-wrapper:nth-child(7) { animation-delay: 0.35s; }
.product-card-wrapper:nth-child(8) { animation-delay: 0.4s; }
