/* ════════════════════════════════════════
   ETHERIC LICENSES - Design System
   Estilo: Editorial Tech Premium
   ════════════════════════════════════════ */

:root {
    --primary:         #0A2463;   /* Azul oscuro institucional */
    --primary-light:   #1B4FBB;
    --accent:          #E63946;   /* Rojo acción */
    --accent-hover:    #c62a35;
    --surface:         #F8FAFF;
    --surface-card:    #FFFFFF;
    --surface-muted:   #EEF2FF;
    --text:            #111827;
    --text-muted:      #6B7280;
    --text-light:      #9CA3AF;
    --border:          #E5E7EB;
    --border-focus:    #1B4FBB;
    --success:         #10B981;
    --warning:         #F59E0B;
    --error:           #EF4444;
    --shadow-sm:       0 1px 3px rgba(10,36,99,.08);
    --shadow-md:       0 4px 16px rgba(10,36,99,.12);
    --shadow-lg:       0 12px 40px rgba(10,36,99,.16);
    --radius:          10px;
    --radius-lg:       16px;
    --radius-xl:       24px;
    --transition:      .2s cubic-bezier(.4,0,.2,1);
    --font-head:       'Manrope', sans-serif;
    --font-body:       'Inter', sans-serif;
}

/* ── Reset ─────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); background: var(--surface); color: var(--text);
       font-size: 15px; line-height: 1.6; -webkit-font-smoothing: antialiased; }

/* ── Typography ────────────────────────── */
h1,h2,h3,h4,h5,h6 { font-family: var(--font-head); font-weight: 700; line-height: 1.2; color: var(--primary); }
h1 { font-size: clamp(2rem, 4vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.5rem); }
h3 { font-size: 1.25rem; }
a { color: var(--primary-light); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); }
p { color: var(--text-muted); }

/* ── Layout ────────────────────────────── */
.container  { max-width: 1240px; margin: 0 auto; padding: 0 1.5rem; }
.container-lg { max-width: 1400px; margin: 0 auto; padding: 0 2rem; }

/* ── Buttons ───────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .75rem 1.75rem;
       border-radius: var(--radius); font-family: var(--font-head); font-weight: 700;
       font-size: .875rem; border: none; cursor: pointer; transition: all var(--transition);
       text-decoration: none; letter-spacing: .01em; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 4px 16px rgba(230,57,70,.3); }
.btn-primary:hover { background: var(--accent-hover); color: #fff; transform: translateY(-1px);
                     box-shadow: 0 6px 20px rgba(230,57,70,.4); }
.btn-secondary { background: var(--primary); color: #fff; }
.btn-secondary:hover { background: var(--primary-light); color: #fff; transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-ghost { background: var(--surface-muted); color: var(--primary); }
/*.btn-ghost:hover { background: var(--primary); color: #fff; }*/
    .btn-ghost:hover {
        background: var(--surface-muted);
    }
.btn-sm { padding: .5rem 1rem; font-size: .8125rem; }
.btn-lg { padding: 1rem 2.5rem; font-size: 1rem; }
.btn-full { width: 100%; justify-content: center; }
.btn-icon { padding: .6rem; border-radius: var(--radius); }

/* ── Cards ──────────────────────────────── */
.card { background: var(--surface-card); border-radius: var(--radius-lg); 
        box-shadow: var(--shadow-sm); border: 1px solid var(--border); overflow: hidden;
        transition: all var(--transition); }
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.card-body { padding: 1.5rem; }
.card-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border); background: var(--surface-muted); }

/* ── Product Card ───────────────────────── */
.product-card { position: relative; cursor: pointer; }
.product-card .badge { position: absolute; top: .75rem; left: .75rem; z-index: 2;
    background: var(--accent); color: #fff; font-size: .7rem; font-weight: 800;
    padding: .2rem .6rem; border-radius: 999px; letter-spacing: .05em; }
.product-card .badge-new { background: var(--primary); }
.product-card .wishlist { position: absolute; top: .75rem; right: .75rem; z-index: 2;
    background: #fff; border: none; border-radius: 999px; width: 2rem; height: 2rem;
    display: flex; align-items: center; justify-content: center; cursor: pointer;
    box-shadow: var(--shadow-sm); transition: all var(--transition); }
.product-card .wishlist:hover { background: var(--accent); color: #fff; }
.product-card .img-wrap { height: 200px; overflow: hidden; background: var(--surface-muted);
    display: flex; align-items: center; justify-content: center; }
.product-card .img-wrap img { width: 100%; height: 100%; object-fit: cover;
    transition: transform .4s ease; }
.product-card:hover .img-wrap img { transform: scale(1.05); }
.product-card .brand { font-size: .7rem; font-weight: 700; letter-spacing: .1em;
    text-transform: uppercase; color: var(--accent); }
.product-card .prod-name { font-family: var(--font-head); font-weight: 700; font-size: 1rem;
    color: var(--primary); margin: .25rem 0 .5rem; }
.product-card .prod-desc { font-size: .8125rem; color: var(--text-muted);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-card .price-box { display: flex; align-items: baseline; gap: .5rem; margin-top: .75rem; }
.product-card .price { font-family: var(--font-head); font-weight: 800; font-size: 1.375rem; color: var(--primary); }
.product-card .price-original { font-size: .875rem; color: var(--text-light); text-decoration: line-through; }
.product-card .add-btn { display: flex; align-items: center; justify-content: space-between; margin-top: 1rem; }

/* ── Navbar ─────────────────────────────── */
.navbar { background: rgba(255,255,255,.96); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 1000;
    transition: box-shadow var(--transition); }
.navbar.scrolled { box-shadow: var(--shadow-md); }
.navbar-inner { display: flex; align-items: center; justify-content: space-between;
    height: 68px; gap: 1.5rem; }
.navbar-brand { font-family: var(--font-head); font-size: 1.375rem; font-weight: 900;
    color: var(--primary); display: flex; align-items: center; gap: .5rem; letter-spacing: -.02em; }
.navbar-brand .dot { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links a { font-family: var(--font-head); font-size: .875rem; font-weight: 600;
    color: var(--text-muted); letter-spacing: .01em; transition: color var(--transition); }
.nav-links a:hover, .nav-links a.active { color: var(--primary); }
.navbar-actions { display: flex; align-items: center; gap: .5rem; }
.cart-btn { position: relative; }
.cart-badge { position: absolute; top: -4px; right: -4px; background: var(--accent); color: #fff;
    width: 18px; height: 18px; border-radius: 999px; font-size: .65rem; font-weight: 800;
    display: flex; align-items: center; justify-content: center; }

/* ── Forms ──────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-size: .8125rem; font-weight: 700; letter-spacing: .06em;
    text-transform: uppercase; color: var(--text-muted); margin-bottom: .5rem; }
.form-control { width: 100%; padding: .75rem 1rem; background: var(--surface-muted);
    border: 1.5px solid transparent; border-radius: var(--radius); font-family: var(--font-body);
    font-size: .9375rem; color: var(--text); transition: all var(--transition); }
.form-control:focus { outline: none; border-color: var(--border-focus);
    background: #fff; box-shadow: 0 0 0 3px rgba(27,79,187,.1); }
.form-control.is-invalid { border-color: var(--error); }
.validation-error { color: var(--error); font-size: .8125rem; margin-top: .3rem; }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 100px; }

/* ── Hero ───────────────────────────────── */
.hero { background: linear-gradient(135deg, var(--primary) 0%, #1B4FBB 60%, #2563EB 100%);
    color: #fff; padding: 6rem 0 5rem; position: relative; overflow: hidden; }
.hero::after { content: ''; position: absolute; inset: 0;
    background: radial-gradient(ellipse at 70% 50%, rgba(230,57,70,.15) 0%, transparent 60%); }
.hero .container { position: relative; z-index: 1; }
.hero-badge { display: inline-flex; align-items: center; gap: .5rem; background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.2); border-radius: 999px; padding: .35rem 1rem;
    font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
    color: rgba(255,255,255,.9); margin-bottom: 1.5rem; }
.hero-badge .dot { width: 6px; height: 6px; border-radius: 999px; background: #34D399; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.6;transform:scale(1.3)} }
.hero h1 { color: #fff; margin-bottom: 1.25rem; font-size: clamp(2.25rem, 5vw, 4rem); }
.hero h1 span { color: var(--accent); }
.hero p { color: rgba(255,255,255,.75); font-size: 1.125rem; max-width: 520px; margin-bottom: 2rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-card { background: rgba(255,255,255,.08); backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,.15); border-radius: var(--radius-xl);
    padding: 2rem; color: #fff; }

/* ── Filters Sidebar ────────────────────── */
.filters-panel { background: var(--surface-card); border-radius: var(--radius-lg);
    border: 1px solid var(--border); padding: 1.5rem; position: sticky; top: 80px; }
.filter-section { border-bottom: 1px solid var(--border); padding: 1.25rem 0; }
.filter-section:first-child { padding-top: 0; }
.filter-section:last-child { border-bottom: none; }
.filter-title { font-family: var(--font-head); font-weight: 800; font-size: .75rem;
    letter-spacing: .1em; text-transform: uppercase; color: var(--primary); margin-bottom: .875rem;
    display: flex; align-items: center; gap: .5rem; }
.filter-check { display: flex; align-items: center; gap: .625rem; padding: .375rem 0; cursor: pointer; }
.filter-check input[type="checkbox"] { accent-color: var(--accent); width: 16px; height: 16px; }
.filter-check label { font-size: .875rem; color: var(--text-muted); cursor: pointer;
    transition: color var(--transition); }
.filter-check:hover label { color: var(--primary); }

/* ── Badges/Tags ────────────────────────── */
.tag { display: inline-block; padding: .25rem .75rem; border-radius: 999px;
    font-size: .75rem; font-weight: 700; letter-spacing: .05em; }
.tag-primary { background: rgba(10,36,99,.08); color: var(--primary); }
.tag-accent { background: rgba(230,57,70,.1); color: var(--accent); }
.tag-success { background: rgba(16,185,129,.1); color: var(--success); }
.tag-warning { background: rgba(245,158,11,.1); color: var(--warning); }
.tag-muted { background: var(--surface-muted); color: var(--text-muted); }

/* ── Status badges ──────────────────────── */
.status { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .8rem;
    border-radius: 999px; font-size: .75rem; font-weight: 700; letter-spacing: .04em; }
.status::before { content:''; width:7px; height:7px; border-radius:999px; background:currentColor; }
.status-pendiente { background: rgba(245,158,11,.1); color: var(--warning); }
.status-pagado { background: rgba(16,185,129,.1); color: var(--success); }
.status-completado { background: rgba(16,185,129,.12); color: #059669; }
.status-cancelado { background: rgba(239,68,68,.1); color: var(--error); }
.status-procesando { background: rgba(27,79,187,.1); color: var(--primary-light); }

/* ── Tables ─────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; }
thead { background: var(--primary); }
thead th { padding: .875rem 1.25rem; color: rgba(255,255,255,.85); font-size: .7rem;
    font-weight: 700; letter-spacing: .1em; text-transform: uppercase; text-align: left; }
tbody tr { border-bottom: 1px solid var(--border); transition: background var(--transition); }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--surface-muted); }
tbody td { padding: 1rem 1.25rem; font-size: .875rem; color: var(--text); }

/* ── Admin Sidebar ──────────────────────── */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar { width: 260px; background: var(--primary); color: #fff; 
    position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
    overflow-y: auto; flex-shrink: 0; }
.admin-sidebar-brand { padding: 1.75rem 1.5rem; border-bottom: 1px solid rgba(255,255,255,.1); }
.admin-sidebar-brand h2 { color: #fff; font-size: 1.125rem; font-family: var(--font-head); }
.admin-sidebar-brand p { color: rgba(255,255,255,.5); font-size: .75rem; margin-top: .25rem; }
.admin-nav { padding: 1rem .75rem; flex: 1; }
.admin-nav-item { display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem;
    border-radius: var(--radius); color: rgba(255,255,255,.7); font-size: .875rem;
    font-weight: 500; transition: all var(--transition); margin-bottom: .25rem; }
.admin-nav-item:hover { background: rgba(255,255,255,.1); color: #fff; }
.admin-nav-item.active { background: var(--accent); color: #fff; }
.admin-nav-item .material-symbols-outlined { font-size: 1.25rem; }
.admin-content { flex: 1; background: #F1F5FB; overflow-y: auto; }
.admin-topbar { background: #fff; border-bottom: 1px solid var(--border);
    padding: 1rem 2rem; display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 100; }
.admin-main { padding: 2rem; }
.page-header { margin-bottom: 2rem; }
.page-header h1 { font-size: 1.75rem; color: var(--primary); }
.page-header p { color: var(--text-muted); font-size: .875rem; margin-top: .25rem; }

/* ── Stats Cards ────────────────────────── */
.stat-card { background: var(--surface-card); border-radius: var(--radius-lg);
    padding: 1.5rem; border: 1px solid var(--border); position: relative; overflow: hidden; }
.stat-card::after { content: ''; position: absolute; right: -1rem; top: -1rem;
    width: 80px; height: 80px; border-radius: 999px; opacity: .06; }
.stat-card.blue::after { background: var(--primary); }
.stat-card.red::after { background: var(--accent); }
.stat-card .stat-icon { width: 48px; height: 48px; border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; }
.stat-icon.blue { background: rgba(10,36,99,.1); color: var(--primary); }
.stat-icon.red { background: rgba(230,57,70,.1); color: var(--accent); }
.stat-icon.green { background: rgba(16,185,129,.1); color: var(--success); }
.stat-icon.orange { background: rgba(245,158,11,.1); color: var(--warning); }
.stat-card .stat-value { font-family: var(--font-head); font-size: 2rem; font-weight: 900; color: var(--primary); }
.stat-card .stat-label { font-size: .8rem; color: var(--text-muted); margin-top: .25rem; }

/* ── Checkout ───────────────────────────── */
.checkout-step { display: flex; align-items: center; gap: 1rem; margin-bottom: 2rem; }
.step-num { width: 36px; height: 36px; border-radius: 999px; background: var(--primary);
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: .875rem; flex-shrink: 0; }
.step-num.done { background: var(--success); }
.order-summary-card { background: var(--surface-card); border-radius: var(--radius-lg);
    border: 1px solid var(--border); position: sticky; top: 80px; }
.summary-line { display: flex; justify-content: space-between; padding: .75rem 0;
    border-bottom: 1px solid var(--border); font-size: .9rem; }
.summary-total { display: flex; justify-content: space-between; padding: 1rem 0 0;
    font-family: var(--font-head); font-weight: 800; font-size: 1.25rem; color: var(--primary); }

/* ── License Key Display ────────────────── */
.license-key { font-family: 'Courier New', monospace; font-size: 1.125rem; letter-spacing: .15em;
    background: var(--surface-muted); border: 1.5px dashed var(--primary-light);
    border-radius: var(--radius); padding: 1rem 1.25rem; word-break: break-all;
    color: var(--primary); font-weight: 700; }

/* ── Alerts ─────────────────────────────── */
.alert { padding: 1rem 1.25rem; border-radius: var(--radius); display: flex; gap: .75rem;
    align-items: flex-start; margin-bottom: 1rem; font-size: .9rem; }
.alert-success { background: rgba(16,185,129,.1); border-left: 4px solid var(--success); color: #065F46; }
.alert-error   { background: rgba(239,68,68,.1);  border-left: 4px solid var(--error);   color: #991B1B; }
.alert-info    { background: rgba(27,79,187,.1);   border-left: 4px solid var(--primary-light); color: var(--primary); }
.alert-warning { background: rgba(245,158,11,.1);  border-left: 4px solid var(--warning); color: #92400E; }

/* ── Footer ─────────────────────────────── */
.footer { background: var(--primary); color: rgba(255,255,255,.7); padding: 4rem 0 2rem; }
.footer h4 { color: #fff; font-family: var(--font-head); margin-bottom: 1rem; }
.footer a { color: rgba(255,255,255,.6); font-size: .875rem; transition: color var(--transition); }
.footer a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 3rem;
    padding-top: 1.5rem; display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 1rem; font-size: .8125rem; }

/* ── Price Range Slider ─────────────────── */
input[type="range"] { -webkit-appearance: none; width: 100%; height: 4px;
    background: var(--border); border-radius: 2px; outline: none; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px;
    border-radius: 50%; background: var(--primary); cursor: pointer; box-shadow: var(--shadow-sm); }

/* ── Pagination ─────────────────────────── */
.pagination { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.page-btn { width: 36px; height: 36px; border-radius: var(--radius); border: 1px solid var(--border);
    background: #fff; color: var(--text); display: flex; align-items: center; justify-content: center;
    font-size: .875rem; font-weight: 600; cursor: pointer; transition: all var(--transition); }
.page-btn:hover, .page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ── Grid ───────────────────────────────── */
.grid-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

/* ── Toast ──────────────────────────────── */
.toast-container { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 9999; 
    display: flex; flex-direction: column; gap: .5rem; }
.toast { background: #fff; border-left: 4px solid var(--success); border-radius: var(--radius);
    padding: 1rem 1.25rem; box-shadow: var(--shadow-lg); min-width: 280px;
    animation: slideIn .3s ease; }
.toast.error { border-left-color: var(--error); }
@keyframes slideIn { from { opacity:0; transform:translateX(40px); } to { opacity:1; transform:none; } }

/* ── Responsive ─────────────────────────── */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .admin-sidebar { display: none; }
}
@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero { padding: 4rem 0 3rem; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .grid-products { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
    .admin-main { padding: 1rem; }
}
@media (max-width: 480px) {
    .btn-lg { padding: .875rem 1.5rem; font-size: .9375rem; }
    .hero h1 { font-size: 1.875rem; }
}

/* ── Material Icons ─────────────────────── */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    user-select: none;
}
