/* Summary Screen — Component Styles
   Shared: .section-label, .upsell-card, .upsell-add-btn, 
           .page-footer, textarea, .page-header, .back-btn from global.css
   ========================================================================== */

/* --- Cart List --- */
.cart-list {
    margin-top: 20px;
}

.cart-item {
    display: flex;
    gap: 15px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    animation: fadeInUp var(--duration-slow) var(--ease-out-expo) both;
}

.cart-item:nth-child(2) { animation-delay: 0.1s; }
.cart-item:nth-child(3) { animation-delay: 0.2s; }

.item-thumb {
    width: 64px;
    height: 64px;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-elevated);
}

.item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

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

.item-header h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 10px;
}

.remove-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 0 5px;
    transition: color var(--duration-fast) ease, transform var(--duration-fast) ease;
}

.remove-btn:hover {
    color: var(--status-error);
}

.remove-btn:active {
    transform: scale(0.8);
}

.item-modifiers {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.item-price {
    font-weight: 800;
    color: var(--primary-orange);
    font-size: 15px;
}

.qty-control {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    padding: 6px 12px;
    border-radius: var(--border-radius-pill);
}

.qty-btn {
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 18px;
    font-weight: 800;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    transition: background var(--duration-fast) ease;
}

.qty-btn:active {
    background: var(--border-color);
}

.qty-btn.minus {
    font-size: 14px;
}

.qty-val {
    font-weight: 800;
    font-size: 15px;
    min-width: 16px;
    text-align: center;
    color: var(--text-main);
}

/* --- Note Toggle --- */
.note-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 0;
    color: var(--primary-orange);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: color var(--duration-normal) ease;
    user-select: none;
}

.note-toggle:active {
    opacity: 0.7;
}

.note-toggle.active {
    color: var(--text-main);
}

.note-container {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s var(--ease-out-expo);
}

.note-container.active {
    max-height: 150px;
    margin-bottom: 20px;
}

/* --- Recommendations --- */
.upsell-section {
    margin-top: 20px;
    padding: 25px 0;
    border-top: 1px solid var(--border-color);
}

/* --- Summary / Totals --- */
.summary-totals {
    margin-top: 10px;
    padding-bottom: 110px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    padding: 14px 0;
}

.total-row span:first-child {
    font-weight: 600;
    color: var(--text-secondary);
}

.total-row span:last-child {
    font-weight: 800;
    font-size: 18px;
    color: var(--text-main);
}

/* --- Footer --- */
.summary-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    padding-bottom: calc(20px + var(--safe-bottom));
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-color);
    z-index: 1000;
    animation: slideUp 0.5s var(--ease-out-expo) 0.2s both;
}

/* Checkout button — uses .btn-primary visual pattern */
.checkout-btn {
    width: 100%;
    height: 56px;
    background: var(--primary-orange);
    color: white;
    border: none;
    border-radius: var(--border-radius-pill);
    font-family: inherit;
    font-size: 15px;
    font-weight: 800;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-btn);
    text-decoration: none;
    cursor: pointer;
    transition: transform var(--duration-fast) var(--ease-out-expo),
                background var(--duration-fast) ease;
}

.checkout-btn:hover {
    background: var(--primary-orange-hover);
}

.checkout-btn:active {
    transform: scale(0.97);
}
