/* =========================================================
   SHIPPING TABLE - Espaço Criativo
   Estilização da tabela de frete na página de produto
   ========================================================= */

/* Container principal */
.shipping-table-wrap {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
}

/* Endereço do CEP */
.shipping-table-wrap .shipping-addr {
    font-size: 13px;
    color: #4b5563;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
}

.shipping-table-wrap .shipping-addr b {
    color: #6f42c1;
}

/* Tabela */
.shipping-table-wrap .table-responsive {
    margin: 0;
}

.shipping-table-wrap .ship-table {
    margin: 0;
    font-size: 13px;
    border-collapse: collapse;
}

.shipping-table-wrap .ship-table thead {
    background: #f8f5ff;
}

.shipping-table-wrap .ship-table thead th {
    font-weight: 600;
    color: #6f42c1;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    padding: 10px 12px;
    border: none;
    border-bottom: 2px solid #e9d5ff;
}

.shipping-table-wrap .ship-table tbody tr {
    transition: background 0.15s ease;
}

.shipping-table-wrap .ship-table tbody tr:hover {
    background: #faf5ff;
}

.shipping-table-wrap .ship-table tbody td {
    padding: 12px;
    border: none;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
    vertical-align: middle;
}

.shipping-table-wrap .ship-table tbody tr:last-child td {
    border-bottom: none;
}

/* Coluna da transportadora */
.shipping-table-wrap .ship-table td .d-flex {
    gap: 8px;
}

.shipping-table-wrap .ship-table td .d-flex i {
    color: #6f42c1;
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.shipping-table-wrap .ship-table td .d-flex img {
    height: 18px;
    width: auto;
    max-width: 50px;
    object-fit: contain;
}

.shipping-table-wrap .ship-table td .d-flex strong {
    color: #1f2937;
    font-weight: 600;
}

/* Coluna de preço */
.shipping-table-wrap .ship-table td.text-end {
    font-weight: 700;
    color: #059669;
}

/* Frete grátis destaque */
.shipping-table-wrap .ship-table tbody tr:first-child td.text-end {
    color: #059669;
}

/* Nota de rodapé */
.shipping-table-wrap small.text-muted {
    font-size: 11px;
    color: #9ca3af !important;
    padding: 8px 0 0;
}

/* =========================================================
   SHIPPING CARDS - Para o carrinho (com radio)
   ========================================================= */

.shipping-cards {
    background: #fff;
    border-radius: 10px;
}

.shipping-cards .shipping-addr {
    font-size: 13px;
    color: #4b5563;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid #f3f4f6;
}

.shipping-cards .shipping-addr b {
    color: #6f42c1;
}

.shipping-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ship-item {
    position: relative;
}

.ship-radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ship-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #fafafa;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ship-card:hover {
    border-color: #c4b5fd;
    background: #faf5ff;
}

.ship-radio:checked + .ship-card {
    border-color: #6f42c1;
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
    box-shadow: 0 0 0 3px rgba(111, 66, 193, 0.1);
}

.ship-radio:checked + .ship-card::before {
    content: '';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 18px;
    height: 18px;
    background: #6f42c1;
    border-radius: 50%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' width='12' height='12' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 6L9 17l-5-5' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

.ship-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #f3f4f6;
    border-radius: 8px;
    flex-shrink: 0;
}

.ship-icon i {
    font-size: 18px;
    color: #6f42c1;
}

.ship-icon img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.ship-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ship-text strong {
    font-size: 14px;
    color: #1f2937;
}

.ship-text small {
    font-size: 12px;
    color: #6b7280;
}

.ship-price {
    font-size: 15px;
    font-weight: 700;
    color: #059669;
    white-space: nowrap;
}

/* Frete grátis */
.ship-card[data-free="true"] .ship-price,
.ship-price:contains("0,00") {
    color: #059669;
}

/* =========================================================
   RESPONSIVO
   ========================================================= */

@media (max-width: 576px) {
    .shipping-table-wrap .ship-table {
        font-size: 12px;
    }

    .shipping-table-wrap .ship-table thead th {
        font-size: 10px;
        padding: 8px 6px;
    }

    .shipping-table-wrap .ship-table tbody td {
        padding: 10px 6px;
    }

    .shipping-table-wrap .ship-table td .d-flex strong {
        font-size: 12px;
    }

    /* Esconde coluna serviço em mobile */
    .shipping-table-wrap .ship-table th:nth-child(2),
    .shipping-table-wrap .ship-table td:nth-child(2) {
        display: none;
    }

    .ship-card {
        padding: 10px 12px;
        gap: 10px;
    }

    .ship-icon {
        width: 36px;
        height: 36px;
    }

    .ship-text strong {
        font-size: 13px;
    }

    .ship-text small {
        font-size: 11px;
    }

    .ship-price {
        font-size: 14px;
    }
}