/* CardVerse — Oportunidades */
.cv-oportunidades-page {
    --cv-purple: #7c3aed;
    --cv-orange: #f59e0b;
    --cv-text: #0f172a;
    --cv-muted: #64748b;
    --cv-border: #e2e8f0;
    --cv-surface: #f1f5f9;
}

.cv-oportunidades-page .store-main.main {
    background: var(--cv-surface);
    padding-bottom: 2.5rem;
}

.cv-oportunidades__inner {
    max-width: 1680px;
    margin: 0 auto;
    padding: 0 1rem 1.5rem;
}

.cv-oportunidades-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.25rem 1.1rem;
    margin: 1rem 0 1.25rem;
    border-radius: 20px;
    background: linear-gradient(135deg, #f5f3ff 0%, #fff7ed 55%, #fff 100%);
    border: 1px solid #ede9fe;
    box-shadow: 0 8px 28px rgba(124, 58, 237, 0.08);
}

.cv-oportunidades-hero__eyebrow {
    margin: 0 0 0.35rem;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--cv-purple);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cv-oportunidades-hero__title {
    margin: 0 0 0.35rem;
    font-size: clamp(1.6rem, 3vw, 2rem);
    font-weight: 800;
    color: var(--cv-text);
}

.cv-oportunidades-hero__sub,
.cv-oportunidades-hero__hint {
    margin: 0;
    color: var(--cv-muted);
    line-height: 1.5;
    max-width: 640px;
}

.cv-oportunidades-hero__hint {
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.cv-oportunidades-hero__stat {
    min-width: 140px;
    padding: 0.85rem 1rem;
    border-radius: 16px;
    background: #fff;
    border: 1px solid var(--cv-border);
    text-align: center;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.cv-oportunidades-hero__stat strong {
    display: block;
    font-size: 1.75rem;
    line-height: 1.1;
    color: var(--cv-purple);
}

.cv-oportunidades-hero__stat span {
    font-size: 0.8125rem;
    color: var(--cv-muted);
}

.cv-oportunidades-filters {
    background: #fff;
    border: 1px solid var(--cv-border);
    border-radius: 18px;
    padding: 0.85rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.cv-oportunidades-filters__row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: flex-end;
}

.cv-opp-filter {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 120px;
}

.cv-opp-filter--grow {
    flex: 1 1 200px;
    position: relative;
}

.cv-opp-filter--grow i {
    position: absolute;
    left: 12px;
    bottom: 11px;
    color: var(--cv-muted);
}

.cv-opp-filter--grow input {
    padding-left: 2rem;
    min-height: 42px;
    border-radius: 12px;
}

.cv-opp-filter__label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--cv-muted);
}

.cv-opp-filter .form-select,
.cv-opp-filter .form-control {
    min-height: 42px;
    border-radius: 12px;
}

.cv-opp-filter-btn {
    min-height: 42px;
    border-radius: 12px;
    font-weight: 700;
    padding-inline: 1.1rem;
}

.cv-opp-filter--check {
    flex-direction: row;
    align-items: center;
    gap: 0.45rem;
    min-height: 42px;
    padding: 0 0.25rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    user-select: none;
}

.cv-opp-filter--check input {
    margin: 0;
    cursor: pointer;
}

.cv-oportunidades-filters-mobile {
    margin-top: 0.65rem;
}

.cv-oportunidades-filters-mobile summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--cv-purple);
    list-style: none;
}

.cv-oportunidades-filters-mobile summary::-webkit-details-marker { display: none; }

.cv-oportunidades-summary {
    font-size: 0.875rem;
    color: var(--cv-muted);
    margin: 0 0 0.85rem;
}

/* ——— Grilla agregada (7 columnas desktop) ——— */
.opportunities-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 14px;
}

@media (max-width: 1600px) {
    .opportunities-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

@media (max-width: 1400px) {
    .opportunities-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (max-width: 1200px) {
    .opportunities-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 992px) {
    .opportunities-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .cv-opp-filter--hide-mobile { display: none; }
}

@media (max-width: 768px) {
    .opportunities-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 480px) {
    .opportunities-grid { grid-template-columns: 1fr; }
}

.opportunity-card {
    background: #fff;
    border: 1px solid #e8eaf2;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
    transition: all 0.18s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.opportunity-card:hover,
.opportunity-card:focus-visible {
    transform: translateY(-3px);
    border-color: rgba(124, 58, 237, 0.35);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.1);
    outline: none;
}

.opportunity-image-wrap {
    position: relative;
    height: 210px;
    padding: 10px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
}

.opportunity-image-wrap img {
    max-width: 100%;
    max-height: 190px;
    object-fit: contain;
    display: block;
}

.opportunity-demand-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #7c3aed, #5b21b6);
    color: #fff;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    padding: 5px 8px;
    line-height: 1.2;
}

.opportunity-demand-badge--muted {
    background: #e5e7eb;
    color: #6b7280;
}

.opportunity-body {
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.opportunity-title {
    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;
    color: #111827;
    margin: 0 0 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.opportunity-set-name,
.opportunity-set-code {
    font-size: 11px;
    color: #64748b;
    line-height: 1.25;
    margin: 0 0 3px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.opportunity-set-code {
    font-weight: 800;
    color: #111827;
    letter-spacing: 0.02em;
}

.opportunity-edition {
    font-weight: 700;
    color: #7c3aed;
}

.opportunity-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 8px;
}

.opportunity-badge {
    font-size: 10px;
    font-weight: 800;
    border-radius: 999px;
    padding: 3px 7px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.opportunity-badge.tcg { color: #6d28d9; background: #f3e8ff; }
.opportunity-badge.rarity { color: #ea580c; background: #fff7ed; }
.opportunity-badge.city { color: #0369a1; background: #e0f2fe; }

.opportunity-summary {
    font-size: 11px;
    color: #475569;
    margin: 0 0 10px;
    line-height: 1.4;
}

.opportunity-summary strong {
    color: #111827;
}

.opportunity-btn {
    width: 100%;
    min-height: 36px;
    margin-top: auto;
    border-radius: 10px;
    border: 0;
    background: linear-gradient(135deg, #7c3aed, #5b21b6);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.opportunity-btn:hover {
    filter: brightness(1.05);
}

/* ——— Modal detalle ——— */
.cv-opp-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 280px) minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
}

@media (max-width: 768px) {
    .cv-opp-detail-layout { grid-template-columns: 1fr; }
}

.cv-opp-detail-image-wrap {
    background: #f8fafc;
    border-radius: 14px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 260px;
}

.cv-opp-detail-image-wrap img {
    max-width: 100%;
    max-height: 320px;
    object-fit: contain;
}

.cv-opp-detail-meta {
    margin: 0.75rem 0 0;
    display: grid;
    gap: 0.35rem;
    font-size: 0.8125rem;
}

.cv-opp-detail-meta div {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 0.5rem;
}

.cv-opp-detail-meta dt {
    margin: 0;
    color: var(--cv-muted);
    font-weight: 600;
}

.cv-opp-detail-meta dd {
    margin: 0;
    color: var(--cv-text);
    font-weight: 600;
}

.cv-opp-detail-summary {
    margin-top: 0.85rem;
    padding: 0.75rem;
    border-radius: 12px;
    background: #f5f3ff;
    border: 1px solid #ede9fe;
    font-size: 0.875rem;
    color: #475569;
}

.cv-opp-detail-summary strong {
    color: #6d28d9;
}

.cv-opp-detail-users__title {
    font-size: 0.8125rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--cv-muted);
    margin: 0 0 0.65rem;
}

.cv-opp-detail-users__list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    max-height: min(52vh, 480px);
    overflow-y: auto;
    padding-right: 4px;
}

.cv-opp-user {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: 0.65rem;
    align-items: center;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--cv-border);
    border-radius: 14px;
    background: #fff;
}

.cv-opp-user__avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    overflow: hidden;
    background: #ede9fe;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cv-opp-user__avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cv-opp-user__avatar-init {
    font-size: 0.875rem;
    font-weight: 800;
    color: #6d28d9;
}

.cv-opp-user__body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.cv-opp-user__name {
    font-size: 0.9rem;
    color: var(--cv-text);
}

.cv-opp-user__city,
.cv-opp-user__date {
    font-size: 0.75rem;
    color: var(--cv-muted);
}

.cv-opp-user__qty {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #6d28d9;
}

.cv-opp-user__action .btn {
    white-space: nowrap;
    border-radius: 10px;
    font-weight: 700;
}

.cv-oportunidades-empty {
    text-align: center;
    padding: 3rem 1.5rem;
    background: #fff;
    border: 1px dashed var(--cv-border);
    border-radius: 20px;
}

.cv-oportunidades-empty__icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    border-radius: 18px;
    background: #f5f3ff;
    color: var(--cv-purple);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
}

.cv-oportunidades-empty h2 {
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
}

.cv-oportunidades-empty p {
    color: var(--cv-muted);
    margin: 0 0 1rem;
}

.cv-oportunidades-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.cv-oportunidades-pagination__current {
    font-size: 0.875rem;
    color: var(--cv-muted);
    font-weight: 600;
}
