/* Product Cards & Grid Styles */

@keyframes buyButtonPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(0, 102, 255, 0.7);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(0, 102, 255, 0);
    }
}

@keyframes buyButtonGlow {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(0, 102, 255, 0.5);
    }
    50% {
        box-shadow: 0 4px 30px rgba(0, 102, 255, 0.8);
    }
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    width: 100%;
}

.product-card {
    background-color: #303038;
    border: 1px solid #606060;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    border-color: #f8f8f8;
    box-shadow: 0 8px 20px rgba(248, 248, 248, 0.15);
    transform: translateY(-4px);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background-color: #303030;
}

.product-content {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-badges {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.product-badge {
    display: inline-block;
    padding: 4px 8px;
    background-color: #606060;
    color: #f8f8f8;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.product-badge.featured {
    background-color: #f8f8f8;
    color: #303030;
}

.product-badge.bestseller {
    background-color: #989898;
    color: #303030;
}

.product-badge.physical {
    background-color: #606060;
}

.product-badge.digital {
    background-color: #989898;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #f8f8f8;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.product-description {
    font-size: 0.9rem;
    color: rgba(248, 248, 248, 0.7);
    margin-bottom: 0.75rem;
    flex: 1;
    line-height: 1.4;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.product-stars {
    display: flex;
    gap: 0.25rem;
    font-size: 0.9rem;
}

.product-stars .star {
    color: #f8f8f8;
}

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

.product-rating-text {
    font-size: 0.85rem;
    color: rgba(248, 248, 248, 0.6);
}

.product-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: #f8f8f8;
    margin-bottom: 1rem;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.product-price .original {
    font-size: 1rem;
    color: rgba(248, 248, 248, 0.5);
    text-decoration: line-through;
    margin-right: 0.5rem;
}

.product-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: auto;
}

.product-btn {
    flex: 1;
    padding: 10px 12px;
    border: none;
    border-radius: 6px;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.product-btn.primary {
    background-color: #0066ff;
    color: #ffffff;
    font-weight: 700;
    font-size: 1.25rem;
    padding: 14px 16px;
    width: 100%;
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.5);
    animation: buyButtonGlow 2s ease-in-out infinite;
    order: -1;
}

.product-btn.primary:hover {
    background-color: #0052cc;
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 102, 255, 0.7);
}

.product-btn.secondary {
    background-color: #303038;
    color: #f8f8f8;
    border: 1px solid #606060;
}

.product-btn.secondary:hover {
    background-color: #606060;
    border-color: #f8f8f8;
}

.product-link {
    color: #f8f8f8;
    text-decoration: none;
    font-weight: 600;
}

.product-link:hover {
    opacity: 0.9;
}

/* Product Detail Page */
.product-detail-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.product-detail-image {
    width: 100%;
    max-width: 500px;
    height: auto;
    border-radius: 8px;
    background-color: #303038;
    padding: 1rem;
}

.product-detail-image img {
    width: 100%;
    height: auto;
    display: block;
}

.product-detail-info {
    display: flex;
    flex-direction: column;
}

.product-detail-title {
    font-size: 2.2rem;
    color: #f8f8f8;
    margin-bottom: 1rem;
}

.product-detail-badges {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.product-detail-rating {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.product-detail-rating .stars {
    display: flex;
    gap: 0.25rem;
    font-size: 1.3rem;
}

.product-detail-price {
    font-size: 2rem;
    font-weight: 700;
    color: #f8f8f8;
    margin-bottom: 1.5rem;
}

.product-detail-price .original {
    font-size: 1.3rem;
    color: rgba(248, 248, 248, 0.5);
    text-decoration: line-through;
    margin-right: 1rem;
}

.product-detail-description {
    color: rgba(248, 248, 248, 0.8);
    margin-bottom: 2rem;
    line-height: 1.8;
    font-size: 1.05rem;
}

.product-detail-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.product-detail-btn {
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
}

.product-detail-btn.primary {
    background-color: #0066ff;
    color: #ffffff;
    flex: 1;
    min-width: 200px;
    font-size: 1.25rem;
    padding: 16px 32px;
    box-shadow: 0 4px 16px rgba(0, 102, 255, 0.5);
    animation: buyButtonGlow 2s ease-in-out infinite;
}

.product-detail-btn.primary:hover {
    background-color: #0052cc;
    transform: scale(1.05);
    box-shadow: 0 6px 24px rgba(0, 102, 255, 0.7);
}

.product-detail-btn.secondary {
    background-color: #303038;
    color: #f8f8f8;
    border: 1px solid #606060;
    flex: 1;
    min-width: 200px;
}

.product-detail-btn.secondary:hover {
    border-color: #f8f8f8;
    background-color: #606060;
}

.product-affiliates {
    background-color: #303038;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.product-affiliates h3 {
    color: #f8f8f8;
    margin-bottom: 1rem;
}

.product-affiliates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
}

.affiliate-btn {
    padding: 14px 20px;
    background-color: #0066ff;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1.05rem;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s ease;
    display: block;
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.5);
}

.affiliate-btn:hover {
    background-color: #0052cc;
    box-shadow: 0 6px 16px rgba(0, 102, 255, 0.7);
    transform: translateY(-2px);
}

/* Related Products */
.related-products {
    margin-top: 3rem;
}

.related-products h2 {
    margin-bottom: 2rem;
    text-align: center;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }

    .product-card {
        border-radius: 6px;
    }

    .product-image {
        height: 150px;
    }

    .product-content {
        padding: 0.75rem;
    }

    .product-title {
        font-size: 0.95rem;
    }

    .product-description {
        font-size: 0.8rem;
    }

    .product-price {
        font-size: 1.1rem;
    }

    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .product-detail-title {
        font-size: 1.6rem;
    }

    .product-detail-price {
        font-size: 1.5rem;
    }

    .product-detail-actions {
        flex-direction: column;
    }

    .product-detail-btn {
        width: 100%;
        min-width: auto;
    }

    .product-affiliates-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

    .product-image {
        height: 120px;
    }

    .product-content {
        padding: 0.5rem;
    }

    .product-title {
        font-size: 0.85rem;
    }

    .product-description {
        font-size: 0.75rem;
        margin-bottom: 0.5rem;
    }

    .product-price {
        font-size: 1rem;
    }

    .product-btn {
        padding: 12px 16px;
        font-size: 0.95rem;
    }

    .product-btn.primary {
        padding: 16px 20px;
        font-size: 1rem;
    }

    .product-detail-wrapper {
        padding: 1rem;
    }

    .product-detail-title {
        font-size: 1.4rem;
    }

    .product-detail-price {
        font-size: 1.3rem;
    }

    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
