/*
   Virada de lote (#lotes) - MBNF 2027.
*/

#lotes.lot-pricing {
    --lot-line: rgba(243, 227, 215, .3);
    --lot-divider: rgba(243, 227, 215, .11);
    --lot-row-line: rgba(243, 227, 215, .1);     /* linhas horizontais: abaixo do cabecalho e entre as categorias */
    --lot-col-line: rgba(243, 227, 215, .065);   /* divisorias verticais entre lotes (so no corpo da tabela) */
    --lot-current-bg: #4a1d30;                   /* coluna do lote atual (tom mais claro que o fundo) */
    --lot-accent: #cda78e;
    --lot-current: #e1a0b4;
    margin: 0;
    padding: 30px 6vw 42px;
    background: #2c0d18;
    color: #f3e3d7;
    font-family: var(--font-primary);
    font-size: 17px;
    line-height: 1.5;
    letter-spacing: normal;
}
#lotes :where(h2, p, ul, table) { margin: 0; color: inherit; text-transform: none; }
#lotes .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* ===== Cabecalho + legenda ===== */
#lotes .lot-pricing-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto 22px;
}
#lotes .eyebrow {
    margin: 0 0 10px;
    color: var(--lot-accent);
    font-size: 9px;
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: calc(.13em + var(--track-caps));
}
#lotes h2 {
    font-family: var(--font-primary);
    font-size: 32px;
    font-weight: 300;
    line-height: 1.1;
    letter-spacing: calc(-.035em + var(--track-300));
}
#lotes h2 em { font-family: var(--font-accent); font-style: italic; font-weight: 400; letter-spacing: -.035em; }

#lotes .lot-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    padding: 0;
    list-style: none;
    font-size: 11px;
    line-height: 1.4;
    letter-spacing: var(--track-400);
    opacity: .85;
}
#lotes .lot-legend li { display: flex; align-items: center; gap: 7px; }
#lotes .lot-legend-current {
    display: block;
    width: 12px;
    height: 12px;
    border: 1px solid rgba(225, 160, 180, .28);
    border-top: 2px solid var(--lot-current);
    border-radius: 3px 3px 0 0;
    background: var(--lot-current-bg);
}
#lotes .lot-legend-price { color: var(--lot-accent); font-size: 11px; }
#lotes .lot-legend-student { color: var(--lot-accent); font-size: 9px; opacity: .75; }

/* ===== Tabela ===== */
#lotes .lot-table-scroll {
    max-width: 1100px;
    margin: 0 auto;
    overflow-x: auto;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}
#lotes .lot-table-scroll:focus-visible { outline: 2px solid var(--lot-accent); outline-offset: 4px; }
/* Reset do tema legado (theme-styles.css: "table, th, td { border: 1px solid #ddd }", border-bottom 2px
   no thead, th alinhado a esquerda, vertical-align top, margin-bottom 20px). As bordas que a tabela usa
   sao declaradas abaixo, com seletores mais especificos. */
#lotes .lot-table { margin: 0; border: 0; background: transparent; }
#lotes .lot-table :is(th, td) { border: 0; line-height: 1.5; text-align: center; vertical-align: middle; }
#lotes .lot-table thead th { vertical-align: bottom; }

#lotes .lot-table {
    width: 100%;
    min-width: 760px;
    border-collapse: separate; /* "separate" para os cantos arredondados da coluna do lote atual */
    border-spacing: 0;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

/* Cabecalho dos lotes */
#lotes .lot-table thead th {
    position: relative;
    padding: 17px 10px 12px;
    font-weight: 500;
    vertical-align: bottom;
}
/* Linha dos nomes dos lotes e coluna das categorias: sem bordas */
#lotes .lot-name {
    display: block;
    font-size: 19px;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: calc(-.025em + var(--track-600));
    white-space: nowrap;
}
#lotes .lot-date {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: var(--track-400);
    opacity: .65;
    white-space: nowrap;
}
#lotes .lot-badge {
    display: inline-block;
    margin-bottom: 6px;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--lot-current);
    color: #2c0d18;
    font-size: 9px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: calc(.1em + var(--track-caps));
    text-transform: uppercase;
}

/* Coluna das categorias (fixa ao rolar) */
#lotes .lot-table .lot-category-head,
#lotes .lot-table .lot-category {
    position: sticky;
    left: 0;
    z-index: 1;
    width: 240px;
    min-width: 170px;
    padding-left: 0;
    background: #2c0d18;
    text-align: left;
}
#lotes .lot-table .lot-category-head {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: calc(.13em + var(--track-caps));
    text-transform: uppercase;
    color: var(--lot-accent);
}
#lotes .lot-table .lot-category { padding: 14px 16px 14px 0; }

/* Nome da categoria em formato de tag */
#lotes .lot-tag {
    display: inline-block;
    max-width: 100%;
    padding: 6px 13px;
    border: 1px solid rgba(243, 227, 215, .16);
    border-radius: 16px; /* pilula em uma linha; continua harmonioso se um nome longo quebrar */
    background: rgba(243, 227, 215, .06);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: var(--track-600);
}

/* Celulas de valor */
/* Linhas horizontais atravessando a tabela toda (inclusive a coluna das categorias):
   uma abaixo da linha dos lotes e uma entre cada categoria; nenhuma no topo nem no fim. */
#lotes .lot-table thead th { border-bottom: 1px solid var(--lot-row-line); }
#lotes .lot-table tbody tr + tr > * { border-top: 1px solid var(--lot-row-line); }
#lotes .lot-table tbody td { padding: 14px 10px; border-left: 1px solid var(--lot-col-line); vertical-align: middle; }

#lotes .lot-price {
    display: block;
    font-size: 22px;
    font-weight: 300;
    line-height: 1.3;
    letter-spacing: calc(-.04em + var(--track-300));
    white-space: nowrap;
}
#lotes .lot-price > span {
    margin-right: 4px;
    color: var(--lot-accent);
    font-size: 12px;
    letter-spacing: normal;
}
#lotes .lot-student {
    display: block;
    margin-top: 3px;
    color: var(--lot-accent);
    font-size: 12px;
    line-height: 1.35;
    letter-spacing: var(--track-400);
    opacity: .85;
    white-space: nowrap;
}
#lotes .lot-student-label {
    margin-right: 4px;
    color: var(--lot-accent);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: calc(.08em + var(--track-caps));
    text-transform: uppercase;
}
#lotes .lot-empty { opacity: .45; }

/* Lote atual e lotes encerrados */
/* Coluna do lote atual: "cartao" com contorno desenhado por sombras internas (as bordas da tabela foram removidas) */
#lotes .lot-table .is-current {
    --lot-edge: rgba(225, 160, 180, .26);
    background: var(--lot-current-bg);
    border-left-color: transparent;
    box-shadow: inset 1px 0 0 var(--lot-edge), inset -1px 0 0 var(--lot-edge);
}
#lotes .lot-table thead th.is-current {
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    box-shadow: inset 0 2px 0 var(--lot-current), inset 1px 0 0 var(--lot-edge), inset -1px 0 0 var(--lot-edge);
}
#lotes .lot-table tbody tr:last-child td.is-current {
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    box-shadow: inset 1px 0 0 var(--lot-edge), inset -1px 0 0 var(--lot-edge), inset 0 -1px 0 var(--lot-edge);
}
/* A coluna seguinte ao lote atual nao repete a divisoria colada ao contorno */
#lotes .lot-table td.is-current + td { border-left-color: transparent; }
#lotes .lot-table thead th.is-current .lot-date { opacity: .9; }
#lotes .lot-table td.is-current .lot-price { color: #fff7f0; font-weight: 400; }
#lotes .lot-table td.is-current .lot-student { opacity: 1; }
#lotes .lot-table .is-closed > * { opacity: .4; }

/* ===== Mobile: botoes de lote + lista (escondido no desktop) ===== */
#lotes .lot-mobile { display: none; }

@media (max-width: 1100px) {
    #lotes .lot-table .lot-category-head,
    #lotes .lot-table .lot-category { width: 170px; }
    #lotes .lot-price { font-size: 20px; }
}

@media (max-width: 700px) {
    #lotes.lot-pricing { padding: 30px 7vw 42px; font-size: 16px; }
    #lotes .lot-pricing-heading { display: block; margin-bottom: 20px; }
    #lotes h2 { font-size: 29px; }
    #lotes .lot-legend { margin-top: 14px; gap: 6px 16px; }
    #lotes .lot-table-scroll { display: none; }

    #lotes .lot-mobile { display: block; }
    #lotes .lot-tabs {
        display: flex;
        gap: 8px;
        margin: 0 -7vw;
        padding: 2px 7vw 4px;
        overflow-x: auto;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
    }
    #lotes .lot-tabs::-webkit-scrollbar { display: none; }
    #lotes .lot-tab {
        flex: 0 0 auto;
        margin: 0;
        padding: 10px 14px;
        border: 1px solid rgba(243, 227, 215, .22);
        border-radius: 12px;
        background: transparent;
        color: inherit;
        font-family: inherit;
        text-align: left;
        scroll-snap-align: start;
        cursor: pointer;
    }
    #lotes .lot-tab .lot-name { font-size: 15px; }
    #lotes .lot-tab .lot-date { font-size: 10px; }
    #lotes .lot-tab.is-current { border-color: var(--lot-current); }
    #lotes .lot-tab.is-closed { opacity: .55; }
    #lotes .lot-tab[aria-selected="true"] { border-color: #f3e3d7; background: #f3e3d7; color: #2c0d18; opacity: 1; }
    #lotes .lot-tab:focus-visible { outline: 2px solid var(--lot-accent); outline-offset: 2px; }

    #lotes .lot-panel { margin-top: 16px; border-top: 1px solid var(--lot-line); }
    #lotes .lot-panel[hidden] { display: none; }
    #lotes .lot-panel.is-closed { opacity: .55; }
    #lotes .lot-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        padding: 13px 0;
        border-bottom: 1px solid var(--lot-divider);
    }
    #lotes .lot-row:last-child { border-bottom-color: var(--lot-line); }
    #lotes .lot-row .lot-category {
        flex: 1 1 auto;
        min-width: 0;
        font-size: 14px;
        font-weight: 500;
        line-height: 1.3;
        letter-spacing: var(--track-600);
    }
    #lotes .lot-values { flex: 0 0 auto; text-align: right; }
    #lotes .lot-row .lot-price { font-size: 20px; }
    #lotes .lot-row .lot-student { font-size: 11px; }
}
