/* ==========================================================================
   Products Page
   ========================================================================== */

.products-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.products-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.products-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.products-toolbar .search-filter {
    flex: 1;
    max-width: 600px;
}

.products-table-wrapper {
    background-color: var(--bg-tile);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

/* Product Modal */

.product-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.product-form-grid .form-group-full {
    grid-column: 1 / -1;
}

.product-form-grid .form-group label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
}

.product-form-grid .form-group input,
.product-form-grid .form-group select,
.product-form-grid .form-group textarea {
    width: 100%;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

/* Tier Pricing Section */

.tier-pricing-section {
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-color);
}

.tier-pricing-section h6 {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.tier-pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--space-sm);
}

.tier-pricing-item {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.tier-pricing-item label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
}

.tier-pricing-item input {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    padding: 0.25rem 0.5rem;
    font-size: 0.8125rem;
}

/* Product Status Indicator */

.product-status-active {
    color: var(--status-completed-text);
}

.product-status-inactive {
    color: var(--text-muted);
}

/* Responsive */

@media (max-width: 768px) {
    .products-header {
        flex-direction: column;
    }

    .products-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .products-toolbar .search-filter {
        max-width: none;
    }

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