
/* --- SENRA AUTOPARTS V2.0 - PREMIUM DESIGN --- */

:root {
    --primary: #1e40af;
    --primary-dark: #1e3a8a;
    --secondary: #3b82f6;
    --accent: #e11d48;
    --success: #059669;
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --radius: 12px;
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--bg);
    animation: fadeInPage 0.5s ease-out;
}

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

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* --- NAVBAR --- */
.navbar {
    background: rgba(30, 64, 175, 0.95);
    backdrop-filter: blur(10px);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: white;
}

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -1px;
}

@keyframes rodarRoda {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.roda-animada {
    width: 38px;
    height: 38px;
    animation: rodarRoda 4s linear infinite;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.logo-container:hover .roda-animada {
    animation-duration: 0.6s;
    transform: scale(1.1);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 600;
    font-size: 0.95rem;
}

.nav-links a:hover {
    color: white;
    transform: translateY(-1px);
}
/* --- FEATURES --- */
.features {
    padding: 4rem 2rem;
    background: #f9fafb;
}

.features .container {
    max-width: 1200px;
    margin: 0 auto;
}

.features h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #1f2937;
}

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

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: #3b82f6;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 1.8rem;
    color: white;
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #1f2937;
}

.feature-card p {
    color: #6b7280;
    line-height: 1.6;
}
/* --- CARDS & COMPONENTS --- */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0,0,0,0.03);
}

.btn-primary {
    background: var(--primary);
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    display: inline-block;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.2);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn-add-cart {
    background: var(--primary);
    color: white;
    padding: 1rem;
    border-radius: 10px;
    border: none;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-add-cart:hover {
    background: var(--primary-dark);
    transform: scale(1.02);
}

/* --- PRODUCTS GRID --- */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2.5rem;
}

.product-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

.product-image {
    height: 250px;
    background: #f1f5f9;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-info {
    padding: 1.8rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-price {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary);
}

/* --- USER NAV --- */
.user-nav-container {
    position: relative;
}

.user-profile-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.15);
    padding: 6px 15px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s;
}

.user-profile-trigger:hover {
    background: rgba(255,255,255,0.25);
}

.nav-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
}

.nav-dropdown {
    position: absolute;
    top: 120%;
    right: 0;
    background: white;
    min-width: 220px;
    border-radius: 15px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.15);
    padding: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s;
    z-index: 1001;
}

.user-nav-container:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown a {
    color: var(--text-main) !important;
    padding: 12px 15px;
    border-radius: 10px;
    display: block;
    font-size: 0.9rem;
    text-decoration: none;
}

.nav-dropdown a:hover {
    background: #f1f5f9;
}

/* --- FORM GROUPS --- */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-family: inherit;
    transition: all 0.3s;
}

.form-group input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 4px rgba(30, 64, 175, 0.1);
}

/* --- BADGES --- */
.badge {
    padding: 6px 15px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
}

.badge.pendente { background: #fef3c7; color: #92400e; }
.badge.enviado { background: #dbeafe; color: #1e40af; }
.badge.entregue { background: #d1fae5; color: #065f46; }
.badge.cancelado { background: #fee2e2; color: #991b1b; }

/* --- DESCRIPTION TRUNCATION --- */
.product-description {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.6;
    max-height: 4.8em;
    transition: max-height 0.3s ease;
}

.product-description.expanded {
    -webkit-line-clamp: unset;
    line-clamp: unset;
    max-height: 1000px;
}

.btn-ver-mais {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    margin-bottom: 1.2rem;
    text-align: left;
    display: none;
}

/* --- HERO SECTION --- */
.hero {
    background: linear-gradient(rgba(55, 89, 163, 0.637), rgba(68, 68, 71, 0.6)), url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 100px 0;
    text-align: center;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* --- WHY CHOOSE US --- */
.why-choose-us {
    padding: 80px 0;
    background: white;
}

.why-choose-us h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary);
}

.benefits-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.benefits-list li {
    padding: 1.5rem;
    background: var(--bg);
    border-radius: var(--radius);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.check-icon {
    color: var(--success);
    font-weight: 800;
}

/* --- CTA SECTION --- */
.cta-section {
    padding: 80px 0;
    text-align: center;
    background: var(--primary);
    color: white;
}

.cta-section h2 {
    margin-bottom: 1rem;
}

.cta-section p {
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* --- FOOTER --- */
.footer {
    background: #1e2937;
    color: white;
    padding: 60px 0 20px;
    margin-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 40px;
}

.footer-col h4 {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
    color: #9ca3af;
    font-size: 0.9rem;
}

/* --- PRODUCTS HEADER --- */
.products-header {
    background: var(--primary);
    color: white;
    padding: 60px 0;
    text-align: center;
}

.search-filters {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.search-box input {
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    border: none;
    width: 300px;
}

.category-select {
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    border: none;
    background: white;
    cursor: pointer;
}

.products-section {
    padding: 60px 0;
}

/* --- CHATBOT STYLES --- */
.chatbot-page {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: #1524f7;
}

.chatbot-header {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    color: white;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow);
}

.chatbot-header h1 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.chatbot-header p {
    margin: 0.5rem 0 0 0;
    font-size: 0.95rem;
    opacity: 0.95;
}

.chatbot-main {
    flex: 1;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    background: #ffffff;
}

.chatbot-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 700px;
    height: 100%;
    background: #ffffff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

#chat-box {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: #ffffff;
}

#chat-box::-webkit-scrollbar {
    width: 6px;
}

#chat-box::-webkit-scrollbar-track {
    background: transparent;
}

#chat-box::-webkit-scrollbar-thumb {
    background: #3b82f6;
    border-radius: 10px;
}

#chat-box::-webkit-scrollbar-thumb:hover {
    background: #1e40af;
}

.message {
    padding: 0.875rem 1.25rem;
    border-radius: var(--radius);
    max-width: 85%;
    word-wrap: break-word;
    line-height: 1.5;
    animation: fadeInMessage 0.3s ease-out;
}

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

.user-message {
    background: #1e40af;
    color: #ffffff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.bot-message {
    background: #dbeafe;
    color: #1e3a8a;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    border-left: 4px solid #1e40af;
}

.input-area {
    display: flex;
    gap: 0.75rem;
    padding: 1.25rem;
    border-top: 2px solid #e0e7ff;
    background: #ffffff;
}

#user-input {
    flex: 1;
    padding: 0.875rem 1.25rem;
    border: 2px solid #bfdbfe;
    border-radius: 30px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: #ffffff;
    color: #1e3a8a;
}

#user-input::placeholder {
    color: #a5b4fc;
}

#user-input:focus {
    outline: none;
    border-color: #1e40af;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.15);
    background: #ffffff;
}

#send-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    color: #ffffff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
}

#send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(30, 64, 175, 0.4);
}

#send-btn:active {
    transform: translateY(0);
}

#send-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.typing-indicator {
    display: none;
    gap: 0.5rem;
    padding: 0.875rem 1.25rem;
    align-items: center;
    animation: fadeInMessage 0.3s ease-out;
}

.typing-indicator .dot {
    width: 8px;
    height: 8px;
    background: #9ca3af;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-indicator .dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator .dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        opacity: 0.5;
        transform: translateY(0);
    }
    30% {
        opacity: 1;
        transform: translateY(-8px);
    }
}

.chat-buttons {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.btn-action {
    padding: 0.625rem 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

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