/* Estilos para a página do carrinho */
.cart-container {
    background-color: #f5f5f5;
    min-height: 100vh;
    padding: 40px 0;
}

.cart-products-section {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.cart-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 15px;
    background: #82ae46;
    border-radius: 8px 8px 0 0;
    margin: -20px -20px 20px -20px;
}

.cart-header h5 {
    margin: 0;
    font-size: 18px;
    font-weight: 400;
    color: #fff;
}

.cart-product-item {
    display: flex;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #e5e5e5;
    position: relative;
    gap: 15px;
}

.cart-product-item:last-child {
    border-bottom: none;
}

.cart-checkbox {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    border: 2px solid #82ae46;
    border-radius: 4px;
    outline: none;
    transition: all 0.3s ease;
    position: relative;
}

.cart-checkbox:hover {
    border-color: #6b9437;
    box-shadow: 0 0 5px rgba(130, 174, 70, 0.3);
}

.cart-checkbox:checked {
    background-color: #82ae46;
    border-color: #82ae46;
}

.cart-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
}

.cart-select-all input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    border: 2px solid #82ae46;
    border-radius: 4px;
    outline: none;
    transition: all 0.3s ease;
    position: relative;
}

.cart-select-all input[type="checkbox"]:hover {
    border-color: #6b9437;
    box-shadow: 0 0 5px rgba(130, 174, 70, 0.3);
}

.cart-select-all input[type="checkbox"]:checked {
    background-color: #82ae46;
    border-color: #82ae46;
}

.cart-select-all input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
}

.cart-product-image {
    width: 80px;
    height: 80px;
    object-fit: contain;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    padding: 5px;
    flex-shrink: 0;
}

.cart-product-details {
    flex: 1;
    max-width: 400px;
    min-width: 200px;
}

.cart-product-name {
    font-size: 14px;
    color: #333;
    margin-bottom: 5px;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cart-product-info {
    font-size: 12px;
    color: #666;
    margin-bottom: 10px;
}

.cart-product-actions {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.cart-product-actions a {
    color: #3483fa;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
}

.cart-product-actions a:hover {
    text-decoration: none;
}

.cart-product-qty-section {
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-left: auto;
}

.cart-product-price-section {
    text-align: right;
    min-width: 120px;
    flex-shrink: 0;
}

.cart-product-discount {
    font-size: 12px;
    color: #00a650;
    font-weight: 500;
}

.cart-product-old-price {
    font-size: 12px;
    color: #999;
    text-decoration: line-through;
}

.cart-product-price {
    font-size: 24px;
    color: #333;
    font-weight: 400;
    margin: 5px 0;
    line-height: 1;
}

.cart-product-price sup {
    font-size: 14px;
    vertical-align: baseline;
    position: relative;
    top: -0.2em;
}

.cart-product-stock {
    font-size: 12px;
    color: #666;
}

.cart-qty-controls {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    padding: 5px 10px;
    background: #fff;
}

.cart-qty-btn {
    background: none;
    border: none;
    color: #82ae46;
    font-size: 18px;
    cursor: pointer;
    padding: 0 5px;
    transition: color 0.3s ease;
}

.cart-qty-btn:hover {
    color: #6b9437;
}

.cart-qty-value {
    min-width: 30px;
    text-align: center;
    font-size: 14px;
}

.cart-summary {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    position: sticky;
    top: 20px;
}

.cart-summary h5 {
    font-size: 18px;
    font-weight: 400;
    margin-bottom: 20px;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 16px;
}

.cart-summary-label {
    color: #666;
}

.cart-summary-value {
    color: #333;
}

.cart-summary-total {
    display: flex;
    justify-content: space-between;
    font-size: 28px;
    font-weight: 400;
    margin: 20px 0;
    padding-top: 20px;
    border-top: 1px solid #e5e5e5;
    line-height: 1;
}

.cart-summary-total .price-cents {
    font-size: 14px;
    vertical-align: baseline;
    position: relative;
    top: -0.3em;
}

.cart-summary .btn-checkout {
    width: 100%;
    background: #82ae46;
    color: #fff;
    border: none;
    padding: 15px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
}

.cart-summary .btn-checkout:hover {
    background: #6b9437;
}

.cart-coupon-section {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.cart-coupon-input {
    display: flex;
    gap: 10px;
}

.cart-coupon-input input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    font-size: 14px;
}

.cart-coupon-input button {
    background: #fff;
    color: #3483fa;
    border: 1px solid #3483fa;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}

.cart-select-all {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 15px 20px;
    background: #fff;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

/* Estilos para o carrinho lateral (sidebar) */
.cart-section {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100%;
    background: white;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    z-index: 1000;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.cart-section.cart-active {
    right: 0;
}

.cart-section.cart-inactive {
    right: -400px;
}

.cart-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #35b831;
    color: white;
}

.cart-header h3 {
    margin: 0;
    font-size: 18px;
}

.btn-cart-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.cart-body {
    padding: 20px;
    flex: 1;
}

.table-cart {
    width: 100%;
    font-size: 12px;
}

.table-cart th,
.table-cart td {
    padding: 8px 4px;
    text-align: center;
}

.table-cart img {
    width: 30px;
    height: 30px;
    object-fit: cover;
}

.cart-qty-minus,
.cart-qty-plus {
    width: 25px;
    height: 25px;
    padding: 0;
    font-size: 12px;
}

.cart-qty {
    margin: 0 5px;
    font-weight: bold;
}

.cart-remove {
    color: #dc3545;
    text-decoration: none;
}

.cart-remove:hover {
    color: #c82333;
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    background: #f8f9fa;
}

.cart-total {
    margin-bottom: 15px;
    text-align: center;
}

.cart-total h3 {
    color: #35b831;
    margin: 0;
}

.cart-actions {
    display: flex;
    gap: 10px;
}

.cart-actions .btn {
    flex: 1;
    padding: 10px;
    font-size: 12px;
}

.main-content {
    margin-right: 400px;
    transition: margin-right 0.3s ease;
}

/* Responsivo */
@media (max-width: 768px) {
    .cart-section {
        width: 100%;
        right: -100%;
    }
    
    .cart-section.cart-active {
        right: 0;
    }
    
    .main-content {
        margin-right: 0;
    }
}