/* ===== SHOP SPECIFIC STYLES ===== */

/* Shop Hero */
.shop-hero {
    padding-top: calc(var(--header-height) + 3rem);
    padding-bottom: 3rem;
    background: linear-gradient(135deg, #6366F1 0%, #4F46E5 100%);
    color: white;
    text-align: center;
}

.shop-hero__title {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: white;
}

.shop-hero__description {
    font-size: 1.25rem;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto;
}

/* Navigation Actions */
.nav__actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cart-btn {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    border: 2px solid var(--primary-color);
    transition: all var(--transition-normal);
    cursor: pointer;
}

.cart-btn:hover {
    background: var(--primary-color);
    color: white;
}

/* Filters Section */
.filters {
    padding: 2rem 0;
    background: var(--bg-light);
}

.filters__container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    align-items: end;
}

.filter__group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter__group label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.filter__select,
.filter__search {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color var(--transition-fast);
}

.filter__select:focus,
.filter__search:focus {
    outline: none;
    border-color: var(--primary-color);
}

.filter__search {
    width: 100%;
}

/* Products Grid */
.products__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.product__card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
}

.product__card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.product__image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    cursor: pointer;
    transition: transform var(--transition-slow);
}

.product__card:hover .product__image {
    transform: scale(1.05);
}

.product__badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 0.375rem 0.875rem;
    border-radius: 2rem;
    font-size: 0.8rem;
    font-weight: 600;
}

.product__category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary-color);
    padding: 0.375rem 0.875rem;
    border-radius: 2rem;
    font-size: 0.8rem;
    font-weight: 600;
}

.product__content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product__title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    cursor: pointer;
    transition: color var(--transition-fast);
}

.product__title:hover {
    color: var(--primary-color);
}

.product__description {
    color: var(--text-gray);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.6;
    flex: 1;
}

.product__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.product__rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.9rem;
}

.product__downloads {
    color: var(--text-light);
    font-size: 0.85rem;
}

.product__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product__price {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
}

.product__price-currency {
    font-size: 1rem;
    font-weight: 600;
}

.product__add-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.product__add-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.product__add-btn:active {
    transform: translateY(0);
}

/* Cart Modal */
.cart-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.cart-modal.show {
    display: flex;
}

.cart-modal__content {
    background: white;
    border-radius: 1rem;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cart-modal__header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-modal__header h2 {
    font-size: 1.5rem;
    margin: 0;
}

.cart-modal__close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-gray);
    cursor: pointer;
    transition: color var(--transition-fast);
    line-height: 1;
}

.cart-modal__close:hover {
    color: var(--text-dark);
}

.cart-modal__body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.cart-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-gray);
}

.cart-empty__icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.cart-empty__text {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    transition: background var(--transition-fast);
}

.cart-item:hover {
    background: var(--bg-gray);
}

.cart-item__image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 0.5rem;
    flex-shrink: 0;
}

.cart-item__details {
    flex: 1;
}

.cart-item__title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-dark);
}

.cart-item__category {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.cart-item__price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.cart-item__remove {
    background: none;
    border: none;
    color: #EF4444;
    cursor: pointer;
    font-size: 1.5rem;
    transition: transform var(--transition-fast);
}

.cart-item__remove:hover {
    transform: scale(1.2);
}

.cart-modal__footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.cart-total__amount {
    font-size: 1.75rem;
    color: var(--primary-color);
}

.cart-modal__footer .button {
    width: 100%;
    margin-bottom: 0.75rem;
    justify-content: center;
}

.cart-modal__footer .button:last-child {
    margin-bottom: 0;
}

/* Product Detail Modal */
.product-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.product-modal.show {
    display: flex;
}

.product-modal__content {
    background: white;
    border-radius: 1rem;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

.product-modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    color: var(--text-gray);
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-fast);
    z-index: 1;
}

.product-modal__close:hover {
    background: var(--primary-color);
    color: white;
    transform: rotate(90deg);
}

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

.product-detail__image {
    width: 100%;
    border-radius: 1rem;
}

.product-detail__info h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.product-detail__category {
    display: inline-block;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    padding: 0.375rem 0.875rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

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

.product-detail__description {
    color: var(--text-gray);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.product-detail__features {
    margin-bottom: 1.5rem;
}

.product-detail__features h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.product-detail__features ul {
    list-style: none;
}

.product-detail__features li {
    padding: 0.5rem 0;
    color: var(--text-gray);
}

.product-detail__features li::before {
    content: '✓';
    color: var(--secondary-color);
    font-weight: bold;
    margin-right: 0.5rem;
}

.product-detail__price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.product-detail__actions {
    display: flex;
    gap: 1rem;
}

.product-detail__actions .button {
    flex: 1;
}

/* Empty State */
.products-empty {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--text-gray);
}

.products-empty__icon {
    font-size: 5rem;
    margin-bottom: 1rem;
}

.products-empty__text {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.products-empty__description {
    font-size: 1rem;
}

/* Loading State */
.products-loading {
    text-align: center;
    padding: 4rem 1rem;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--bg-gray);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media screen and (max-width: 968px) {
    .shop-hero__title {
        font-size: 2rem;
    }

    .filters__container {
        grid-template-columns: 1fr;
    }

    .products__grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

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

    .cart-modal__content {
        max-width: 100%;
    }

    .product-modal__content {
        max-width: 100%;
    }
}

@media screen and (max-width: 576px) {
    .shop-hero__title {
        font-size: 1.75rem;
    }

    .products__grid {
        grid-template-columns: 1fr;
    }

    .product__price {
        font-size: 1.5rem;
    }

    .cart-item {
        flex-direction: column;
    }

    .cart-item__image {
        width: 100%;
        height: 200px;
    }
}

/* Additional Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}
