/* CSS Responsivo para Centro Útil */

/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f7fa;
}

/* Container responsivo */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header responsivo */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
}

.logo p {
    font-size: 0.9rem;
    opacity: 0.9;
}

.header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    min-width: 200px;
}

.search-box input {
    width: 100%;
    padding: 8px 40px 8px 12px;
    border: none;
    border-radius: 20px;
    font-size: 0.9rem;
}

.search-box button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: #667eea;
    border: none;
    color: #fff;
    padding: 6px 10px;
    border-radius: 16px;
    cursor: pointer;
}

.cart-icon {
    position: relative;
    color: #fff;
    text-decoration: none;
    font-size: 1.2rem;
    padding: 8px;
}

.cart-count {
    position: absolute;
    top: -6px;
    right: -10px;
    background: #ff6b6b;
    color: #fff;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

/* Grid responsivo */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    margin: 20px 0;
}

/* Cards */
.card {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

/* Botões */
.btn {
    display: inline-block;
    background: #667eea;
    color: #fff;
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn:hover {
    background: #5a67d8;
}

.btn-outline {
    background: #fff;
    color: #667eea;
    border: 1px solid #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: #fff;
}

/* Tabelas responsivas */
.table-responsive {
    overflow-x: auto;
    margin: 20px 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0,0,0,.1);
}

th, td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

th {
    background: #fafafa;
    font-weight: 600;
}

/* Layout de checkout */
.checkout-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

/* Formulários */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}

/* Status badges */
.status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: bold;
}

.status-pago {
    background-color: #d4edda;
    color: #155724;
}

.status-aguardando {
    background-color: #fff3cd;
    color: #856404;
}

.status-pendente {
    background-color: #f8d7da;
    color: #721c24;
}

/* Footer */
footer {
    background: #0f172a;
    color: #d1d5db;
    padding: 30px 0 20px;
    margin-top: 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.footer-section h3 {
    color: #fff;
    margin: 0 0 10px;
    font-size: 1.05rem;
}

.footer-bottom {
    border-top: 1px solid #334155;
    margin-top: 18px;
    padding-top: 12px;
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.social-links {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #1f2937;
    color: #fff;
    font-size: 1.1rem;
    text-decoration: none;
}

.social-links a:hover {
    background: #334155;
}

/* Utilitários */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mb-20 { margin-bottom: 20px; }
.mt-20 { margin-top: 20px; }
.p-20 { padding: 20px; }

/* Media Queries para Responsividade */

/* Tablets */
@media (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }
    
    .grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 20px;
    }
    
    .checkout-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 10px;
    }
    
    .header-actions {
        width: 100%;
        justify-content: center;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }
    
    .header-content {
        padding: 10px 0;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .search-box {
        min-width: 180px;
    }
    
    .search-box input {
        font-size: 0.8rem;
        padding: 6px 35px 6px 10px;
    }
    
    .grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 15px;
    }
    
    .checkout-grid {
        grid-template-columns: 1fr;
    }
    
    .table-responsive {
        font-size: 0.9rem;
    }
    
    th, td {
        padding: 8px;
    }
    
    .btn {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .card {
        margin: 10px 0;
    }
    
    /* Esconder elementos desnecessários em mobile */
    .hide-mobile {
        display: none;
    }
}

/* Mobile pequeno */
@media (max-width: 480px) {
    .container {
        padding: 0 5px;
    }
    
    .logo h1 {
        font-size: 1.3rem;
    }
    
    .search-box {
        min-width: 150px;
    }
    
    .grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
    
    .header-actions {
        gap: 10px;
    }
    
    th, td {
        padding: 6px;
        font-size: 0.8rem;
    }
    
    .btn {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
    
    .card {
        border-radius: 8px;
    }
}

/* Melhorias para touch devices */
@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    .cart-icon {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    .search-box button {
        min-height: 32px;
        min-width: 32px;
    }
}

/* Modo escuro (opcional) */
@media (prefers-color-scheme: dark) {
    body {
        background: #1a202c;
        color: #e2e8f0;
    }
    
    .card {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .form-control {
        background: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
    }
    
    th {
        background: #4a5568;
    }
}