/* Correção de visibilidade do toast */
.toast-container {
    display: flex !important;
    opacity: 1 !important;
}
.toast {
    opacity: 1 !important;
}
/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Cores Primárias - Qualcore */
    --primary-purple: #3F2A5D;
    --primary-dark: #1C2120;
    --accent-black: #000000;
    --accent-white: #FFFFFF;
    --accent-gray: #8F8E8E;
    
    /* Cores Derivadas */
    --purple-light: #5A4079;
    --purple-dark: #2D1D42;
    --gray-light: #F5F5F5;
    --gray-medium: #CCCCCC;
    --gray-dark: #333333;
    
    /* Cores do Sistema */
    --success: #22C55E;
    --warning: #F59E0B;
    --error: #EF4444;
    --info: #3B82F6;
    
    /* Gradientes */
    --gradient-purple: linear-gradient(135deg, var(--primary-purple) 0%, var(--purple-dark) 100%);
    --gradient-dark: linear-gradient(135deg, var(--primary-dark) 0%, var(--gray-dark) 100%);
    
    /* Sombras */
    --shadow-sm: 0 2px 4px rgba(63, 42, 93, 0.1);
    --shadow-md: 0 4px 12px rgba(63, 42, 93, 0.15);
    --shadow-lg: 0 8px 25px rgba(63, 42, 93, 0.2);
    
    /* Transições */
    --transition-fast: 0.15s ease-out;
    --transition-smooth: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Layout */
    --header-height: 70px;
    --sidebar-width: 280px;
    --container-max: 1200px;
    --border-radius: 12px;
    --border-radius-sm: 8px;
}

/* Tema Light Mode (padrão) */
:root {
    --text-primary: #1A1A1A;
    --text-secondary: #666666;
    --bg-primary: #FFFFFF;
    --bg-secondary: #F8F9FA;
    --border-color: #E5E7EB;
    --card-bg: #FFFFFF;
    --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Tema Dark Mode */
[data-theme="dark"] {
    --text-primary: #FFFFFF;
    --text-secondary: #D1D5DB;
    --bg-primary: #111827;
    --bg-secondary: #1F2937;
    --border-color: #374151;
    --card-bg: #1F2937;
    --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    --accent-white: #111827;
    --gray-light: #374151;
    --gray-medium: #4B5563;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--transition-smooth), color var(--transition-smooth);
}

/* ==================== HEADER ==================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--gradient-purple);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(63, 42, 93, 0.3);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1rem;
    gap: 1rem;
}

.menu-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 1.25rem;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.logo-img {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: transform var(--transition-smooth);
}

.logo-img:hover {
    transform: scale(1.05);
}

.search-container {
    display: flex;
    align-items: center;
    flex: 1;
    max-width: 400px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 0.875rem;
    transition: all var(--transition-fast);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.search-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.header-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    position: relative;
    white-space: nowrap;
    font-size: 0.875rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.header-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.header-btn.active {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-text {
    display: none;
}

.cart-counter,
.build-counter {
    background: var(--error);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: -8px;
    right: -8px;
    opacity: 0;
    transform: scale(0.8);
    transition: all var(--transition-fast);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.cart-counter.active,
.build-counter.active {
    opacity: 1;
    transform: scale(1);
}

/* ==================== RESPONSIVE HEADER ==================== */
@media (min-width: 640px) {
    .btn-text {
        display: inline;
    }
    
    .theme-toggle-btn {
        display: none;
    }
}

@media (min-width: 768px) {
    .header-container {
        padding: 0 2rem;
        gap: 2rem;
    }
    
    .header-btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .logo-img {
        width: 52px;
        height: 52px;
    }
}

/* ==================== SIDEBAR ==================== */
.sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-primary);
    border-right: 1px solid var(--border-color);
    z-index: 1100;
    transition: left var(--transition-fast);
    overflow-y: auto;
    overflow-x: hidden; /* ADICIONAR ESTA LINHA */
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
    display: flex; /* ADICIONAR ESTA LINHA */
    flex-direction: column; /* ADICIONAR ESTA LINHA */
}

.sidebar.active {
    left: 0;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.sidebar-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.sidebar-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
}

.sidebar-close:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
}

.sidebar-content {
    padding: 1rem;
    flex: 1; /* ADICIONAR ESTA LINHA */
    overflow-y: auto; /* ADICIONAR ESTA LINHA */
    display: flex; /* ADICIONAR ESTA LINHA */
    flex-direction: column; /* ADICIONAR ESTA LINHA */
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: all var(--transition-fast);
    font-weight: 500;
}

.nav-item:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
    transform: translateX(4px);
}

.nav-item.active {
    background: var(--primary-purple);
    color: white;
    box-shadow: 0 4px 12px rgba(63, 42, 93, 0.3);
}

.nav-item i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.sidebar-divider {
    height: 1px;
    background: var(--border-color);
    margin: 1.5rem 0;
}

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto; /* ADICIONAR ESTA LINHA */
    padding-top: 1rem; /* ADICIONAR ESTA LINHA */
}

.theme-label {
    font-weight: 500;
    color: var(--text-primary);
}

.theme-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.theme-btn:hover {
    background: var(--primary-purple);
    color: white;
    border-color: var(--primary-purple);
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1050;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ==================== MAIN CONTENT ==================== */
.main-content {
    margin-top: var(--header-height);
    padding: 2rem 1rem;
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 768px) {
    .main-content {
        padding: 2rem;
    }
}

/* ==================== BUILD MODE BANNER ==================== */
.build-mode-banner {
    background: linear-gradient(135deg, var(--info) 0%, #2563EB 100%);
    color: white;
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    animation: slideDown 0.3s ease-out;
}

.banner-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.banner-content i {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.banner-text {
    flex: 1;
}

.banner-text h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.banner-text p {
    font-size: 0.875rem;
    opacity: 0.9;
}

.banner-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 0.5rem;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: background-color var(--transition-fast);
    flex-shrink: 0;
}

.banner-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ==================== FILTERS ==================== */
.filters-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.category-tabs {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.category-tabs::-webkit-scrollbar {
    height: 4px;
}

.category-tabs::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 2px;
}

.category-tabs::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 2px;
}

.tab-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.tab-btn:hover {
    background: var(--primary-purple);
    color: white;
    border-color: var(--primary-purple);
}

.tab-btn.active {
    background: var(--primary-purple);
    color: white;
    border-color: var(--primary-purple);
}

.sort-section {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.sort-select {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.875rem;
}

@media (min-width: 768px) {
    .filters-section {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .category-tabs {
        padding-bottom: 0;
    }
}

/* ==================== PRODUCTS GRID ==================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.product-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: all var(--transition-smooth);
    box-shadow: var(--card-shadow);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.product-card.incompatible {
    opacity: 0.6;
    border-color: var(--error);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: contain;
    transition: transform var(--transition-smooth);
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-content {
    padding: 1.25rem;
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.product-category {
    background: var(--primary-purple);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
}

.product-brand {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.product-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.product-specs {
    background: var(--bg-secondary);
    padding: 0.75rem;
    border-radius: var(--border-radius-sm);
    margin-bottom: 1rem;
}

.spec-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.spec-row:last-child {
    margin-bottom: 0;
}

.spec-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.spec-value {
    color: var(--text-primary);
    font-weight: 600;
}

.incompatibility-warning {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--border-radius-sm);
    padding: 0.75rem;
    margin-bottom: 1rem;
}

.warning-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--error);
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.warning-reasons {
    list-style: none;
    margin: 0;
    padding: 0;
}

.warning-reasons li {
    color: var(--error);
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
    padding-left: 1rem;
    position: relative;
}

.warning-reasons li::before {
    content: '•';
    position: absolute;
    left: 0;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-purple);
    margin-bottom: 1rem;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
}

.btn {
    padding: 0.75rem 1rem;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    flex: 1;
}

.btn-primary {
    background: var(--primary-purple);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: var(--purple-dark);
    transform: translateY(-1px);
}

.btn-primary:disabled {
    background: var(--gray-medium);
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
}

.btn-danger {
    background: var(--error);
    color: white;
}

.btn-danger:hover {
    background: #DC2626;
    transform: translateY(-1px);
}

/* ==================== LOADING ==================== */
.loading {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    text-align: center;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-purple);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.loading p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.no-products {
    text-align: center;
    padding: 3rem;
    grid-column: 1 / -1;
}

.no-products h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.no-products p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* ==================== MODALS ==================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1rem;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
}

.modal-container {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideUp 0.3s ease-out;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.modal-header h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
}

.modal-content {
    padding: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.cart-total {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-purple);
}

/* ==================== CART ITEMS ==================== */
.cart-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    background: var(--bg-secondary);
}

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--border-radius-sm);
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.cart-item-price {
    color: var(--primary-purple);
    font-weight: 600;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.quantity-btn {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 32px;
    height: 32px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    transition: all var(--transition-fast);
}

.quantity-btn:hover {
    background: var(--primary-purple);
    color: white;
}

.quantity-display {
    min-width: 40px;
    text-align: center;
    font-weight: 600;
    color: var(--text-primary);
}

.remove-btn {
    background: var(--error);
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.remove-btn:hover {
    background: #DC2626;
}

.empty-cart {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

/* ==================== TOAST NOTIFICATIONS ==================== */
.toast-container {
    position: fixed;
    top: calc(var(--header-height) + 1rem);
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--success);
    border-radius: var(--border-radius);
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 300px;
    max-width: 400px;
        animation: toastSlideIn 0.3s ease-out, slideDown 0.3s;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.toast.success {
    border-left-color: var(--success);
}

.toast.error {
    border-left-color: var(--error);
}

.toast.warning {
    border-left-color: var(--warning);
}

.toast.info {
    border-left-color: var(--info);
}

.toast-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.toast.success .toast-icon {
    color: var(--success);
}

.toast.error .toast-icon {
    color: var(--error);
}

.toast.warning .toast-icon {
    color: var(--warning);
}

.toast.info .toast-icon {
    color: var(--info);
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
}

.toast-message {
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.toast-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* ==================== ANIMATIONS ==================== */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ==================== UTILITIES ==================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 480px) {
    .header-container {
        padding: 0 0.75rem;
    }
    
    .search-container {
        max-width: none;
        min-width: 0;
    }
    
    .search-input {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .header-actions {
        gap: 0.25rem;
    }

    .sidebar {
        width: 100%; /* Sidebar ocupa tela toda no mobile */
        max-width: 320px; /* Mas não mais que 320px */
    }
    
    .sidebar-content {
        height: calc(100vh - 80px); /* Altura total menos header */
        padding-bottom: 2rem; /* Espaço extra no fim */
    }
    
    .theme-toggle {
        margin-top: auto;
        padding: 1.5rem 0;
        border-top: 1px solid var(--border-color);
        margin-top: 1rem;
    }
    
    .theme-btn {
        padding: 0.75rem 1rem; /* Botão maior para mobile */
        min-height: 44px; /* Tamanho mínimo para touch */
    }
}
    
    .header-btn {
        padding: 0.5rem;
        min-width: 44px;
        height: 44px;
    }
    
    .btn-text {
        display: none;
    }
    
    .theme-toggle-btn {
        min-width: 44px;
        height: 44px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .main-content {
        padding: 1rem 0.75rem;
    }
    
    .modal-container {
        margin: 0.5rem;
        max-width: none;
    }
    
    .toast-container {
        left: 0.5rem;
        right: 0.5rem;
    }
    
    .toast {
        min-width: auto;
        max-width: none;
    }

@media (min-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 2rem;
    }
    
    .product-actions {
        flex-direction: row;
    }
}

@media (min-width: 1200px) {
    .header-container {
        padding: 0;
    }

}

/* Estilos para cupons e histórico */
.coupon-row .btn-primary {
    background: var(--success);
    color: white;
    border: none;
}
.coupon-row .btn-primary:hover {
    background: #1cbf4a;
}
.coupon-row {
    transition: background var(--transition-fast);
}
.coupon-row:hover {
    background: var(--gray-light);
}
/* Histórico */
.history-row {
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.15s;
}
.history-row:hover {
    box-shadow: var(--shadow-md);
}