/* Modern CSS Stylesheet for Multi-Vendor Marketplace */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #10b981; /* Fresh Emerald Green for CTA / WhatsApp */
    --primary-hover: #059669;
    --secondary: #4f46e5; /* Premium Indigo */
    --secondary-hover: #4338ca;
    --background: #f8fafc;
    --surface: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius-sm: 0.375rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--background);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.5;
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    height: 70px;
    display: flex;
    align-items: center;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-brand span {
    color: var(--primary);
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.navbar-menu {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--secondary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    gap: 0.5rem;
}

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

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

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

.btn-secondary:hover {
    background-color: var(--secondary-hover);
    transform: translateY(-1px);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--border);
    color: var(--text-main);
}

.btn-outline:hover {
    border-color: var(--secondary);
    color: var(--secondary);
}

.btn-danger {
    background-color: #ef4444;
    color: white;
}

.btn-danger:hover {
    background-color: #dc2626;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
}

.btn-block {
    display: flex;
    width: 100%;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #e0e7ff 0%, #d1fae5 100%);
    padding: 4rem 0;
    text-align: center;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 1.5rem auto;
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 4rem;
}

/* Cards */
.card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(79, 70, 229, 0.2);
}

.card-img-wrapper {
    position: relative;
    padding-top: 75%; /* 4:3 Aspect Ratio */
    background: #f1f5f9;
    overflow: hidden;
}

.card-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-main);
    text-decoration: none;
    line-height: 1.3;
}

.card-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 0.75rem;
}

.card-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--border);
    background: #fafafa;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.vendor-badge {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 600;
    color: var(--text-main);
}

/* Forms */
.form-container {
    max-width: 480px;
    margin: 3rem auto;
    background: var(--surface);
    padding: 2.5rem 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}

.form-title {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--text-main);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background-color: #f8fafc;
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary);
    background-color: var(--surface);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.alert-danger {
    background-color: #fef2f2;
    color: #ef4444;
    border: 1px solid #fee2e2;
}

.alert-success {
    background-color: #ecfdf5;
    color: #10b981;
    border: 1px solid #d1fae5;
}

/* Detail Page */
.detail-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin: 3rem 0;
}

.detail-img-container {
    background: #f1f5f9;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
}

.detail-img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    display: block;
}

.detail-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.detail-vendor {
    color: var(--secondary);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.detail-title {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.detail-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.detail-desc-title {
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.detail-desc {
    color: var(--text-muted);
    margin-bottom: 2rem;
    white-space: pre-line;
}

/* Table / Admin list */
.table-responsive {
    overflow-x: auto;
    margin-top: 1.5rem;
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.table th, .table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
}

.table th {
    background-color: #f8fafc;
    font-weight: 700;
    color: var(--text-muted);
}

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

.table-img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

/* Dashboard Stat Card */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.stat-card-title {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-card-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--secondary);
    margin-top: 0.5rem;
}

/* Search bar */
.search-wrapper {
    display: flex;
    gap: 0.75rem;
    max-width: 600px;
    margin: -1.5rem auto 2.5rem auto;
    position: relative;
    z-index: 10;
}

/* Footer */
footer {
    margin-top: auto;
    background-color: #0f172a;
    color: white;
    padding: 3rem 0;
    text-align: center;
}

footer p {
    color: #94a3b8;
    font-size: 0.95rem;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .detail-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .navbar-menu {
        gap: 0.75rem;
    }
    
    .nav-link {
        font-size: 0.85rem;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero {
        padding: 2.5rem 0;
        margin-bottom: 2rem;
    }
    
    .form-container {
        padding: 1.5rem 1.25rem;
        margin: 1.5rem auto;
    }
    
    .search-wrapper {
        flex-direction: column;
        padding: 0 1rem;
    }
}
