/* ============================================
   Local Supply Platform - Modern CSS
   Color Palette: Deep Navy (#1a2a6c), Gold (#fdbb2d), Off-white (#f4f7f6)
   ============================================ */

/* CSS Variables */
:root {
    /* لوك صناعي يناسب قطع الغيار */
    --primary-color: #0f172a;          /* Steel/Navy */
    --secondary-color: #f5b70a;        /* Amber highlight */
    --accent-cyan: #38bdf8;            /* Tech accent */
    --background-color: #f6f8fb;
    --text-dark: #0b1324;
    --text-light: #6b7280;
    --white: #ffffff;
    --success: #27ae60;
    --danger: #e74c3c;
    --warning: #f39c12;
    --border-color: #e5e7eb;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 14px 30px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s ease;
    --grid-gear: radial-gradient(circle at 10px 10px, rgba(255,255,255,0.14) 6px, transparent 0),
                 radial-gradient(circle at 40px 40px, rgba(56,189,248,0.12) 8px, transparent 0),
                 radial-gradient(circle at 70px 20px, rgba(245,183,10,0.12) 7px, transparent 0);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Tajawal', 'Arial', sans-serif;
    background-color: var(--background-color);
    color: var(--text-dark);
    line-height: 1.6;
    direction: rtl;
    text-align: right;
    background-image:
        radial-gradient(circle at 15% 15%, rgba(15, 23, 42, 0.06), transparent 30%),
        radial-gradient(circle at 80% 10%, rgba(245, 183, 10, 0.05), transparent 28%);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: var(--primary-color);
    color: var(--white);
    padding: 1rem 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

/* Language Switcher */
.language-switcher {
    flex-shrink: 0;
}

.language-switcher button {
    font-family: inherit;
}

@media (max-width: 768px) {
    .language-switcher {
        order: 3;
        width: 100%;
        margin: 10px 0 0 0 !important;
        justify-content: center;
    }
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    text-decoration: none;
}

.logo a {
    text-decoration: none;
    color: inherit;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    align-items: center;
}

.nav-list a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    padding: 0.5rem 1rem;
    border-radius: 5px;
}

.nav-list a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--secondary-color);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--white);
    border-radius: 2px;
    transition: var(--transition);
}

/* Messages */
.messages-container {
    margin-top: 1rem;
}

.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.alert-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
}

.alert-close:hover {
    opacity: 1;
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(125deg, #0b1324 0%, #111c33 40%, var(--primary-color) 100%);
    color: var(--white);
    padding: 4.5rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 20%, rgba(253, 187, 45, 0.15), transparent 40%),
        radial-gradient(circle at 85% 10%, rgba(255, 255, 255, 0.07), transparent 45%),
        linear-gradient(115deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0) 35%);
    pointer-events: none;
}

.hero-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--grid-gear);
    background-size: 85px 85px;
    opacity: 0.12;
    mix-blend-mode: screen;
    pointer-events: none;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero-content::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(253, 187, 45, 0.2), transparent 35%),
                radial-gradient(circle at 80% 30%, rgba(255, 255, 255, 0.08), transparent 40%);
    pointer-events: none;
    z-index: -1;
}

.eyebrow {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    background: rgba(253, 187, 45, 0.15);
    color: #ffd37a;
    border: 1px solid rgba(253, 187, 45, 0.35);
    border-radius: 999px;
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: 0.3px;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    animation: fadeInUp 0.6s ease;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    line-height: 1.7;
    animation: fadeInUp 0.8s ease;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease;
}

/* Features Section */
.features-section {
    padding: 4rem 0;
}

.feature-band {
    background: var(--primary-color);
    color: var(--white);
    padding: 3rem 0;
    position: relative;
    overflow: hidden;
}

.feature-band::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(120deg, rgba(253,187,45,0.06) 0%, rgba(255,255,255,0) 45%),
        radial-gradient(circle at 85% 20%, rgba(255,255,255,0.08), transparent 45%),
        radial-gradient(circle at 20% 80%, rgba(253,187,45,0.08), transparent 50%);
    pointer-events: none;
}

.feature-band::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--grid-gear);
    background-size: 100px 100px;
    opacity: 0.08;
    mix-blend-mode: screen;
    pointer-events: none;
}

.band-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.band-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 1.5rem;
    backdrop-filter: blur(4px);
    box-shadow: var(--shadow);
}

.band-card h3 {
    margin-bottom: 0.5rem;
    color: #ffd37a;
}

.band-card p {
    color: #e9eef7;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.band-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
}

.band-list li {
    margin-bottom: 0.5rem;
    padding-inline-start: 1.25rem;
    position: relative;
    color: #f7f9ff;
    font-size: 0.98rem;
}

.band-list li::before {
    content: '•';
    position: absolute;
    right: 0;
    color: #ffd37a;
}

.cta-section {
    padding: 3.5rem 0;
}

.cta-card {
    background: var(--white);
    border-radius: 14px;
    padding: 2.25rem;
    box-shadow: var(--shadow-hover);
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
    border: 1px solid rgba(26,42,108,0.08);
}

.cta-card h2 {
    color: var(--primary-color);
    margin: 0.25rem 0 0.75rem 0;
}

.cta-card p {
    max-width: 620px;
    color: var(--text-dark);
}

.cta-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
    animation: fadeIn 0.6s ease;
    position: relative;
    overflow: hidden;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.feature-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 10%, rgba(253, 187, 45, 0.12), transparent 50%);
    opacity: 0;
    transition: var(--transition);
}

.feature-card:hover::after {
    opacity: 1;
}

.feature-card::before {
    content: '';
    position: absolute;
    width: 120px;
    height: 120px;
    right: -30px;
    bottom: -40px;
    background-image:
        radial-gradient(circle at 20px 20px, rgba(26,42,108,0.08) 10px, transparent 0),
        radial-gradient(circle at 60px 60px, rgba(253,187,45,0.12) 12px, transparent 0),
        radial-gradient(circle at 90px 30px, rgba(26,42,108,0.06) 9px, transparent 0);
    background-size: 90px 90px;
    opacity: 0.22;
    transform: rotate(15deg);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
    filter: drop-shadow(0 6px 14px rgba(0,0,0,0.18));
}

.feature-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, #f5b70a 0%, #facc15 100%);
    color: #0f172a;
    box-shadow: 0 10px 26px rgba(245, 183, 10, 0.35);
}

.btn-primary:hover {
    background-color: #e6a91d;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

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

.btn-secondary:hover {
    background-color: #15204a;
    transform: translateY(-2px);
}

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

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

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

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.btn-link:hover {
    text-decoration: underline;
}

/* Auth Pages */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
    padding: 2rem 0;
}

.auth-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow-hover);
    width: 100%;
    max-width: 500px;
    animation: fadeIn 0.5s ease;
}

.auth-title {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 2rem;
    font-size: 2rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: var(--text-dark);
}

.form-input {
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 42, 108, 0.1);
}

.error-message {
    color: var(--danger);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-light);
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Dashboard */
.dashboard-container {
    padding: 2rem 0;
}

.page-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.welcome-text {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.dashboard-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.dashboard-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.dashboard-card h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.products-preview,
.orders-preview {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.product-item,
.order-item {
    padding: 1rem;
    background: var(--background-color);
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    padding: 20px 0;
}

.product-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    animation: fadeIn 0.5s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-image-placeholder {
    width: 100%;
    height: 200px;
    background: var(--background-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
}

.product-info {
    padding: 1.5rem;
}

.product-info h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.product-info p {
    margin-bottom: 0.5rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.product-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin: 1rem 0;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.order-btn {
    margin-top: 1rem;
}

/* Forms */
.form-container {
    padding: 2rem 0;
}

.form-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow-hover);
    max-width: 600px;
    margin: 0 auto;
}

.form-title {
    color: var(--primary-color);
    margin-bottom: 2rem;
    font-size: 2rem;
}

.product-form,
.order-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.product-summary {
    background: var(--background-color);
    padding: 1.5rem;
    border-radius: 5px;
    margin-bottom: 2rem;
}

.product-summary h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Marketplace */
.marketplace-container {
    padding: 2rem 0;
}

.search-section {
    margin-bottom: 2rem;
}

.search-box {
    display: flex;
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.search-input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 42, 108, 0.1);
}

/* Orders Table */
.orders-table-container {
    overflow-x: auto;
    background: var(--white);
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 1rem;
}

.orders-table {
    width: 100%;
    border-collapse: collapse;
}

.orders-table th {
    background: var(--primary-color);
    color: var(--white);
    padding: 1rem;
    text-align: right;
    font-weight: 600;
}

.orders-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.orders-table tr:hover {
    background: var(--background-color);
}

.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    display: inline-block;
}

.status-pending {
    background: var(--warning);
    color: var(--white);
}

.status-completed {
    background: var(--success);
    color: var(--white);
}

.status-cancelled {
    background: var(--danger);
    color: var(--white);
}

.status-select {
    padding: 0.5rem;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-family: inherit;
    cursor: pointer;
}

.status-form {
    display: inline-block;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: var(--white);
    margin: 10% auto;
    padding: 2rem;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: slideDown 0.3s ease;
}

.modal-close {
    position: absolute;
    left: 1rem;
    top: 1rem;
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--danger);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--white);
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.empty-state p {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

/* Footer */
.footer {
    background: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Supplier Profile Card */
.supplier-profile-card {
    background: linear-gradient(135deg, #1a2a6c 0%, #2c3e50 100%);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid #1a2a6c;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(26, 42, 108, 0.2);
}

.supplier-profile-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(26, 42, 108, 0.4);
}

.supplier-profile-card::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    pointer-events: none;
}

.supplier-profile-card::after {
    content: '';
    position: absolute;
    bottom: -40px;
    left: -40px;
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    pointer-events: none;
}

.supplier-profile-content {
    position: relative;
    z-index: 1;
}

.supplier-profile-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    gap: 15px;
    flex-wrap: wrap;
}

.supplier-profile-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    min-width: 200px;
}

.supplier-profile-icon {
    background: rgba(255, 255, 255, 0.2);
    padding: 12px;
    border-radius: 50%;
    font-size: 28px;
    backdrop-filter: blur(10px);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
}

.supplier-profile-details {
    flex: 1;
}

.supplier-profile-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    margin-bottom: 6px;
    font-weight: normal;
}

.supplier-profile-name {
    margin: 0;
    color: white;
    font-size: 22px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.supplier-profile-badge {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: normal;
    white-space: nowrap;
}

.supplier-profile-action {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 10px 18px;
    border-radius: 20px;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: bold;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.supplier-profile-action:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(-3px);
}

.supplier-profile-body {
    background: rgba(255, 255, 255, 0.1);
    padding: 18px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    margin-bottom: 15px;
}

.supplier-profile-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.supplier-profile-info-item {
    margin: 0;
    color: rgba(255, 255, 255, 0.95);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.supplier-profile-info-item strong {
    color: white;
}

.supplier-profile-footer {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

.supplier-profile-button {
    background: white;
    color: #1a2a6c;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: bold;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.supplier-profile-button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

/* Compact Supplier Profile (for product cards) */
.supplier-profile-compact {
    background: linear-gradient(135deg, #1a2a6c 0%, #2c3e50 100%);
    padding: 16px;
    border-radius: 10px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid #1a2a6c;
    position: relative;
    overflow: hidden;
}

.supplier-profile-compact:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 42, 108, 0.3);
}

.supplier-profile-compact::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    pointer-events: none;
}

.supplier-profile-compact-content {
    position: relative;
    z-index: 1;
}

.supplier-profile-compact-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    gap: 10px;
    flex-wrap: wrap;
}

.supplier-profile-compact-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.supplier-profile-compact-icon {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px;
    border-radius: 50%;
    font-size: 22px;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.supplier-profile-compact-details {
    flex: 1;
    min-width: 0;
}

.supplier-profile-compact-name {
    margin: 0;
    color: white;
    font-weight: bold;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.supplier-profile-compact-badge {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: normal;
}

.supplier-profile-compact-hint {
    margin: 5px 0 0 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 11px;
}

.supplier-profile-compact-products-badge {
    background: #007bff;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
    white-space: nowrap;
}

.supplier-profile-compact-body {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.supplier-profile-compact-info-item {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.supplier-profile-compact-footer {
    margin-top: 12px;
    text-align: right;
}

.supplier-profile-compact-action {
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .supplier-profile-card {
        padding: 18px;
        margin-bottom: 18px;
    }

    .supplier-profile-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .supplier-profile-action {
        width: 100%;
        justify-content: center;
        padding: 10px 16px;
    }

    .supplier-profile-name {
        font-size: 20px;
    }

    .supplier-profile-icon {
        width: 48px;
        height: 48px;
        font-size: 24px;
        padding: 10px;
    }

    .supplier-profile-info-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .supplier-profile-compact {
        padding: 14px;
    }

    .supplier-profile-compact-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .supplier-profile-compact-products-badge {
        width: 100%;
        text-align: center;
        padding: 8px;
    }

    .supplier-profile-compact-info {
        width: 100%;
    }

    .supplier-profile-compact-body {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .supplier-profile-card {
        padding: 15px;
        border-radius: 10px;
    }

    .supplier-profile-name {
        font-size: 18px;
    }

    .supplier-profile-icon {
        width: 44px;
        height: 44px;
        font-size: 22px;
        padding: 8px;
    }

    .supplier-profile-compact {
        padding: 12px;
    }

    .supplier-profile-compact-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
        padding: 6px;
    }

    .supplier-profile-compact-name {
        font-size: 14px;
    }

    .supplier-profile-compact-hint {
        font-size: 10px;
    }
}
    .nav {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        background: var(--primary-color);
        width: 100%;
        padding: 1rem;
        box-shadow: var(--shadow);
    }

    .nav.active {
        display: block;
    }

    .nav-list {
        flex-direction: column;
        gap: 0.5rem;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .page-title {
        font-size: 2rem;
    }

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

    .dashboard-actions {
        flex-direction: column;
    }

    .search-box {
        flex-direction: column;
    }

    .cta-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .orders-table-container {
        overflow-x: scroll;
    }

    .orders-table {
        min-width: 800px;
    }


@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .auth-card,
    .form-card {
        padding: 1.5rem;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .supplier-profile-button {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* Product Card with Supplier Profile */
.product-card {
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
    transform: translateY(-5px);
}

/* Ensure proper spacing and alignment */
.supplier-profile-compact + h3,
.supplier-profile-card + h3 {
    margin-top: 10px;
}

/* Grid responsive adjustments */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 15px 0;
    }
    
    .marketplace-container .container {
        padding: 0 10px;
    }
    
    .search-section {
        padding: 15px !important;
    }
    
    .search-box {
        flex-direction: column;
        gap: 10px;
    }
    
    .search-input {
        width: 100% !important;
    }
    
    .search-box button {
        width: 100%;
    }
    
    /* Sort section mobile optimization */
    .marketplace-container > .container > div[style*="display: flex"][style*="sortProducts"] {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }
    
    .marketplace-container > .container > div[style*="display: flex"][style*="sortProducts"] > div:first-child {
        min-width: 100% !important;
        flex-direction: column !important;
        gap: 8px !important;
    }
    
    .marketplace-container > .container > div[style*="display: flex"][style*="sortProducts"] label {
        font-size: 13px !important;
    }
    
    .marketplace-container > .container > div[style*="display: flex"][style*="sortProducts"] select {
        width: 100% !important;
    }
    
    /* Filter grid mobile */
    .search-section > div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    
    /* Filter active banner mobile */
    .search-section > div[style*="background: #e7f3ff"] {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
    }
    
    /* Product cards mobile */
    .product-card-modern {
        margin-bottom: 0;
    }
    
    .product-card-modern > div:first-child {
        height: 220px !important;
    }
    
    .product-card-modern h3 {
        font-size: 16px !important;
        min-height: auto !important;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 10px 0;
    }
    
    .page-title {
        font-size: 24px;
        margin-bottom: 15px;
    }
    
    .search-section {
        padding: 12px !important;
        margin-bottom: 15px !important;
    }
    
    .product-card-modern > div:first-child {
        height: 200px !important;
    }
    
    .product-card-modern {
        border-radius: 10px !important;
    }
    
    .product-card-modern > div:last-child {
        padding: 15px !important;
    }
}

