/* Premium Bento Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 280px;
    gap: 16px;
    padding: 24px 40px 80px 40px;
}

.product-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: #000;
    transition: all 0.3s ease;
    cursor: pointer;
}

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

.product-preview {
    position: relative;
    width: 100%;
    height: 100%;
}

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

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

.product-crown {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255, 215, 0, 0.95);
    color: #000;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    z-index: 3;
}

.product-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(239, 68, 68, 0.95);
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 3;
}

.product-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.product-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 15;
}

.product-card:hover .product-info {
    opacity: 1;
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 12px;
}

.product-details h3 {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: white;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-details p {
    font-size: 11px;
    color: rgba(255,255,255,0.7);
    margin: 0;
}

.product-price {
    text-align: right;
    flex-shrink: 0;
}

.product-price .price {
    font-size: 14px;
    font-weight: 700;
    color: #10b981;
    background: #dadada;
    padding: 4px 10px;
    border-radius: 6px;
    display: block;
}

.product-price .old-price {
    font-size: 10px;
    color: #9ca3af;
    text-decoration: line-through;
    background: #dadada;
    padding: 2px 6px;
    border-radius: 4px;
    display: block;
}

body.dark-theme .product-price .price {
    background: #2a2a2a;
    color: #10b981;
}

body.dark-theme .product-price .old-price {
    color: rgba(255,255,255,0.5);
    background: #2a2a2a;
}

.btn-preview, .btn-add-cart, .btn-download {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-preview {
    background: rgba(255,255,255,0.95);
    color: #111827;
}

.btn-preview:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.btn-add-cart, .btn-download {
    background: rgba(16, 185, 129, 0.95);
    color: white;
}

.btn-add-cart:hover, .btn-download:hover {
    background: #10b981;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(16, 185, 129, 0.4);
}

/* Grid 3 */
.products-grid.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

/* Responsive */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-auto-rows: 260px;
    }
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 240px;
        gap: 12px;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}
