/* Home Page - Popular Games & Categories Grid - Uses same styles as market game-cards-grid from game-cards-rtema.css */
/* Mobile Optimized Version - v2.0 */

/* Home Page - Product Cards - Premium Design */
.home-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

@media (max-width: 1400px) {
    .home-products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (max-width: 992px) {
    .home-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }
}

@media (max-width: 768px) {
    .home-products-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 0 16px;
    }
}

@media (max-width: 576px) {
    .home-products-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 12px;
    }
}

.home-product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-decoration: none;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

@media (max-width: 768px) {
    .home-product-card {
        border-radius: 18px;
        box-shadow: 
            0 6px 24px rgba(0, 0, 0, 0.25),
            0 0 0 1px rgba(255, 255, 255, 0.08) inset;
    }
    
    .home-product-card:hover {
        transform: translateY(-4px);
    }
}

.home-product-card:hover {
    transform: translateY(-8px);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(99, 102, 241, 0.3) inset,
        0 0 80px rgba(99, 102, 241, 0.2);
}

.home-product-card__image {
    position: relative;
    width: 100%;
    height: 280px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
}

@media (max-width: 768px) {
    .home-product-card__image {
        height: 240px;
    }
}

@media (max-width: 576px) {
    .home-product-card__image {
        height: 220px;
    }
}

.home-product-card__image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.home-product-card:hover .home-product-card__image img {
    transform: scale(1.1);
}

.home-product-card__badge {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.95), rgba(255, 180, 0, 0.95));
    color: #1a1a1a;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-radius: 20px;
    box-shadow: 0 4px 16px rgba(255, 215, 0, 0.4);
    z-index: 3;
    backdrop-filter: blur(10px);
    animation: pulse-badge 2s ease-in-out infinite;
}

@media (max-width: 768px) {
    .home-product-card__badge {
        top: 12px;
        left: 12px;
        padding: 7px 14px;
        font-size: 11px;
    }
}

@keyframes pulse-badge {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.home-product-card__badge--new {
    background: linear-gradient(135deg, #10b981, #34d399, #6ee7b7);
    color: white;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.5);
}

.home-product-card__badge--best {
    background: linear-gradient(135deg, #f59e0b, #fbbf24, #fcd34d);
    color: #1a1a1a;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.5);
}

.home-product-card__content {
    padding: 20px 20px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
    min-height: 200px;
}

@media (max-width: 768px) {
    .home-product-card__content {
        padding: 18px;
        gap: 10px;
        min-height: auto;
    }
}

.home-product-card__category {
    font-size: 12px;
    font-weight: 600;
    color: rgba(168, 162, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.home-product-card__category:hover {
    color: #c4b5fd;
}

.home-product-card__title {
    font-size: 15px;
    font-weight: 700;
    color: #f1f5f9;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    text-decoration: none;
    transition: all 0.3s ease;
    min-height: 42px;
}

.home-product-card__title a {
    color: inherit;
    text-decoration: none;
}

.home-product-card__description {
    font-size: 13px;
    color: rgba(226, 232, 240, 0.75);
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin: 4px 0;
    min-height: 40px;
}

@media (max-width: 768px) {
    .home-product-card__title {
        font-size: 16px;
        min-height: 44px;
        font-weight: 600;
    }
}

.home-product-card:hover .home-product-card__title {
    color: #c4b5fd;
}

.home-product-card__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .home-product-card__meta {
        gap: 10px;
        margin-top: 12px;
    }
}

.home-product-card__meta span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    background: rgba(91, 75, 255, 0.12);
    border: 1px solid rgba(91, 75, 255, 0.25);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    color: rgba(226, 232, 240, 0.95);
    transition: all 0.3s ease;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .home-product-card__meta span {
        padding: 10px 16px;
        font-size: 14px;
        border-width: 1.5px;
        gap: 8px;
        box-shadow: 0 2px 8px rgba(91, 75, 255, 0.15);
    }
}

@media (max-width: 576px) {
    .home-product-card__meta span {
        padding: 9px 14px;
        font-size: 13px;
    }
}

.home-product-card__meta span:hover {
    background: rgba(91, 75, 255, 0.2);
    border-color: rgba(91, 75, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(91, 75, 255, 0.3);
}

.home-product-card__meta span i {
    font-size: 13px;
    opacity: 0.9;
}

@media (max-width: 768px) {
    .home-product-card__meta span i {
        font-size: 14px;
    }
}

[data-theme="light"] .home-product-card__meta span {
    background: rgba(91, 75, 255, 0.1);
    border-color: rgba(91, 75, 255, 0.2);
    color: #1e293b;
}

@media (max-width: 768px) {
    [data-theme="light"] .home-product-card__meta span {
        background: rgba(91, 75, 255, 0.12);
        border-color: rgba(91, 75, 255, 0.25);
    }
}

[data-theme="light"] .home-product-card__meta span:hover {
    background: rgba(91, 75, 255, 0.18);
    border-color: rgba(91, 75, 255, 0.35);
}

.home-product-card__footer {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 18px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: auto;
}

@media (max-width: 768px) {
    .home-product-card__footer {
        padding: 14px 16px;
    }
}

[data-theme="light"] .home-product-card__footer {
    background: rgba(0, 0, 0, 0.03);
    border-top-color: rgba(0, 0, 0, 0.05);
}

.home-product-card__price {
    font-size: 28px;
    font-weight: 900;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.8px;
    line-height: 1.1;
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .home-product-card__price {
        font-size: 24px;
        letter-spacing: -0.6px;
    }
}

@media (max-width: 576px) {
    .home-product-card__price {
        font-size: 22px;
    }
}

.home-product-card:hover .home-product-card__price {
    background: linear-gradient(135deg, #fcd34d, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transform: scale(1.05);
}

.home-product-card__actions {
    padding: 0 16px 16px;
}

.home-product-card__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    font-size: 13px;
    font-weight: 700;
    border-radius: 10px;
    text-decoration: none;
    letter-spacing: 0.3px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
    position: relative;
    overflow: hidden;
    border: none;
}

.home-product-card__btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.home-product-card__btn:hover::before {
    opacity: 1;
}

.home-product-card__btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.6);
}

.home-product-card__btn:active {
    transform: translateY(0);
}

.home-product-card__btn i {
    font-size: 14px;
    transition: transform 0.3s ease;
    position: relative;
    z-index: 1;
}

.home-product-card__btn span {
    position: relative;
    z-index: 1;
}

.home-product-card__btn:hover i {
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .home-product-card__btn {
        padding: 13px 20px;
        font-size: 14px;
        border-radius: 12px;
    }
    
    .home-product-card__btn i {
        font-size: 15px;
    }
    
    .home-product-card__actions {
        padding: 0 18px 18px;
    }
}

@media (max-width: 576px) {
    .home-product-card__image {
        height: 180px;
    }
}

/* Mobile Spacing */
@media (max-width: 768px) {
    .container-wide {
        padding-left: 16px;
        padding-right: 16px;
    }
}

@media (max-width: 576px) {
    .container-wide {
        padding-left: 12px;
        padding-right: 12px;
    }
    
    .section-padding {
        padding: 40px 0;
    }
}

/* Dark Mode Support */
[data-theme="dark"] .home-product-card {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.98));
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .home-product-card:hover {
    border-color: rgba(99, 102, 241, 0.6);
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.4), 0 0 0 1px rgba(99, 102, 241, 0.5);
}

[data-theme="dark"] .home-product-card__title {
    color: #e2e8f0;
}

/* Light Theme Support - Premium Design */
[data-theme="light"] .home-product-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(0, 0, 0, 0.05) inset;
}

[data-theme="light"] .home-product-card:hover {
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(99, 102, 241, 0.2) inset,
        0 0 80px rgba(99, 102, 241, 0.15);
}

[data-theme="light"] .home-product-card__content {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.98) 100%);
}

[data-theme="light"] .home-product-card__category {
    color: #6366f1;
}

[data-theme="light"] .home-product-card__category:hover {
    color: #4f46e5;
}

[data-theme="light"] .home-product-card__title {
    color: #1e293b;
}

[data-theme="light"] .home-product-card__title a {
    color: #1e293b;
}

[data-theme="light"] .home-product-card:hover .home-product-card__title {
    color: #6366f1;
}

[data-theme="light"] .home-product-card__description {
    color: rgba(30, 41, 59, 0.7);
}

[data-theme="light"] .home-product-card__price {
    background: linear-gradient(135deg, #f59e0b, #dc2626);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="light"] .home-product-card:hover .home-product-card__price {
    background: linear-gradient(135deg, #f97316, #ef4444);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="light"] .home-product-card__badge {
    box-shadow: 0 4px 16px rgba(255, 215, 0, 0.3);
}

[data-theme="light"] .home-product-card__badge--new {
    background: linear-gradient(135deg, #10b981, #34d399);
    color: white;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

[data-theme="light"] .home-product-card__badge--best {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    color: #1a1a1a;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3);
}

[data-theme="light"] .home-product-card__btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

[data-theme="light"] .home-product-card__btn::before {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

[data-theme="light"] .home-product-card__btn:hover {
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.5);
}

