/* assets/style.css - Todo o CSS do DropShop em um único arquivo */
/* Separado por seção com comentários */

/* ============================================================
   RESET & VARIÁVEIS GLOBAIS
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=DM+Sans:wght@300;400;500;600&display=swap');

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

:root {
    --bg:        #111110;
    --bg2:       #1a1a18;
    --bg3:       #222220;
    --gold:      #D4A843;
    --gold-dark: #B8912E;
    --gold-light:#E8C06A;
    --text:      #F0EDE6;
    --text-muted:#8A8778;
    --text-dim:  #5A5950;
    --border:    rgba(212,168,67,0.15);
    --border2:   rgba(255,255,255,0.08);
    --red:       #E25555;
    --green:     #4CAF82;
    --radius:    12px;
    --radius-sm: 8px;
    --shadow:    0 4px 24px rgba(0,0,0,0.4);
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body:    'DM Sans', sans-serif;
    --transition:   all 0.2s ease;
}

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.6;
    min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: var(--font-body); }
input, select, textarea { font-family: var(--font-body); }

/* ============================================================
   COMPONENTES COMPARTILHADOS - Toast, Modal, Loader
   ============================================================ */
.toast-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.toast {
    background: var(--bg3);
    border: 1px solid var(--border2);
    border-left: 3px solid var(--gold);
    color: var(--text);
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    box-shadow: var(--shadow);
    animation: slideIn 0.25s ease;
    min-width: 240px;
    max-width: 360px;
}
.toast.error { border-left-color: var(--red); }
.toast.success { border-left-color: var(--green); }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to   { transform: translateX(0); opacity: 1; }
}

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.modal-overlay.open { display: flex; }

.modal {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    width: 100%;
    max-width: 640px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow);
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border2);
}
.modal-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--gold);
}
.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    line-height: 1;
    padding: 4px;
    transition: var(--transition);
}
.modal-close:hover { color: var(--text); }
.modal-body { padding: 1.5rem; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    border: none;
    transition: var(--transition);
    white-space: nowrap;
}
.btn-gold {
    background: var(--gold);
    color: #111;
}
.btn-gold:hover { background: var(--gold-light); }
.btn-outline {
    background: transparent;
    border: 1px solid var(--border2);
    color: var(--text);
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }
.btn-danger {
    background: transparent;
    border: 1px solid rgba(226,85,85,0.3);
    color: var(--red);
}
.btn-danger:hover { background: rgba(226,85,85,0.1); }
.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn:disabled { opacity: 0.5; pointer-events: none; }

.spinner {
    width: 20px; height: 20px;
    border: 2px solid rgba(255,255,255,0.2);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   FORMULÁRIOS
   ============================================================ */
.form-group { margin-bottom: 1.25rem; }
.form-label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 6px;
}
.form-control {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border2);
    color: var(--text);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: var(--transition);
}
.form-control:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212,168,67,0.12);
}
.form-control::placeholder { color: var(--text-dim); }
select.form-control { appearance: none; cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 80px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ============================================================
   LOJA PÚBLICA - Header / Nav
   ============================================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(17,17,16,0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.nav-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}
.nav-logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    color: var(--text);
    flex-shrink: 0;
}
.nav-logo span { color: var(--gold); }
.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}
.nav-links a {
    font-size: 14px;
    color: var(--text-muted);
    transition: var(--transition);
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 10px; }

/* ============================================================
   LOJA PÚBLICA - Hero / Catálogo
   ============================================================ */
.catalog-hero {
    max-width: 1280px;
    margin: 0 auto;
    padding: 4rem 2rem 2.5rem;
}
.catalog-label {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 0.75rem;
}
.catalog-title {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 2rem;
}
.catalog-title em {
    font-style: italic;
    color: var(--gold);
}

.search-filter-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}
.search-box {
    position: relative;
    flex: 1;
    min-width: 220px;
    max-width: 380px;
}
.search-box input {
    width: 100%;
    background: var(--bg2);
    border: 1px solid var(--border2);
    color: var(--text);
    padding: 10px 14px 10px 42px;
    border-radius: 999px;
    font-size: 14px;
    transition: var(--transition);
}
.search-box input:focus { outline: none; border-color: var(--gold); }
.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    font-size: 16px;
}
.category-pills {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.pill {
    padding: 7px 16px;
    border-radius: 999px;
    font-size: 13px;
    border: 1px solid var(--border2);
    color: var(--text-muted);
    background: transparent;
    cursor: pointer;
    transition: var(--transition);
}
.pill:hover { border-color: var(--gold); color: var(--gold); }
.pill.active {
    background: var(--gold);
    border-color: var(--gold);
    color: #111;
    font-weight: 500;
}
.results-count {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* ============================================================
   LOJA PÚBLICA - Grade de Produtos
   ============================================================ */
.catalog-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem 5rem;
}
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
}

.product-card {
    background: var(--bg2);
    border: 1px solid var(--border2);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
}
.product-card:hover {
    transform: translateY(-4px);
    border-color: var(--border);
    box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}
.product-thumb {
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--bg3);
    position: relative;
}
.product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}
.product-card:hover .product-thumb img { transform: scale(1.06); }
.product-thumb .no-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--text-dim);
}
.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--red);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
}
.product-info { padding: 14px; }
.product-source {
    font-size: 10px;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 4px;
}
.product-name {
    font-size: 13px;
    color: var(--text);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
    min-height: 36px;
}
.product-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 10px;
}
.stars { color: var(--gold); font-size: 11px; }
.product-price-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 12px;
}
.product-price {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--gold);
}
.product-original {
    font-size: 11px;
    color: var(--text-dim);
    text-decoration: line-through;
}
.product-cta {
    width: 100%;
    background: var(--gold);
    color: #111;
    border: none;
    padding: 10px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition);
}
.product-cta:hover { background: var(--gold-light); }

.empty-state {
    text-align: center;
    padding: 5rem 2rem;
    color: var(--text-muted);
}
.empty-state svg { opacity: 0.3; margin: 0 auto 1rem; }
.empty-state h3 { font-size: 1.2rem; margin-bottom: 0.5rem; color: var(--text-dim); }

/* ============================================================
   LOJA PÚBLICA - Seção "Como funciona"
   ============================================================ */
.how-section {
    background: var(--bg2);
    border-top: 1px solid var(--border2);
    border-bottom: 1px solid var(--border2);
    padding: 6rem 2rem;
}
.how-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: start;
}
.how-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.15em; color: var(--gold); margin-bottom: 1rem; }
.how-title { font-family: var(--font-display); font-size: 2.5rem; line-height: 1.2; margin-bottom: 1.5rem; }
.how-title em { font-style: italic; color: var(--gold); }
.how-desc { color: var(--text-muted); line-height: 1.8; margin-bottom: 2rem; }
.how-features { display: flex; flex-direction: column; gap: 1.25rem; }
.how-feature { display: flex; gap: 1rem; align-items: flex-start; }
.feature-icon {
    width: 40px; height: 40px; flex-shrink: 0;
    background: rgba(212,168,67,0.1);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
}
.feature-text h4 { font-size: 15px; margin-bottom: 2px; }
.feature-text p { font-size: 13px; color: var(--text-muted); }
.how-cta { display: flex; gap: 12px; margin-top: 2rem; }

.steps-card {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
}
.steps-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.15em; color: var(--gold); margin-bottom: 1.5rem; }
.steps-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 2rem; }
.step-item { text-align: center; }
.step-num {
    width: 48px; height: 48px; border-radius: 50%;
    background: rgba(212,168,67,0.12);
    border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--gold);
    margin: 0 auto 10px;
}
.step-item h4 { font-size: 14px; margin-bottom: 4px; }
.step-item p { font-size: 12px; color: var(--text-muted); }
.steps-stats { display: flex; flex-direction: column; gap: 8px; }
.stat-row {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; color: var(--text-muted);
}
.stat-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); flex-shrink: 0; }

/* ============================================================
   LOJA PÚBLICA - Footer
   ============================================================ */
.site-footer {
    background: var(--bg2);
    border-top: 1px solid var(--border2);
    padding: 4rem 2rem 2rem;
}
.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}
.footer-brand-name { font-family: var(--font-display); font-size: 1.4rem; margin-bottom: 0.75rem; }
.footer-brand-name span { color: var(--gold); }
.footer-brand-desc { font-size: 13px; color: var(--text-muted); line-height: 1.7; }
.footer-col-title { font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--gold); margin-bottom: 1rem; font-weight: 600; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-links a { font-size: 13px; color: var(--text-muted); transition: var(--transition); }
.footer-links a:hover { color: var(--text); }
.footer-bottom {
    border-top: 1px solid var(--border2);
    padding-top: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-dim);
}

/* ============================================================
   PAINEL ADMIN - Layout
   ============================================================ */
.admin-body {
    background: var(--bg);
    min-height: 100vh;
    display: flex;
}
.admin-sidebar {
    width: 240px;
    flex-shrink: 0;
    background: var(--bg2);
    border-right: 1px solid var(--border2);
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: sticky;
    top: 0;
    overflow-y: auto;
}
.sidebar-logo {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border2);
    font-family: var(--font-display);
    font-size: 1.3rem;
}
.sidebar-logo span { color: var(--gold); }
.sidebar-subtitle { font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--gold); margin-top: 2px; }
.sidebar-nav { flex: 1; padding: 1rem 0; }
.sidebar-section {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-dim);
    padding: 1rem 1.25rem 0.5rem;
    font-weight: 600;
}
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 1.25rem;
    color: var(--text-muted);
    font-size: 14px;
    transition: var(--transition);
    border-left: 2px solid transparent;
}
.sidebar-link:hover { color: var(--text); background: rgba(255,255,255,0.03); }
.sidebar-link.active { color: var(--gold); border-left-color: var(--gold); background: rgba(212,168,67,0.06); }
.sidebar-link svg { width: 16px; height: 16px; flex-shrink: 0; }
.sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border2);
    font-size: 12px;
    color: var(--text-dim);
}
.sidebar-user { font-weight: 500; color: var(--text-muted); margin-bottom: 6px; }

.admin-main { flex: 1; min-width: 0; }
.admin-topbar {
    background: var(--bg2);
    border-bottom: 1px solid var(--border2);
    padding: 0 2rem;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.admin-page-title { font-size: 15px; font-weight: 500; }
.admin-content { padding: 2rem; }

/* ============================================================
   PAINEL ADMIN - Cards de estatísticas
   ============================================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.stat-card {
    background: var(--bg2);
    border: 1px solid var(--border2);
    border-radius: var(--radius);
    padding: 1.25rem;
}
.stat-card-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); margin-bottom: 6px; }
.stat-card-value { font-family: var(--font-display); font-size: 2rem; color: var(--gold); }
.stat-card-sub { font-size: 12px; color: var(--text-dim); margin-top: 4px; }

/* ============================================================
   PAINEL ADMIN - Tabela de produtos
   ============================================================ */
.admin-card {
    background: var(--bg2);
    border: 1px solid var(--border2);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 1.5rem;
}
.admin-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border2);
}
.admin-card-title { font-size: 15px; font-weight: 500; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th {
    text-align: left;
    padding: 10px 16px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border2);
    font-weight: 500;
}
.admin-table td {
    padding: 12px 16px;
    font-size: 13px;
    color: var(--text);
    border-bottom: 1px solid rgba(255,255,255,0.04);
    vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(255,255,255,0.02); }
.table-img {
    width: 44px; height: 44px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: var(--bg3);
}
.table-img-placeholder {
    width: 44px; height: 44px;
    border-radius: var(--radius-sm);
    background: var(--bg3);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; color: var(--text-dim);
}
.product-cell { display: flex; align-items: center; gap: 12px; }
.product-cell-name { font-size: 13px; font-weight: 500; line-height: 1.4; max-width: 280px; }
.product-cell-id { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.badge-status {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
}
.badge-active { background: rgba(76,175,130,0.15); color: var(--green); }
.badge-inactive { background: rgba(90,89,80,0.3); color: var(--text-dim); }
.badge-shopee {
    background: rgba(212,168,67,0.1);
    color: var(--gold);
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid var(--border);
}
.table-actions { display: flex; align-items: center; gap: 6px; }

.admin-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.admin-search {
    flex: 1;
    min-width: 200px;
    max-width: 320px;
}

/* ============================================================
   PAINEL ADMIN - URL Shopee preview
   ============================================================ */
.shopee-fetch-box {
    background: rgba(212,168,67,0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin-bottom: 1rem;
}
.shopee-fetch-row { display: flex; gap: 8px; }
.shopee-fetch-row input { flex: 1; }
.fetch-result {
    display: none;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border2);
}
.fetch-result.show { display: flex; gap: 1rem; }
.fetch-result-img {
    width: 64px; height: 64px; border-radius: var(--radius-sm);
    object-fit: cover; flex-shrink: 0;
    background: var(--bg3);
}
.fetch-result-info h4 { font-size: 13px; margin-bottom: 4px; }
.fetch-result-price { color: var(--gold); font-size: 1rem; font-weight: 600; }
.fetch-result-meta { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* ============================================================
   PAINEL ADMIN - Login
   ============================================================ */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    padding: 2rem;
}
.login-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 3rem;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow);
}
.login-logo {
    font-family: var(--font-display);
    font-size: 2rem;
    text-align: center;
    margin-bottom: 0.5rem;
}
.login-logo span { color: var(--gold); }
.login-subtitle { text-align: center; color: var(--text-muted); font-size: 13px; margin-bottom: 2.5rem; }

/* ============================================================
   LOJA PÚBLICA - Loading skeleton
   ============================================================ */
.skeleton {
    background: linear-gradient(90deg, var(--bg3) 25%, var(--bg2) 50%, var(--bg3) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}
@keyframes shimmer { to { background-position: -200% 0; } }
.skeleton-card { border-radius: var(--radius); overflow: hidden; }
.skeleton-thumb { aspect-ratio: 1; }
.skeleton-line { height: 14px; margin: 8px 14px; }
.skeleton-line.short { width: 60%; }

/* ============================================================
   RESPONSIVO
   ============================================================ */
@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .how-inner { grid-template-columns: 1fr; gap: 3rem; }
}

@media (max-width: 768px) {
    .admin-sidebar { display: none; }
    .nav-links { display: none; }
    .nav-inner { padding: 0 1rem; }
    .catalog-hero { padding: 2.5rem 1rem 1.5rem; }
    .catalog-section { padding: 0 1rem 3rem; }
    .products-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0.75rem; }
    .form-row { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    .how-section { padding: 3rem 1rem; }
    .admin-content { padding: 1rem; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
}
