/* Filters Section */
.filters-section {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: var(--gray-50);
    border-radius: 12px;
    border: 1px solid var(--gray-200);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    min-width: 150px;
}

.filter-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray-900);
}

.filter-select,
.filter-input {
    padding: 0.6rem;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: var(--navy);
}

.clear-btn {
    padding: 0.6rem 1.2rem;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: flex-end;
}

.clear-btn:hover {
    background: var(--gray-50);
}

/* Sort Section */
.sort-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.sort-section label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gray-900);
}

.sort-select {
    padding: 0.6rem;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
}

.sort-btn {
    width: 40px;
    height: 40px;
    background: var(--navy);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sort-btn:hover {
    background: var(--navy-dark);
}

.sort-btn.desc {
    transform: rotate(180deg);
}

/* Wine Cards (Mobile) */
.wines-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.wine-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 1rem;
    transition: all 0.3s ease;
}

.wine-card:hover {
    border-color: var(--navy);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.1);
}

.wine-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.wine-card-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 0.25rem;
}

.wine-card-producer {
    font-size: 0.9rem;
    color: var(--gray-600);
}

.wine-card-price {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--navy);
}

.wine-card-meta {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.wine-card-tag {
    padding: 0.25rem 0.75rem;
    background: var(--gray-100);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--gray-900);
}

.wine-card-description {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--gray-900);
    margin-bottom: 0.75rem;
}

.wine-card-store {
    font-size: 0.85rem;
    color: var(--gray-600);
}

.wine-card-store::before {
    content: "🏪 ";
}

/* Wine Table (Desktop) */
.wines-table-wrapper {
    display: none;
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--gray-200);
    margin-bottom: 2rem;
}

.wines-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
}

.wines-table thead {
    background: var(--gray-50);
}

.wines-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--navy);
    font-size: 0.9rem;
    border-bottom: 2px solid var(--gray-200);
    cursor: pointer;
    user-select: none;
}

.wines-table th:hover {
    background: var(--gray-100);
}

.wines-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.9rem;
}

.wines-table tr:last-child td {
    border-bottom: none;
}

.wines-table tr:hover {
    background: var(--gray-50);
}

.wine-type-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--gray-100);
    border-radius: 50px;
    font-size: 0.85rem;
}

.wine-price {
    font-weight: 600;
    color: var(--navy);
}

/* Empty State */
.empty-state {
    padding: 3rem;
    text-align: center;
    color: var(--gray-600);
    background: var(--gray-50);
    border-radius: 12px;
    border: 1px solid var(--gray-200);
}

/* Toggle Buttons */
.toggle-section {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.toggle-btn {
    flex: 1;
    min-width: 200px;
    padding: 1rem 1.5rem;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    color: var(--gray-700);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toggle-btn:hover {
    background: var(--gray-50);
    border-color: var(--navy);
}

.toggle-btn.active {
    background: var(--navy);
    border-color: var(--navy);
    color: var(--white);
}

/* Star styling for wine-food pairings */
.match-item .stars {
    color: #fbbf24;
    font-size: 0.85rem;
    margin-left: 0.25rem;
}

.match-stars-1 {
    color: var(--gray-700);
    font-weight: 400;
}

.match-stars-2 {
    color: var(--navy);
    font-weight: 600;
}

.match-stars-3 {
    color: var(--navy);
    font-weight: 700;
}

/* Responsive */
@media (min-width: 1024px) {
    .wines-cards {
        display: none;
    }
    
    .wines-table-wrapper {
        display: block;
    }
}

@media (max-width: 768px) {
    .filters-section {
        flex-direction: column;
    }
    
    .filter-group {
        min-width: 100%;
    }
    
    .clear-btn {
        width: 100%;
        align-self: stretch;
    }
    
    .sort-section {
        flex-wrap: wrap;
    }
}