/* Custom styles, transitions and Dark Mode support */

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

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

.animate-fade-in {
    animation: fadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-scale-in {
    animation: scaleIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Product Card Image aspect ratio and hover */
.product-card {
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px -8px rgba(0, 0, 0, 0.12), 0 8px 16px -6px rgba(0, 0, 0, 0.08);
}

.dark .product-card:hover {
    box-shadow: 0 14px 32px -8px rgba(0, 0, 0, 0.5), 0 8px 16px -6px rgba(16, 185, 129, 0.1);
}

.product-img-wrapper {
    position: relative;
    width: 100%;
    padding-top: 133.33%; /* 3:4 Portrait aspect ratio - taller to view full product thumbnail */
    overflow: hidden;
    background-color: #f8fafc;
}

.dark .product-img-wrapper {
    background-color: #090d16;
}

.product-img-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card:hover .product-img-wrapper img {
    transform: scale(1.06);
}

/* Stock status pill styles */
.status-pill {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.22rem 0.6rem;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    line-height: 1;
    backdrop-filter: blur(8px);
    transition: all 0.2s ease;
}

/* Light mode pills */
.status-in-stock {
    background-color: rgba(220, 252, 231, 0.95);
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.status-out-of-stock {
    background-color: rgba(254, 226, 226, 0.95);
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.status-limited-stock, .status-low-stock {
    background-color: rgba(254, 243, 199, 0.95);
    color: #b45309;
    border: 1px solid #fde68a;
}

.status-pre-order {
    background-color: rgba(224, 231, 255, 0.95);
    color: #4338ca;
    border: 1px solid #c7d2fe;
}

/* Dark mode pills */
.dark .status-in-stock {
    background-color: rgba(6, 78, 59, 0.85);
    color: #4ade80;
    border: 1px solid rgba(52, 211, 153, 0.3);
}

.dark .status-out-of-stock {
    background-color: rgba(127, 29, 29, 0.85);
    color: #f87171;
    border: 1px solid rgba(248, 113, 113, 0.3);
}

.dark .status-limited-stock, .dark .status-low-stock {
    background-color: rgba(120, 53, 15, 0.85);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.dark .status-pre-order {
    background-color: rgba(49, 46, 129, 0.85);
    color: #a5b4fc;
    border: 1px solid rgba(165, 180, 252, 0.3);
}

/* Custom scrollbars */
::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}
::-webkit-scrollbar-track {
    background: #f8fafc;
}
.dark ::-webkit-scrollbar-track {
    background: #090d16;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
.dark ::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
.dark ::-webkit-scrollbar-thumb:hover {
    background: #475569;
}
