:root {
    --bg-dark: #0f1117;
    --bg-card: #181b24;
    --bg-input: #222634;
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --accent: #00f5d4;
    --accent-hover: #00c4a7;
    --shopee: #ee4d2d;
    --ml: #ffe600;
    --amazon: #ff9900;
    --border: #2d3244;
    --radius: 10px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.5;
}

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Busca Avançada */
.header {
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 15px 20px;
}

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-main);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.logo i,
.logo span {
    color: var(--accent);
}

.search-advanced {
    display: flex;
    flex: 1;
    max-width: 680px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.search-advanced select {
    background: #1b1f2b;
    color: var(--text-main);
    border: none;
    border-right: 1px solid var(--border);
    padding: 0 14px;
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
}

.search-advanced input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px 16px;
    color: var(--text-main);
    font-size: 0.95rem;
    outline: none;
}

.search-advanced button {
    background: var(--accent);
    color: #0b0d12;
    border: none;
    padding: 0 22px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.search-advanced button:hover {
    background: var(--accent-hover);
}

.btn-admin-toggle {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 10px 16px;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: 0.2s;
}

.btn-admin-toggle:hover {
    background: var(--accent);
    color: #000;
}

/* Barra de Filtros Secundários */
.filter-bar {
    background: #13161f;
    border-top: 1px solid var(--border);
    padding: 10px 0;
}

.filter-bar-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.filter-group select,
.filter-group input {
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 6px 10px;
    border-radius: 6px;
    outline: none;
}

.filter-group input {
    width: 110px;
}

.btn-clear {
    margin-left: auto;
    background: transparent;
    border: none;
    color: var(--text-muted);
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.85rem;
}

.btn-clear:hover {
    color: var(--accent);
}

/* Painel Admin (Colar Link) */
.admin-panel {
    background: #141822;
    border-bottom: 2px solid var(--accent);
    padding: 25px 0;
}

.admin-panel.hidden {
    display: none;
}

.admin-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.admin-header h2 {
    font-size: 1.2rem;
    color: var(--accent);
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.8rem;
    cursor: pointer;
}

.link-fetcher {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.link-fetcher input {
    flex: 1;
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 12px 15px;
    border-radius: var(--radius);
    outline: none;
}

.btn-primary {
    background: var(--accent);
    color: #000;
    border: none;
    padding: 0 20px;
    border-radius: var(--radius);
    font-weight: 700;
    cursor: pointer;
}

.status-msg {
    font-size: 0.85rem;
    color: var(--accent);
    margin-bottom: 15px;
    min-height: 20px;
}

.product-form {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 20px;
    align-items: start;
}

.preview-card {
    position: relative;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
}

.preview-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.form-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.field-row {
    display: flex;
    gap: 12px;
}

.field {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.field.small {
    max-width: 170px;
}

.field label {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.field input,
.field select {
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-main);
    padding: 9px 12px;
    border-radius: 6px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 5px;
}

.btn-success {
    background: #10b981;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}

.btn-secondary {
    background: var(--bg-input);
    color: var(--text-main);
    border: 1px solid var(--border);
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
}

/* Carrossel */
.carousel-section {
    margin-top: 25px;
}

.carousel {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    height: 290px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.carousel-track {
    height: 100%;
}

.carousel-slide {
    display: none;
    height: 100%;
    padding: 40px 65px;
    align-items: center;
    color: #fff;
    animation: fadeIn 0.5s ease;
}

.carousel-slide.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0.4;
    }

    to {
        opacity: 1;
    }
}

.slide-content {
    max-width: 600px;
}

.slide-tag {
    display: inline-block;
    background: rgba(0, 0, 0, 0.35);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.slide-tag.dark {
    background: #111;
    color: #ffe600;
}

.slide-tag.amazon {
    background: #ff9900;
    color: #111;
}

.slide-content h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.slide-content p {
    font-size: 1rem;
    margin-bottom: 20px;
    opacity: 0.92;
}

.btn-slide {
    background: #fff;
    color: #111;
    border: none;
    padding: 11px 22px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-slide.dark {
    background: #111;
    color: #fff;
}

.btn-slide.amazon {
    background: #ff9900;
    color: #111;
}

.btn-slide:hover {
    transform: translateY(-2px);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
}

.carousel-btn.prev {
    left: 15px;
}

.carousel-btn.next {
    right: 15px;
}

.carousel-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
}

.dot.active {
    background: #fff;
    transform: scale(1.2);
}

/* Vitrine de Produtos */
.main-content {
    margin: 40px auto;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-header h2 i {
    color: #ff6b35;
}

#results-count {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 22px;
}

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, border-color 0.2s;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
}

.product-img-wrap {
    position: relative;
    background: #fff;
    height: 220px;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-img-wrap img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
}

.badge.shopee {
    background: var(--shopee);
    color: #fff;
}

.badge.mercadolivre {
    background: var(--ml);
    color: #111;
}

.badge.amazon {
    background: var(--amazon);
    color: #111;
}

.btn-delete-card {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.8rem;
}

.btn-delete-card:hover {
    background: #ef4444;
}

.product-info {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-category {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 6px;
}

.product-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.product-price {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 14px;
}

.product-price span {
    font-size: 0.9rem;
    font-weight: 500;
}

.btn-buy {
    display: block;
    text-align: center;
    text-decoration: none;
    padding: 11px;
    border-radius: 8px;
    font-weight: 700;
    transition: opacity 0.2s;
}

.btn-buy.shopee {
    background: var(--shopee);
    color: #fff;
}

.btn-buy.mercadolivre {
    background: var(--ml);
    color: #111;
}

.btn-buy.amazon {
    background: var(--amazon);
    color: #111;
}

.btn-buy:hover {
    opacity: 0.9;
}

/* Rodapé */
.footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    margin-top: 60px;
    padding-top: 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    padding-bottom: 30px;
}

.footer-col h3 {
    font-size: 1.4rem;
    margin-bottom: 12px;
}

.footer-col h3 span,
.footer-col h3 i {
    color: var(--accent);
}

.footer-col h4 {
    margin-bottom: 12px;
    color: var(--text-main);
}

.footer-col p,
.footer-col li {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col a {
    color: var(--text-muted);
    text-decoration: none;
}

.footer-col a:hover {
    color: var(--accent);
}

.disclaimer {
    font-size: 0.82rem !important;
    line-height: 1.45;
}

.footer-bottom {
    border-top: 1px solid var(--border);
    text-align: center;
    padding: 18px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Responsividade */
@media (max-width: 768px) {
    .header-top {
        flex-wrap: wrap;
    }

    .search-advanced {
        order: 3;
        max-width: 100%;
        width: 100%;
    }

    .product-form {
        grid-template-columns: 1fr;
    }

    .preview-card {
        max-width: 180px;
    }

    .field-row {
        flex-direction: column;
    }

    .field.small {
        max-width: 100%;
    }

    .carousel {
        height: 320px;
    }

    .carousel-slide {
        padding: 30px;
    }

    .slide-content h2 {
        font-size: 1.5rem;
    }
}