/* ═══════════════════════════════════════════════════════
   CADASTRO PRODUTO — Design System Apple-like
   Dark mode • Glassmorphism • Micro-animações
   ═══════════════════════════════════════════════════════ */

/* ── Google Font ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ── CSS Variables ── */
:root {
    --bg-primary: #000000;
    --bg-secondary: #1c1c1e;
    --bg-tertiary: #2c2c2e;
    --bg-elevated: #3a3a3c;

    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-hover: rgba(255, 255, 255, 0.1);

    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-tertiary: rgba(255, 255, 255, 0.45);
    --text-quaternary: rgba(255, 255, 255, 0.25);

    --accent-blue: #007AFF;
    --accent-blue-hover: #0a84ff;
    --accent-green: #30D158;
    --accent-red: #FF3B30;
    --accent-orange: #FF9500;
    --accent-yellow: #FFD60A;
    --accent-purple: #BF5AF2;
    --accent-teal: #64D2FF;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 48px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(0, 122, 255, 0.15);

    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 350ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 500ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ── Reset & Base ── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.5;
    overflow-x: hidden;
}

/* ── Scrollbar Customizada ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { 
    background: var(--bg-elevated); 
    border-radius: var(--radius-full); 
}
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ── Background Gradiente ── */
.app-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: 
        radial-gradient(ellipse at 20% 0%, rgba(0, 122, 255, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(191, 90, 242, 0.06) 0%, transparent 50%),
        var(--bg-primary);
}

/* ═══════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════ */
.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--glass-border);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.3px;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-icon {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.nav-tabs {
    display: flex;
    gap: 2px;
    background: var(--bg-tertiary);
    padding: 3px;
    border-radius: var(--radius-full);
}

.nav-tab {
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition-fast);
    white-space: nowrap;
}

.nav-tab:hover {
    color: var(--text-primary);
}

.nav-tab.active {
    background: var(--bg-elevated);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.btn-config {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-full);
    border: none;
    background: var(--glass-bg);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: var(--transition-fast);
}

.btn-config:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

/* ═══════════════════════════════════════════════════════
   MAIN CONTENT
   ═══════════════════════════════════════════════════════ */
.app-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px;
}

.view { display: none; }
.view.active { display: block; }

/* ═══════════════════════════════════════════════════════
   BUSCA EAN — Hero Section
   ═══════════════════════════════════════════════════════ */
.search-hero {
    text-align: center;
    padding: 80px 0 48px;
}

.search-hero h1 {
    font-size: 40px;
    font-weight: 700;
    letter-spacing: -1.5px;
    line-height: 1.1;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.search-hero p {
    font-size: 17px;
    color: var(--text-secondary);
    font-weight: 400;
    max-width: 480px;
    margin: 0 auto 40px;
}

.search-box {
    position: relative;
    max-width: 560px;
    margin: 0 auto;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 20px;
    font-size: 20px;
    color: var(--text-tertiary);
    pointer-events: none;
    transition: var(--transition-base);
}

.search-input {
    width: 100%;
    padding: 18px 140px 18px 52px;
    font-size: 17px;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    color: var(--text-primary);
    background: var(--glass-bg);
    border: 1.5px solid var(--glass-border);
    border-radius: var(--radius-lg);
    outline: none;
    transition: var(--transition-base);
    backdrop-filter: blur(10px);
}

.search-input::placeholder {
    color: var(--text-quaternary);
}

.search-input:focus {
    border-color: var(--accent-blue);
    box-shadow: var(--shadow-glow);
    background: rgba(255, 255, 255, 0.08);
}

.search-input:focus ~ .search-icon {
    color: var(--accent-blue);
}

.btn-search {
    position: absolute;
    right: 6px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    color: #fff;
    background: var(--accent-blue);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-base);
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-search:hover {
    background: var(--accent-blue-hover);
    transform: scale(1.02);
}

.btn-search:active {
    transform: scale(0.98);
}

.btn-search:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ═══════════════════════════════════════════════════════
   CARD DE PRODUTO (RESULTADO)
   ═══════════════════════════════════════════════════════ */
.product-result {
    max-width: 720px;
    margin: 0 auto;
    animation: slideUp 0.5s var(--transition-spring) forwards;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 32px;
    transition: var(--transition-base);
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

.product-header {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--glass-border);
}

.product-image {
    width: 96px;
    height: 96px;
    border-radius: var(--radius-lg);
    background: var(--bg-tertiary);
    object-fit: contain;
    flex-shrink: 0;
    border: 1px solid var(--glass-border);
}

.product-image-placeholder {
    width: 96px;
    height: 96px;
    border-radius: var(--radius-lg);
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: var(--text-quaternary);
    flex-shrink: 0;
}

.product-info h2 {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.3px;
    margin-bottom: 6px;
}

.product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.meta-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
}

.meta-badge.ncm { color: var(--accent-teal); background: rgba(100, 210, 255, 0.1); }
.meta-badge.marca { color: var(--accent-purple); background: rgba(191, 90, 242, 0.1); }
.meta-badge.preco { color: var(--accent-green); background: rgba(48, 209, 88, 0.1); }

/* ═══════════════════════════════════════════════════════
   FORMULÁRIO
   ═══════════════════════════════════════════════════════ */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.2px;
}

.form-input, .form-select {
    padding: 12px 16px;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    outline: none;
    transition: var(--transition-fast);
}

.form-input:focus, .form-select:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
}

.form-input:read-only {
    color: var(--text-tertiary);
    background: var(--bg-primary);
}

.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='rgba(255,255,255,0.4)' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

textarea.form-input {
    resize: vertical;
    min-height: 80px;
}

/* ═══════════════════════════════════════════════════════
   BOTÕES
   ═══════════════════════════════════════════════════════ */
.btn-group {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    justify-content: flex-end;
}

.btn {
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-primary {
    background: var(--accent-blue);
    color: #fff;
}
.btn-primary:hover { background: var(--accent-blue-hover); }

.btn-success {
    background: var(--accent-green);
    color: #000;
}
.btn-success:hover { background: #3ae064; }

.btn-danger {
    background: var(--accent-red);
    color: #fff;
}
.btn-danger:hover { background: #ff5147; }

.btn-ghost {
    background: var(--glass-bg);
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
}
.btn-ghost:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

.btn-outline {
    background: transparent;
    color: var(--accent-blue);
    border: 1.5px solid var(--accent-blue);
}
.btn-outline:hover {
    background: rgba(0, 122, 255, 0.1);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: var(--radius-sm);
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 16px;
}

/* ═══════════════════════════════════════════════════════
   TABELA DE TRIBUTAÇÃO
   ═══════════════════════════════════════════════════════ */
.tax-section {
    margin-top: 32px;
}

.tax-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.tax-header h3 {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.2px;
}

.tax-table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
}

.tax-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.tax-table thead {
    background: var(--bg-tertiary);
}

.tax-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--glass-border);
    white-space: nowrap;
}

.tax-table td {
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    white-space: nowrap;
}

.tax-table tbody tr {
    transition: var(--transition-fast);
}

.tax-table tbody tr:hover {
    background: var(--glass-hover);
}

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

.tax-value {
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.tax-value.highlight {
    color: var(--accent-blue);
}

/* ═══════════════════════════════════════════════════════
   LISTA DE PRODUTOS
   ═══════════════════════════════════════════════════════ */
.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.list-header h2 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.list-search {
    position: relative;
    width: 280px;
}

.list-search-input {
    width: 100%;
    padding: 10px 16px 10px 38px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    outline: none;
    transition: var(--transition-fast);
}

.list-search-input:focus {
    border-color: var(--accent-blue);
    background: rgba(255, 255, 255, 0.08);
}

.list-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-quaternary);
    font-size: 14px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.product-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: var(--transition-base);
    cursor: default;
    animation: fadeIn 0.3s ease forwards;
}

.product-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.card-top {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.card-thumb {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    object-fit: contain;
    flex-shrink: 0;
    border: 1px solid var(--glass-border);
}

.card-thumb-placeholder {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--text-quaternary);
    flex-shrink: 0;
}

.card-info h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-info p {
    font-size: 13px;
    color: var(--text-tertiary);
}

.card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.card-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    padding-top: 12px;
    border-top: 1px solid var(--glass-border);
}

/* ═══════════════════════════════════════════════════════
   MODAL
   ═══════════════════════════════════════════════════════ */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-base);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    width: 100%;
    max-width: 560px;
    max-height: 85vh;
    overflow-y: auto;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    transform: scale(0.95) translateY(10px);
    transition: var(--transition-smooth);
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

.modal.modal-lg {
    max-width: 800px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--glass-border);
}

.modal-header h3 {
    font-size: 17px;
    font-weight: 600;
}

.modal-close {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    border: none;
    background: var(--bg-elevated);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: var(--transition-fast);
}

.modal-close:hover {
    background: var(--glass-hover);
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--glass-border);
}

/* ═══════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
   ═══════════════════════════════════════════════════════ */
.toast-container {
    position: fixed;
    top: 68px;
    right: 24px;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    padding: 14px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: auto;
    animation: slideInRight 0.3s ease forwards;
    max-width: 400px;
}

.toast.success { border-left: 3px solid var(--accent-green); }
.toast.error { border-left: 3px solid var(--accent-red); }
.toast.warning { border-left: 3px solid var(--accent-orange); }
.toast.info { border-left: 3px solid var(--accent-blue); }

.toast.hiding {
    animation: slideOutRight 0.3s ease forwards;
}

/* ═══════════════════════════════════════════════════════
   LOADING STATES
   ═══════════════════════════════════════════════════════ */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--glass-border);
    border-top-color: var(--accent-blue);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.spinner-sm {
    width: 14px;
    height: 14px;
    border-width: 2px;
}

.skeleton {
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-elevated) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-sm);
}

.loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: inherit;
    z-index: 10;
}

/* ═══════════════════════════════════════════════════════
   ESTADO VAZIO
   ═══════════════════════════════════════════════════════ */
.empty-state {
    text-align: center;
    padding: 64px 24px;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.empty-state p {
    font-size: 14px;
    color: var(--text-tertiary);
    max-width: 360px;
    margin: 0 auto;
}

/* ═══════════════════════════════════════════════════════
   STATUS INDICATORS
   ═══════════════════════════════════════════════════════ */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.online { background: var(--accent-green); box-shadow: 0 0 8px rgba(48, 209, 88, 0.4); }
.status-dot.offline { background: var(--accent-red); }
.status-dot.warning { background: var(--accent-orange); }

.api-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-tertiary);
}

/* ═══════════════════════════════════════════════════════
   CONFIG FORM
   ═══════════════════════════════════════════════════════ */
.config-group {
    margin-bottom: 20px;
}

.config-group-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-tertiary);
    margin-bottom: 12px;
}

.config-item {
    margin-bottom: 16px;
}

.config-item .form-label {
    margin-bottom: 4px;
}

.config-description {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 4px;
}

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

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

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideOutRight {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(40px); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

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

/* ═══════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .header-content {
        padding: 0 16px;
    }

    .nav-tabs {
        display: none;
    }

    .nav-mobile {
        display: flex !important;
    }

    .app-main {
        padding: 20px 16px;
    }

    .search-hero {
        padding: 40px 0 32px;
    }

    .search-hero h1 {
        font-size: 28px;
    }

    .search-input {
        padding: 16px 16px 16px 44px;
        font-size: 16px;
    }

    .btn-search {
        position: relative;
        right: auto;
        width: 100%;
        justify-content: center;
        margin-top: 12px;
        padding: 14px;
    }

    .search-input-wrapper {
        flex-direction: column;
    }

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

    .product-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

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

    .list-header {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }

    .list-search {
        width: 100%;
    }

    .modal {
        max-height: 95vh;
        margin: 8px;
    }

    .btn-group {
        flex-direction: column;
    }

    .btn-group .btn {
        justify-content: center;
    }
}

/* Nav mobile - hidden by default */
.nav-mobile {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: saturate(180%) blur(20px);
    border-top: 1px solid var(--glass-border);
    padding: 8px 0;
    padding-bottom: env(safe-area-inset-bottom, 8px);
}

.nav-mobile-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
    list-style: none;
}

.nav-mobile-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 16px;
    font-size: 10px;
    font-weight: 500;
    color: var(--text-tertiary);
    cursor: pointer;
    border: none;
    background: none;
    transition: var(--transition-fast);
}

.nav-mobile-item.active {
    color: var(--accent-blue);
}

.nav-mobile-item span:first-child {
    font-size: 22px;
}

/* ═══════════════════════════════════════════════════════
   UTILITIES
   ═══════════════════════════════════════════════════════ */
.text-muted { color: var(--text-tertiary); }
.text-blue { color: var(--accent-blue); }
.text-green { color: var(--accent-green); }
.text-red { color: var(--accent-red); }
.text-center { text-align: center; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; }
.gap-3 { gap: 12px; }
.hidden { display: none !important; }
.relative { position: relative; }
