/**
 * Rydan Catálogo - Estilos Exclusivos dos Modos Tabulares em Linha
 * 1) Modo Foto-Lista (Linha com Foto Pequena de 48px)
 * 2) Modo Lista (Linha Compacta sem Foto)
 * 
 * Regra: CSS 100% isolado, autônomo e sem dependência de classes legadas.
 * Versão: 1.1.14
 */

/* ========================================================
   CONTAINER PRINCIPAL DA LISTA TABULAR
   ======================================================== */
.ry-table-list,
ul.catalogo-lista.catalogo-lista-linha,
ul.catalogo-lista.catalogo-lista-lista {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    margin: 15px 0 25px 0 !important;
    padding: 0 !important;
    list-style: none !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    box-sizing: border-box !important;
}

/* ========================================================
   LINHA DA TABELA (ITEM DE PRODUTO)
   ======================================================== */
li.ry-table-item {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    min-height: 56px !important;
    padding: 8px 14px !important;
    gap: 12px !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: 1px solid #f1f5f9 !important;
    background: #ffffff !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    transition: background-color 0.15s ease !important;
}

li.ry-table-item:hover {
    background-color: #f8fafc !important;
}

li.ry-table-item:last-child {
    border-bottom: none !important;
}

li.ry-table-item.ry-table-item--in-cart {
    background-color: #f0fdf4 !important;
    border-left: 4px solid #10b981 !important;
}

/* ========================================================
   COLUNAS DA TABELA
   ======================================================== */
.ry-table-col {
    display: flex !important;
    align-items: center !important;
    box-sizing: border-box !important;
    margin: 0 !important;
}

/* 1. Coluna Foto Pequena (48px x 48px) */
.ry-table-col--img {
    flex: 0 0 48px !important;
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    max-width: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    padding: 0 !important;
}

.ry-table-col--img .ry-table-img-link {
    display: block !important;
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    max-width: 48px !important;
    text-decoration: none !important;
}

.ry-table-col--img .ry-table-img {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    max-width: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    border-radius: 6px !important;
    border: 1px solid #e2e8f0 !important;
    background-color: #ffffff !important;
    background-size: contain !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.ry-table-col--img .ry-table-img-spinner {
    font-size: 10px !important;
    color: #94a3b8 !important;
}

/* 2. Coluna Informações: Código, Tags e Título */
.ry-table-col--info {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center !important;
    gap: 3px !important;
    padding: 0 8px !important;
}

.ry-table-meta {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
    font-size: 0.75rem !important;
    line-height: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.ry-table-code {
    color: #0c3866 !important;
    font-weight: 700 !important;
    font-size: 0.8rem !important;
}

.ry-table-tag {
    color: #64748b !important;
    font-size: 0.72rem !important;
    background: #f1f5f9 !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 3px !important;
    white-space: nowrap !important;
}

.ry-table-title {
    font-size: 0.92rem !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    text-decoration: none !important;
    line-height: 1.35 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 1 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    margin: 0 !important;
    padding: 0 !important;
    text-align: left !important;
}

.ry-table-title:hover {
    color: #0284c7 !important;
    text-decoration: underline !important;
}

/* 3. Coluna Especificações de Atacado (Mínimo / Embalagem) */
.ry-table-col--specs {
    flex: 0 0 auto !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 0 6px !important;
}

.ry-table-pill {
    font-size: 0.73rem !important;
    color: #475569 !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    padding: 3px 7px !important;
    border-radius: 4px !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
}

/* 4. Coluna Preço */
.ry-table-col--price {
    flex: 0 0 115px !important;
    width: 115px !important;
    min-width: 115px !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    justify-content: center !important;
    text-align: right !important;
    padding: 0 6px !important;
}

.ry-table-price {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    margin: 0 !important;
    padding: 0 !important;
}

.ry-table-price-por {
    font-size: 0.92rem !important;
    font-weight: 700 !important;
    color: #0c3866 !important;
    white-space: nowrap !important;
}

.ry-table-price-de {
    font-size: 0.72rem !important;
    color: #94a3b8 !important;
    white-space: nowrap !important;
}

.ry-table-price--promo .ry-table-price-por {
    color: #dc2626 !important;
}

.ry-table-price-locked {
    font-size: 0.75rem !important;
    color: #64748b !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
}

/* 5. Coluna Ação / Compra */
.ry-table-col--action {
    flex: 0 0 180px !important;
    width: 180px !important;
    min-width: 180px !important;
    justify-content: flex-end !important;
    align-items: center !important;
    padding-left: 6px !important;
}

.ry-table-form {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 6px !important;
    margin: 0 !important;
    padding: 0 !important;
}

.ry-stepper--table {
    display: flex !important;
    align-items: center !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 5px !important;
    height: 30px !important;
    overflow: hidden !important;
    background: #ffffff !important;
    box-sizing: border-box !important;
}

.ry-stepper--table .ry-stepper__btn {
    width: 24px !important;
    height: 30px !important;
    min-width: 24px !important;
    border: none !important;
    background: #f1f5f9 !important;
    color: #334155 !important;
    cursor: pointer !important;
    font-weight: bold !important;
    font-size: 13px !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background 0.15s ease !important;
}

.ry-stepper--table .ry-stepper__btn:hover {
    background: #e2e8f0 !important;
}

.ry-stepper--table .ry-stepper__input {
    width: 36px !important;
    height: 30px !important;
    min-width: 36px !important;
    border: none !important;
    border-left: 1px solid #e2e8f0 !important;
    border-right: 1px solid #e2e8f0 !important;
    text-align: center !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    box-sizing: border-box !important;
    -moz-appearance: textfield !important;
}

.ry-stepper--table .ry-stepper__input::-webkit-outer-spin-button,
.ry-stepper--table .ry-stepper__input::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

.ry-btn--table-buy {
    height: 30px !important;
    padding: 0 10px !important;
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    border-radius: 5px !important;
    border: none !important;
    background: linear-gradient(135deg, #10b981 0%, #047857 100%) !important;
    color: #ffffff !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
    transition: opacity 0.15s ease, transform 0.15s ease !important;
}

.ry-btn--table-buy:hover {
    opacity: 0.9 !important;
    transform: translateY(-1px) !important;
}

.ry-btn--table-login {
    height: 30px !important;
    padding: 0 10px !important;
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    border-radius: 5px !important;
    border: 1px solid #cbd5e1 !important;
    background: #f8fafc !important;
    color: #0c3866 !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
}

.ry-btn--table-login:hover {
    background: #f1f5f9 !important;
}

/* ========================================================
   RESPONSIVIDADE MOBILE
   ======================================================== */
@media (max-width: 768px) {
    li.ry-table-item {
        flex-wrap: wrap !important;
        padding: 10px 10px !important;
        gap: 8px !important;
        min-height: auto !important;
    }

    .ry-table-col--img {
        flex: 0 0 44px !important;
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        max-width: 44px !important;
    }

    .ry-table-col--info {
        flex: 1 1 calc(100% - 56px) !important;
        padding: 0 !important;
    }

    .ry-table-item.ry-table-item--no-img .ry-table-col--info {
        flex: 1 1 100% !important;
    }

    .ry-table-col--specs {
        display: none !important;
    }

    .ry-table-col--price {
        flex: 1 1 auto !important;
        width: auto !important;
        min-width: 0 !important;
        align-items: flex-start !important;
        text-align: left !important;
        padding-left: 52px !important;
    }

    .ry-table-item.ry-table-item--no-img .ry-table-col--price {
        padding-left: 0 !important;
    }

    .ry-table-col--action {
        flex: 0 0 auto !important;
        width: auto !important;
        min-width: 0 !important;
    }
}

