/* Carrinho Page Styles */

.cart-page {
    padding: 20px 16px;
    padding-bottom: 80px;
    max-width: 1100px;
    margin: 0 auto;
}

.cart-page-title {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    font-weight: 500;
    margin-bottom: 28px;
    color: #111;
}

/* Summary Section */
.cart-summary {
    background: #f7f7f7;
    padding: 24px;
    margin-bottom: 24px;
    border-radius: 10px;
    border: 1px solid #ebebeb;
}

.summary-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 18px;
    color: #111;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.summary-section {
    border-bottom: 1px solid #e0e0e0;
    padding: 14px 0;
}

.summary-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
    border: none;
    font-size: 14px;
    color: #444;
    cursor: pointer;
    padding: 0;
    font-weight: 500;
}

.summary-toggle svg {
    transition: transform 0.3s;
}

.summary-toggle.active svg {
    transform: rotate(180deg);
}

.frete-form,
.cupom-form {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.cep-input,
.cupom-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    font-size: 14px;
}

.btn-calcular,
.btn-aplicar {
    background: #1a1a1a;
    color: #fff;
    border: none;
    padding: 12px 20px;
    font-size: 13px;
    cursor: pointer;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #ddd;
}

.summary-label {
    font-size: 15px;
    color: #555;
}

.summary-value {
    font-size: 15px;
    color: #111;
    font-weight: 500;
}

.summary-row.total {
    border-bottom: none;
    padding-bottom: 20px;
}

.summary-row.total .summary-label,
.summary-row.total .summary-value {
    font-weight: 600;
    color: #333;
}

.btn-finalizar {
    width: 100%;
    background: #111;
    color: #fff;
    border: none;
    padding: 17px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 1.5px;
    cursor: pointer;
    margin-top: 14px;
    border-radius: 8px;
    text-transform: uppercase;
    transition: background 0.2s;
}

.btn-finalizar:hover {
    background: #333;
}

/* Cart Items */
.cart-items {
    background: #fff;
    border: 1px solid #ebebeb;
    border-radius: 10px;
    padding: 20px 24px;
    margin-bottom: 24px;
}

.items-title {
    font-size: 13px;
    font-weight: 700;
    color: #111;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding-bottom: 14px;
    border-bottom: 1px solid #eee;
    margin-bottom: 8px;
}

.cart-item {
    display: flex;
    gap: 16px;
    padding: 20px 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.cart-item-image {
    width: 90px;
    height: 110px;
    object-fit: contain;
    border-radius: 6px;
    background: #f9f9f9;
    flex-shrink: 0;
}

.cart-item-details {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-size: 15px;
    font-weight: 600;
    color: #111;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1.3;
}

.cart-item-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
}

.cart-item-col {
    text-align: center;
}

.cart-item-col-label {
    font-size: 12px;
    color: #888;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cart-item-price {
    font-size: 16px;
    font-weight: 600;
    color: #111;
}

.qty-control {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
}

.qty-btn {
    width: 30px;
    height: 30px;
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #666;
}

.qty-input {
    width: 40px;
    height: 30px;
    border: none;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    text-align: center;
    font-size: 14px;
}

.cart-item-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    justify-content: flex-end;
}

.item-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    padding: 5px;
}

.item-action-btn:hover {
    color: #333;
}

/* Cart Actions */
.cart-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.btn-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-decoration: none;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

.btn-outline {
    background: #fff;
    color: #333;
    border: 1.5px solid #333;
}

.btn-outline:hover {
    background: #111;
    color: #fff;
    border-color: #111;
}

/* More Options */
.more-options {
    margin-top: 40px;
}

.more-title {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    font-weight: 400;
    margin-bottom: 25px;
    color: #333;
}

.more-products {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.more-product-card {
    text-align: center;
}

.more-product-image {
    width: 100%;
    height: 180px;
    object-fit: contain;
    margin-bottom: 15px;
}

.more-product-name {
    font-size: 13px;
    font-weight: 500;
    color: #333;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.more-product-price {
    font-size: 14px;
    color: #333;
    margin-bottom: 5px;
}

.more-product-price .price-big {
    font-size: 28px;
    font-weight: 700;
}

.more-product-installment {
    font-size: 12px;
    color: #666;
    margin-bottom: 15px;
}

.btn-adicione-more {
    width: 100%;
    background: #1a1a1a;
    color: #fff;
    border: none;
    padding: 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

/* ============================================
   MINI CART SIDEBAR — baseado na Principia
   ============================================ */

.cart-sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}
.cart-sidebar-overlay.active { opacity: 1; visibility: visible; }

/* Drawer */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -110%;
    width: clamp(280px, 78vw, 380px);
    height: 100%;
    background: #fff;
    z-index: 9999;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 20px rgba(0,0,0,0.12);
    font-family: 'Inter', sans-serif;
}
.cart-sidebar.active { right: 0; }

/* Cabeçalho */
.cart-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid #ececec;
}
.cart-sidebar-title {
    font-size: 16px;
    font-weight: 600;
    color: #111;
    display: flex;
    align-items: center;
    gap: 8px;
}
.cart-sidebar-title .count-badge {
    background: #4a90d9;
    color: #fff;
    min-width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    padding: 0 4px;
}
.cart-sidebar-link {
    font-size: 13px;
    color: #4a90d9;
    text-decoration: none;
    font-weight: 500;
}
.cart-sidebar-link:hover { text-decoration: underline; }

/* Lista de itens */
.cart-sidebar-items {
    flex: 1;
    overflow-y: auto;
    padding: 0 20px;
}

/* Item */
.mini-cart-item {
    display: flex;
    gap: 14px;
    padding: 16px 0;
    align-items: flex-start;
}
.mini-cart-images {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}
.mini-cart-item-image {
    width: 52px;
    height: 66px;
    object-fit: contain;
    border: none;
    border-radius: 4px;
}
.mini-cart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}
.mini-cart-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 6px;
}
.mini-cart-item-name {
    font-size: 13px;
    font-weight: 700;
    color: #111;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    line-height: 1.3;
    flex: 1;
}
.mini-cart-item-remove {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #aaa;
    line-height: 1;
    padding: 0;
    flex-shrink: 0;
}
.mini-cart-item-remove:hover { color: #111; }

.mini-cart-item-qty {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.mini-qty-control {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}
.mini-qty-btn {
    width: 30px;
    height: 30px;
    background: none;
    border: none;
    font-size: 17px;
    cursor: pointer;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.mini-qty-btn:hover { background: #f5f5f5; }
.mini-qty-value {
    width: 32px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    padding: 4px 0;
    color: #111;
}
.mini-cart-item-price {
    font-size: 15px;
    font-weight: 700;
    color: #111;
}

/* Seção "Complete sua rotina" */
.complete-rotina {
    background: #e8f4f8;
    padding: 14px 16px;
    border-top: 1px solid #cce5ee;
}
.complete-rotina-title {
    font-size: 13px;
    color: #1a7a8c;
    text-align: center;
    margin-bottom: 12px;
    font-weight: 400;
    font-style: italic;
}
.complete-rotina-item {
    background: #fff;
    padding: 12px;
    border-radius: 6px;
}

/* Orderbump dentro do complete-rotina */
.orderbump-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.orderbump-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.orderbump-image {
    width: 50px;
    height: 64px;
    object-fit: contain;
    flex-shrink: 0;
    border: 1px solid #efefef;
    border-radius: 4px;
}
.orderbump-info {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.orderbump-name {
    font-size: 12px;
    font-weight: 700;
    color: #111;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    line-height: 1.3;
}
.orderbump-price {
    font-size: 15px;
    font-weight: 700;
    color: #111;
    white-space: nowrap;
}
.orderbump-price .currency { font-size: 11px; font-weight: 400; }
.btn-orderbump {
    width: 100%;
    background: #fff;
    color: #111;
    border: 1.5px solid #333;
    padding: 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    border-radius: 6px;
    text-transform: uppercase;
    transition: all 0.2s;
}
.btn-orderbump:hover { background: #111; color: #fff; }

/* Rodapé */
.cart-sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid #ececec;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.frete-gratis-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.frete-gratis-row svg { color: #555; flex-shrink: 0; }
.frete-gratis-text {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}
.frete-cep-input {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    color: #999;
    min-width: 0;
}
.frete-cep-input:focus { outline: none; border-color: #aaa; color: #333; }

.cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.cart-total-label {
    font-size: 15px;
    font-weight: 600;
    color: #111;
}
.cart-total-value {
    display: flex;
    align-items: baseline;
    gap: 3px;
    font-size: 14px;
    color: #111;
}
.cart-total-value .price-prefix { font-size: 14px; font-weight: 500; }
.cart-total-value .price-big {
    font-size: 30px;
    font-weight: 700;
    line-height: 1;
}
.cart-total-value .price-cents {
    font-size: 14px;
    font-weight: 700;
}

.btn-finalizar-sidebar {
    width: 100%;
    background: #111;
    color: #fff;
    border: none;
    padding: 16px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1.5px;
    cursor: pointer;
    border-radius: 8px;
    text-transform: uppercase;
    transition: background 0.2s;
}
.btn-finalizar-sidebar:hover { background: #333; }

.btn-continue-sidebar {
    width: 100%;
    background: none;
    border: none;
    color: #888;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-decoration: underline;
    text-transform: uppercase;
    cursor: pointer;
    padding: 4px;
    text-align: center;
}
.btn-continue-sidebar:hover { color: #333; }

/* Carrinho vazio */
.empty-cart {
    text-align: center;
    padding: 50px 20px;
    color: #999;
}
.empty-cart p { margin-bottom: 16px; font-size: 14px; }
.empty-cart a { color: #4a90d9; text-decoration: underline; }

/* ============================================
   RESPONSIVE DESIGN - CARRINHO
   ============================================ */

/* Desktop (992px+) */
@media (min-width: 992px) {
    .cart-page {
        max-width: 1100px;
        margin: 0 auto;
        padding: 40px 32px;
        display: grid;
        grid-template-columns: 1fr 340px;
        grid-template-rows: auto auto auto;
        grid-template-areas:
            "title   title"
            "items   summary"
            "more    more";
        gap: 24px 32px;
        align-items: start;
    }

    .cart-page-title {
        grid-area: title;
        font-size: 32px;
    }

    .cart-summary {
        grid-area: summary;
        position: sticky;
        top: 90px;
        margin-bottom: 0;
    }

    .cart-items {
        grid-area: items;
    }

    .cart-actions {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 12px;
    }

    .more-options {
        grid-area: more;
    }

    .more-products {
        grid-template-columns: repeat(4, 1fr);
    }

    .cart-sidebar {
        width: 360px;
    }
}

/* Tablet (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .cart-page {
        padding: 30px;
    }
    
    .cart-page-title {
        font-size: 28px;
    }
    
    .cart-item-info {
        gap: 25px;
    }
    
    .more-products {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .cart-sidebar {
        width: 320px;
    }
}

/* Mobile (até 767px) */
@media (max-width: 767px) {
    .cart-page {
        padding: 16px;
        padding-bottom: 80px;
    }

    .cart-page-title {
        font-size: 24px;
        margin-bottom: 20px;
    }

    .cart-summary {
        padding: 20px;
    }

    .summary-title {
        font-size: 13px;
    }

    .summary-toggle {
        font-size: 14px;
    }

    .summary-label,
    .summary-value {
        font-size: 15px;
    }

    .btn-finalizar {
        padding: 17px;
        font-size: 15px;
    }

    .cart-items {
        padding: 16px;
    }

    .items-title {
        font-size: 13px;
    }

    .cart-item {
        gap: 14px;
    }

    .cart-item-image {
        width: 80px;
        height: 100px;
    }

    .cart-item-name {
        font-size: 14px;
        margin-bottom: 12px;
    }

    .cart-item-info {
        gap: 10px;
    }

    .cart-item-col-label {
        font-size: 11px;
    }

    .cart-item-price {
        font-size: 15px;
    }

    .cart-item-actions {
        justify-content: flex-end;
        margin-top: 10px;
    }

    .cart-actions {
        gap: 10px;
    }

    .btn-action {
        padding: 14px;
        font-size: 13px;
    }

    .more-options {
        margin-top: 24px;
    }

    .more-title {
        font-size: 20px;
    }

    .more-products {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .more-product-image {
        height: 150px;
    }

    .more-product-name {
        font-size: 13px;
    }

    .more-product-price .price-big {
        font-size: 26px;
    }

    .btn-adicione-more {
        padding: 12px;
        font-size: 13px;
    }

    /* Mini Cart Sidebar Mobile */
    .cart-sidebar {
        width: clamp(280px, 78vw, 380px);
    }
}

/* Order Bump Styles */
.orderbump-item {
    display: flex;
    flex-direction: column;
    background: #fff;
    padding: 10px;
    gap: 10px;
}

.orderbump-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.orderbump-image {
    width: 52px;
    height: 64px;
    object-fit: contain;
    flex-shrink: 0;
    border: 1px solid #f0f0f0;
}

.orderbump-info {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.orderbump-name {
    font-size: 12px;
    font-weight: 700;
    color: #000;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1.3;
}

.orderbump-price {
    font-size: 14px;
    font-weight: 700;
    color: #000;
    white-space: nowrap;
}

.orderbump-price .currency {
    font-size: 11px;
    font-weight: 400;
}

.btn-orderbump {
    width: 100%;
    background: #fff;
    color: #000;
    border: 1px solid #000;
    padding: 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
}

.btn-orderbump:hover {
    background: #000;
    color: #fff;
}

/* Extra Small Mobile (até 360px) */
@media (max-width: 360px) {
    .cart-page-title {
        font-size: 20px;
    }
    
    .cart-item-info {
        gap: 15px;
    }
    
    .qty-control {
        transform: scale(0.9);
    }
    
    .more-products {
        gap: 10px;
    }
    
    .more-product-image {
        height: 120px;
    }
    
    .cart-sidebar {
        width: clamp(260px, 78vw, 360px);
    }
}
