/* ==========================================
   TOWN MARKETPLACE
   Custom Design System
========================================== */

:root {
    --market-orange: #f97316;
    --market-orange-dark: #ea580c;
    --market-orange-light: #fff7ed;

    --market-gray-50: #f9fafb;
    --market-gray-100: #f3f4f6;
    --market-gray-200: #e5e7eb;
    --market-gray-300: #d1d5db;
    --market-gray-600: #4b5563;
    --market-gray-900: #111827;

    --market-radius: 0.75rem;
    --market-radius-lg: 1rem;
}

/* ==========================================
   Global
========================================== */

html {
    scroll-behavior: smooth;
}

body {
    background: var(--market-gray-50);
    color: var(--market-gray-900);
}

/* ==========================================
   Tailwind v4 Border Compatibility
========================================== */

*,
::before,
::after {
    border-color: var(--market-gray-200);
}

/* ==========================================
   Links & Buttons
========================================== */

a,
button {
    transition:
        color 0.2s ease,
        background-color 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

button {
    cursor: pointer;
}

/* ==========================================
   Form Controls
========================================== */

input,
select,
textarea {
    border: 1px solid var(--market-gray-300);
    border-radius: 0.5rem;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--market-orange);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
}

/* ==========================================
   Marketplace Buttons
========================================== */

.btn-primary {
    background: var(--market-orange);
    color: white;
    border: 1px solid var(--market-orange);
    border-radius: 0.5rem;
    padding: 0.75rem 1.25rem;
    font-weight: 600;
}

.btn-primary:hover {
    background: var(--market-orange-dark);
    border-color: var(--market-orange-dark);
}

.btn-secondary {
    background: white;
    color: var(--market-gray-900);
    border: 1px solid var(--market-gray-300);
    border-radius: 0.5rem;
    padding: 0.75rem 1.25rem;
    font-weight: 600;
}

.btn-secondary:hover {
    background: var(--market-gray-50);
    border-color: var(--market-gray-400);
}

.btn-danger {
    background: #dc2626;
    color: white;
    border: 1px solid #dc2626;
    border-radius: 0.5rem;
    padding: 0.75rem 1.25rem;
    font-weight: 600;
}

.btn-danger:hover {
    background: #b91c1c;
}

/* ==========================================
   Product / Marketplace Cards
========================================== */

.market-card {
    background: white;
    border: 1px solid var(--market-gray-200);
    border-radius: var(--market-radius);
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.market-card:hover {
    border-color: var(--market-gray-300);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* ==========================================
   Product Images
========================================== */

.product-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
}

/* ==========================================
   Text Utilities
========================================== */

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==========================================
   Vendor Logo
========================================== */

.vendor-logo {
    width: 60px;
    height: 60px;
    margin: 0 auto;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--market-gray-100);
}

.vendor-logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.vendor-profile-logo {
    width: 80px;
    height: 80px;
    border-radius: 9999px;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--market-gray-100);
}

.vendor-profile-logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ==========================================
   Mobile Tables
========================================== */

@media (max-width: 768px) {
    .overflow-x-auto {
        -webkit-overflow-scrolling: touch;
    }
}

/* ==========================================
   Mobile Improvements
========================================== */

@media (max-width: 640px) {
    input,
    select,
    textarea {
        font-size: 16px;
    }

    .btn-primary,
    .btn-secondary,
    .btn-danger {
        min-height: 44px;
    }
}