/* ============================================
   CART & CHECKOUT PAGES
   ============================================ */

/* Cart Section */
.cart-section {
    min-height: 100vh;
    padding: 120px 0 60px;
}

.cart-header {
    margin-bottom: 40px;
}

.cart-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 16px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.back-link svg {
    width: 18px;
    height: 18px;
}

.back-link:hover {
    color: var(--primary);
}

/* Cart Layout */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 32px;
    align-items: start;
}

/* Cart Items */
.cart-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cart-item {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    gap: 20px;
    align-items: center;
    background: rgba(20, 20, 30, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 20px;
    transition: all 0.2s ease;
}

.cart-item:hover {
    border-color: rgba(99, 102, 241, 0.3);
}

.cart-item-icon {
    width: 80px;
    height: 80px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-icon svg {
    width: 36px;
    height: 36px;
    color: var(--primary);
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.cart-item-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.cart-item-price {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 4px;
}

.quantity-btn {
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.quantity-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.quantity-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    min-width: 24px;
    text-align: center;
}

.remove-btn {
    width: 36px;
    height: 36px;
    background: rgba(239, 68, 68, 0.1);
    border: none;
    border-radius: 8px;
    color: #ef4444;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.remove-btn svg {
    width: 18px;
    height: 18px;
}

.remove-btn:hover {
    background: #ef4444;
    color: white;
}

/* Cart Summary */
.cart-summary {
    position: sticky;
    top: 100px;
}

.summary-card {
    background: rgba(20, 20, 30, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 20px;
    padding: 28px;
}

.summary-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.summary-row span:first-child {
    color: var(--text-secondary);
}

.summary-row span:last-child {
    color: var(--text-primary);
    font-weight: 500;
}

.summary-row .discount {
    color: #22c55e;
}

.summary-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 16px 0;
}

.summary-total {
    font-size: 1.1rem;
}

.summary-total span:last-child {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.summary-card .btn-block {
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.summary-card .btn-block svg {
    width: 18px;
    height: 18px;
}

.summary-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.summary-note svg {
    width: 16px;
    height: 16px;
    color: #22c55e;
}

/* Empty Cart */
.cart-empty {
    text-align: center;
    padding: 80px 20px;
}

.empty-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 24px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-icon svg {
    width: 48px;
    height: 48px;
    color: var(--text-muted);
}

.cart-empty h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.cart-empty p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.cart-empty .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.cart-empty .btn svg {
    width: 18px;
    height: 18px;
}

/* Header Cart Icon */
.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.cart-icon-link {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.cart-icon-link svg {
    width: 24px;
    height: 24px;
}

.cart-icon-link:hover {
    color: var(--primary);
}

.cart-badge {
    position: absolute;
    top: 0;
    right: 0;
    min-width: 18px;
    height: 18px;
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}

/* Checkout Section */
.checkout-section {
    min-height: 100vh;
    padding: 120px 0 60px;
}

.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
    align-items: start;
}

.checkout-form-container h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
}

.checkout-form .form-section {
    margin-bottom: 32px;
}

.checkout-form .form-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Payment Methods */
.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.payment-option {
    cursor: pointer;
}

.payment-option input {
    display: none;
}

.payment-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.payment-option input:checked+.payment-card {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.payment-icon {
    width: 44px;
    height: 44px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.payment-icon svg {
    width: 22px;
    height: 22px;
    color: var(--primary);
}

.pix-icon {
    background: rgba(0, 189, 174, 0.1);
}

.pix-icon svg {
    width: 24px;
    height: 24px;
    color: #00bdae;
}

.payment-info {
    flex: 1;
}

.payment-name {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.payment-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.payment-badge {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
}

/* Checkout Summary */
.checkout-summary {
    position: sticky;
    top: 100px;
}

.order-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.order-item-name {
    font-size: 0.9rem;
    color: var(--text-primary);
}

.order-item-qty {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.order-item-price {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* Checkout Steps */
.checkout-steps {
    display: flex;
    align-items: center;
    gap: 12px;
}

.checkout-steps .step {
    font-size: 0.85rem;
    color: var(--text-muted);
    padding: 6px 12px;
    border-radius: 20px;
}

.checkout-steps .step.active {
    background: var(--primary);
    color: white;
    font-weight: 500;
}

.checkout-steps .step.completed {
    color: #22c55e;
}

.step-divider {
    width: 20px;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
}

/* Success Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.modal-content {
    background: rgba(20, 20, 30, 0.95);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 24px;
    padding: 48px 40px;
    max-width: 440px;
    text-align: center;
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-content .success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: rgba(34, 197, 94, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content .success-icon svg {
    width: 40px;
    height: 40px;
    color: #22c55e;
}

.modal-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.modal-content p {
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.5;
}

.order-number {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.order-number span {
    font-weight: 600;
    color: var(--primary);
}

/* Account Section */
.account-section {
    min-height: 100vh;
    padding: 120px 0 60px;
}

.account-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    align-items: start;
}

/* Account Sidebar */
.account-sidebar {
    position: sticky;
    top: 100px;
}

.user-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background: rgba(20, 20, 30, 0.8);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 16px;
    margin-bottom: 20px;
}

.user-avatar {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
}

.user-info h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.user-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.account-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.account-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.account-nav-link svg {
    width: 20px;
    height: 20px;
}

.account-nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.account-nav-link.active {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

/* Account Content */
.account-content {
    min-height: 400px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.content-card {
    background: rgba(20, 20, 30, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 32px;
}

.content-card h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.content-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 28px;
}

.input-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 48px 20px;
}

.empty-state svg {
    width: 64px;
    height: 64px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 1024px) {

    .cart-layout,
    .checkout-layout {
        grid-template-columns: 1fr;
    }

    .cart-summary,
    .checkout-summary {
        position: static;
        order: -1;
    }

    .account-layout {
        grid-template-columns: 1fr;
    }

    .account-sidebar {
        position: static;
    }

    .user-card {
        margin-bottom: 16px;
    }

    .account-nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }

    .checkout-steps {
        display: none;
    }
}

@media (max-width: 640px) {

    .cart-section,
    .checkout-section,
    .account-section {
        padding: 100px 0 40px;
    }

    .cart-item {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .cart-item-icon {
        display: none;
    }

    .cart-item-actions {
        justify-content: space-between;
    }

    .content-card {
        padding: 24px 20px;
    }

    .payment-card {
        flex-wrap: wrap;
    }

    .payment-badge {
        margin-left: auto;
    }
}

/* ============================================
   ORDERS CARDS - Meus Pedidos
   ============================================ */

.orders-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.order-card {
    background: rgba(20, 20, 30, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 20px;
    transition: all 0.2s ease;
}

.order-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.order-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.order-id {
    font-weight: 600;
    color: var(--text-primary);
}

.order-date {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.order-status {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: capitalize;
}

.order-status.status-pending,
.order-status.status-processing {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.order-status.status-completed {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.order-status.status-cancelled {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.order-items {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.order-card .order-items .order-item {
    background: rgba(99, 102, 241, 0.1);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--primary);
}

.order-footer {
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 16px;
}

.order-total {
    font-weight: 600;
    color: var(--text-primary);
}

@media (max-width: 640px) {
    .order-header {
        flex-direction: column;
        gap: 12px;
    }

    .order-status {
        align-self: flex-start;
    }
}