/* ===== صفحه محصولات - Products Page ===== */

.products-page {
    padding-top: 100px;
    padding-bottom: 60px;
    min-height: 100vh;
}

/* Breadcrumb */
.ht-breadcrumb {
    padding: 15px 0;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.ht-breadcrumb a {
    color: var(--primary-color);
    transition: var(--transition);
}

.ht-breadcrumb a:hover {
    color: var(--primary-dark);
}

.ht-breadcrumb span {
    color: var(--text-light);
    margin: 0 8px;
}

/* Page Header */
.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.products-header h1 {
    font-size: 2rem;
    color: var(--secondary-color);
}

.products-header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.clear-filters-btn {
    padding: 8px 16px;
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 5px;
}

.clear-filters-btn:hover {
    background: var(--primary-color);
    color: white;
}

.filter-toggle-btn {
    padding: 10px 20px;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.filter-toggle-btn:hover {
    background: var(--primary-color);
}

/* Filter Panel */
.filter-panel {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    display: none;
}

.filter-panel.active {
    display: block;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
}

.filter-group h3 {
    font-size: 1rem;
    color: var(--secondary-color);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-color);
}

.filter-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-item input[type="checkbox"],
.filter-item input[type="radio"] {
    accent-color: var(--primary-color);
    width: 18px;
    height: 18px;
}

.filter-item label {
    cursor: pointer;
    font-size: 0.9rem;
}

/* Price Filter */
.price-inputs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    align-items: center;
}

.price-inputs input {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid #eee;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    transition: var(--transition);
}

.price-inputs input:focus {
    border-color: var(--primary-color);
    outline: none;
}

.apply-price-btn {
    width: 100%;
    padding: 10px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    transition: var(--transition);
}

.apply-price-btn:hover {
    background: var(--primary-dark);
}

/* Product Grid - شبکه‌ای (گرید) با استفاده از تمام عرض */
.products-page .container {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

.products-page .menu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    width: 100%;
    margin-top: 0;
}

.products-page .food-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100%;
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.products-page .food-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.products-page .food-card > a:first-child {
    display: block;
    flex-shrink: 0;
}

.products-page .food-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    background: #eee;
}

.products-page .food-card-img-link {
    display: block;
    flex-shrink: 0;
}

.products-page .food-info {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
}

.products-page .food-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.4;
    flex: 1;
    min-width: 0;
}

.products-page .food-title a {
    color: var(--text-dark);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.products-page .food-title a:hover {
    color: var(--primary-color);
}

.products-page .food-category {
    font-size: 0.85rem;
    color: var(--secondary-color);
    margin: 0;
    line-height: 1.4;
}

/* قیمت و دکمه‌ها در پایین کارت */
.products-page .food-footer {
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.products-page .food-price-block {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.products-page .food-price-original {
    font-size: 0.8rem;
    color: #999;
    text-decoration: line-through;
    white-space: nowrap;
}

.products-page .food-price {
    color: var(--primary-color);
    font-weight: 800;
    font-size: 1.1rem;
    white-space: nowrap;
}

.products-page .food-price small {
    font-size: 0.75em;
    font-weight: 600;
}

.products-page .food-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.products-page .food-cart-form {
    margin: 0;
    line-height: 0;
}

.products-page .food-btn-cart,
.products-page .food-btn-wishlist {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--transition);
}

.products-page .food-btn-cart {
    background: var(--primary-color);
    color: white;
}

.products-page .food-btn-cart:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.products-page .food-btn-wishlist {
    background: #f0f0f0;
    color: #666;
}

.products-page .food-btn-wishlist:hover {
    background: #fee2e2;
    color: #dc2626;
}

/* فرم یکسان کارت محصول در همه صفحات (صفحه اصلی، محصولات مشابه، علاقه‌مندی‌ها) */
.menu-grid .food-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100%;
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.menu-grid .food-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.menu-grid .food-card .food-card-img-link,
.menu-grid .food-card > a:first-child {
    display: block;
    flex-shrink: 0;
}

.menu-grid .food-card .food-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    background: #eee;
}

.menu-grid .food-card .food-info {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.menu-grid .food-card .food-category {
    font-size: 0.75rem;
    color: var(--secondary-color);
    margin: 0;
    line-height: 1.4;
}

.menu-grid .food-card .food-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.4;
    flex: 1;
    min-width: 0;
}

.menu-grid .food-card .food-title a {
    color: var(--text-dark);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.menu-grid .food-card .food-title a:hover {
    color: var(--primary-color);
}

.menu-grid .food-card .food-footer {
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.menu-grid .food-card .food-price-block {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.menu-grid .food-card .food-price-original {
    font-size: 0.8rem;
    color: #999;
    text-decoration: line-through;
    white-space: nowrap;
}

.menu-grid .food-card .food-price {
    color: var(--primary-color);
    font-weight: 800;
    font-size: 1.1rem;
    white-space: nowrap;
}

.menu-grid .food-card .food-price small {
    font-size: 0.75em;
    font-weight: 600;
}

.menu-grid .food-card .food-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.menu-grid .food-card .food-cart-form {
    margin: 0;
    line-height: 0;
}

.menu-grid .food-card .food-btn-cart,
.menu-grid .food-card .food-btn-wishlist {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--transition);
}

.menu-grid .food-card .food-btn-cart {
    background: var(--primary-color);
    color: white;
}

.menu-grid .food-card .food-btn-cart:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

.menu-grid .food-card .food-btn-wishlist {
    background: #f0f0f0;
    color: #666;
}

.menu-grid .food-card .food-btn-wishlist:hover {
    background: #fee2e2;
    color: #dc2626;
}

.menu-grid .food-card .food-btn-remove {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: #f0f0f0;
    color: #666;
    transition: var(--transition);
}

.menu-grid .food-card .food-btn-remove:hover {
    background: #fee2e2;
    color: #dc2626;
}

/* آیکون قلب پر با SVG (مستقل از فونت) */
.menu-grid .food-card .food-btn-remove .icon-heart-fill {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: block;
}

/* Pagination */
.ht-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.ht-pagination a {
    padding: 10px 16px;
    border: 2px solid #eee;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
    min-width: 44px;
    text-align: center;
}

.ht-pagination a:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.ht-pagination a.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Empty State */
.products-empty {
    text-align: center;
    padding: 60px 20px;
}

.products-empty i {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 20px;
}

.products-empty p {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 20px;
}

/* Wishlist page */
.wishlist-page .products-header {
    margin-bottom: 24px;
}

.wishlist-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 0.95rem;
}

.wishlist-alert i {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.wishlist-alert--success {
    background: #ecfdf5;
    border: 1px solid #10b981;
    color: #065f46;
}

.wishlist-alert--success i {
    color: #10b981;
}

.wishlist-alert--error {
    background: #fef2f2;
    border: 1px solid #ef4444;
    color: #991b1b;
}

.wishlist-alert--error i {
    color: #ef4444;
}

.wishlist-empty i {
    color: var(--primary-color);
    opacity: 0.8;
}

.wishlist-empty-hint {
    font-size: 1rem !important;
    margin-bottom: 24px !important;
}

/* Sort Dropdown */
.sort-select {
    padding: 8px 16px;
    border: 2px solid #eee;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
    transition: var(--transition);
}

.sort-select:focus {
    border-color: var(--primary-color);
    outline: none;
}

/* Responsive - گرید شبکه‌ای در سایزهای مختلف */
@media (max-width: 1200px) {
    .products-page .menu-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .products-header h1 {
        font-size: 1.5rem;
    }
    .filter-grid {
        grid-template-columns: 1fr;
    }
    .products-page .menu-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    .products-page .food-img {
        height: 180px;
    }
    .products-page .food-info {
        padding: 1rem;
    }
    .products-page .food-title {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .products-page .menu-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    .products-page .food-img {
        height: 220px;
    }
}
