/**
 * Shopping Page Styles
 */

:root {
    --teko-primary: #ff6600;
}

.shopping-section {
    margin-bottom: 3rem;
}

.shopping-section__title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--bs-body-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.shopping-section__title i {
    color: #ff6600;
}

.shopping-section__subtitle {
    font-size: 0.9rem;
    color: var(--bs-secondary);
    margin-top: -1rem;
    margin-bottom: 1.5rem;
}

/* Category Filter */
.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--bs-secondary-bg);
    border-radius: 0.5rem;
}

.category-filter__item {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    text-decoration: none;
    color: var(--bs-body-color);
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    transition: all 0.2s ease;
    font-size: 0.875rem;
    font-weight: 500;
}

.category-filter__item:hover {
    border-color: #ff6600;
    color: #ff6600;
}

.category-filter__item.active {
    background: #ff6600;
    border-color: #ff6600;
    color: white;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}

/* Product Card */
.product-card {
    position: relative;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
    border-color: #ff6600;
}

.product-card--featured {
    border-color: #ff6600;
    border-width: 2px;
}

.product-card__badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 10;
    background: #ff6600;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.product-card--featured .product-card__badge {
    background: linear-gradient(135deg, #ff6600, #e74c3c);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.75rem;
}

.product-card__discount {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 10;
    background: #27ae60;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 700;
}

.product-card__sponsor {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 10;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.7rem;
}

.product-card__network {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 10;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: white;
}

.product-card__network--hotmart {
    background: #ff6b35;
}

.product-card__network--monetizze {
    background: #2ecc71;
}

.product-card__network--amazon {
    background: #ff9900;
    color: #111;
}

.product-card__badge-sale {
    position: absolute;
    bottom: 0.75rem;
    left: 0.75rem;
    z-index: 10;
    background: #e74c3c;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.7rem;
    font-weight: 600;
}

.product-card__link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-card__image-wrapper {
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--bs-secondary-bg);
    position: relative;
}

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

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

.product-card__content {
    padding: 1rem;
}

.product-card__title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--bs-body-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
}

.product-card__instructor {
    font-size: 0.75rem;
    color: var(--bs-secondary);
    margin-bottom: 0.5rem;
}

.product-card__rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    color: #ff6600;
}

.product-card__rating i {
    width: 12px;
}

.product-card__reviews {
    color: var(--bs-secondary);
    font-size: 0.75rem;
    margin-left: 0.25rem;
}

.product-card__students {
    color: var(--bs-secondary);
    font-size: 0.75rem;
    margin-left: 0.5rem;
    background: var(--bs-secondary-bg);
    padding: 0.1rem 0.4rem;
    border-radius: 0.25rem;
}

.product-card__price-wrapper {
    margin-bottom: 0.75rem;
}

.product-card__price-original {
    display: block;
    font-size: 0.8rem;
    color: var(--bs-secondary);
    text-decoration: line-through;
    margin-bottom: 0.25rem;
}

.product-card__price-original--subtle {
    font-size: 0.8rem;
    color: var(--bs-secondary);
    opacity: 0.7;
    text-decoration: none;
    font-weight: 500;
    text-align: center;
    display: block;
}

.product-card__avista-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    background: var(--bs-secondary-bg);
    padding: 0.15rem 0.35rem;
    border-radius: 0.25rem;
    margin-right: 0.35rem;
    opacity: 0.7;
    display: inline-block;
    vertical-align: middle;
}

.product-card__price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #27ae60;
}

.product-card__installments {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
    padding: 0.6rem 0.8rem;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    border-radius: 0.5rem;
    color: white;
    font-weight: 600;
}

.product-card__installments-text {
    font-size: 0.85rem;
    opacity: 0.95;
}

.product-card__installments-price {
    font-size: 1.2rem;
    font-weight: 800;
    color: white;
}

.product-card__installments-sufix {
    font-size: 0.75rem;
    opacity: 0.85;
}

.product-card__btn {
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, #ff6600, #e74c3c);
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.product-card__btn:hover {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    transform: scale(1.02);
}

/* Sponsored Section */
.sponsored-section {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 2rem;
    border-radius: 1rem;
    margin-bottom: 2rem;
    border: 2px dashed #ff6600;
}

.sponsored-section__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.sponsored-section__title {
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sponsored-cta {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 0.75rem;
    border: 2px dashed var(--bs-border-color);
}

.sponsored-cta__title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.sponsored-cta__price {
    color: #27ae60;
    font-weight: 700;
    margin-bottom: 1rem;
}

.sponsored-cta__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: #ff6600;
    color: white;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s ease;
}

.sponsored-cta__btn:hover {
    background: #e67e22;
    color: white;
}

/* Digital Products Section */
.digital-products-section {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    padding: 2rem;
    border-radius: 1rem;
    margin-bottom: 2rem;
    color: white;
}

.digital-products-section .shopping-section__title {
    color: white;
}

.digital-products-section .shopping-section__title i {
    color: #ff6600;
}

.digital-products-section .category-filter {
    background: rgba(255, 255, 255, 0.1);
}

.digital-products-section .category-filter__item {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: rgba(255, 255, 255, 0.2);
}

.digital-products-section .category-filter__item:hover,
.digital-products-section .category-filter__item.active {
    background: #ff6600;
    border-color: #ff6600;
    color: white;
}

/* Network Info Bar */
.network-info-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--bs-secondary-bg);
    border-radius: 0.5rem;
}

.network-info-card {
    flex: 1;
    min-width: 150px;
    padding: 1rem;
    background: var(--bs-body-bg);
    border-radius: 0.5rem;
    border: 1px solid var(--bs-border-color);
    text-align: center;
}

.network-info-card__name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.network-info-card__commission {
    font-size: 0.875rem;
    color: #27ae60;
    margin-bottom: 0.25rem;
}

.network-info-card__count {
    font-size: 0.75rem;
    color: var(--bs-secondary);
}

/* Featured Products Carousel */
.featured-products {
    margin-bottom: 3rem;
}

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

/* Horizontal Variant */
.product-card--horizontal {
    display: flex;
    flex-direction: row;
}

.product-card--horizontal .product-card__image-wrapper {
    width: 120px;
    flex-shrink: 0;
    aspect-ratio: 1;
}

.product-card--horizontal .product-card__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Responsive */
@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

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

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

    .sponsored-section__header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .category-filter {
        justify-content: center;
    }

    .network-info-bar {
        flex-direction: column;
    }
}

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

    .product-card--horizontal {
        flex-direction: column;
    }

    .product-card--horizontal .product-card__image-wrapper {
        width: 100%;
    }
}

/* Loading State */
.product-card--loading {
    opacity: 0.6;
    pointer-events: none;
}

.product-card--loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}
