/* Custom styles for E-commerce Module */

:root {
    --eco-primary: #0d6efd;
    --eco-secondary: #6c757d;
    --eco-success: #198754;
    --eco-danger: #dc3545;
    --eco-warning: #ffc107;
    --eco-info: #0dcaf0;
    --eco-light: #f8f9fa;
    --eco-dark: #212529;
    --eco-card-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    --eco-transition: all 0.3s ease;
}

/* Store Front */
.eco-store-title {
    font-weight: 700;
    color: var(--eco-dark);
    letter-spacing: -0.5px;
}

.eco-product-card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--eco-card-shadow);
    transition: var(--eco-transition);
    background: #fff;
    display: flex;
    flex-direction: column;
}

.eco-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.eco-product-image-container {
    position: relative;
    overflow: hidden;
    padding-top: 100%; /* 1:1 Aspect Ratio */
    background: #fff;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.eco-product-image-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain; /* Alterado para contain para não cortar detalhes do produto */
    padding: 6px; /* Reduzido o respiro para a imagem */
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    image-rendering: -webkit-optimize-contrast; /* Melhora nitidez em alguns browsers */
    background-color: #fff;
    cursor: zoom-in;
}

.eco-product-image-container a {
    display: block;
    width: 100%;
    height: 100%;
}

.eco-product-card:hover .eco-product-image-container img {
    transform: scale(1.1);
}

.eco-product-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    z-index: 10;
    font-size: 0.6rem;
    padding: 3px 6px;
}

.eco-product-category {
    font-size: 0.55rem;
    text-transform: uppercase;
    color: var(--eco-secondary);
    font-weight: 600;
    margin-bottom: 2px;
}

.eco-product-title {
    font-weight: 600;
    font-size: 0.75rem;
    margin-bottom: 3px;
    color: var(--eco-dark);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 1.8rem;
    line-height: 0.9rem;
}

.eco-product-price {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--eco-primary);
    margin-bottom: 5px;
}

.eco-product-card .card-body {
    padding: 0.5rem !important;
}

.eco-product-card .input-group {
    margin-bottom: 0.4rem !important;
}

.eco-product-card .input-group-text, 
.eco-product-card .form-control {
    font-size: 0.75rem;
    padding: 0.2rem 0.4rem;
}

.eco-btn-add {
    padding: 0.3rem 0.4rem;
    font-size: 0.75rem;
    border-radius: 6px;
}

/* Cart & Checkout */
.card-radio {
    position: relative;
    display: block;
}

.card-radio .form-check-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.card-radio .form-check-label {
    display: flex !important;
    align-items: center;
    padding: 1rem !important;
    border: 2px solid #e9ecef !important;
    border-radius: 12px !important;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    background-color: #fff;
    margin: 0 !important;
    width: 100%;
}

.card-radio .form-check-label:hover {
    border-color: #dee2e6 !important;
    background-color: #f8f9fa;
}

.card-radio .form-check-input:checked + .form-check-label {
    border-color: #0d6efd !important;
    background-color: rgba(13, 110, 253, 0.08) !important;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15) !important;
}

.card-radio .form-check-label .payment-icon {
    width: 48px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
    font-size: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 6px;
    padding: 4px;
}

.payment-details {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.payment-instructions {
    font-size: 0.7rem;
    color: #6c757d;
    font-weight: normal;
    margin-top: 2px;
    line-height: 1.2;
}

.card-radio .form-check-label .payment-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.cursor-pointer {
    cursor: pointer;
}

.eco-cart-table th {
    background-color: var(--eco-light);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.eco-summary-card {
    border: none;
    border-radius: 15px;
    box-shadow: var(--eco-card-shadow);
}

.eco-summary-total {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--eco-primary);
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .eco-product-title {
        font-size: 0.7rem;
        height: 1.6rem;
        line-height: 0.8rem;
    }
    .eco-product-price {
        font-size: 0.75rem;
    }
    .eco-product-card .card-body {
        padding: 0.4rem !important;
    }
    .eco-btn-add {
        font-size: 0.7rem;
        padding: 0.25rem 0.35rem;
    }
}

/* Icon Colors */
.eco-icon-transfer { color: #0d6efd; } /* Azul */
.eco-icon-mbway { color: #e11d48; }    /* Rosa/Vermelho MB WAY */
.eco-icon-multibanco { color: #facc15; } /* Amarelo Multibanco */
.eco-icon-paypal { color: #003087; }   /* Azul PayPal */
.eco-icon-cash { color: #16a34a; }     /* Verde Dinheiro */
.eco-icon-card { color: #475569; }     /* Cinza Cartão */
.eco-icon-secure { color: #059669; }   /* Verde Seguro */

.eco-icon-danger { color: #dc3545; }
.eco-icon-success { color: #198754; }
.eco-icon-warning { color: #ffc107; }
.eco-icon-info { color: #0dcaf0; }
