/* ========================================
   CONFORTOCARE - MAIN CSS
   Estilos Globais (Header + Footer)
======================================== */

/* ========================================
   RESET E VARIÁVEIS
======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Cores Principais */
    --primary-orange: #FF6B35;
    --primary-dark: #E55A2B;
    --primary-light: #FF8C5F;
    --accent-green: #10B981;
    
    /* Cores Base */
    --bg-primary: #F5F7FA;
    --bg-secondary: #FFFFFF;
    --bg-elevated: #FAFBFC;
    --text-primary: #2C3E50;
    --text-secondary: #546E7A;
    --text-muted: #90A4AE;
    --border-color: #E0E6ED;
    --border-subtle: #EDF2F7;
    
    /* Gradientes */
    --gradient-primary: linear-gradient(135deg, #FF6B35 0%, #FF8C5F 100%);
    --gradient-overlay: linear-gradient(135deg, rgba(255, 107, 53, 0.95), rgba(255, 140, 95, 0.85));
    
    /* Sombras */
    --shadow-sm: 0 2px 8px rgba(44, 62, 80, 0.08);
    --shadow-md: 0 4px 16px rgba(44, 62, 80, 0.1);
    --shadow-lg: 0 8px 24px rgba(44, 62, 80, 0.12);
    --shadow-glow: 0 4px 20px rgba(255, 107, 53, 0.25);
    
    /* Transições */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
    background: var(--bg-primary);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    position: relative;
}

body.menu-open {
    overflow: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}

.container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

/*--------------------------------------------------------------
# USER DROPDOWN - MENU DE USUÁRIO LOGADO
--------------------------------------------------------------*/
.user-dropdown-container {
    position: relative;
}

.btn-user-dropdown {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1), rgba(255, 140, 66, 0.1));
    border: 2px solid rgba(255, 107, 53, 0.3);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    color: var(--text-primary);
}

.btn-user-dropdown:hover {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.2), rgba(255, 140, 66, 0.2));
    border-color: var(--primary-orange);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.2);
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #FF6B35, #FF8C42);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.user-name {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
    white-space: nowrap;
}

.btn-user-dropdown i.fa-chevron-down {
    font-size: 12px;
    color: var(--primary-orange);
    transition: transform 0.3s ease;
}

.btn-user-dropdown.active i.fa-chevron-down {
    transform: rotate(180deg);
}

/* DROPDOWN MENU */
.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 280px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    overflow: hidden;
}

.user-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 24px;
    width: 12px;
    height: 12px;
    background: white;
    transform: rotate(45deg);
    box-shadow: -2px -2px 4px rgba(0, 0, 0, 0.05);
}

.user-dropdown-header {
    padding: 20px;
    background: linear-gradient(135deg, #FF6B35, #FF8C42);
    display: flex;
    align-items: center;
    gap: 14px;
}

.user-dropdown-avatar {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 20px;
    flex-shrink: 0;
}

.user-dropdown-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.user-dropdown-info strong {
    color: white;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
}

.user-dropdown-info span {
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    font-weight: 500;
}

.user-dropdown-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, #e5e7eb, transparent);
    margin: 0;
}

.user-dropdown-list {
    list-style: none;
    padding: 8px 0;
    margin: 0;
}

.user-dropdown-list li {
    margin: 0;
}

.user-dropdown-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    position: relative;
}

.user-dropdown-link:hover {
    background: #f9fafb;
    color: var(--primary-orange);
}

.user-dropdown-link i {
    width: 20px;
    font-size: 16px;
    color: #6b7280;
    transition: color 0.2s ease;
}

.user-dropdown-link:hover i {
    color: var(--primary-orange);
}

.user-dropdown-link span:first-of-type {
    flex: 1;
}

.user-dropdown-link.logout {
    color: #ef4444;
    border-top: 1px solid #f3f4f6;
    margin-top: 8px;
}

.user-dropdown-link.logout:hover {
    background: #fef2f2;
    color: #dc2626;
}

.user-dropdown-link.logout i {
    color: #ef4444;
}

.user-dropdown-link.logout:hover i {
    color: #dc2626;
}

/* Cart Badge */
.cart-badge {
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    background: var(--primary-orange);
    color: white;
    border-radius: 11px;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Botão Entrar (não logado) */
.btn-entrar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.btn-entrar:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

/*--------------------------------------------------------------
# RESPONSIVE DROPDOWN
--------------------------------------------------------------*/
@media (max-width: 768px) {
    .user-name {
        display: none;
    }
    
    .btn-user-dropdown {
        padding: 10px 14px;
    }
    
    .user-dropdown-menu {
        width: 260px;
        right: -10px;
    }
}

@media (max-width: 480px) {
    .user-dropdown-menu {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        border-radius: 20px 20px 0 0;
        max-height: 80vh;
        overflow-y: auto;
    }
    
    .user-dropdown-menu::before {
        display: none;
    }
    
    .user-dropdown-menu.show {
        transform: translateY(0);
    }
    
    .user-dropdown-menu:not(.show) {
        transform: translateY(100%);
    }
}

/* ========================================
   BANNER PROMOCIONAL ANIMADO
======================================== */
.promo-banner {
    background: var(--gradient-primary);
    color: white;
    overflow: hidden;
    padding: 10px 0;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 1001;
}

.promo-content {
    display: flex;
    white-space: nowrap;
    animation: scrollPromo 30s linear infinite;
}

.promo-text {
    display: inline-block;
    padding: 0 50px;
}

.separator {
    display: inline-block;
    margin: 0 20px;
    opacity: 0.7;
}

@keyframes scrollPromo {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.promo-banner:hover .promo-content {
    animation-play-state: paused;
}

/* ========================================
   HEADER PRINCIPAL
======================================== */
.main-header {
    background: var(--bg-secondary);
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

/* Desktop: header normal (NÃO sticky) */
@media (min-width: 769px) {
    .main-header {
        position: relative;
    }
}

/* Mobile: header FIXO (sticky) */
@media (max-width: 768px) {
    .main-header {
        position: sticky;
        top: 0;
    }
    
    .main-header.scrolled {
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    }
}

/* Header Content */
.header-content {
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 10px 0;
}

/* Logo */
.logo {
    flex-shrink: 0;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
}

.logo:hover {
    transform: translateY(-2px);
}

.logo img {
    height: 110px;  /* ✅ AUMENTADO de 90px para 110px (DESKTOP) */
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.logo:hover img {
    transform: scale(1.05);
}

/* Search Bar */
.search-bar {
    flex: 0 0 auto;
    max-width: 280px;
    position: relative;
    order: 10;
}

.search-bar input {
    width: 100%;
    padding: 12px 50px 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    font-size: 14px;
    transition: var(--transition);
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.15);
    background: var(--bg-secondary);
}

.search-bar input::placeholder {
    color: var(--text-muted);
}

.search-bar button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    background: var(--gradient-primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: var(--transition);
}

.search-bar button:hover {
    transform: translateY(-50%) scale(1.05);
    box-shadow: var(--shadow-glow);
}

/* Desktop: Layout flex normal */
@media (min-width: 769px) {
    .header-content {
        display: flex;
        align-items: center;
        gap: 30px;
    }
    
    .logo {
        order: 1;
        flex-shrink: 0;
    }
    
    .header-actions {
        order: 2;
        display: flex;
        align-items: center;
        gap: 20px;
        flex: 1;
        justify-content: flex-end;
    }
    
    .search-bar {
        order: 3;
        margin-left: 20px;
        flex-shrink: 0;
    }
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: var(--transition);
}

.header-link:hover {
    background: var(--bg-elevated);
    color: var(--primary-orange);
}

.header-link i {
    font-size: 18px;
}

.phone-link {
    padding: 10px 20px;
    background: var(--gradient-primary);
    color: #fff;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
}

.phone-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
    color: #fff !important;
    background: var(--gradient-primary) !important;
}

.phone-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.phone-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

.phone-number {
    font-size: 14px;
    font-weight: 700;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: var(--gradient-primary);
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
}

.mobile-menu-btn span {
    display: block;
    width: 100%;
    height: 3px;
    background: #fff;
    border-radius: 2px;
    transition: var(--transition);
}

.mobile-menu-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

.mobile-menu-btn.active span:nth-child(2) {
    transform: rotate(-45deg) translate(4px, -4px);
}

/* ========================================
   NAVEGAÇÃO PRINCIPAL
======================================== */
.main-nav {
    background: var(--gradient-primary);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-menu {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 5px;
    padding: 0;
    margin: 0;
}

.nav-menu li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
    font-size: 14px;
    position: relative;
    transition: var(--transition);
}

.nav-menu li a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: #fff;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.nav-menu li a:hover,
.nav-menu li a.active {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.nav-menu li a:hover::before,
.nav-menu li a.active::before {
    transform: scaleX(1);
}

.nav-menu li a i {
    font-size: 16px;
}

/* ========================================
   FOOTER
======================================== */
.main-footer {
    position: relative;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    margin-top: 0px;
    border-top: 4px solid transparent;
    border-image: linear-gradient(90deg, 
        var(--primary-orange) 0%, 
        var(--primary-blue) 50%, 
        var(--primary-orange) 100%) 1;
}

.footer-divider {
    height: 4px;
    background: linear-gradient(90deg, 
        var(--primary-orange) 0%, 
        var(--primary-blue) 50%, 
        var(--primary-orange) 100%
    );
    box-shadow: 0 2px 15px rgba(255, 107, 0, 0.3);
}

.footer-content {
    background: var(--bg-secondary);
    padding: 80px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 50px;
    padding-bottom: 50px;
    border-bottom: 1px solid var(--border-subtle);
}

.footer-column h3,
.footer-column h4 {
    margin-bottom: 20px;
}

/* Footer Logo */
.footer-logo img {
    height: 80px;  /* ✅ AUMENTADO de 50px para 80px (DESKTOP) */
    width: auto;
    object-fit: contain;
    margin-bottom: 15px;
}

.footer-logo p {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 0;
}

.footer-description {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin: 20px 0 25px;
}

/* Footer Social */
.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-orange);
    border: 1px solid var(--border-subtle);
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--gradient-primary);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
    border-color: transparent;
}

/* Footer Columns */
.footer-column h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column ul li {
    margin-bottom: 12px;
}

.footer-column ul li a {
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.footer-column ul li a:hover {
    color: var(--primary-orange);
    padding-left: 5px;
}

/* Footer Contact */
.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 15px;
}

.footer-contact li i {
    font-size: 18px;
    color: var(--primary-orange);
    width: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.footer-contact li div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.footer-contact strong {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-contact span,
.footer-contact a {
    font-size: 14px;
    color: var(--text-secondary);
}

.footer-contact a:hover {
    color: var(--primary-orange);
}

/* Footer Bottom */
.footer-bottom {
    padding: 30px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.footer-certifications {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-certifications span {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.footer-certifications i {
    color: var(--primary-orange);
    font-size: 16px;
}

.footer-copyright {
    font-size: 14px;
    color: var(--text-muted);
    text-align: center;
    margin: 0;
}

.footer-developer {
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    margin: 0;
}

.footer-developer a {
    color: var(--primary-orange);
    font-weight: 600;
    transition: var(--transition);
}

.footer-developer a:hover {
    color: var(--primary-blue);
    text-decoration: underline;
}

/* ========================================
   RESPONSIVE - TABLET
======================================== */
@media (max-width: 1024px) {
    .phone-link .phone-info {
        display: none;
    }
    
    .phone-link {
        padding: 10px 16px;
    }
    
    .nav-menu li a {
        padding: 14px 18px;
        font-size: 13px;
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
    
    .footer-column:first-child {
        grid-column: 1 / -1;
    }
}

/* ========================================
   RESPONSIVE - MOBILE
======================================== */
@media (max-width: 768px) {
    .promo-banner {
        font-size: 12px;
        padding: 8px 0;
    }
    
    /* HEADER MOBILE - BEM RESPONSIVO */
    .header-content {
        padding: 8px 0 !important;
        display: grid !important;
        grid-template-columns: auto 1fr auto !important;
        gap: 10px !important;
        align-items: center;
    }
    
    .logo {
        order: 1 !important;
        grid-column: 1 !important;
    }
    
    .logo img {
        height: 90px !important;  /* ✅ AUMENTADO de 75px para 90px (TABLET) */
    }
    
    .search-bar {
        order: 2 !important;
        grid-column: 2 !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
    }
    
    .search-bar input {
        padding: 10px 40px 10px 12px !important;
        font-size: 13px !important;
    }
    
    .search-bar button {
        width: 34px !important;
        height: 34px !important;
    }
    
    .mobile-menu-btn {
        display: flex !important;
        order: 3 !important;
        grid-column: 3 !important;
    }
    
    .header-actions {
        display: none !important;
    }
    
    .main-nav {
        display: none;
    }
    
    .footer-content {
        padding: 60px 0 0;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .footer-column:first-child {
        grid-column: 1;
    }
    
    /* ✅ Footer logo MAIOR no mobile */
    .footer-logo img {
        height: 90px !important;
    }
    
    .footer-certifications {
        gap: 15px;
        flex-direction: row;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .header-content {
        padding: 6px 0 !important;
        gap: 8px !important;
    }
    
    .logo img {
        height: 80px !important;  /* ✅ AUMENTADO de 65px para 80px (MOBILE PEQUENO) */
    }
    
    .search-bar input {
        padding: 9px 38px 9px 10px !important;
        font-size: 12px !important;
    }
    
    .search-bar button {
        width: 32px !important;
        height: 32px !important;
    }
    
    .search-bar button i {
        font-size: 12px;
    }
    
    .mobile-menu-btn {
        width: 40px;
        height: 40px;
        padding: 8px;
    }
    
    .mobile-menu-btn span {
        height: 2.5px;
    }
    
    .footer-certifications span {
        font-size: 11px;
        white-space: nowrap;
    }
}

/* ========================================
   SCROLL SUAVE
======================================== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-elevated);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-orange);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ========================================
   ANIMAÇÕES GLOBAIS
======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease;
}