/*
  TheSixthColor - Frontend Styles
  Paleta: Oscura con acentos cálidos (MTG Premium)
*/

/* ── Google Fonts ─────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    /* ─── Colores base ────────────────────────────────────── */
    --bg-primary: #0b0c12;
    --bg-surface: #161724;
    --bg-surface-light: #232333;
    --accent-primary: #c89b3c;
    --accent-primary-hover: #d9ab4d;
    --accent-secondary: #4a90d9;
    --text-primary: #e8e8ec;
    --text-secondary: #9fa0b4;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-focus: rgba(200, 155, 60, 0.6);
    --shadow: 0 32px 90px rgba(0, 0, 0, 0.28);

    /* ─── Colores semánticos ─────────────────────────────── */
    --success: #2ecc71;
    --success-bg: rgba(46, 204, 113, 0.12);
    --danger: #e74c3c;
    --danger-bg: rgba(231, 76, 60, 0.12);
    --warning: #f1c40f;
    --warning-bg: rgba(241, 196, 15, 0.12);
    --info: #4a90d9;
    --info-bg: rgba(74, 144, 217, 0.12);

    /* ─── Escala de radio ────────────────────────────────── */
    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 999px;

    /* ─── Escala de espaciado (base 4px) ─────────────────── */
    --space-1: 0.25rem;   /* 4px  */
    --space-2: 0.5rem;    /* 8px  */
    --space-3: 0.75rem;   /* 12px */
    --space-4: 1rem;      /* 16px */
    --space-5: 1.25rem;   /* 20px */
    --space-6: 1.5rem;    /* 24px */
    --space-8: 2rem;      /* 32px */
    --space-10: 2.5rem;   /* 40px */
    --space-12: 3rem;     /* 48px */

    /* ─── Escala z-index ─────────────────────────────────── */
    --z-base: 0;
    --z-dropdown: 100;
    --z-sticky: 150;
    --z-drawer: 200;
    --z-filter: 300;
    --z-modal: 500;
    --z-toast: 900;
    --z-auth: 2000;

    /* ─── Transiciones ───────────────────────────────────── */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);

    /* ─── Focus ring ─────────────────────────────────────── */
    --focus-ring: 0 0 0 2px var(--bg-primary), 0 0 0 4px var(--accent-primary);
}

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

button,
input,
select {
    font: inherit;
}

img {
    display: block;
    max-width: 100%;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100dvh;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: radial-gradient(circle at top left, rgba(200, 155, 60, 0.16), transparent 25%),
        radial-gradient(circle at bottom right, rgba(74, 144, 217, 0.14), transparent 22%),
        linear-gradient(180deg, #0f1118 0%, #090a10 60%, #05060a 100%);
}

/* ── Scrollbar dark (Chromium) ───────────────────────────────────────────── */
::-webkit-scrollbar          { width: 6px; height: 6px; }
::-webkit-scrollbar-track    { background: var(--bg-primary); }
::-webkit-scrollbar-thumb    { background: rgba(255,255,255,0.12); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: rgba(200,155,60,0.4); }
* { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.12) transparent; }

/* ── Selección de texto ──────────────────────────────────────────────────── */
::selection { background: rgba(200, 155, 60, 0.28); color: var(--text-primary); }

/* ── Focus visible global ────────────────────────────────────────────────── */
:focus { outline: none; }
:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
    border-radius: var(--radius-xs);
}

/* ── Cursor pointer en todo lo interactivo ───────────────────────────────── */
button, [role="button"], label[for], select,
a[href], .card-product, .condition-tab,
.color-pill, .chip, .size-btn, .notif-item {
    cursor: pointer;
}

/* ─────────────────────────────────────────────────────── */
/* TIPOGRAFÍA */
/* ─────────────────────────────────────────────────────── */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.2;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

/* ─────────────────────────────────────────────────────── */
/* HEADER */
/* ─────────────────────────────────────────────────────── */

header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(11, 13, 19, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(16px);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.logo {
    text-decoration: none;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo img {
    height: 88px;
    width: auto;
    display: block;
}

nav {
    display: flex;
    gap: 1.75rem;
    align-items: center;
}

/* ── Widget de moneda ─────────────────────────────────────────────── */
.currency-widget {
    display: flex;
    align-items: center;
    gap: .35rem;
    padding: .2rem .5rem;
    border: 1px solid var(--border-color, rgba(255,255,255,.08));
    border-radius: 20px;
    font-size: .8rem;
}

.cw-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: .15rem .45rem;
    border-radius: 12px;
    color: var(--text-secondary, #9fa0b4);
    font-weight: 600;
    font-size: .78rem;
    transition: all .15s;
}
.cw-btn:hover  { color: var(--accent-primary, #c89b3c); }
.cw-btn.active { background: var(--accent-primary, #c89b3c); color: #000; }

.cw-type-sel {
    background: transparent;
    border: 1px solid var(--border-color, rgba(255,255,255,.1));
    border-radius: 8px;
    color: var(--text-secondary, #9fa0b4);
    font-size: .75rem;
    padding: .1rem .3rem;
    cursor: pointer;
}
.cw-type-sel option { background: #161724; }

.cw-rate {
    color: var(--accent-primary, #c89b3c);
    font-size: .75rem;
    font-weight: 600;
    white-space: nowrap;
}

/* Precios con moneda doble */
.price-main { font-weight: 700; }
.price-sub  {
    display: block;
    font-size: .75rem;
    color: var(--text-secondary, #888);
    font-weight: 400;
    margin-top: .1rem;
}

nav a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.2s ease;
    letter-spacing: 0.04em;
    font-size: 0.95rem;
}

nav a:hover {
    color: var(--accent-primary);
}

.cart-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.35rem;
}

.cart-count {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background-color: var(--danger);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
}

/* ─────────────────────────────────────────────────────── */
/* CONTENEDOR PRINCIPAL */
/* ─────────────────────────────────────────────────────── */

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem 4rem;
}

/* ─────────────────────────────────────────────────────── */
/* GRID DE PRODUCTOS */
/* ─────────────────────────────────────────────────────── */

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(var(--card-min-width, 220px), 1fr));
    gap: var(--card-gap, 1.5rem);
    margin-top: 1rem;
}

/* Tamaños de miniaturas */
.products-grid.size-xs  { --card-min-width: 130px; --card-gap: 0.75rem; }
.products-grid.size-sm  { --card-min-width: 170px; --card-gap: 1rem; }
.products-grid.size-md  { --card-min-width: 220px; --card-gap: 1.5rem; }
.products-grid.size-lg  { --card-min-width: 280px; --card-gap: 1.75rem; }
.products-grid.size-xl  { --card-min-width: 340px; --card-gap: 2rem; }

/* En tamaños pequeños, compactar la info */
.products-grid.size-xs .card-info,
.products-grid.size-sm .card-info { padding: 0.75rem; }
.products-grid.size-xs .card-name { font-size: 0.78rem; }
.products-grid.size-sm .card-name { font-size: 0.88rem; }
.products-grid.size-xs .card-set,
.products-grid.size-sm .card-set  { font-size: 0.72rem; margin-bottom: 0.4rem; }
.products-grid.size-xs .card-price,
.products-grid.size-sm .card-price { font-size: 0.9rem; }
.products-grid.size-xs .card-button,
.products-grid.size-sm .card-button { padding: 0.4rem 0.7rem; font-size: 0.78rem; }

.card-product {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 26px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
}

.card-product:hover {
    transform: translateY(-6px);
    border-color: rgba(200, 155, 60, 0.45);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.28);
}

.card-image-container {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: linear-gradient(180deg, rgba(20, 22, 34, 0.95), rgba(10, 12, 18, 0.95));
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.card-product:hover .card-image {
    transform: scale(1.08);
}

.card-info {
    padding: 1.6rem;
}

.card-name {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.card-set,
.card-stock {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.card-price {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--accent-primary);
    margin-bottom: 1rem;
}

.card-condition {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    background-color: rgba(74, 144, 217, 0.14);
    color: var(--accent-secondary);
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.card-button {
    width: 100%;
    padding: 0.95rem;
    border-radius: 999px;
    font-weight: 700;
    background-color: rgba(200, 155, 60, 0.95);
    color: var(--bg-primary);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.card-button:hover {
    background-color: #d1a75a;
    transform: translateY(-1px);
}

.card-button:active {
    transform: scale(0.98);
}

.hero-section {
    position: relative;
    overflow: hidden;
    padding: 5rem 0 3rem;
}

.hero-decor {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top left, rgba(200, 155, 60, 0.16), transparent 24%),
        radial-gradient(circle at 88% 20%, rgba(74, 144, 217, 0.16), transparent 20%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 42%);
    pointer-events: none;
}

.hero-copy {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}

.hero-copy p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin: 1.25rem auto 2rem;
    max-width: 640px;
    line-height: 1.8;
}

.hero-cta {
    display: inline-flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-hero {
    border-radius: 999px;
    padding: 1rem 1.9rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.btn-hero.btn-primary {
    background-color: var(--accent-primary);
    color: var(--bg-primary);
}

.btn-hero.btn-secondary {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.btn-hero:hover {
    transform: translateY(-2px);
}

/* ─────────────────────────────────────────────────────── */
/* PÁGINA DE PRODUCTO */
/* ─────────────────────────────────────────────────────── */

.product-page {
    padding: 2rem 0;
}

.product-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.product-image-wrapper {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    position: relative;
}

.product-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: zoom-in;
    transition: transform 0.3s ease;
}

.product-image-wrapper:hover img {
    transform: scale(1.1);
}

.product-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.product-header h1 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.product-meta {
    display: flex;
    gap: 2rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.product-price-section {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
}

.price-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.price-current {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-primary);
}

/* ─────────────────────────────────────────────────────── */
/* TABS DE CONDICIÓN */
/* ─────────────────────────────────────────────────────── */

.condition-selector {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
}

.condition-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.condition-tabs {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.condition-tab {
    flex: 1;
    min-width: 100px;
    background-color: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.condition-tab:hover {
    border-color: var(--accent-secondary);
    background-color: var(--bg-surface-light);
}

.condition-tab.active {
    border-color: var(--accent-primary);
    background-color: rgba(200, 155, 60, 0.1);
}

.condition-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.condition-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.condition-qty {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

/* ─────────────────────────────────────────────────────── */
/* SELECTOR DE CANTIDAD */
/* ─────────────────────────────────────────────────────── */

.quantity-selector {
    display: flex;
    gap: 1rem;
    align-items: center;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
}

.quantity-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.25rem;
}

.quantity-btn {
    width: 44px;
    height: 44px;
    border: none;
    background-color: transparent;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 1.1rem;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
}

.quantity-btn:hover {
    background-color: var(--accent-primary);
    color: var(--bg-primary);
}

.quantity-input {
    width: 50px;
    text-align: center;
    background-color: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
}

.quantity-input:focus {
    outline: none;
}

/* ─────────────────────────────────────────────────────── */
/* BOTONES */
/* ─────────────────────────────────────────────────────── */

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--accent-primary);
    color: var(--bg-primary);
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
}

.btn-primary:hover {
    background-color: #d9ab4d;
}

.btn-secondary {
    background-color: var(--accent-secondary);
    color: white;
}

.btn-secondary:hover {
    background-color: #5b9fee;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ─────────────────────────────────────────────────────── */
/* MODAL */
/* ─────────────────────────────────────────────────────── */

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);           /* desenfoque del fondo */
    -webkit-backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;                  /* unificado con bottom sheets */
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(12px) scale(0.97);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.modal-close {
    float: right;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    background: none;
    border: none;
    padding: 0;
}

.modal-close:hover {
    color: var(--accent-primary);
}

/* ─────────────────────────────────────────────────────── */
/* CARRITO — drawer lateral derecho                         */
/* ─────────────────────────────────────────────────────── */

/* ── Cart push — el contenido se corre cuando el drawer abre ──────── */
header, main, footer {
    transition: margin-right .3s cubic-bezier(.4,0,.2,1);
}
body.cart-open > header,
body.cart-open > main,
body.cart-open > footer { margin-right: 420px; }

/* Mobile: sin push (el cart es bottom sheet) */
@media (max-width: 640px) {
    body.cart-open > header,
    body.cart-open > main,
    body.cart-open > footer { margin-right: 0; }
}

/* Drawer lateral — sin overlay, sin blur, página 100% navegable */
.cart-modal {
    background-color: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    pointer-events: none;          /* toda la página sigue siendo clickeable */
    justify-content: flex-end !important;
    align-items: stretch !important;
    padding: 0 !important;
}

.cart-modal .modal-content {
    pointer-events: auto;          /* solo el drawer intercepta clicks */
    max-width: 420px;
    width: 420px;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
    border-right: none;
    border-top: none;
    border-bottom: none;
    border-left: 1px solid var(--border-color);
    box-shadow: -8px 0 32px rgba(0,0,0,.35);
    padding: 1.5rem 1.25rem;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform .3s cubic-bezier(.4,0,.2,1);
    animation: none !important;
}
.cart-modal.active .modal-content {
    transform: translateX(0);
}

/* Items usan el espacio disponible */
.cart-items {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
    max-height: none;
    overflow-y: auto;
}

/* Mobile: el carrito vuelve a ser bottom sheet */
@media (max-width: 640px) {
    .cart-modal {
        pointer-events: none;
        align-items: flex-end !important;
        justify-content: stretch !important;
    }
    .cart-modal .modal-content {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        max-height: 90vh;
        border-radius: 18px 18px 0 0 !important;
        border-left: none !important;
        border-top: 1px solid var(--border-color) !important;
        transform: translateY(100%) !important;
        transition: transform .3s cubic-bezier(.4,0,.2,1) !important;
    }
    .cart-modal.active .modal-content {
        transform: translateY(0) !important;
    }
    .cart-items { max-height: calc(90vh - 220px); }
}

.cart-item {
    display: flex;
    gap: 1rem;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1rem;
}

.cart-item-image {
    width: 80px;
    height: 110px;
    background-color: var(--bg-surface);
    border-radius: 4px;
    object-fit: cover;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.cart-item-condition {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.cart-item-price {
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.cart-item-qty {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.cart-summary {
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cart-total-amount {
    color: var(--accent-primary);
}

/* ─────────────────────────────────────────────────────── */
/* RESPONSIVE */
/* ─────────────────────────────────────────────────────── */

@media (max-width: 768px) {
    .product-container {
        grid-template-columns: 1fr;
    }

    .header-container {
        padding: 0 1rem;
    }

    .container {
        padding: 1rem;
    }

    nav {
        gap: 1rem;
        font-size: 0.9rem;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }

    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .product-price-section,
    .condition-selector,
    .quantity-selector {
        padding: 1rem;
    }

    .condition-tabs {
        gap: 0.5rem;
    }

    .condition-tab {
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
    }
}
/* ─── Auth Widget & Modal ──────────────────────────────────────────────────── */
.auth-widget { margin-left: auto; display: flex; align-items: center; }
.auth-login-btn {
    background: var(--accent-primary); color: #000; border: none;
    padding: 0.4rem 1rem; border-radius: 6px; cursor: pointer;
    font-weight: 700; font-size: 0.82rem;
}
.auth-login-btn:hover { filter: brightness(1.15); }

.auth-user-menu { position: relative; }
.auth-user-btn {
    display: flex; align-items: center; gap: 0.4rem;
    background: var(--bg-surface-light); border: 1px solid var(--border-color);
    color: var(--text-primary); padding: 0.35rem 0.75rem; border-radius: 6px;
    cursor: pointer; font-size: 0.82rem;
}
.auth-user-btn:hover { border-color: var(--accent-primary); }
.auth-avatar {
    width: 24px; height: 24px; border-radius: 50%;
    background: var(--accent-primary); color: #000;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 0.75rem;
}
.auth-username { font-weight: 600; }
.auth-caret { color: var(--text-secondary); font-size: 0.65rem; }
.vip-badge  { background: linear-gradient(135deg,#c89b3c,#e8c97a); color:#000; padding:0.1rem 0.4rem; border-radius:4px; font-size:.65rem; font-weight:800; }
.admin-badge{ background:#e74c3c; color:#fff; padding:0.1rem 0.4rem; border-radius:4px; font-size:.65rem; font-weight:800; }

.auth-dropdown {
    position: absolute; right: 0; top: calc(100% + 6px);
    background: var(--bg-surface); border: 1px solid var(--border-color);
    border-radius: 8px; min-width: min(200px, 85vw); z-index: 1000;
    box-shadow: 0 8px 24px rgba(0,0,0,.5);
}
.auth-dd-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.6rem 1rem; color: var(--text-primary); text-decoration: none;
    font-size: 0.85rem; border: none; background: none; width: 100%; text-align: left;
    cursor: pointer; transition: background 0.15s;
}
.auth-dd-item:hover { background: var(--bg-surface-light); }
.auth-dd-logout { color: #e74c3c; }
.listing-count { font-size: .72rem; color: var(--text-secondary); }

/* Modal overlay */
.auth-modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.7);
    display: none; align-items: center; justify-content: center; z-index: 2000;
}
.auth-modal {
    background: var(--bg-surface); border: 1px solid var(--border-color);
    border-radius: 12px; padding: 2rem; width: min(420px, 92vw);
    position: relative; max-height: 90vh; overflow-y: auto;
}
.auth-modal-close {
    position: absolute; top: 1rem; right: 1rem;
    background: none; border: none; color: var(--text-secondary);
    font-size: 1.4rem; cursor: pointer; line-height: 1;
}
.auth-modal-tabs { display: flex; gap: 0; margin-bottom: 1.5rem; border-bottom: 1px solid var(--border-color); }
.auth-modal-tab {
    flex: 1; background: none; border: none; color: var(--text-secondary);
    padding: 0.6rem 1rem; cursor: pointer; font-size: 0.9rem;
    border-bottom: 2px solid transparent; transition: all 0.15s;
}
.auth-modal-tab.active { color: var(--accent-primary); border-bottom-color: var(--accent-primary); font-weight: 700; }
.auth-field { margin-bottom: 1rem; }
.auth-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.auth-field label { display: block; font-size: 0.78rem; color: var(--text-secondary); margin-bottom: 0.3rem; }
.auth-field input {
    width: 100%; padding: 0.5rem 0.75rem; background: var(--bg-primary);
    border: 1px solid var(--border-color); border-radius: 6px;
    color: var(--text-primary); font-size: 0.9rem; box-sizing: border-box;
}
.auth-field input:focus { border-color: var(--accent-primary); outline: none; }
.auth-submit-btn {
    width: 100%; padding: 0.65rem; background: var(--accent-primary);
    color: #000; border: none; border-radius: 6px; font-weight: 700;
    font-size: 0.95rem; cursor: pointer; margin-top: 0.5rem;
}
.auth-submit-btn:hover { filter: brightness(1.1); }
.auth-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.auth-error { color: #e74c3c; font-size: 0.85rem; min-height: 1.2em; margin-bottom: 0.5rem; }
.auth-hint { font-size: 0.78rem; color: var(--text-secondary); margin: 0.75rem 0; }

.etched-tag { font-size:.65rem; background:linear-gradient(135deg,#636363,#c0b090); color:#fff; padding:.1rem .35rem; border-radius:3px; }

/* ─── Two-button auth ─────────────────────────────────────────────────────── */
.auth-btns { display: flex; gap: 0.5rem; align-items: center; }
.auth-btn-outline {
    background: none; color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 0.38rem 0.9rem; border-radius: 6px; cursor: pointer;
    font-size: 0.82rem; transition: border-color 0.15s, color 0.15s;
}
.auth-btn-outline:hover { border-color: var(--accent-primary); color: var(--accent-primary); }
.auth-btn-solid {
    background: var(--accent-primary); color: #000; border: none;
    padding: 0.38rem 0.9rem; border-radius: 6px; cursor: pointer;
    font-weight: 700; font-size: 0.82rem; transition: filter 0.15s;
}
.auth-btn-solid:hover { filter: brightness(1.12); }
.mass-entry-nav-btn {
    background: var(--bg-surface-light); color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 0.35rem 0.85rem; border-radius: 6px; font-size: 0.82rem;
    text-decoration: none; transition: border-color 0.15s, color 0.15s;
}
.mass-entry-nav-btn:hover { border-color: var(--accent-primary); color: var(--accent-primary); }

/* ─── Footer ──────────────────────────────────────────────────────────────── */
.site-footer {
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    margin-top: 4rem;
    padding: 2.5rem 0 1.5rem;
    font-size: .85rem;
    color: var(--text-secondary);
}
.footer-inner {
    max-width: 1200px; margin: 0 auto; padding: 0 1.5rem;
    display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2.5rem;
}
.footer-brand img  { height: 36px; margin-bottom: .75rem; opacity: .85; }
.footer-brand p    { line-height: 1.6; font-size: .82rem; max-width: 240px; }
.footer-col h4     { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em;
                     color: var(--text-primary); font-weight: 700; margin-bottom: .75rem; }
.footer-col a      { display: block; color: var(--text-secondary); text-decoration: none;
                     margin-bottom: .45rem; transition: color .15s; }
.footer-col a:hover { color: var(--accent-primary); }
.footer-bottom {
    max-width: 1200px; margin: 1.75rem auto 0; padding: 1rem 1.5rem 0;
    border-top: 1px solid var(--border-color);
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: .5rem; font-size: .78rem;
}
@media (max-width: 640px) {
    .footer-inner { grid-template-columns: 1fr; gap: 1.5rem; }
    .footer-bottom { flex-direction: column; text-align: center; }
}

/* ─── Notificaciones ──────────────────────────────────────────────────────── */
.notif-bell {
    position: relative;
    display: flex;
    align-items: center;
}
.notif-bell-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    position: relative;
    padding: 0.25rem 0.4rem;
    border-radius: 8px;
    transition: background 0.15s;
    line-height: 1;
    color: inherit;
}
.notif-bell-btn:hover { background: rgba(255,255,255,0.07); }
.notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #e74c3c;
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    pointer-events: none;
    line-height: 1;
}
.notif-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: -8px;
    width: min(320px, 95vw);
    background: var(--bg-surface, #161724);
    border: 1px solid var(--border-color, #333);
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    z-index: 1000;
    display: none;
    flex-direction: column;
    overflow: hidden;
}
.notif-dropdown.open { display: flex; }
.notif-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color, #333);
    font-size: 0.85rem;
    font-weight: 600;
}
.notif-mark-all {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--accent-primary, #c89b3c);
    font-size: 0.78rem;
    padding: 0;
}
.notif-mark-all:hover { text-decoration: underline; }
.notif-list {
    max-height: 360px;
    overflow-y: auto;
}
.notif-empty {
    text-align: center;
    color: var(--text-secondary, #888);
    padding: 1.5rem;
    font-size: 0.85rem;
    margin: 0;
}
.notif-item {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color, #333);
    cursor: pointer;
    transition: background 0.15s;
    background: rgba(200, 155, 60, 0.06);
    text-decoration: none;
    color: inherit;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: rgba(255,255,255,0.04); }
.notif-item.read {
    background: transparent;
    opacity: 0.7;
}
.notif-icon { font-size: 1.2rem; flex-shrink: 0; margin-top: 1px; }
.notif-body { flex: 1; min-width: 0; }
.notif-delete-btn {
    flex-shrink: 0;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1;
    padding: 0 0.2rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity .15s, color .15s;
    align-self: center;
}
.notif-item:hover .notif-delete-btn { opacity: 1; }
.notif-delete-btn:hover { color: var(--danger, #e74c3c); }
.notif-title { font-size: 0.82rem; font-weight: 600; margin-bottom: 0.2rem; }
.notif-msg {
    font-size: 0.8rem;
    color: var(--text-secondary, #888);
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.notif-time { font-size: 0.72rem; color: var(--text-secondary, #888); margin-top: 0.2rem; }

/* ─── Tier badges ─────────────────────────────────────────────────────────── */
.tier-badge {
    display: inline-block;
    padding: .15rem .6rem;
    border-radius: 20px;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .02em;
    white-space: nowrap;
}
/* ○ Common — sin badge (usuario normal) */
.tier-uncommon { background: rgba(74,144,217,.15);  color: #4a90d9; border: 1px solid rgba(74,144,217,.3); }
.tier-rare     { background: rgba(200,155,60,.15);  color: #c89b3c; border: 1px solid rgba(200,155,60,.3); }
.tier-mythic   { background: rgba(231,76,60,.15);   color: #ff6b4a; border: 1px solid rgba(231,76,60,.3); }
.tier-tienda   { background: rgba(39,174,96,.15);   color: #27ae60; border: 1px solid rgba(39,174,96,.35); }
.tier-admin    { background: rgba(155,89,182,.15);  color: #9b59b6; border: 1px solid rgba(155,89,182,.3); }

/* ─── Visual polish — de mobile a desktop ────────────────────────────────── */

/* Backdrop blur en TODOS los overlays (filtros, vista, nav mobile) */
#navOverlay, #filterOverlay, #vistaOverlay {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Handle indicator en bottom sheets */
#filterPanel::before,
#vistaPanel::before {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    background: rgba(255,255,255,.18);
    border-radius: 2px;
    margin: 0 auto 1.25rem;
}

/* Auth modal border-radius unificado */
.auth-modal { border-radius: 16px !important; }

/* Pub modal border-radius unificado (desktop) */
.pub-modal { border-radius: 16px; }

/* ─── Fase 6 — Pulido general mobile ─────────────────────────────────────── */

@media (max-width: 768px) {
    /* Touch targets mínimos 44px en botones críticos */
    .btn, .btn-primary, .btn-secondary,
    .card-add-btn, .card-button,
    .auth-btn-outline, .auth-btn-solid,
    .save-btn, .pub-submit {
        min-height: 44px;
    }

    /* Main padding reducido */
    main { padding: 0 .75rem; }

    /* Admin panel: tablas con scroll horizontal */
    .listings-table, .users-table, .dash-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Footer más compacto */
    .footer-inner { gap: 1.5rem; }
}

/* ─── Mobile modales — Fase 4 ────────────────────────────────────────────── */

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

@media (max-width: 640px) {
    /* ── Cart modal — bottom sheet ── */
    .cart-modal.active {
        align-items: flex-end;
    }
    .cart-modal .modal-content {
        width: 100%;
        max-width: 100%;
        max-height: 90vh;
        border-radius: 18px 18px 0 0;
        padding: 1.25rem 1rem;
        animation: slideUp 0.3s ease;
    }
    /* Items usan el espacio disponible */
    .cart-items {
        max-height: calc(90vh - 220px);
    }

    /* ── Auth modal — bottom sheet ── */
    .auth-modal-overlay {
        align-items: flex-end !important;
    }
    .auth-modal {
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 18px 18px 0 0 !important;
        max-height: 92vh;
        padding: 1.5rem 1.25rem !important;
        animation: slideUp 0.3s ease;
    }
    /* Campos en columna simple */
    .auth-field-row {
        grid-template-columns: 1fr !important;
    }

    /* ── Modal de publicación — bottom sheet ── */
    .pub-modal-overlay {
        align-items: flex-end !important;
    }
    .pub-modal {
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 18px 18px 0 0 !important;
        max-height: 92vh;
        padding: 1.25rem !important;
        animation: slideUp 0.3s ease;
    }
}

/* ─── Mobile nav — Fase 1 ─────────────────────────────────────────────────── */

/* Header-actions: cart + hamburger, siempre visibles en mobile */
.header-actions {
    display: none;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* Botón hamburguesa */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: 1px solid var(--border-color, rgba(255,255,255,.1));
    border-radius: 8px;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
}
.nav-toggle .bar {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-primary, #eee);
    border-radius: 2px;
    transition: transform 0.25s, opacity 0.25s;
}

/* Botón cerrar dentro del drawer */
.nav-close {
    display: none;
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-secondary, #aaa);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    line-height: 1;
    border-radius: 6px;
}
.nav-close:hover { color: var(--text-primary, #eee); background: rgba(255,255,255,.07); }

/* Overlay oscuro detrás del drawer */
#navOverlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 199;
    backdrop-filter: blur(2px);
}
#navOverlay.active { display: block; }

/* Bloquear scroll del body cuando drawer abierto */
body.nav-locked { overflow: hidden; }

@media (max-width: 768px) {
    /* Mostrar header-actions y hamburguesa */
    .header-actions { display: flex; }
    .nav-toggle     { display: flex; }
    .nav-close      { display: block; }

    /* Logo más pequeño */
    .logo img { height: 52px; }

    /* Header container más compacto */
    .header-container { padding: 0.6rem 1rem; }

    /* Nav → drawer lateral derecho */
    nav {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(300px, 85vw);
        background: var(--bg-surface, #161724);
        border-left: 1px solid var(--border-color, rgba(255,255,255,.08));
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 4rem 1.5rem 2rem;
        gap: 0;
        z-index: 200;
        transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        overflow-x: hidden;
    }

    nav.nav-open {
        transform: translateX(0);
        box-shadow: -8px 0 32px rgba(0, 0, 0, 0.5);
    }

    /* Links dentro del drawer */
    nav a, nav .nav-link {
        display: block;
        width: 100%;
        padding: 0.85rem 0;
        border-bottom: 1px solid var(--border-color, rgba(255,255,255,.05));
        font-size: 1rem;
        color: var(--text-primary, #eee);
        text-decoration: none;
    }
    nav a:hover { color: var(--accent-primary, #c89b3c); }
    nav a:last-of-type { border-bottom: none; }

    /* Currency widget dentro del drawer */
    .currency-widget {
        margin-top: 1rem;
        width: 100%;
        justify-content: flex-start;
        border-radius: 8px;
        padding: 0.5rem 0.75rem;
    }

    /* Auth widget dentro del drawer */
    .auth-widget {
        width: 100%;
        margin-top: 0.5rem;
    }
    .auth-user-menu, .auth-btns {
        width: 100%;
    }
    .auth-btns {
        flex-direction: column;
        gap: 0.5rem;
    }
    .auth-btn-outline, .auth-btn-solid {
        width: 100%;
        text-align: center;
        padding: 0.65rem;
    }
    /* Dropdown del usuario en mobile → sin position absolute */
    .auth-dropdown {
        position: static !important;
        box-shadow: none !important;
        border: none !important;
        background: transparent !important;
        padding: 0 !important;
        margin-top: 0.25rem;
        display: flex !important;
        flex-direction: column;
        width: 100%;
    }

    /* Notif bell en el drawer */
    .notif-bell { width: 100%; margin-top: 0.5rem; }
    .notif-bell-btn { width: 100%; text-align: left; padding: 0.85rem 0; font-size: 1rem; border-radius: 0; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   UI/UX PRO MAX — MEJORAS GLOBALES
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── 1. Skeleton Loading ─────────────────────────────────────────────────── */
@keyframes shimmer {
    0%   { background-position: -400px 0; }
    100% { background-position:  400px 0; }
}
.skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-surface) 25%,
        var(--bg-surface-light) 50%,
        var(--bg-surface) 75%
    );
    background-size: 800px 100%;
    animation: shimmer 1.4s ease-in-out infinite;
    border-radius: var(--radius-sm);
}
.skeleton-card {
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid var(--border-color);
}
.skeleton-card .skeleton-img {
    aspect-ratio: 3/4;
    width: 100%;
}
.skeleton-card .skeleton-line {
    height: 14px;
    margin: 0.75rem 1rem 0.5rem;
}
.skeleton-card .skeleton-line.short {
    width: 60%;
    height: 12px;
    margin: 0.25rem 1rem 1rem;
}

/* ── 2. Estado vacío ─────────────────────────────────────────────────────── */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-12) var(--space-8);
    text-align: center;
    gap: var(--space-4);
    color: var(--text-secondary);
}
.empty-state-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: var(--space-2);
}
.empty-state h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}
.empty-state p {
    font-size: 0.875rem;
    max-width: 280px;
    line-height: 1.5;
    margin: 0;
}

/* ── 3. Toast / Snackbar mejorado ────────────────────────────────────────── */
.toast-container {
    position: fixed;
    bottom: var(--space-6);
    right: var(--space-6);
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    pointer-events: none;
}
@keyframes toastIn {
    from { transform: translateY(16px) scale(0.95); opacity: 0; }
    to   { transform: translateY(0)    scale(1);    opacity: 1; }
}
@keyframes toastOut {
    from { transform: translateY(0)    scale(1);    opacity: 1; }
    to   { transform: translateY(8px)  scale(0.96); opacity: 0; }
}
.toast {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    font-size: 0.875rem;
    max-width: 320px;
    animation: toastIn 0.2s cubic-bezier(0.4,0,0.2,1) forwards;
}
.toast.toast-exit {
    animation: toastOut 0.18s cubic-bezier(0.4,0,1,1) forwards;
}
.toast.toast-success { border-left: 3px solid var(--success); }
.toast.toast-error   { border-left: 3px solid var(--danger); }
.toast.toast-warning { border-left: 3px solid var(--warning); }
.toast.toast-info    { border-left: 3px solid var(--info); }

@media (max-width: 640px) {
    .toast-container { right: var(--space-4); left: var(--space-4); bottom: var(--space-4); }
    .toast { max-width: 100%; }
}

/* ── 4. Botones — estados mejorados ─────────────────────────────────────── */
.btn {
    transition: transform var(--transition-fast),
                background-color var(--transition-fast),
                box-shadow var(--transition-fast),
                border-color var(--transition-fast);
    user-select: none;
    white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none !important;
}

/* Loading state en botones */
.btn.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}
.btn.loading::after {
    content: '';
    position: absolute;
    inset: 50% 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ── 5. Cards de producto — hover mejorado ───────────────────────────────── */
.card-product {
    transition:
        transform var(--transition-slow),
        box-shadow var(--transition-slow),
        border-color var(--transition-slow);
}
.card-product:hover {
    transform: translateY(-5px);
    border-color: rgba(200, 155, 60, 0.38);
    box-shadow:
        0 20px 60px rgba(0,0,0,0.3),
        0 0 0 1px rgba(200,155,60,0.08);
}
.card-product:active { transform: translateY(-2px); }

/* ── 6. Inputs — estados mejorados ──────────────────────────────────────── */
input, select, textarea {
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent-primary) !important;
    box-shadow: 0 0 0 3px rgba(200,155,60,0.15);
}
input::placeholder { color: rgba(159, 160, 180, 0.55); }

/* ── 7. Badge / Chip mejorado ───────────────────────────────────────────── */
.chip {
    transition: background-color var(--transition-fast),
                border-color var(--transition-fast),
                color var(--transition-fast),
                transform var(--transition-fast);
}
.chip:active { transform: scale(0.94); }

/* ── 8. Nav links — indicador activo ────────────────────────────────────── */
nav a.active {
    color: var(--accent-primary);
    font-weight: 600;
}

/* ── 9. Ripple effect en cards ───────────────────────────────────────────── */
@keyframes ripple {
    to { transform: scale(2.5); opacity: 0; }
}

/* ── 10. Imagen con fade-in al cargar ────────────────────────────────────── */
.card-image {
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.35s ease;
}
.card-image.loaded { opacity: 1; }

/* ── 11. Badge de notificaciones — pulso ─────────────────────────────────── */
@keyframes badgePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(231,76,60,0.4); }
    50%       { box-shadow: 0 0 0 4px rgba(231,76,60,0); }
}
.notif-badge:not(:empty) {
    animation: badgePulse 2.5s ease-in-out infinite;
}
.cart-count:not(:empty) {
    animation: badgePulse 2.5s ease-in-out infinite;
}

/* ── 12. Header — borde inferior animado al hacer scroll ─────────────────── */
header {
    transition: box-shadow var(--transition-base);
}
header.scrolled {
    box-shadow: 0 4px 24px rgba(0,0,0,0.35);
    border-bottom-color: rgba(255,255,255,0.1);
}

/* ── 13. Condition tabs — mejor feedback ─────────────────────────────────── */
.condition-tab {
    transition:
        border-color var(--transition-fast),
        background-color var(--transition-fast),
        transform var(--transition-fast);
}
.condition-tab:hover  { transform: translateY(-1px); }
.condition-tab:active { transform: translateY(0); }
.condition-tab.active {
    box-shadow: 0 0 0 1px rgba(200,155,60,0.2), 0 4px 12px rgba(200,155,60,0.08);
}

/* ── 14. Footer links — underline animado ───────────────────────────────── */
.footer-col a {
    position: relative;
}
.footer-col a::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-primary);
    transition: width var(--transition-fast);
}
.footer-col a:hover::after { width: 100%; }

/* ── 15. Auth modal — backdrop más elegante ──────────────────────────────── */
.auth-modal-overlay {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    background: rgba(0,0,0,0.65);
}

/* ── 16. Dropdown — sombra mejorada ──────────────────────────────────────── */
.auth-dropdown,
.notif-dropdown {
    box-shadow:
        0 4px 6px -1px rgba(0,0,0,0.3),
        0 10px 40px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.09);
}

/* ── 17. Tier badge — shimmer en mythic ──────────────────────────────────── */
@keyframes mythicShimmer {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.tier-mythic {
    background: linear-gradient(270deg, rgba(231,76,60,.2), rgba(200,155,60,.2), rgba(231,76,60,.2));
    background-size: 300% 300%;
    animation: mythicShimmer 4s ease infinite;
}

/* ── 18. Tabla de stock — row hover ──────────────────────────────────────── */
.stock-table tbody tr {
    transition: background-color var(--transition-fast);
}
.stock-table tbody tr:hover {
    background: rgba(255,255,255,0.03);
}

/* ── 19. Precio — pulsación sutil en cambio de moneda ────────────────────── */
@keyframes priceFlash {
    0%   { color: var(--accent-primary); }
    40%  { color: #f0c96a; }
    100% { color: var(--accent-primary); }
}
.price-flash { animation: priceFlash 0.4s ease; }

/* ── 20. Lucide Icons — estilos globales ─────────────────────────────────── */
.icon {
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
    pointer-events: none;
}
/* Iconos dentro de botones alineados con el texto */
.btn .icon, button .icon { vertical-align: -0.15em; }
/* Iconos en nav dropdown */
.auth-dd-item .icon { opacity: 0.7; }
.auth-dd-item:hover .icon { opacity: 1; }
/* Campana de notificaciones */
.notif-bell-btn .icon { display: block; }
/* Cart icon SVG */
#cartIcon .icon { display: block; }
/* Icono de feature en pricing */
.feature-icon .icon { display: block; }

/* ── 21. Accessibility: skip link ────────────────────────────────────────── */
.skip-link {
    position: absolute;
    top: -100%;
    left: var(--space-4);
    background: var(--accent-primary);
    color: var(--bg-primary);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.875rem;
    z-index: var(--z-auth);
    text-decoration: none;
    transition: top var(--transition-fast);
}
.skip-link:focus { top: var(--space-4); }

/* ── 21. Filtros activos — pill con X ────────────────────────────────────── */
.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
}
.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-1) var(--space-3);
    background: rgba(200,155,60,0.12);
    border: 1px solid rgba(200,155,60,0.28);
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--accent-primary);
    cursor: pointer;
    transition: background-color var(--transition-fast);
}
.filter-pill:hover { background: rgba(200,155,60,0.2); }
.filter-pill-x {
    font-size: 1rem;
    line-height: 1;
    opacity: 0.7;
    transition: opacity var(--transition-fast);
}
.filter-pill:hover .filter-pill-x { opacity: 1; }

/* ── 22. Pricing cards ───────────────────────────────────────────────────── */

/* Variables locales compatibles con el sistema existente */
:root {
  --r-card:           var(--radius-lg);
  --r-pill:           var(--radius-full);
  --bg-card:          var(--bg-surface);
  --content-max:      1100px;
  --t-medium:         300ms cubic-bezier(.4,0,.2,1);
  --shadow-card:       0 4px 24px rgba(0,0,0,.35);
  --shadow-card-hover: 0 12px 40px rgba(0,0,0,.5);
  --font-mono:        ui-monospace, 'Courier New', monospace;
  --rarity-common:      #aaaaaa;
  --rarity-uncommon:    #4a90d9;
  --rarity-rare:        #c89b3c;
  --rarity-mythic-from: #e74c3c;
  --rarity-mythic-to:   #e67e22;
}

/* Sección genérica con eyebrow */
.section { padding: 5rem 1.5rem; }
.section-head {
  max-width: 640px; margin: 0 auto 3rem; text-align: center;
}
.section-head h2 {
  font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 800;
  margin: .35rem 0 .75rem;
}
.section-head p { color: var(--text-secondary); font-size: .95rem; margin: 0; }
.eyebrow {
  font-size: .7rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent-primary);
}

/* Botones auxiliares */
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: .55rem 1.25rem;
  border-radius: 8px;
  font-size: .88rem; font-weight: 600;
  cursor: pointer; text-decoration: none; display: inline-block;
  transition: border-color var(--t-medium), background var(--t-medium);
  font-family: inherit;
}
.btn-ghost:hover {
  border-color: var(--accent-primary);
  background: rgba(200,155,60,.06);
}
.btn-pill { border-radius: var(--r-pill) !important; }

/* ── Lista vertical de pricing ────── */
.pricing-list {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: .65rem;
}

.pricing-row {
  position: relative;
  display: flex; flex-direction: column; gap: .75rem;
  padding: 1.25rem 1.4rem;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--r-card);
  cursor: pointer;
  transition: border-color var(--t-medium), background var(--t-medium), box-shadow var(--t-medium);
}
.pricing-row:hover { border-color: rgba(200,155,60,.35); }

.pricing-row.is-selected {
  border-color: var(--accent-primary);
  background: linear-gradient(135deg, rgba(200,155,60,.07) 0%, rgba(200,155,60,0) 60%), var(--bg-card);
  box-shadow: 0 0 0 1px var(--accent-primary), var(--shadow-card);
}
.pricing-row.is-popular { border-color: rgba(200,155,60,.4); }
.pricing-row.is-popular.is-selected { border-color: var(--accent-primary); }

/* Ribbon "Más popular" */
.pricing-card-ribbon {
  position: absolute; top: -11px; left: 1.4rem;
  background: var(--accent-primary); color: #000;
  padding: .2rem .65rem; border-radius: var(--r-pill);
  font-size: .6rem; font-weight: 800;
  letter-spacing: .14em; text-transform: uppercase;
  white-space: nowrap;
}

/* Checkmark badge */
.pricing-check {
  position: absolute; top: -10px; right: 1rem;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--bg-primary); border: 2px solid var(--border-color);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .2s, background .2s, border-color .2s;
}
.pricing-check svg { width: 10px; height: 10px; stroke: var(--text-secondary); }
.pricing-row.is-selected .pricing-check {
  opacity: 1; background: var(--accent-primary); border-color: var(--accent-primary);
}
.pricing-row.is-selected .pricing-check svg { stroke: #000; }

/* Cabecera: left (glifo + nombre) + right (precio) */
.pricing-row-head {
  display: flex; align-items: center;
  justify-content: space-between; gap: 1rem;
}
.pricing-row-left {
  display: flex; align-items: center; gap: .75rem; flex: 1; min-width: 0;
}
.pricing-row-left h3 { margin: 0; font-size: 1rem; font-weight: 700; }

/* Glifo circular */
.pricing-card-glyph {
  width: 36px; height: 36px; flex-shrink: 0;
  border-radius: 50%; display: grid; place-items: center; font-size: 1rem;
  background: rgba(255,255,255,.05); border: 1px solid var(--border-color);
}
.pricing-card-glyph.common   { color: var(--rarity-common); }
.pricing-card-glyph.uncommon { color: var(--rarity-uncommon); border-color: rgba(74,144,217,.4); background: rgba(74,144,217,.06); }
.pricing-card-glyph.rare     { color: var(--rarity-rare);    border-color: rgba(200,155,60,.4); background: rgba(200,155,60,.07); }
.pricing-card-glyph.mythic   { color: #fff; background: linear-gradient(135deg,var(--rarity-mythic-from),var(--rarity-mythic-to)); border-color: rgba(231,76,60,.4); }

/* Precio (derecha) */
.pricing-row-price {
  display: flex; align-items: baseline; gap: .3rem;
  flex-shrink: 0; text-align: right;
}
.pricing-amount {
  font-size: 1.35rem; font-weight: 800;
  color: var(--accent-primary); line-height: 1;
}
.pricing-per { font-size: .78rem; color: var(--text-secondary); }

/* Descripción */
.pricing-card-desc {
  font-size: .78rem; color: var(--text-secondary);
  margin: .15rem 0 0; line-height: 1.4;
}
.pricing-card-desc strong { color: var(--text-primary); }

/* Features en 2 columnas */
.pricing-row-features {
  list-style: none; padding: .6rem 0 0; margin: 0;
  border-top: 1px solid rgba(255,255,255,.06);
  display: grid; grid-template-columns: 1fr 1fr; gap: .3rem .75rem;
}
@media (max-width: 480px) { .pricing-row-features { grid-template-columns: 1fr; } }

/* ── Pantallas muy chicas (iPhone SE 375px, Android compactos 360px) ── */
@media (max-width: 380px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important;
        gap: 0.65rem !important;
    }

    .header-container {
        padding: 0 0.65rem;
    }

    .notif-dropdown {
        right: -40px;   /* re-centrar en pantallas muy estrechas */
    }

    .auth-dropdown {
        right: 0;
        max-width: 92vw;
    }

    /* Modales: más ajustados */
    .modal-content,
    .pub-modal {
        padding: 1.25rem 1rem !important;
    }
}
.pricing-row-features li {
  font-size: .8rem; color: var(--text-secondary);
  display: flex; align-items: flex-start; gap: .4rem; line-height: 1.4;
}
.pricing-row-features li::before {
  content: '✓'; color: var(--accent-primary); font-weight: 800;
  flex-shrink: 0; margin-top: 1px;
}

/* ── 23. prefers-reduced-motion ──────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .card-product:hover { transform: none; }
    .card-image { transition: none; }
    .skeleton   { animation: none; background: var(--bg-surface-light); }
    .card-product:hover .card-image { transform: none; }
    .notif-badge, .cart-count { animation: none; }
    .tier-mythic { animation: none; }
}

