/* ========================================
   INVENTÁRIO DISPLAY - CSS v8 CLEAN
   ======================================== */

/* Force scroll behavior */
html {
    scroll-behavior: smooth;
}

[id] {
    scroll-margin-top: calc(var(--header-height, 72px) + 20px);
}

/* ========================================
   HERO PEQUENO
   ======================================== */
.hero.hero-small {
    min-height: auto;
    padding: calc(var(--header-height, 72px) + 60px) 0 60px;
    background: linear-gradient(135deg, var(--bg-secondary, #f8fafc) 0%, var(--bg, #ffffff) 100%);
}

.hero.hero-small .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
}

.hero.hero-small .hero-content {
    max-width: 700px;
    margin: 0 auto;
}

/* ========================================
   HERO ALIGNMENT FIX
   ======================================== */
.hero.hero-small .hero-content {
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
}

.hero.hero-small .hero-title,
.hero.hero-small .hero-description {
    text-align: center !important;
    width: 100% !important;
}

.hero.hero-small .hero-cta {
    justify-content: center !important;
    width: 100% !important;
    display: flex !important;
    gap: 16px;
}

/* ========================================
   SECTION VISIBILITY TRANSITIONS
   ======================================== */
.section {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.section[style*="display: none"] {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
}

/* Never hide filters and CTA */
.section.section-filters,
.section.section-cta {
    display: block !important;
    opacity: 1 !important;
    transform: none !important;
}

/* ========================================
   HERO TEXT COLORS
   ======================================== */
.hero.hero-small .hero-title {
    color: #0f172a !important;
}

.hero.hero-small .hero-description {
    color: #475569 !important;
}

.hero.hero-small .hero-badge {
    color: #475569;
}

/* ========================================
   FILTROS
   ======================================== */
.section.section-filters {
    padding: 24px 0;
    background: var(--bg, #ffffff);
    border-bottom: 1px solid var(--border, #e2e8f0);
    position: sticky;
    top: var(--header-height, 72px);
    z-index: 100;
}

.filter-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 16px;
}

.filter-btn {
    padding: 8px 20px;
    border: 1px solid var(--border, #e2e8f0);
    background: var(--bg, #ffffff);
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary, #475569);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: inherit;
}

.filter-btn:hover {
    border-color: var(--primary, #6366f1);
    color: var(--primary, #6366f1);
    transform: translateY(-1px);
}

.filter-btn.active {
    background: var(--primary, #6366f1);
    color: #ffffff;
    border-color: var(--primary, #6366f1);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.results-count {
    text-align: center;
    color: var(--text-muted, #94a3b8);
    font-size: 0.875rem;
    margin-top: 8px;
    font-weight: 500;
}

.results-count strong {
    color: var(--primary, #6366f1);
    font-weight: 700;
}

/* ========================================
   INVENTORY GRID
   ======================================== */
.inventory-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* ========================================
   INVENTORY CARD - CLEAN & COMPACT
   ======================================== */
.inventory-card {
    background: #ffffff !important;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 200px;
}

.inventory-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 20px -5px rgba(0, 0, 0, 0.08);
    border-color: var(--primary, #6366f1);
}

.inventory-card.hidden {
    display: none !important;
}

.inventory-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.inventory-logo {
    width: 40px;
    height: 40px;
    background: var(--primary, #6366f1);
    color: #ffffff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.inventory-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    overflow: hidden;
}

.inventory-category {
    font-size: 0.7rem;
    color: #64748b;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
}

/* ========================================
   CARD CONTENT - CLEAN
   ======================================== */
.inventory-card .inventory-name {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: #0f172a !important;
    line-height: 1.3;
    word-break: break-word;
}

.inventory-card .inventory-desc {
    font-size: 0.8rem;
    color: #64748b !important;
    line-height: 1.4;
    margin-bottom: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    flex-shrink: 0;
}

.inventory-card .inventory-stats {
    display: flex;
    gap: 16px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--border, #e2e8f0);
}

.inventory-card .stat {
    display: flex;
    flex-direction: column;
}

.inventory-card .stat-number {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a !important;
    line-height: 1.2;
}

.inventory-card .stat-label {
    font-size: 0.7rem;
    color: #94a3b8 !important;
    margin-top: 2px;
}

/* ========================================
   SECTION DARK - FORCE WHITE CARDS
   ======================================== */
.section.section-dark {
    background: var(--bg-secondary, #f8fafc);
}

.section.section-dark .section-header .section-tag {
    background: var(--primary-light, #e0e7ff);
    color: var(--primary-dark, #4f46e5);
}

.section.section-dark .section-header .section-title {
    color: #0f172a !important;
}

.section.section-dark .section-header .section-description {
    color: #475569 !important;
}

.section.section-dark .inventory-card {
    background: #ffffff !important;
}

.section.section-dark .inventory-card .inventory-name {
    color: #0f172a !important;
}

.section.section-dark .inventory-card .inventory-desc {
    color: #64748b !important;
}

.section.section-dark .inventory-card .stat-number {
    color: #0f172a !important;
}

.section.section-dark .inventory-card .stat-label {
    color: #94a3b8 !important;
}

/* ========================================
   SECTION HEADERS - ALL INVENTORY SECTIONS
   ======================================== */
.section .section-header .section-title {
    color: #0f172a !important;
}

.section .section-header .section-description {
    color: #475569 !important;
}

/* ========================================
   CTA SECTION
   ======================================== */
.section.section-cta {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%) !important;
    color: #ffffff;
}

.section.section-cta .cta-box {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
}

.section.section-cta .cta-title {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    margin-bottom: 16px;
    color: #ffffff !important;
}

.section.section-cta .cta-description {
    font-size: 1.125rem;
    margin-bottom: 32px;
    color: rgba(255, 255, 255, 0.9) !important;
}

/* ========================================
   FORM IN CTA
   ======================================== */
.section.section-cta .cta-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 560px;
    margin: 0 auto;
}

.section.section-cta .cta-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 0;
}

.section.section-cta .cta-form .form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
}

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

.section.section-cta .cta-form input[type="text"],
.section.section-cta .cta-form input[type="email"],
.section.section-cta .cta-form input[type="tel"],
.section.section-cta .cta-form select {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    background: rgba(0, 0, 0, 0.2) !important;
    color: #ffffff !important;
    transition: all 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

.section.section-cta .cta-form input[type="text"]::placeholder,
.section.section-cta .cta-form input[type="email"]::placeholder,
.section.section-cta .cta-form input[type="tel"]::placeholder {
    color: rgba(255, 255, 255, 0.6) !important;
}

.section.section-cta .cta-form input[type="text"]:focus,
.section.section-cta .cta-form input[type="email"]:focus,
.section.section-cta .cta-form input[type="tel"]:focus,
.section.section-cta .cta-form select:focus {
    outline: none;
    border-color: #ffffff !important;
    background: rgba(0, 0, 0, 0.3) !important;
}

.section.section-cta .cta-form select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='white' d='M6 8L1 3h10z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 16px center !important;
    padding-right: 40px;
}

.section.section-cta .cta-form select option {
    background: #ffffff;
    color: #0f172a;
}

.section.section-cta .form-success {
    margin-top: 20px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    font-weight: 600;
    color: #ffffff;
    backdrop-filter: blur(10px);
}

/* ========================================
   RESPONSIVO
   ======================================== */
@media (max-width: 1024px) {
    .inventory-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }

    .section.section-filters {
        position: relative;
        top: 0;
    }

    .filter-tabs {
        gap: 6px;
    }

    .filter-btn {
        padding: 6px 16px;
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    .hero.hero-small {
        padding: calc(var(--header-height, 64px) + 40px) 0 40px;
    }

    .hero.hero-small .hero-cta {
        flex-direction: column;
    }

    .hero.hero-small .hero-cta .btn {
        width: 100%;
    }

    .filter-tabs {
        gap: 6px;
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .filter-tabs::-webkit-scrollbar {
        display: none;
    }

    .filter-btn {
        padding: 6px 14px;
        font-size: 0.8rem;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .inventory-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .inventory-card {
        padding: 16px;
        min-height: 180px;
    }

    .inventory-logo {
        width: 36px;
        height: 36px;
        font-size: 0.7rem;
    }

    .inventory-card .inventory-name {
        font-size: 0.9rem;
    }

    .inventory-card .inventory-desc {
        font-size: 0.75rem;
    }

    .inventory-card .stat-number {
        font-size: 0.85rem;
    }

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

@media (max-width: 480px) {
    .inventory-grid {
        grid-template-columns: 1fr;
    }

    .inventory-card {
        padding: 18px;
        min-height: auto;
    }

    .inventory-card .inventory-stats {
        flex-direction: row;
        gap: 16px;
    }

    .filter-tabs {
        padding-bottom: 12px;
    }

    .section-header {
        text-align: center;
    }

    .section-title {
        font-size: clamp(1.25rem, 4vw, 1.75rem);
    }
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes invFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.inventory-card {
    animation: invFadeIn 0.4s ease forwards;
}

.inventory-grid .inventory-card:nth-child(1) { animation-delay: 0.05s; }
.inventory-grid .inventory-card:nth-child(2) { animation-delay: 0.1s; }
.inventory-grid .inventory-card:nth-child(3) { animation-delay: 0.15s; }
.inventory-grid .inventory-card:nth-child(4) { animation-delay: 0.2s; }
.inventory-grid .inventory-card:nth-child(5) { animation-delay: 0.25s; }
.inventory-grid .inventory-card:nth-child(6) { animation-delay: 0.3s; }
.inventory-grid .inventory-card:nth-child(7) { animation-delay: 0.35s; }
.inventory-grid .inventory-card:nth-child(8) { animation-delay: 0.4s; }