/* Agrolink Stylesheet */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2ecc71;
    --secondary-color: #3498db;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --light-bg: #ecf0f1;
    --dark-text: #2c3e50;
    --border-radius: 8px;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: var(--dark-text);
    line-height: 1.6;
}

/* Navbar */
.navbar {
    background: linear-gradient(135deg, var(--primary-color) 0%, #27ae60 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
    color: white;
}

.navbar-nav {
    display: flex;
    gap: 20px;
    list-style: none;
}

.navbar-nav a {
    color: white;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

.navbar-nav a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Auth Container */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.auth-box {
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
}

.auth-box h1 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.subtitle {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 30px;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--light-bg);
}

.tab-button {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 16px;
    color: #95a5a6;
    transition: all 0.3s ease;
}

.tab-button.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark-text);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--light-bg);
    border-radius: var(--border-radius);
    font-size: 14px;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #27ae60;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(46, 204, 113, 0.3);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

/* Alerts */
.alert {
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-error {
    background: #fadbd8;
    color: #c0392b;
    border-left: 4px solid #e74c3c;
}

.alert-success {
    background: #d5f4e6;
    color: #27ae60;
    border-left: 4px solid #2ecc71;
}

/* Dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.dashboard-card {
    background: white;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    text-align: center;
    transition: transform 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.dashboard-card h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.dashboard-card p {
    font-size: 32px;
    font-weight: bold;
    color: var(--secondary-color);
    margin: 15px 0;
}

/* Products */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.product-card,
.product-item {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.product-card h4,
.product-item h4 {
    background: linear-gradient(135deg, var(--primary-color) 0%, #27ae60 100%);
    color: white;
    padding: 15px;
    margin: 0;
    font-size: 18px;
}

.product-card .category {
    background: var(--light-bg);
    color: var(--secondary-color);
    font-weight: 600;
    padding: 8px 15px;
    margin: 10px 15px 0 15px;
    border-radius: 20px;
    display: inline-block;
    font-size: 12px;
}

.product-card .description {
    padding: 15px;
    color: #7f8c8d;
    font-size: 14px;
}

.product-info {
    padding: 15px;
    border-top: 1px solid var(--light-bg);
}

.product-info p {
    margin: 8px 0;
    font-size: 14px;
}

.price {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-color);
}

.seller {
    color: var(--secondary-color);
    font-weight: 600;
}

.location {
    color: #7f8c8d;
    font-size: 13px;
}

.product-item {
    padding: 20px;
    margin-bottom: 15px;
}

/* Search Form */
.search-form,
.add-product-form {
    background: white;
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 30px;
}

.search-form h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

/* Orders */
.orders-list {
    margin-top: 20px;
}

.order-item {
    background: white;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 15px;
    border-left: 4px solid var(--primary-color);
}

.order-item h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.order-item p {
    margin: 8px 0;
    color: #555;
    font-size: 14px;
}

/* Messages */
.message-item {
    background: white;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 15px;
    border-left: 4px solid var(--secondary-color);
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.message-date {
    color: #95a5a6;
    font-size: 12px;
}

.badge {
    background: var(--danger-color);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

/* Profile */
.profile-card {
    background: white;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    max-width: 600px;
}

/* Product Detail */
.product-detail {
    background: white;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.product-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 30px 0;
}

.product-info-section,
.seller-info-section {
    padding: 20px;
    background: var(--light-bg);
    border-radius: var(--border-radius);
}

.product-info-section h3,
.seller-info-section h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.product-info-section p,
.seller-info-section p {
    margin: 12px 0;
    color: #555;
}

.order-form {
    background: var(--light-bg);
    padding: 25px;
    border-radius: var(--border-radius);
    margin: 20px 0;
}

.contact-seller {
    text-align: center;
    margin-top: 20px;
}

/* Status */
.status-available {
    background: #d5f4e6;
    color: #27ae60;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.status-unavailable {
    background: #fadbd8;
    color: #c0392b;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar-nav {
        flex-direction: column;
        gap: 10px;
    }
    
    .navbar-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .product-body {
        grid-template-columns: 1fr;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .auth-box {
        padding: 20px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    h2 {
        font-size: 20px;
    }
}

/* Utilities */
h1, h2, h3 {
    color: var(--dark-text);
    margin-bottom: 20px;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

input[type="disabled"],
input:disabled {
    background: #ecf0f1;
    cursor: not-allowed;
}

select option {
    padding: 10px;
}
