/* My Products & Services Dashboard Styles */

:root {
    --primary: #2c5f2d;
    --primary-dark: #1e4620;
    --accent: #FF8C42;
    --bg-cream: #FFFBF5;
    --border-soft: #E5E7EB;
    --text-dark: #1F2937;
    --text-medium: #6B7280;
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;
}

.products-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 20px;
}

.page-title {
    font-family: 'Fraunces', serif;
    font-size: 42px;
    font-weight: 900;
    color: var(--primary-dark);
    margin: 0;
}

.stats-bar {
    display: flex;
    gap: 24px;
}

.stat-item {
    background: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 2px solid var(--border-soft);
    text-align: center;
}

.stat-value {
    font-size: 32px;
    font-weight: 900;
    color: var(--primary);
    font-family: 'Fraunces', serif;
}

.stat-label {
    font-size: 13px;
    color: var(--text-medium);
    font-weight: 600;
    margin-top: 4px;
}

/* Tabs */
.tabs-container {
    margin-bottom: 32px;
    border-bottom: 2px solid var(--border-soft);
}

.tabs {
    display: flex;
    gap: 8px;
}

.tab {
    padding: 14px 28px;
    border: none;
    background: transparent;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-medium);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.tab:hover {
    color: var(--primary);
    background: var(--bg-cream);
}

.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: var(--bg-cream);
}

.tab-count {
    background: var(--primary);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
}

.tab.active .tab-count {
    background: white;
    color: var(--primary);
}

/* Alerts */
.alert {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease;
}

.alert-success {
    background: #D1FAE5;
    color: #065F46;
    border-left: 4px solid var(--success);
}

.alert-error {
    background: #FEE2E2;
    color: #991B1B;
    border-left: 4px solid var(--error);
}

/* Action Bar */
.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 20px 24px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    flex-wrap: wrap;
    gap: 16px;
}

.add-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 12px 24px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(44,95,45,0.3);
}

.add-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(44,95,45,0.4);
}

/* Filters */
.filters-section {
    background: white;
    padding: 20px 24px;
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.filters-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 16px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
}

.filter-input,
.filter-select {
    padding: 10px 14px;
    border: 2px solid var(--border-soft);
    border-radius: 8px;
    font-size: 14px;
    font-family: 'DM Sans', sans-serif;
    transition: all 0.2s;
}

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

/* Grid */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.item-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 2px solid var(--border-soft);
    transition: all 0.3s;
    position: relative;
}

.item-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border-color: var(--primary);
}

.item-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: var(--bg-cream);
}

.status-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.status-active { color: var(--success); }
.status-inactive { color: var(--error); }

.item-body {
    padding: 20px;
}

.item-type-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

/* Product type badges */
.badge-eggs { background: #FEF3C7; color: #92400E; }
.badge-medicine { background: #DBEAFE; color: #1E40AF; }
.badge-feed { background: #D1FAE5; color: #065F46; }
.badge-birds { background: #FCE7F3; color: #9F1239; }
.badge-equipment { background: #E0E7FF; color: #3730A3; }
.badge-default { background: #F3F4F6; color: #374151; }

/* Service type badges */
.badge-veterinary { background: #DBEAFE; color: #1E40AF; }
.badge-consultation { background: #D1FAE5; color: #065F46; }
.badge-contract_farming { background: #FEF3C7; color: #92400E; }
.badge-technical_support { background: #E0E7FF; color: #3730A3; }

.item-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.item-description {
    font-size: 14px;
    color: var(--text-medium);
    margin-bottom: 12px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-price {
    font-size: 24px;
    font-weight: 900;
    color: var(--primary);
    font-family: 'Fraunces', serif;
    margin-bottom: 12px;
}

.item-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.item-meta-item {
    font-size: 13px;
    color: var(--text-medium);
    display: flex;
    align-items: center;
    gap: 6px;
}

.item-meta-item i {
    color: var(--primary);
}

.item-actions {
    display: flex;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--border-soft);
}

.btn-edit,
.btn-delete {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    border: none;
}

.btn-edit {
    background: var(--primary);
    color: white;
}

.btn-edit:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-delete {
    background: #FEE2E2;
    color: #991B1B;
}

.btn-delete:hover {
    background: #FCA5A5;
}

/* Empty state */
.no-items {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.no-items-icon {
    font-size: 80px;
    margin-bottom: 24px;
}

.no-items-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.no-items-text {
    font-size: 16px;
    color: var(--text-medium);
    margin-bottom: 32px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 32px;
    padding: 24px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.pagination-btn {
    padding: 10px 16px;
    border: 2px solid var(--border-soft);
    background: white;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.pagination-btn:hover:not(.disabled) {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--bg-cream);
}

.pagination-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-info {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 968px) {
    .filters-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .stats-bar {
        width: 100%;
        justify-content: space-between;
    }

    .filters-grid {
        grid-template-columns: 1fr;
    }

    .items-grid {
        grid-template-columns: 1fr;
    }

    .action-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .add-btn {
        width: 100%;
        justify-content: center;
    }
}
