﻿/* ==========================================================================
   GARIMPO OLFATIVO - CARRINHO DE COMPRAS BOUTIQUE
   Compatível com Safari iOS (100dvh, safe-area-inset, zero overflow horizontal)
   Paleta: #6F5238, #B08D57, #FAF8F5
   ========================================================================== */

.carrinho-wrapper {
    min-height: 100vh;
    min-height: 100dvh;
    padding-bottom: calc(2.5rem + env(safe-area-inset-bottom, 0px));
    overflow-x: hidden;
    max-width: 100%;
}

.carrinho-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #2C241E;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.carrinho-item-card {
    background-color: #FFFFFF;
    border: 1px solid #EAE4DC;
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 2px 8px rgba(111, 82, 56, 0.04);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}

.carrinho-item-card:hover {
    border-color: #B08D57;
    box-shadow: 0 4px 14px rgba(111, 82, 56, 0.08);
}

.carrinho-product-img {
    width: 76px;
    height: 76px;
    min-width: 76px;
    min-height: 76px;
    object-fit: cover;
    object-position: center;
    border-radius: 10px;
    border: 1px solid #EAE4DC;
    background-color: #FAF8F5;
}

.carrinho-product-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-grow: 1;
    min-width: 0; /* Impede overflow de textos longos no flexbox */
}

.carrinho-product-name {
    font-size: 1rem;
    font-weight: 600;
    color: #2C241E;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.carrinho-product-qty {
    font-size: 0.8rem;
    color: #8A7E73;
    margin-bottom: 4px;
}

.carrinho-product-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: #6F5238;
}

.carrinho-btn-remove {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid #F2ECE4;
    background-color: #FAF8F5;
    color: #A33B3B;
    padding: 8px;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: all 0.2s ease;
    margin-left: auto;
    flex-shrink: 0;
}

.carrinho-btn-remove:hover,
.carrinho-btn-remove:active {
    background-color: #FDEDEC;
    border-color: #F5C6CB;
    color: #721C24;
}

/* Card Resumo do Pedido & Pagamento */
.carrinho-summary-card {
    background-color: #FFFFFF;
    border: 1px solid #EAE4DC;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(111, 82, 56, 0.05);
    margin-bottom: 1.5rem;
}

.carrinho-summary-header {
    background-color: #FDFBF7;
    border-bottom: 1px solid #EAE4DC;
    padding: 14px 18px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #6F5238;
    display: flex;
    align-items: center;
    gap: 8px;
}

.carrinho-summary-body {
    padding: 16px 18px;
}

/* Opções de Frete e Pagamento com área de toque de 44px */
.carrinho-option-item {
    display: flex;
    align-items: center;
    min-height: 46px;
    padding: 10px 14px;
    border: 1px solid #EAE4DC;
    border-radius: 10px;
    margin-bottom: 8px;
    background-color: #FAF8F5;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: all 0.2s ease;
}

.carrinho-option-item:hover {
    border-color: #B08D57;
    background-color: #F7F3EC;
}

.carrinho-option-item:has(input:checked) {
    border-color: #B08D57;
    background-color: #FDF9F3;
    box-shadow: 0 0 0 1px #B08D57;
}

.carrinho-option-item input[type="radio"] {
    min-height: 20px;
    min-width: 20px;
    margin-right: 12px;
    accent-color: #6F5238;
    cursor: pointer;
    flex-shrink: 0;
}

.carrinho-option-label {
    margin-bottom: 0;
    cursor: pointer;
    font-size: 0.9rem;
    color: #2C241E;
    flex-grow: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.carrinho-badge-price {
    font-weight: 700;
    color: #6F5238;
}

.carrinho-badge-time {
    font-size: 0.8rem;
    color: #8A7E73;
}

.carrinho-total-row {
    font-size: 1.25rem;
    font-weight: 700;
    color: #6F5238;
}

/* Empty State do Carrinho */
.carrinho-empty-state {
    background-color: #FFFFFF;
    border: 1px solid #EAE4DC;
    border-radius: 16px;
    padding: 3.5rem 1.5rem;
    text-align: center;
    box-shadow: 0 4px 16px rgba(111, 82, 56, 0.04);
}

.carrinho-empty-icon {
    font-size: 3.5rem;
    color: #CDB78F;
    margin-bottom: 1.25rem;
}

/* Ajustes finos no Mobile */
@media (max-width: 575.98px) {
    .carrinho-item-card {
        padding: 12px;
        gap: 10px;
    }

    .carrinho-product-img {
        width: 64px;
        height: 64px;
        min-width: 64px;
        min-height: 64px;
    }

    .carrinho-product-name {
        font-size: 0.92rem;
    }

    .carrinho-product-price {
        font-size: 1rem;
    }
}
