/* Products Page Styles */
.products-index {
    background-color: #f8f9fa;
    min-height: 100vh;
}

.products-index-title {
    text-align: center;
    font-size: 2.5rem;
    margin: 2rem 0;
    color: #343a40;
    font-weight: 700;
}

/* Filter Styles */
.products-filter-container {
    max-width: 600px;
    margin: 1.5rem auto;
    padding: 0 1rem;
}

.filter-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.category-filter-select {
    padding: 0.75rem 1.25rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: white;
    font-size: 1.1rem;
    font-family: inherit;
    color: #495057;
    text-align: right;
    direction: rtl;
    min-width: 200px;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.category-filter-select:focus {
    outline: none;
    border-color: #ff6f61;
    box-shadow: 0 0 0 3px rgba(255, 111, 97, 0.1);
}

/* Search Styles */
.products-search-container {
    max-width: 600px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 100px;
    transition: border-color 0.3s ease;
}

.search-wrapper:focus-within {
    border-color: #ff6f61;
    box-shadow: 0 0 0 3px rgba(255, 111, 97, 0.1);
}

.products-search-input {
    flex: 1;
    padding: 1rem 1.25rem;
    border: none;
    font-family: inherit;
    outline: none;
    font-size: 1.5rem;
    text-align: right;
    direction: rtl;
    background: transparent;
    color: #495057;
}

.products-search-input::placeholder {
    color: #6c757d;
    opacity: 1;
}

.clear-search-btn {
    background: none;
    border: none;
    color: #6c757d;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0.6rem;
    margin-left: 0.6rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: none;
}

.clear-search-btn:hover {
    background-color: #f8f9fa;
    color: #495057;
}

.no-results-message {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
    font-size: 1.2rem;
    background: white;
    border-radius: 8px;
    margin-top: 1rem;
}

/* Products Grid Styles */
.products-grid-container {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 1rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.product-image-container {
    position: relative;
    width: 100%;
    height: 350px;
    overflow: hidden;
}

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

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

.discount-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #ff6f61, #ff8660);
    color: white;
    padding: 0.5rem 0.8rem;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.product-info {
    padding: 1.5rem;
}

.product-title {
    margin: 0 0 0.75rem 0;
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.4;
}

.product-title a {
    text-decoration: none;
    color: #343a40;
    transition: color 0.2s ease;
}

.product-title a:hover {
    color: #ff6f61;
}

.product-description {
    color: #6c757d;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.stars {
    display: flex;
    gap: 2px;
}

.star {
    color: #ddd;
    font-size: 1.1rem;
}

.star.filled {
    color: #ffc107;
}

.rating-text {
    font-size: 0.9rem;
    color: #6c757d;
}

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

.current-price {
    font-size: 1.4rem;
    font-weight: bold;
    color: #28a745;
}

.old-price {
    font-size: 1.1rem;
    color: #6c757d;
    text-decoration: line-through;
}

.product-features {
    margin: 1rem 0;
    padding: 0;
    list-style: none;
}

.product-features li {
    color: #28a745;
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
    padding-right: 0.5rem;
}

/* Product actions use existing styles from main.css */

.no-products-message {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.no-products-message h3 {
    color: #343a40;
    margin-bottom: 1rem;
}

.no-products-message p {
    color: #6c757d;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .products-index-title {
        font-size: 2rem;
        margin: 1.5rem 0;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
        padding: 1.5rem 0;
    }

    .product-image-container {
        height: 200px;
    }

    .product-info {
        padding: 1.25rem;
    }

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

    /* Mobile styles for product actions inherited from main.css */

    .category-filter-select {
        width: 100%;
        min-width: unset;
    }
}

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

    .product-image-container {
        height: 180px;
    }

    .products-index-title {
        font-size: 1.8rem;
        padding: 0 1rem;
    }
}
