:root {
    --primary-color: #6c63ff;
    --primary-light: #8b5cf6;
    --accent-color: #6c63ff;
    --accent-light: #8b5cf6;
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --border-color: #e5e7eb;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --shadow-soft: 0 18px 50px rgba(15, 23, 42, 0.08);
    --radius-sm: 14px;
    --radius-lg: 28px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Nunito', sans-serif;
    color: var(--text-main);
    background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
}

button,
input,
select,
textarea {
    font: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

.main-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 32px 32px 96px;
}

.marketplace-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    background: linear-gradient(135deg, rgba(108, 99, 255, 0.14), rgba(139, 92, 246, 0.08));
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-soft);
    margin-bottom: 24px;
}

.marketplace-hero h1 {
    margin: 0;
    font-size: clamp(2rem, 2.6vw, 3.4rem);
    line-height: 1.02;
}

.marketplace-hero p {
    margin: 8px 0 0;
    color: var(--text-muted);
    font-size: 1rem;
}

.hero-stats {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-card);
    color: var(--text-main);
    border-radius: 999px;
    border: 1px solid rgba(108, 99, 255, 0.16);
    padding: 10px 16px;
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(108, 99, 255, 0.08);
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    width: min(100%, 540px);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 10px 16px;
    box-shadow: var(--shadow-soft);
}

.search-bar input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    color: var(--text-main);
    font-size: 0.96rem;
    min-width: 0;
}

.search-bar button {
    border: none;
    background: var(--primary-color);
    color: white;
    border-radius: 999px;
    padding: 10px 18px;
    cursor: pointer;
    font-weight: 700;
}

.cta-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    background-image: linear-gradient(180deg, rgba(76, 29, 149, 0.72), rgba(79, 70, 229, 0.72)), url('img/banner.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white;
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    box-shadow: var(--shadow-soft);
    margin-bottom: 24px;
}

.carousel-container {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    margin-bottom: 24px;
    min-height: 320px;
}

.carousel-track {
    display: flex;
    transition: transform 0.45s ease;
    will-change: transform;
}

.carousel-slide {
    min-width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 32px 160px 32px 24px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 320px;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    touch-action: pan-y;
}

.carousel-slide:hover {
    opacity: 0.96;
}

.carousel-slide::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15,23,42,0.72), rgba(15,23,42,0.18));
}

.carousel-slide-content {
    position: relative;
    z-index: 1;
    max-width: 560px;
    color: white;
    text-shadow: 0 12px 24px rgba(0,0,0,0.4);
}

.carousel-slide h2 {
    margin: 0 0 16px;
    font-size: clamp(1.9rem, 2.6vw, 2.8rem);
    line-height: 1.05;
}

.carousel-slide p {
    margin: 0;
    color: rgba(255,255,255,0.92);
    font-size: 1rem;
    line-height: 1.6;
}

.carousel-logo {
    width: 120px;
    max-width: 100%;
    margin-bottom: 20px;
    display: block;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.92);
    color: var(--primary-color);
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
    z-index: 2;
}

.carousel-btn:hover {
    transform: translateY(-50%) scale(1.05);
    background: white;
}

.carousel-btn.prev {
    left: 16px;
}

.carousel-btn.next {
    right: 16px;
}

.carousel-indicators {
    position: absolute;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 2;
}

.carousel-indicators span {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.65);
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.carousel-indicators span.active {
    background: white;
    transform: scale(1.2);
}

@media (max-width: 768px) {
    .carousel-slide {
        padding: 24px 100px 24px 20px;
        min-height: 260px;
    }
    .carousel-cta-btn {
        right: 130px;
        padding: 12px 16px;
    }
    .carousel-btn {
        width: 40px;
        height: 40px;
    }
    .carousel-logo {
        width: 100px;
    }
}

@media (max-width: 520px) {
    .carousel-slide {
        padding: 20px 20px 80px;
        min-height: auto;
    }
}

.cta-banner h2 {
    margin: 0;
    font-size: clamp(1.6rem, 2vw, 2.4rem);
}

.cta-banner p {
    margin: 10px 0 0;
    color: rgba(255,255,255,0.88);
    max-width: 560px;
    line-height: 1.5;
}

.btn-cta {
    border: none;
    background: white;
    color: var(--primary-color);
    padding: 14px 24px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.1);
}

.marketplace-tabs {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.marketplace-tab {
    border: none;
    background: var(--bg-body);
    color: var(--text-main);
    padding: 12px 22px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s ease;
    border: 1px solid transparent;
}

.marketplace-tab.active {
    background: white;
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: var(--shadow-soft);
}

.sidebar-toggle {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 14px 18px;
    cursor: pointer;
    color: var(--text-main);
    font-weight: 700;
    box-shadow: var(--shadow-soft);
    margin-bottom: 18px;
}

.sidebar-toggle .toggle-chevron {
    transition: transform 0.3s ease;
}

.sidebar-toggle[aria-expanded="true"] .toggle-chevron {
    transform: rotate(180deg);
}

.marketplace-layout {
    display: flex;
    gap: 28px;
    align-items: flex-start;
}

.marketplace-sidebar {
    width: 320px;
    flex-shrink: 0;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 24px;
    position: sticky;
    top: 24px;
    align-self: flex-start;
}

.sidebar-section {
    margin-bottom: 24px;
}

.sidebar-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: var(--text-main);
}

.marketplace-sidebar .filter-group {
    margin-bottom: 18px;
}

.marketplace-sidebar .filter-group:last-child {
    margin-bottom: 0;
}

.marketplace-sidebar .sidebar-close-btn {
    display: none;
}

/* ============================================
   MENÚ FLOTANTE Y BOTTOM NAV (estilo usermenu)
   ============================================ */
.floating-nav.userview-menu {
    position: fixed;
    top: 24px;
    right: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: rgba(255,255,255,0.98);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 28px;
    padding: 12px;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
    z-index: 999;
}

.floating-nav.userview-menu .floating-nav-item {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 18px;
    color: var(--accent-color);
    text-decoration: none;
    background: rgba(108, 99, 255, 0.08);
    transition: background 0.2s ease, transform 0.2s ease;
    border: 1px solid rgba(108, 99, 255, 0.18);
    cursor: pointer;
}

.floating-nav.userview-menu .floating-nav-item i {
    font-size: 18px;
}

.floating-nav.userview-menu .floating-nav-item:hover {
    background: rgba(108, 99, 255, 0.15);
    transform: translateX(2px);
}

.floating-nav.userview-menu .floating-nav-tooltip {
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%) translateX(-8px);
    opacity: 0;
    pointer-events: none;
    background: var(--accent-color);
    color: white;
    white-space: nowrap;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    line-height: 1;
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.floating-nav.userview-menu .floating-nav-item:hover .floating-nav-tooltip {
    opacity: 1;
    transform: translateY(-50%) translateX(-12px);
}

/* Avatar en el menú flotante */
.floating-nav-item.avatar-item {
    padding: 0;
    overflow: visible;
    background: transparent;
    border: 2px solid var(--primary-color);
}
.floating-nav-item.avatar-item img {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    object-fit: cover;
    display: block;
}
.floating-nav-item.avatar-item:hover {
    transform: scale(1.05);
}

/* Dropdown del usuario (se despliega desde el avatar) */
.user-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    background: white;
    border-radius: 20px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    padding: 12px;
    min-width: 200px;
    display: none;
    flex-direction: column;
    gap: 6px;
    border: 1px solid var(--border-color);
    z-index: 1002;
    overflow: hidden;
}
.user-dropdown.show {
    display: flex;
}
.user-dropdown .dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border-radius: 12px;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s;
}
.user-dropdown .dropdown-item:hover {
    background: var(--bg-body);
}
.user-dropdown .dropdown-item i {
    width: 20px;
    color: var(--primary-color);
}
.user-dropdown .dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 4px 0;
}

/* BOTTOM NAV (móvil) */
.userview-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    justify-content: space-around;
    align-items: center;
    gap: 8px;
    padding: 10px 8px;
    background: rgba(255,255,255,0.98);
    border-top: 1px solid rgba(0,0,0,0.08);
    backdrop-filter: blur(12px);
    z-index: 999;
}

.userview-bottom-nav .bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--accent-color);
    text-decoration: none;
    font-size: 11px;
    min-width: 56px;
    border-radius: 16px;
    padding: 8px 6px;
    transition: background 0.2s ease, color 0.2s ease;
    background: rgba(108, 99, 255, 0.08);
    border: 1px solid rgba(108, 99, 255, 0.18);
    cursor: pointer;
}

.userview-bottom-nav .bottom-nav-item i {
    font-size: 18px;
}

.userview-bottom-nav .bottom-nav-item:hover {
    background: rgba(108, 99, 255, 0.16);
}

.userview-bottom-nav .bottom-nav-item.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ============================================
   BOTÓN CARGAR MÁS
   ============================================ */
.load-more-container {
    text-align: center;
    margin-top: 28px;
}
.load-more-btn {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    padding: 12px 32px;
    border-radius: 40px;
    font-weight: 700;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
    box-shadow: var(--shadow-soft);
}
.load-more-btn:hover {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}
.load-more-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ============================================
   SIDEBAR COMO BOTTOM SHEET EN MÓVIL
   ============================================ */
@media (max-width: 992px) {
    .marketplace-sidebar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        top: auto;
        max-height: 80vh;
        border-radius: 24px 24px 0 0;
        transform: translateY(100%);
        transition: transform 0.3s cubic-bezier(0.2, 0, 0, 1);
        box-shadow: 0 -10px 40px rgba(0,0,0,0.15);
        z-index: 1001;
        overflow-y: auto;
        pointer-events: none;
        display: block !important; /* forzamos bloque para animar */
        background: var(--bg-card);
        padding: 20px 24px 30px;
    }
    .marketplace-sidebar.open {
        transform: translateY(0);
        pointer-events: auto;
    }
    /* Fondo oscuro overlay cuando el sidebar está abierto */
    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.3);
        z-index: 1000;
        backdrop-filter: blur(4px);
    }
    .sidebar-overlay.active {
        display: block;
    }
    /* Botón cerrar dentro del sidebar */
    .sidebar-close-btn {
        display: flex;
        justify-content: flex-end;
        margin-bottom: 12px;
    }
    .sidebar-close-btn button {
        background: none;
        border: none;
        font-size: 24px;
        color: var(--text-muted);
        cursor: pointer;
        padding: 4px 8px;
    }
    /* Ajustes de los filtros dentro del bottom sheet */
    .marketplace-sidebar .filter-group {
        margin-bottom: 16px;
    }
}

/* Ocultar botón de cerrar en escritorio */
.sidebar-close-btn {
    display: none;
    border-radius: 50%;
    object-fit: cover;
}
.favorite-item .fav-name { font-weight: 600; font-size: 14px; flex: 1; }
.favorite-item .fav-status {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 40px;
}
.fav-status.available { background: #d4edda; color: #155724; }
.fav-status.closed { background: #f8d7da; color: #721c24; }
.favorite-item .fav-remove {
    background: none;
    border: none;
    color: #ccc;
    cursor: pointer;
    padding: 0 4px;
    font-size: 14px;
    transition: color 0.2s;
}
.favorite-item .fav-remove:hover { color: #e74c3c; }
.favorite-empty {
    color: var(--text-muted);
    font-size: 14px;
    text-align: center;
    padding: 20px 0;
    background: var(--bg-body);
    border-radius: var(--radius-sm);
}
.favorite-empty i { opacity: 0.3; font-size: 28px; display: block; margin-bottom: 6px; }
.favorite-associate {
    margin-top: 12px;
    padding: 14px;
    background: #f0f4ff;
    border-radius: var(--radius-sm);
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    border: 1px dashed var(--primary-light);
}
.favorite-associate button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 6px 18px;
    border-radius: 30px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 6px;
    font-size: 13px;
    font-family: inherit;
}
.favorite-associate button:hover { background: var(--primary-light); }

/* MODAL DE FAVORITOS */
.favorites-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10020;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(6px);
}
.favorites-modal-overlay.active { display: flex; }
.favorites-modal {
    position: relative;
    width: min(760px, 100%);
    max-height: min(680px, 90vh);
    overflow-y: auto;
    padding: 30px;
    background: var(--bg-card);
    border: 1px solid rgba(108, 99, 255, 0.14);
    border-radius: 24px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.25);
    animation: favoritesModalIn 0.25s ease;
}
@keyframes favoritesModalIn {
    from { opacity: 0; transform: translateY(18px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.favorites-modal-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    background: var(--bg-body);
    color: var(--text-muted);
    cursor: pointer;
}
.favorites-modal-heading { display: flex; align-items: center; gap: 14px; padding-right: 40px; margin-bottom: 24px; }
.favorites-modal-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 16px; background: #eeecff; color: var(--primary-color); font-size: 20px; }
.favorites-modal-heading h2 { margin: 0; font-size: 24px; }
.favorites-modal-heading p { margin: 4px 0 0; color: var(--text-muted); font-size: 13px; }
.favorites-modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.favorites-group { min-width: 0; padding: 16px; border: 1px solid var(--border-color); border-radius: 16px; background: #fbfcff; }
.favorites-group-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.favorites-group-heading h3 { margin: 0; font-size: 15px; }
.favorites-group-heading h3 i { margin-right: 6px; color: var(--primary-color); }
.favorites-group-heading > span { min-width: 24px; padding: 3px 7px; border-radius: 20px; background: #eeecff; color: var(--primary-color); text-align: center; font-size: 12px; font-weight: 800; }
.favorites-modal-list { display: grid; gap: 8px; }
.favorite-modal-item { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 8px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 12px; }
.favorite-modal-item > img { width: 40px; height: 40px; flex: 0 0 40px; object-fit: cover; border-radius: 10px; }
.favorite-modal-item > div { min-width: 0; flex: 1; }
.favorite-modal-item strong, .favorite-modal-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.favorite-modal-item strong { font-size: 13px; }
.favorite-modal-item small { margin-top: 3px; color: var(--text-muted); font-size: 11px; }
.favorite-modal-open, .favorite-modal-remove { display: grid; place-items: center; flex: 0 0 28px; width: 28px; height: 28px; border: 0; border-radius: 8px; background: transparent; color: var(--text-muted); cursor: pointer; }
.favorite-modal-open:hover { background: #eeecff; color: var(--primary-color); }
.favorite-modal-remove:hover { background: #fff0f0; color: #e74c3c; }
.favorite-modal-empty { display: grid; place-items: center; gap: 6px; min-height: 110px; color: var(--text-muted); font-size: 12px; text-align: center; }
.favorite-modal-empty i { font-size: 24px; opacity: 0.35; }
.btn-product-fav { width: 38px; border: 1px solid var(--border-color); border-radius: 10px; background: var(--bg-card); color: var(--text-muted); cursor: pointer; }
.btn-product-fav.active, .btn-product-fav:hover { border-color: var(--primary-color); color: var(--primary-color); }

@media (max-width: 640px) {
    .favorites-modal { padding: 22px 16px; border-radius: 20px; }
    .favorites-modal-grid { grid-template-columns: 1fr; }
}

/* FILTROS */
.filter-group { margin-bottom: 14px; }
.filter-group:last-child { margin-bottom: 0; }
.filter-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    display: block;
    margin-bottom: 6px;
}
.filter-select {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-body);
    color: var(--text-main);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-weight: 600;
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
}
.filter-select:focus { border-color: var(--primary-color); box-shadow: 0 0 0 4px rgba(139,92,246,0.1); }
.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
}
.filter-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

/* LEYENDA */
.legend {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 13px;
    color: var(--text-muted);
    flex-wrap: wrap;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    margin-top: 4px;
}
.legend span { display: flex; align-items: center; gap: 4px; }
.legend .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.dot.available { background: #2ecc71; }
.dot.closed { background: #e74c3c; }
.legend .featured-badge {
    padding: 1px 10px;
    background: linear-gradient(135deg, #f5af19, #f12711);
    color: white;
    border-radius: 40px;
    font-size: 9px;
    font-weight: 700;
}

/* ============================================
   PANELES (TAB CONTENT)
   ============================================ */
.tab-panel { display: none; animation: fadeUp 0.4s ease; }
.tab-panel.active { display: block; }
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.results-count {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 18px;
}
.results-count strong { color: var(--text-main); }

/* ============================================
   GRID DE ARTISTAS Y PRODUCTOS
   ============================================ */
.artists-grid, .products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
    gap: 24px;
}

/* TARJETA DE ARTISTA */
.artist-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.2, 0, 0, 1);
    box-shadow: var(--shadow-soft);
}
.artist-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary-light);
    box-shadow: 0 15px 30px rgba(139, 92, 246, 0.15);
}
.artist-banner {
    height: 120px;
    background-size: cover;
    background-position: center;
    position: relative;
}
.artist-banner .featured-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #f5af19, #f12711);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 40px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(241, 39, 17, 0.3);
}
.artist-banner .status-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 40px;
    text-transform: uppercase;
}
.status-badge.available { background: #10b981; color: white; }
.status-badge.closed { background: var(--text-muted); color: white; }

.artist-info { padding: 20px; }
.artist-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 10px;
}
.artist-avatar {
    width: 60px;
    height: 60px;
    border-radius: 20px;
    border: 4px solid var(--bg-card);
    margin-top: -40px;
    background: white;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    flex-shrink: 0;
}
.artist-name-wrap { flex: 1; min-width: 0; }
.artist-name { font-size: 18px; font-weight: 800; color: var(--text-main); }
.artist-username { color: var(--primary-color); font-size: 13px; font-weight: 700; }
.artist-category {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: var(--primary-color);
    background: #f0f4ff;
    padding: 2px 14px;
    border-radius: 40px;
    margin-top: 2px;
}
.artist-description {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 8px 0 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.artist-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
}
.artist-meta .rating { display: flex; align-items: center; gap: 4px; }
.artist-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.artist-tag {
    font-size: 11px;
    font-weight: 700;
    background: var(--bg-body);
    color: var(--text-muted);
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}
.artist-actions {
    display: flex;
    gap: 10px;
}
.btn-visit {
    flex: 1;
    text-align: center;
    background: var(--bg-body);
    color: var(--primary-color);
    padding: 12px;
    border-radius: var(--radius-sm);
    font-weight: 800;
    text-decoration: none;
    transition: all 0.3s;
    border: none;
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
}
.btn-visit:hover { background: var(--primary-light); color: white; }
.btn-fav {
    padding: 10px 16px;
    background: white;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
}
.btn-fav:hover { border-color: var(--primary-color); color: var(--primary-color); background: #f0f4ff; }
.btn-fav.active { color: #ff4757; border-color: #ff4757; background: #fff0f0; }
.btn-fav.active:hover { background: #ffe0e0; }

/* TARJETA DE PRODUCTO */
.product-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.2, 0, 0, 1);
    box-shadow: var(--shadow-soft);
}
.product-card:hover {
    transform: translateY(-6px);
    border-color: var(--primary-light);
    box-shadow: 0 15px 30px rgba(139, 92, 246, 0.15);
}
.product-image {
    height: 200px;
    overflow: hidden;
}
.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}
.product-card:hover .product-image img { transform: scale(1.05); }
.product-info { padding: 20px; }
.product-title {
    font-weight: 800;
    font-size: 16px;
    margin-bottom: 6px;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-artist {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 10px;
    text-decoration: none;
}
.product-artist:hover { color: var(--primary-color); }
.product-artist img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}
.product-price {
    font-size: 20px;
    font-weight: 800;
    color: var(--accent-color);
    margin: 6px 0;
}
.product-price .from { font-size: 14px; font-weight: 400; color: var(--text-muted); }
.product-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 8px;
    flex-wrap: wrap;
}
.product-meta .category {
    background: #f0f4ff;
    color: var(--primary-color);
    padding: 2px 12px;
    border-radius: 40px;
    font-size: 12px;
    font-weight: 700;
}
.product-actions { margin-top: 14px; }
.btn-product-detail {
    width: 100%;
    padding: 10px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}
.btn-product-detail:hover { background: var(--primary-light); }

/* ============================================
   TOAST
   ============================================ */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 14px 28px;
    border-radius: 40px;
    font-size: 14px;
    font-weight: 600;
    z-index: 9999;
    animation: toastIn 0.4s ease, toastOut 0.4s ease 2.6s;
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    gap: 10px;
}
.toast i { font-size: 20px; }
@keyframes toastIn {
    from { opacity: 0; transform: translateX(-50%) translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}
@keyframes toastOut {
    from { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
    to { opacity: 0; transform: translateX(-50%) translateY(30px) scale(0.95); }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 992px) {
    .marketplace-layout { flex-direction: column; }
    .marketplace-sidebar {
        flex: none;
        position: static;
        max-height: none;
        width: 100%;
        display: none;
    }
    .marketplace-sidebar.open { display: block; }
    .sidebar-toggle { display: flex; }
    .marketplace-hero {
        flex-direction: column;
        align-items: flex-start;
        padding: 24px 28px;
    }
    .search-bar { max-width: 100%; width: 100%; }
    .top-bar { flex-direction: column; align-items: stretch; text-align: center; }
    .top-bar .marquee { white-space: normal; animation: none; padding: 0; }
    .auth-buttons { justify-content: center; }
    .cta-banner { flex-direction: column; text-align: center; padding: 30px 25px; }
}
@media (max-width: 768px) {
    .floating-nav.userview-menu {
        display: none;
    }
    .userview-bottom-nav {
        display: flex;
    }
    .main-content {
        padding-bottom: 110px !important;
    }
    .marketplace-tab { padding: 10px 16px; font-size: 14px; }
    .main-content { padding: 15px !important; }
    .marketplace-hero { padding: 20px; }
    .marketplace-hero h1 { font-size: 24px; }
    .top-bar {
        flex-direction: column;
        align-items: stretch;
        text-align: left;
        padding: 12px 14px;
        gap: 8px;
    }
    .marquee {
        white-space: normal;
        overflow: hidden;
    }
    .marquee span { display: block; padding-left: 0; animation: none; }
    .auth-buttons {
        justify-content: space-between;
        gap: 8px;
        width: 100%;
        flex-wrap: wrap;
    }
    .auth-buttons a,
    .auth-buttons button {
        flex: 1 1 48%;
        min-width: 0;
        white-space: normal;
        font-size: 13px;
        padding: 9px 12px;
    }
    .top-bar .marquee { margin-bottom: 4px; }
}
@media (max-width: 480px) {
    .top-bar { padding: 12px 12px 10px; }
    .marquee span { font-size: 13px; }
    .auth-buttons a,
    .auth-buttons button {
        flex: 1 1 100%;
        padding: 10px 12px;
    }
    #userName { display: none; }
    .artists-grid, .products-grid { gap: 16px; }
    .marketplace-sidebar { padding: 16px; }
    .marketplace-tabs { overflow-x: auto; flex-wrap: nowrap; gap: 0; }
    .marketplace-tab { white-space: nowrap; padding: 10px 14px; font-size: 13px; }
    .marketplace-hero > div:first-child img { max-width: 150px; }
    .cta-banner .btn-cta { width: 100%; }
}
