/* Products Page Styles */
.section {
    position: relative;
    z-index: 1;
}

/* Search Section Layout */
.search-section {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
    max-width: 850px;
    margin: 2rem auto;
    padding: 0 1rem;
    align-items: center;
}

/* Filter Buttons */
.filter-buttons {
    display: flex;
    gap: 0.5rem;
}

.filter-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: rgba(17, 17, 35, 0.95);
    border: 1px solid rgba(114, 137, 218, 0.1);
    border-radius: 12px;
    color: rgba(156, 163, 175, 0.9);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    backdrop-filter: blur(8px);
}

.filter-btn i {
    font-size: 0.875rem;
    color: #7289da;
    transition: all 0.3s ease;
}

.filter-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        45deg,
        rgba(114, 137, 218, 0.1),
        rgba(67, 181, 129, 0.1)
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: inherit;
}

.filter-btn:hover {
    border-color: rgba(114, 137, 218, 0.3);
    color: #ffffff;
    transform: translateY(-1px);
}

.filter-btn:hover::before {
    opacity: 1;
}

.filter-btn:hover i {
    color: #43b581;
}

.filter-btn.active {
    background: rgba(114, 137, 218, 0.15);
    border-color: rgba(114, 137, 218, 0.3);
    color: #ffffff;
}

.filter-btn.active i {
    color: #43b581;
}

/* Search Bar */
.search-bar {
    position: relative;
    background: rgba(17, 17, 35, 0.95);
    border: 1px solid rgba(114, 137, 218, 0.1);
    border-radius: 12px;
    overflow: hidden;
}

.search-bar input {
    width: 100%;
    height: 42px;
    padding: 0 1.25rem;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
}

.search-bar input::placeholder {
    color: rgba(156, 163, 175, 0.7);
}

.search-bar:focus-within {
    border-color: rgba(114, 137, 218, 0.3);
    box-shadow: 0 4px 20px rgba(114, 137, 218, 0.15);
}

/* Responsive Design */
@media (max-width: 768px) {
    .search-section {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .filter-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Products Grid */
#productList {
    perspective: 1000px;
}

.product-card {
    position: relative;
    background: rgba(17, 17, 35, 0.95);
    border: 1px solid rgba(114, 137, 218, 0.1);
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.product-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(114, 137, 218, 0.3);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.2),
        0 15px 20px rgba(114, 137, 218, 0.1);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-image-wrapper {
    position: relative;
    overflow: hidden;
    padding-top: 56.25%; /* 16:9 aspect ratio */
}

.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover .product-image {
    transform: scale(1.1);
}

.star-rating {
    position: absolute;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(17, 17, 35, 0.85);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(8px);
    color: #FFD700;
    font-weight: 600;
    z-index: 2;
}

.out-of-stock-overlay {
    position: absolute;
    inset: 0;
    background: rgba(17, 17, 35, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ef4444;
    font-weight: 600;
    font-size: 1.25rem;
    letter-spacing: 1px;
    backdrop-filter: blur(4px);
}

.product-info {
    padding: 1.5rem;
    background: linear-gradient(
        to bottom,
        rgba(17, 17, 35, 0.95),
        rgba(23, 23, 40, 0.98)
    );
}

.product-header {
    margin-bottom: 1rem;
}

.product-category {
    color: #7289da;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.product-name {
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

.product-card:hover .product-name {
    color: #7289da;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.stock-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    background: rgba(114, 137, 218, 0.1);
    transition: all 0.3s ease;
}

.stock-badge.in-stock {
    color: #43b581;
}

.stock-badge.out-of-stock {
    color: #ef4444;
}

.product-card:hover .stock-badge {
    background: rgba(114, 137, 218, 0.15);
}

.product-price {
    text-align: right;
}

.price-label {
    color: rgba(156, 163, 175, 0.9);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.price-amount {
    color: #43b581;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

/* Stagger animation for cards */
#productList > a:nth-child(1) { animation-delay: 0.1s; }
#productList > a:nth-child(2) { animation-delay: 0.2s; }
#productList > a:nth-child(3) { animation-delay: 0.3s; }
#productList > a:nth-child(4) { animation-delay: 0.4s; }
#productList > a:nth-child(5) { animation-delay: 0.5s; }
#productList > a:nth-child(6) { animation-delay: 0.6s; }

/* Loading animation */
.loading-skeleton {
    background: linear-gradient(
        90deg,
        rgba(114, 137, 218, 0.05) 25%,
        rgba(114, 137, 218, 0.1) 50%,
        rgba(114, 137, 218, 0.05) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .product-name {
        font-size: 1.125rem;
    }
    
    .price-amount {
        font-size: 1.25rem;
    }
}

@media (max-width: 768px) {
    .search-bar {
        flex-direction: column;
        gap: 1rem;
    }
    
    .filter-btn {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .product-meta {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .stock-badge {
        width: 100%;
        justify-content: center;
    }
    
    .product-price {
        width: 100%;
        text-align: center;
    }
} 