/* ================================================
   AllWayShalom - Shop Page Styles
   ================================================ */

.shop-page {
    padding: 40px 0;
    min-height: calc(100vh - var(--header-height));
}

.shop-container {
    display: flex;
    gap: 32px;
}

/* ==================== SIDEBAR EXTENSIONS ==================== */
.has-children .subcategory-list {
    display: none;
    padding-left: 16px;
    margin-top: 8px;
}

.has-children.expanded .subcategory-list {
    display: block;
}

.subcategory-list li a {
    display: block;
    padding: 8px 12px;
    font-size: 0.875rem;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.subcategory-list li a:hover {
    background: var(--bg-lightbeige);
    color: var(--brand-dark);
}

/* Price Filter */
.price-filter {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.price-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

.price-inputs .form-input {
    flex: 1;
    padding: 10px 12px;
}

.price-inputs span {
    color: var(--text-light);
}

/* Rating Filter */
.rating-filter {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rating-filter .form-checkbox {
    padding: 8px;
    border-radius: var(--radius-sm);
}

.rating-filter .form-checkbox:hover {
    background: var(--bg-beige);
}

.rating-filter .form-checkbox .stars {
    margin: 0 8px;
}

/* ==================== SHOP CONTENT ==================== */
.shop-content {
    flex: 1;
    min-width: 0;
}

.shop-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.page-title {
    font-size: 2rem;
    margin-bottom: 4px;
}

.results-count {
    color: var(--text-muted);
    font-size: 0.9375rem;
}

.shop-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.search-box {
    position: relative;
}

.search-box .form-input {
    width: 280px;
    padding-right: 44px;
}

.search-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    transition: color var(--transition);
}

.search-btn:hover {
    color: var(--brand-dark);
}

.sort-select {
    min-width: 200px;
}

/* ==================== PRODUCTS GRID ==================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

/* Product Card */
.product-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.product-image {
    position: relative;
    height: 180px;
    overflow: hidden;
    background: var(--bg-lightbeige);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-image .badge {
    position: absolute;
    top: 12px;
    left: 12px;
}

.wishlist-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    background: var(--bg-white);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    box-shadow: var(--shadow-sm);
    opacity: 0;
    transform: scale(0.8);
    transition: all var(--transition);
}

.product-card:hover .wishlist-btn {
    opacity: 1;
    transform: scale(1);
}

.wishlist-btn:hover {
    color: var(--error);
}

.wishlist-btn.active {
    color: var(--error);
}

.wishlist-btn.active svg {
    fill: var(--error);
}

.product-body {
    padding: 20px;
    flex: 1;
}

.product-category {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-green);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.product-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-title a {
    color: var(--brand-dark);
}

.product-title a:hover {
    color: var(--accent-green);
}

.product-seller {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 6px;
}

.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-top: 1px solid var(--border-light);
    margin-top: auto;
}

.product-price {
    display: flex;
    flex-direction: column;
}

.price-old {
    font-size: 0.8125rem;
    color: var(--text-light);
    text-decoration: line-through;
}

.price-current {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--brand-dark);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .shop-container {
        flex-direction: column;
    }

    .sidebar {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
        width: 100%;
    }

    .sidebar-section {
        margin-bottom: 0;
    }
}

@media (max-width: 768px) {
    .sidebar {
        grid-template-columns: 1fr;
    }

    .shop-header {
        flex-direction: column;
        align-items: stretch;
    }

    .shop-header-right {
        flex-direction: column;
    }

    .search-box .form-input {
        width: 100%;
    }

    .sort-select {
        width: 100%;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .product-body {
        padding: 16px;
    }

    .product-footer {
        padding: 12px 16px;
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .product-footer .btn {
        width: 100%;
    }
}

@media (max-width: 544px) {
    .products-grid {
        grid-template-columns: 1fr;
    }

    .page-title {
        font-size: 1.5rem;
    }
}

/* ==================== LOADING & EMPTY STATES ==================== */
.loading-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: var(--text-muted);
}

.spinner-large {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border-color);
    border-top-color: var(--accent-green);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.no-products {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
}

.no-products svg {
    color: var(--text-light);
    margin-bottom: 24px;
}

.no-products h3 {
    font-size: 1.25rem;
    color: var(--brand-dark);
    margin-bottom: 8px;
}

.no-products p {
    color: var(--text-muted);
}
