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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1800px; /* Increased from 1400px to prevent line breaks */
    margin: 0 auto;
}

header {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 30px;
    text-align: center;
}

header h1 {
    color: #667eea;
    font-size: 2.5em;
    margin-bottom: 10px;
}

header p {
    color: #666;
    font-size: 1.2em;
}

.filters {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.filters input,
.filters select {
    flex: 1;
    min-width: 200px;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.filters input:focus,
.filters select:focus {
    outline: none;
    border-color: #667eea;
}

.table-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

th {
    padding: 15px 10px;
    text-align: center;
    font-weight: 600;
    font-size: 13px;
}

td {
    padding: 12px 10px;
    border-bottom: 1px solid #f0f0f0;
    text-align: center;
    vertical-align: middle;
    font-size: 13px;
}

/* Destaque column (first column) */
.destaque-cell {
    text-align: center;
    width: 160px;
    min-width: 160px;
}

/* Item column aligned to left (second column now) */
td:nth-child(2) {
    text-align: left;
    min-width: 200px; /* Prevent item names from wrapping */
}

/* Célula de descrição com controle de quebra */
.descricao-cell {
    max-width: 150px; /* Reduced width since we only show "Ver Descrição" */
    white-space: nowrap;
    overflow: hidden;
    text-align: center;
}

/* Destaque badges - colorful buttons with icon and text */
.destaque-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.destaque-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

/* Nenhum destaque */
.destaque-nenhum {
    background: #e9ecef;
    color: #6c757d;
    box-shadow: none;
}

/* Super Oferta - Red/Orange gradient */
.destaque-super-oferta {
    background: linear-gradient(135deg, #ff4757 0%, #ff6348 100%);
    color: white;
}

/* Último do Estoque - Orange gradient */
.destaque-ultimo-estoque {
    background: linear-gradient(135deg, #ffa502 0%, #ff7f00 100%);
    color: white;
}

/* Lacrado - Green gradient */
.destaque-lacrado {
    background: linear-gradient(135deg, #2ed573 0%, #26de81 100%);
    color: white;
}

/* Abaixo do Preço - Blue gradient */
.destaque-abaixo-preco {
    background: linear-gradient(135deg, #1e90ff 0%, #4169e1 100%);
    color: white;
}

/* Novidade - Purple gradient */
.destaque-novidade {
    background: linear-gradient(135deg, #a29bfe 0%, #6c5ce7 100%);
    color: white;
}

/* Exclusivo - Pink gradient */
.destaque-exclusivo {
    background: linear-gradient(135deg, #fd79a8 0%, #e84393 100%);
    color: white;
}

/* Imperdível - Red gradient */
.destaque-imperdivel {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
}

tbody tr {
    transition: background-color 0.3s;
}

tbody tr:hover {
    background-color: #f8f9ff;
}

/* Produto Reservado - Destaque visual */
tbody tr.produto-reservado {
    background-color: #fff3cd !important;
    border-left: 4px solid #ff9800;
}

tbody tr.produto-reservado:hover {
    background-color: #ffe8a1 !important;
}

.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-disponivel {
    background: #d1f2eb;
    color: #0c5460;
}

.badge-reservado {
    background: #fff3cd;
    color: #856404;
}

.badge-indisponivel {
    background: #f8d7da;
    color: #721c24;
}

.badge-novo {
    background: #d1ecf1;
    color: #0c5460;
}

.badge-usado {
    background: #e2e3e5;
    color: #383d41;
}

.badge-sem-uso {
    background: #d4edda;
    color: #155724;
}

.badge-recondicionado {
    background: #cce5ff;
    color: #004085;
}

.btn-reservar {
    background: #28a745;
    color: white;
}

.btn-reservar:hover {
    background: #218838;
    transform: translateY(-2px);
}

.btn-oferta {
    background: #ffc107;
    color: #333;
}

.btn-oferta:hover {
    background: #e0a800;
    transform: translateY(-2px);
}

.btn-fotos {
    background: #667eea;
    color: white;
}

.btn-fotos:hover {
    background: #764ba2;
    transform: translateY(-2px);
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.3);
    animation: slideDown 0.3s;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: #000;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

.btn-submit {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.gallery img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s;
}

.gallery img:hover {
    transform: scale(1.05);
}

.loading {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

.no-photos {
    text-align: center;
    padding: 40px;
    color: #999;
}

/* Coluna de fotos centralizada */
.fotos-cell {
    text-align: center;
    width: 50px;
    min-width: 50px;
}

/* Ícone de câmera */
.camera-icon {
    cursor: pointer;
    font-size: 18px;
    opacity: 0.7;
    transition: all 0.3s;
    display: inline-block;
}

.camera-icon:hover {
    opacity: 1;
    transform: scale(1.3);
}

/* Link "Ver Descrição" */
.ver-descricao {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.3s;
    display: inline-block;
}

.ver-descricao:hover {
    color: white;
    background: #667eea;
    text-decoration: none;
}

/* Descrição completa no modal */
.produto-info {
    margin: 20px 0;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    color: white;
}

.produto-info h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.descricao-completa {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9ff;
    border-radius: 8px;
    line-height: 1.8;
    border: 1px solid #e0e7ff;
}

.descricao-completa p {
    margin: 0;
    color: #333;
    font-size: 15px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Célula de ações - tudo em uma linha */
.acoes-cell {
    white-space: nowrap;
    min-width: 250px;
}

.btn {
    padding: 6px 12px;
    margin: 2px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    vertical-align: middle;
}

/* Botões de compartilhamento - inline */
.btn-share {
    padding: 8px 10px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}

.btn-share svg {
    width: 14px;
    height: 14px;
}

.btn-whatsapp {
    background: #25D366;
    color: white;
}

.btn-whatsapp:hover {
    background: #1da851;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    header h1 {
        font-size: 1.8em;
    }

    .filters {
        flex-direction: column;
    }

    .filters input,
    .filters select {
        width: 100%;
    }

    .table-container {
        overflow-x: auto;
    }

    table {
        font-size: 12px;
    }

    th, td {
        padding: 6px;
    }

    .btn {
        padding: 6px 10px;
        font-size: 11px;
    }

    .btn-share {
        padding: 6px 8px;
    }
}
