/* ==========================================================
   HUB DE COBRO / LIMBODIA MARKETPLACE
   FASE 49 - PORTAL DEL COMPRADOR
   Archivo: /_lc-core-7842/buyer/assets/buyer.css
   ========================================================== */

.buyer-page {
    background:
        radial-gradient(circle at top left, rgba(225, 182, 83, .13), transparent 32%),
        radial-gradient(circle at bottom right, rgba(81, 209, 138, .08), transparent 28%),
        var(--bg);
}

.buyer-login-page {
    min-height: 100vh;
}

.buyer-login-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 22px;
}

.buyer-login-card {
    max-width: 500px;
}

.buyer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
}

.buyer-brand strong {
    display: block;
}

.buyer-brand span {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.buyer-small-note {
    margin-top: 18px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.buyer-shell .sidebar {
    background:
        linear-gradient(180deg, rgba(225, 182, 83, .07), transparent 38%),
        #090c12;
}

.buyer-topbar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.buyer-metric-email {
    font-size: 15px !important;
    line-height: 1.25 !important;
    word-break: break-word;
}

.buyer-metric-money {
    font-size: 22px !important;
    line-height: 1.15 !important;
}

.buyer-section-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.buyer-section-head h2,
.buyer-section-head p {
    margin-bottom: 0;
}

.buyer-orders {
    display: grid;
    gap: 18px;
}

.buyer-order-card {
    background: rgba(255, 255, 255, .025);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px;
}

.buyer-order-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.buyer-order-head h3 {
    margin: 0 0 4px;
}

.buyer-order-status {
    display: grid;
    gap: 8px;
    justify-items: end;
    text-align: right;
}

.buyer-items {
    display: grid;
    gap: 14px;
    margin: 16px 0;
}

.buyer-product-card {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    background: #0b0f16;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px;
}

.buyer-cover {
    width: 92px;
    height: 118px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: rgba(255,255,255,.03);
}

.buyer-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.buyer-cover-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: var(--accent);
    font-weight: 900;
    letter-spacing: .08em;
}

.buyer-product-main {
    min-width: 0;
}

.buyer-product-title-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
}

.buyer-product-title-row strong {
    display: block;
    font-size: 16px;
    line-height: 1.25;
}

.buyer-product-desc {
    margin: 4px 0 7px;
    line-height: 1.45;
}

.buyer-item-actions,
.buyer-file-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.buyer-listen-btn {
    background: linear-gradient(135deg, #e1b653, #f3d47f);
    color: #101820;
    box-shadow: 0 9px 24px rgba(225, 182, 83, .16);
}

.buyer-access-note {
    margin-top: 12px;
    border: 1px solid rgba(225, 182, 83, .25);
    background: rgba(225, 182, 83, .06);
    color: var(--muted);
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.45;
}

.buyer-access-pending {
    border-color: rgba(255, 209, 102, .35);
    background: rgba(255, 209, 102, .08);
}

.buyer-file-list {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.buyer-file-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    background: rgba(255, 255, 255, .025);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 12px;
    padding: 10px;
}

.buyer-file-row strong,
.buyer-file-row small {
    display: block;
}

.buyer-file-row small {
    margin-top: 3px;
}

.buyer-order-actions {
    margin-top: 16px;
}

@media (max-width: 900px) {
    .buyer-topbar,
    .buyer-order-head,
    .buyer-product-title-row,
    .buyer-file-row {
        display: grid;
    }

    .buyer-order-status {
        justify-items: start;
        text-align: left;
    }

    .buyer-item-actions,
    .buyer-file-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .buyer-login-wrap {
        padding: 14px;
    }

    .buyer-product-card {
        grid-template-columns: 72px minmax(0, 1fr);
        gap: 12px;
    }

    .buyer-cover {
        width: 72px;
        height: 94px;
    }

    .buyer-item-actions .btn,
    .buyer-file-actions .btn,
    .buyer-order-actions .btn,
    .buyer-topbar .btn {
        width: 100%;
    }
}

/* Fase 49C: pantallas seguras propias del portal comprador */
.buyer-simple-page {
    width: min(760px, calc(100% - 28px));
    margin: 0 auto;
    padding: 34px 0 70px;
}

.buyer-simple-page-wide {
    width: min(1040px, calc(100% - 28px));
}

.buyer-simple-card h1 {
    margin-top: 0;
}

.buyer-simple-top {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.buyer-support-form textarea {
    width: 100%;
    resize: vertical;
    min-height: 160px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 14px;
    background: rgba(0,0,0,.20);
    color: var(--text);
    padding: 13px 14px;
    font: inherit;
    outline: none;
}

.buyer-support-form textarea:focus {
    border-color: rgba(225,182,83,.45);
    box-shadow: 0 0 0 4px rgba(225,182,83,.08);
}

.buyer-reorder-grid {
    display: grid;
    gap: 28px;
    row-gap: 28px;
    margin-top: 24px;
}

.buyer-reorder-card,
.buyer-product-fallback {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
    background: rgba(255,255,255,.025);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 18px;
    margin-bottom: 4px;
}

.buyer-reorder-card h2 {
    margin: 0 0 6px;
    font-size: 20px;
}

.buyer-reorder-cover,
.buyer-product-fallback-cover {
    width: 96px;
    height: 124px;
}

.buyer-reorder-actions {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

@media (max-width: 640px) {
    .buyer-reorder-card,
    .buyer-product-fallback {
        grid-template-columns: 76px minmax(0, 1fr);
        gap: 12px;
    }

    .buyer-reorder-cover,
    .buyer-product-fallback-cover {
        width: 76px;
        height: 98px;
    }

    .buyer-simple-top .btn,
    .buyer-reorder-actions .btn {
        width: 100%;
    }
}


/* Fase 49E: separación visual extra en recompra */
.buyer-simple-card .buyer-reorder-grid {
    gap: 28px !important;
    row-gap: 28px !important;
    margin-top: 24px !important;
}

.buyer-simple-card .buyer-reorder-card + .buyer-reorder-card {
    margin-top: 6px;
}

.buyer-simple-card .buyer-reorder-card {
    padding: 18px !important;
}

.buyer-simple-card .buyer-reorder-actions {
    gap: 10px !important;
}

@media (max-width: 640px) {
    .buyer-simple-card .buyer-reorder-grid {
        gap: 22px !important;
        row-gap: 22px !important;
    }

    .buyer-simple-card .buyer-reorder-card {
        padding: 16px !important;
    }
}


/* Fase 50E: marca clickeable hacia el catálogo principal */
.buyer-brand-home,
.buyer-shell .brand-home {
    color: inherit;
    text-decoration: none;
    border-radius: 18px;
    padding: 8px;
    margin: -8px -8px 14px;
    border: 1px solid transparent;
    transition: background .18s ease, transform .18s ease, border-color .18s ease;
}
.buyer-brand-home:hover,
.buyer-shell .brand-home:hover {
    background: rgba(255,255,255,.055);
    transform: translateY(-1px);
    border-color: rgba(225,182,83,.24);
}
.buyer-brand-home span:last-child,
.buyer-shell .brand-home span:last-child {
    color: var(--muted);
}

/* ==========================================================
   Fase 50F — Cuentas comprador / login contraseña
   ========================================================== */
.buyer-login-wrap-wide {
    max-width: 1040px;
}

.buyer-login-card-wide {
    max-width: 1040px;
}

.buyer-login-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px;
    margin-top: 22px;
}

.buyer-login-panel {
    border: 1px solid rgba(225, 182, 83, .18);
    background: rgba(255, 255, 255, .035);
    border-radius: 18px;
    padding: 20px;
}

.buyer-login-panel-primary {
    border-color: rgba(225, 182, 83, .42);
    box-shadow: 0 18px 46px rgba(0,0,0,.20);
}

.buyer-login-panel h2 {
    margin: 6px 0 8px;
    font-size: 22px;
}

.buyer-panel-kicker {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(225, 182, 83, .36);
    color: #e1b653;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.buyer-login-panel .btn[disabled] {
    opacity: .55;
    cursor: not-allowed;
}

.buyer-account-prompt {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    border-color: rgba(225, 182, 83, .32);
}

.buyer-account-prompt h2 {
    margin-bottom: 4px;
}

.buyer-account-grid table th {
    width: 150px;
}

@media (max-width: 780px) {
    .buyer-login-grid,
    .buyer-account-grid {
        grid-template-columns: 1fr;
    }

    .buyer-account-prompt {
        align-items: flex-start;
        flex-direction: column;
    }
}


/* ==========================================================
   Fase 50G3 — Mi cuenta unificada / tarjetas premium
   ========================================================== */
.buyer-account-hub-panel {
    margin: 18px 0 22px;
    padding: 22px;
    border: 1px solid rgba(225, 182, 83, .24);
    background:
        radial-gradient(circle at top left, rgba(225, 182, 83, .11), transparent 34%),
        linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.025));
    box-shadow: 0 18px 48px rgba(0,0,0,.20);
}

.buyer-hub-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}

.buyer-hub-head h2 {
    margin: 4px 0 4px;
    font-size: clamp(20px, 2vw, 28px);
    letter-spacing: -.02em;
}

.buyer-section-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid rgba(225, 182, 83, .34);
    background: rgba(225, 182, 83, .10);
    color: var(--gold, #e1b653);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .09em;
}

.buyer-account-hub-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 0;
}

.buyer-hub-card {
    position: relative;
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    min-height: 96px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(225, 182, 83, .20);
    background: rgba(7, 10, 19, .42);
    color: inherit !important;
    text-decoration: none !important;
    overflow: hidden;
    transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.buyer-hub-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(225, 182, 83, .10), transparent 48%);
    opacity: .42;
}

.buyer-hub-card:hover {
    transform: translateY(-2px);
    border-color: rgba(225, 182, 83, .52);
    background: rgba(7, 10, 19, .58);
    box-shadow: 0 14px 34px rgba(0,0,0,.24);
}

.buyer-hub-card:focus-visible {
    outline: 2px solid rgba(225, 182, 83, .85);
    outline-offset: 3px;
}

.buyer-hub-card-primary {
    border-color: rgba(225, 182, 83, .38);
    background:
        linear-gradient(135deg, rgba(225, 182, 83, .16), rgba(255,255,255,.04)),
        rgba(7, 10, 19, .46);
}

.buyer-hub-icon {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 16px;
    background: rgba(225, 182, 83, .13);
    border: 1px solid rgba(225, 182, 83, .22);
    font-size: 23px;
    line-height: 1;
    flex: 0 0 auto;
}

.buyer-hub-copy {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 4px;
    min-width: 0;
}

.buyer-hub-copy strong,
.buyer-hub-card strong {
    display: block;
    font-size: 16px;
    line-height: 1.2;
    color: var(--text, #f6f0df);
}

.buyer-hub-copy small,
.buyer-hub-card small {
    display: block;
    color: var(--muted, #a8adbd);
    line-height: 1.35;
    font-size: 13px;
}

.buyer-hub-arrow {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: rgba(255,255,255,.06);
    color: var(--gold, #e1b653);
    font-weight: 900;
    transition: transform .18s ease, background .18s ease;
}

.buyer-hub-card:hover .buyer-hub-arrow {
    transform: translateX(3px);
    background: rgba(225, 182, 83, .14);
}

@media (max-width: 920px) {
    .buyer-account-hub-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .buyer-account-hub-panel {
        padding: 16px;
    }

    .buyer-hub-card {
        grid-template-columns: auto minmax(0, 1fr);
        padding: 15px;
    }

    .buyer-hub-arrow {
        display: none;
    }
}
