/* ═══════════════════════════════════════════════════════════════════
   Mercatino Artigianato — Modern Design System (2026)
   Premium Tailwind CSS Theme - Professional, Functional, Beautiful
   ═══════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@600;700;800&display=swap');

/* ═══════════════════════════════════════════════════════════════════
   Root Variables & Colors
   ═══════════════════════════════════════════════════════════════════ */

:root {
    --primary: #2563eb;
    --primary-light: #3b82f6;
    --primary-dark: #1e40af;
    --secondary: #7c3aed;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
}

/* ═══════════════════════════════════════════════════════════════════
   Global Typography & Base Styles
   ═══════════════════════════════════════════════════════════════════ */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--gray-50);
    color: var(--gray-900);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    letter-spacing: -0.015em;
    font-weight: 700;
    line-height: 1.2;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
    margin: 0;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-dark);
}

/* ═══════════════════════════════════════════════════════════════════
   Modern Card Component
   ═══════════════════════════════════════════════════════════════════ */

.card-elevated {
    @apply bg-white rounded-xl border border-gray-100 shadow-sm hover:shadow-lg transition-all duration-200;
}

.card-elevated:hover {
    border-color: var(--primary-light);
}

.card-primary {
    @apply bg-gradient-to-br from-blue-50 to-white border border-blue-100;
}

.card-ghost {
    @apply bg-transparent border-0 shadow-none;
}

/* ═══════════════════════════════════════════════════════════════════
   Modern Button System
   ═══════════════════════════════════════════════════════════════════ */

.btn {
    @apply inline-flex items-center justify-center gap-2 px-4 py-2.5 rounded-lg font-semibold text-sm;
    @apply transition-all duration-200 cursor-pointer;
    border: none;
    text-decoration: none;
    white-space: nowrap;
}

.btn:disabled {
    @apply opacity-50 cursor-not-allowed;
}

.btn-primary {
    @apply bg-blue-600 text-white hover:bg-blue-700 active:bg-blue-800;
}

.btn-secondary {
    @apply bg-gray-200 text-gray-900 hover:bg-gray-300 active:bg-gray-400;
}

.btn-outline {
    @apply border-2 border-gray-300 text-gray-900 hover:bg-gray-50 active:bg-gray-100;
}

.btn-ghost {
    @apply text-gray-600 hover:bg-gray-100 active:bg-gray-200;
}

.btn-danger {
    @apply bg-red-600 text-white hover:bg-red-700 active:bg-red-800;
}

.btn-success {
    @apply bg-green-600 text-white hover:bg-green-700 active:bg-green-800;
}

.btn-sm { @apply px-3 py-1.5 text-xs; }
.btn-lg { @apply px-6 py-3 text-base; }
.btn-icon { @apply p-2.5; }

/* ═══════════════════════════════════════════════════════════════════
   Modern Form Elements
   ═══════════════════════════════════════════════════════════════════ */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="search"],
textarea,
select {
    @apply w-full px-4 py-2.5 rounded-lg border border-gray-300 font-base;
    @apply transition-all duration-200;
    background-color: white;
    color: var(--gray-900);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="search"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

input::placeholder {
    color: var(--gray-400);
}

textarea {
    resize: vertical;
}

/* ═══════════════════════════════════════════════════════════════════
   Badge & Chip Components
   ═══════════════════════════════════════════════════════════════════ */

.badge {
    @apply inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-xs font-semibold;
}

.badge-primary { @apply bg-blue-100 text-blue-700; }
.badge-success { @apply bg-green-100 text-green-700; }
.badge-warning { @apply bg-amber-100 text-amber-700; }
.badge-danger { @apply bg-red-100 text-red-700; }
.badge-gray { @apply bg-gray-100 text-gray-700; }

.chip {
    @apply inline-flex items-center gap-2 px-3 py-1.5 rounded-lg border border-gray-200 bg-white text-sm font-medium;
    @apply transition-all duration-200 cursor-pointer hover:bg-gray-50;
}

.chip.active {
    @apply bg-blue-50 border-blue-200 text-blue-700;
}

/* ═══════════════════════════════════════════════════════════════════
   Artisan Profile & Cards
   ═══════════════════════════════════════════════════════════════════ */

.artisan-card {
    @apply card-elevated p-6 hover:shadow-xl transition-all duration-300;
}

.artisan-avatar {
    @apply w-12 h-12 rounded-xl bg-gradient-to-br from-blue-400 to-blue-600 text-white;
    @apply flex items-center justify-center font-bold text-lg flex-shrink-0;
}

.artisan-tag {
    @apply flex items-center gap-3 p-3 rounded-lg;
}

.artisan-tag img {
    @apply w-10 h-10 rounded-full object-cover bg-gray-100;
}

.artisan-tag .meta {
    @apply flex flex-col;
}

.artisan-tag .name {
    @apply font-semibold text-sm text-gray-900;
}

.artisan-tag .info {
    @apply text-xs text-gray-500;
}

/* ═══════════════════════════════════════════════════════════════════
   Gallery & Media
   ═══════════════════════════════════════════════════════════════════ */

.gallery-grid {
    @apply grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6;
}

.gallery-item {
    @apply rounded-xl overflow-hidden border border-gray-100 hover:shadow-lg transition-all duration-300;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
}

.gallery-item img {
    @apply w-full h-full object-cover;
}

.image-placeholder {
    @apply aspect-square bg-gradient-to-br from-gray-200 to-gray-300 rounded-lg flex items-center justify-center;
    color: var(--gray-400);
}

/* ═══════════════════════════════════════════════════════════════════
   Layout Components
   ═══════════════════════════════════════════════════════════════════ */

.container-fluid {
    @apply max-w-7xl mx-auto px-4 sm:px-6 lg:px-8;
}

.section-header {
    @apply mb-8 pb-6 border-b border-gray-200;
}

.section-title {
    @apply text-3xl font-bold text-gray-900 mb-2;
}

.section-subtitle {
    @apply text-gray-600 text-lg;
}

/* ═══════════════════════════════════════════════════════════════════
   Animations & Transitions
   ═══════════════════════════════════════════════════════════════════ */

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

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

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.animate-slide-down {
    animation: slideDown 0.2s ease-out;
}

.animate-slide-up {
    animation: slideUp 0.2s ease-out;
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out;
}

.animate-scale-in {
    animation: scaleIn 0.2s ease-out;
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ═══════════════════════════════════════════════════════════════════
   Utility Classes
   ═══════════════════════════════════════════════════════════════════ */

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

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

.shadow-soft {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05), 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.shadow-elevated {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.shadow-floating {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.backdrop-blur {
    backdrop-filter: blur(10px);
}

.gradient-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
}

/* ═══════════════════════════════════════════════════════════════════
   Accessibility & Print Styles
   ═══════════════════════════════════════════════════════════════════ */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

@media print {
    body {
        background: white;
    }
    .no-print {
        display: none;
    }
}
