/* cart-page-v3.css - Estilos aprimorados para a página do carrinho */

body {
    font-family: 'Open Sans', sans-serif;
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f9f9f9;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header da Página do Carrinho com Logo AudioTech */
header .logo a {
    text-decoration: none;
    color: #333;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 24px;
    display: flex;
    align-items: center;
}

header .logo span {
    color: #007bff; /* Cor de destaque da marca */
    margin-left: 4px;
}

.cart-page-main {
    padding: 40px 0;
}

.cart-page-main h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5em;
    color: #333;
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.cart-page-main h1:after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: #007bff;
    margin: 15px auto 0;
    border-radius: 2px;
}

.cart-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

@media (min-width: 992px) {
    .cart-content {
        flex-direction: row;
        align-items: flex-start;
    }
}

.cart-items-list {
    flex-grow: 1;
    background-color: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
    gap: 20px;
    transition: all 0.3s ease;
}

.cart-item:hover {
    background-color: #f8f9fa;
    transform: translateY(-2px);
    border-radius: 8px;
    padding: 20px 10px;
}

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

.cart-item-image {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.cart-item-image:hover {
    transform: scale(1.05);
}

.cart-item-image img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 10px;
    display: block;
}

.cart-item-details {
    flex-grow: 1;
}

.cart-item-details h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2em;
    margin: 0 0 10px 0;
    color: #333;
}

.cart-item-details .item-price {
    font-size: 1.1em;
    color: #007bff;
    font-weight: 600;
    margin-bottom: 12px;
}

/* Novos estilos para os botões de quantidade */
.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 15px;
    background-color: #f8f9fa;
    border-radius: 30px;
    padding: 5px;
    width: fit-content;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
}

.quantity-controls button {
    background-color: transparent;
    border: none;
    color: #007bff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2em;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.quantity-controls button:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #007bff;
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.2s ease;
    z-index: -1;
}

.quantity-controls button:hover {
    color: #fff;
}

.quantity-controls button:hover:before {
    transform: scale(1);
}

.quantity-controls button:active {
    transform: scale(0.95);
}

.quantity-controls button.minus {
    margin-right: 5px;
}

.quantity-controls button.plus {
    margin-left: 5px;
}

.quantity-controls input[type="number"] {
    width: 50px;
    text-align: center;
    border: none;
    background-color: transparent;
    font-size: 1.1em;
    font-weight: 600;
    color: #333;
    padding: 8px 0;
    -moz-appearance: textfield; /* Firefox */
}

.quantity-controls input[type="number"]::-webkit-outer-spin-button,
.quantity-controls input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cart-item-price {
    font-size: 1.2em;
    font-weight: 700;
    color: #007bff;
    min-width: 80px;
    text-align: right;
}

.cart-item-remove {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 1.1em;
}

.cart-item-remove:hover {
    background-color: #dc3545;
    color: #fff;
}

.cart-summary {
    width: 100%;
    background-color: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    position: sticky;
    top: 20px; /* Para fixar ao rolar em telas maiores */
    transition: all 0.3s ease;
}

@media (min-width: 992px) {
    .cart-summary {
        width: 320px; /* Largura fixa para o sumário em desktops */
        min-width: 320px;
    }
}

.cart-summary h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.6em;
    margin-top: 0;
    margin-bottom: 25px;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    position: relative;
}

.cart-summary h2:after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: #007bff;
    position: absolute;
    bottom: -1px;
    left: 0;
}

.summary-details .summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 1em;
    padding: 5px 0;
}

.summary-details .summary-row span:first-child {
    color: #555;
}

.summary-details .summary-row span:last-child {
    font-weight: 600;
    color: #333;
}

.summary-details .grand-total {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #ddd;
}

.summary-details .grand-total span {
    font-size: 1.3em;
    color: #007bff;
    font-weight: 700;
}

.cart-actions {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.btn {
    display: inline-block;
    padding: 14px 25px;
    font-family: 'Montserrat', sans-serif;
    font-size: 1em;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.1);
    transform: translateX(-100%);
    transition: all 0.3s ease;
    z-index: -1;
}

.btn:hover:before {
    transform: translateX(0);
}

.btn-primary {
    background-color: #007bff;
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.btn-primary:hover {
    background-color: #0056b3;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.btn-secondary {
    background-color: #6c757d;
    color: #fff;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.btn-secondary:hover {
    background-color: #545b62;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
}

.empty-cart-message {
    text-align: center;
    padding: 60px 20px;
}

.empty-cart-message i {
    font-size: 4em;
    color: #dee2e6;
    margin-bottom: 20px;
    display: block;
}

.empty-cart-message p {
    font-size: 1.3em;
    margin-bottom: 25px;
    color: #6c757d;
}

/* Estilos para o cabeçalho da página do carrinho */
header .header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

header nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 25px;
}

header nav a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.2s ease;
    position: relative;
}

header nav a:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #007bff;
    transition: width 0.3s ease;
}

header nav a:hover {
    color: #007bff;
}

header nav a:hover:after {
    width: 100%;
}

header .header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

header .cart-btn {
    font-size: 1.2em;
    color: #333;
    position: relative;
    transition: all 0.2s ease;
}

header .cart-btn:hover {
    color: #007bff;
    transform: translateY(-2px);
}

header .cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background-color: #007bff;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.7em;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 123, 255, 0.3);
}

header .mobile-menu-btn {
    display: none; /* Esconder em desktop, mostrar em mobile via styles.css */
    font-size: 1.5em;
    background: none;
    border: none;
    cursor: pointer;
}

/* Ajustes de responsividade para o carrinho */
@media (max-width: 768px) {
    .cart-page-main h1 {
        font-size: 2em;
    }

    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        text-align: center;
        padding: 20px 10px;
    }

    .cart-item-image {
        margin: 0 auto 15px auto;
    }

    .quantity-controls {
        margin: 0 auto 15px auto;
    }

    .cart-item-price {
        text-align: center;
        width: 100%;
        margin-top: 10px;
    }

    .cart-item-remove {
        margin: 10px auto 0;
    }

    .cart-summary {
        position: static;
        width: 100%;
        margin-top: 20px;
    }

    header nav {
        display: none; /* Mobile menu handled by script.js and styles.css */
    }

    header .mobile-menu-btn {
        display: block;
    }
    
    .btn {
        padding: 12px 20px;
    }
}
