/* Cart Page Styles - Apple/Telegram Inspired Glassmorphism */

#cart-page {
    padding: 0 0 100px 0;
    min-height: auto;
}

/* Cart Header uses .page-header from main.css (DRY) */

/* Empty Cart State */
.cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
    min-height: 50vh;
}

.cart-empty svg {
    opacity: 0.3;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.cart-empty h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.cart-empty p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 24px 0;
}

.btn-primary {
    background: var(--accent-gradient);
    border: 1px solid rgba(10, 132, 255, 0.3);
    border-radius: 12px;
    padding: 12px 24px;
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 4px 12px rgba(10, 132, 255, 0.3);
}

.btn-primary:active {
    transform: scale(0.97);
    box-shadow: 0 2px 8px rgba(10, 132, 255, 0.4);
}

/* Cart Items List - Compact iOS style */
.cart-items {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 16px 4px;
}

/* Vendor Group */
.vendor-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.vendor-group-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.vendor-group-header svg {
    color: rgba(255, 255, 255, 0.6);
    flex-shrink: 0;
}

.vendor-group-header > span:first-of-type {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.vendor-name-clickable {
    cursor: pointer;
    transition: color var(--transition-fast);
}

.vendor-name-clickable:active {
    color: var(--accent-primary);
}

.vendor-shipping {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.08);
    padding: 4px 8px;
    border-radius: 6px;
}

/* Cart Item Card - Apple Card Style */
.cart-item {
    display: flex;
    gap: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.12) 0%,
        rgba(255, 255, 255, 0.06) 100%
    );
    backdrop-filter: var(--blur-strong);
    -webkit-backdrop-filter: var(--blur-strong);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    padding: 0;
    overflow: hidden;
    transition: all var(--transition-fast);
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.cart-item:active {
    transform: scale(0.98);
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.15) 0%,
        rgba(255, 255, 255, 0.08) 100%
    );
}

/* Item Image - Rounded corners */
.cart-item-image {
    width: 90px;
    height: 90px;
    flex-shrink: 0;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.2);
    cursor: pointer;
    margin: 8px;
    border-radius: 12px;
}

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

.cart-item-image .no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    opacity: 0.3;
}

/* Item Info - Compact padding */
.cart-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding: 12px 12px 12px 0;
    gap: 8px;
}

/* Top Section: Title + Delete Button */
.cart-item-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.cart-item-title-section {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cart-item-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: -0.2px;
}

.cart-item-vendor {
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    opacity: 0.8;
}

/* Bottom Section: Price + Quantity Controls - Compact */
.cart-item-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.cart-item-price {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.price-amount {
    font-size: 17px;
    font-weight: 700;
    color: var(--accent-primary);
    line-height: 1.2;
    letter-spacing: -0.3px;
}

.price-weight {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
    opacity: 0.7;
    margin-top: 2px;
}

/* Quantity Controls - iOS style compact */
.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 10px;
    padding: 3px;
}

/* Delete Button - Smaller, cleaner */
.cart-item-remove {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    background: rgba(255, 69, 58, 0.15);
    border: 1px solid rgba(255, 69, 58, 0.3);
    border-radius: 8px;
    color: #FF453A;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
}

.cart-item-remove:active {
    transform: scale(0.88);
    background: rgba(255, 69, 58, 0.25);
}

.cart-item-remove svg {
    width: 16px;
    height: 16px;
}

.qty-btn {
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
}

.qty-btn:active {
    transform: scale(0.88);
    background: rgba(255, 255, 255, 0.25);
}

.qty-value {
    min-width: 28px;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    color: white;
}

/* Payment Mode Section */
.payment-mode-section {
    padding: 0 4px 16px 4px;
}

.payment-mode-card {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.08) 0%,
        rgba(255, 255, 255, 0.04) 100%
    );
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 16px 18px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.payment-mode-title {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.payment-mode-buttons {
    display: flex;
    gap: 8px;
}

.payment-btn {
    flex: 1;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
}

.payment-btn:active {
    transform: scale(0.96);
}

.payment-btn.active {
    background: linear-gradient(135deg, #0A84FF 0%, #0066CC 100%);
    border-color: rgba(10, 132, 255, 0.5);
    color: white;
    box-shadow: 0 2px 12px rgba(10, 132, 255, 0.4);
}

/* Cart Summary - Static below items */
.cart-summary {
    padding: 0 4px 16px 4px;
}

.summary-card {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.08) 0%,
        rgba(255, 255, 255, 0.04) 100%
    );
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

/* Summary Details Section */
.summary-details {
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.summary-row span:first-child {
    display: flex;
    align-items: center;
    gap: 6px;
}

.summary-row span:last-child {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.info-icon {
    width: 16px;
    height: 16px;
    color: rgba(10, 132, 255, 0.8);
    cursor: pointer;
    transition: all var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
}

.info-icon:active {
    transform: scale(0.9);
    color: rgba(10, 132, 255, 1);
}

/* Total Row - Prominent */
.summary-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    margin-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.summary-total-label {
    font-size: 17px;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-total {
    font-size: 28px;
    font-weight: 700;
    color: white;
    letter-spacing: -0.5px;
}

/* Checkout Button - Inspired by image */
.btn-checkout {
    width: 100%;
    background: linear-gradient(135deg, #0A84FF 0%, #0066CC 100%);
    border: none;
    border-radius: 0;
    padding: 18px;
    color: white;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
    margin-top: 2px;
}

.btn-checkout:active {
    background: linear-gradient(135deg, #0066CC 0%, #0052A3 100%);
    transform: scale(0.99);
}

/* Tabs System - Similar to referral.css */
.cart-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin: 16px 4px;
    margin-bottom: 16px;
}

.cart-tabs .tab-btn {
    flex: 1;
    padding: 14px 16px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

.cart-tabs .tab-btn:active {
    transform: scale(0.96);
}

.cart-tabs .tab-btn.active {
    color: var(--accent-primary);
}

.cart-tabs .tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-primary);
    border-radius: 2px 2px 0 0;
}

/* Tab Content */
.tab-content {
    display: none;
}

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

/* Orders Tab Styles */
.orders-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
    min-height: 50vh;
}

.orders-empty svg {
    opacity: 0.3;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.orders-empty h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.orders-empty p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

/* Orders Filter */
.orders-filter {
    display: flex;
    gap: 8px;
    padding: 0 4px 16px 4px;
}

.filter-btn {
    flex: 1;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
}

.filter-btn:active {
    transform: scale(0.96);
}

.filter-btn.active {
    background: linear-gradient(135deg, rgba(10, 132, 255, 0.2) 0%, rgba(10, 132, 255, 0.1) 100%);
    border-color: rgba(10, 132, 255, 0.3);
    color: var(--accent-primary);
}

/* Orders List */
.orders-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 4px;
}

/* Order Card - Liquid Glass */
.order-card {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.12) 0%,
        rgba(255, 255, 255, 0.06) 100%
    );
    backdrop-filter: var(--blur-strong);
    -webkit-backdrop-filter: var(--blur-strong);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 16px;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.order-card:active {
    transform: scale(0.98);
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.15) 0%,
        rgba(255, 255, 255, 0.08) 100%
    );
}

/* Order Header */
.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.order-number {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.2px;
}

.order-status {
    font-size: 13px;
    font-weight: 600;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    text-transform: capitalize;
}

.order-status.pending {
    background: rgba(255, 204, 0, 0.15);
}

.order-status.paid,
.order-status.processing {
    background: rgba(10, 132, 255, 0.15);
}

.order-status.shipped {
    background: rgba(52, 199, 89, 0.15);
}

.order-status.delivered,
.order-status.completed {
    background: rgba(52, 199, 89, 0.2);
}

.order-status.refunded {
    background: rgba(255, 69, 58, 0.15);
}

/* Order Date */
.order-date {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

/* Order Items Preview */
.order-items-preview {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Order Footer */
.order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.order-total {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent-primary);
    letter-spacing: -0.3px;
}

.order-details-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    background: rgba(10, 132, 255, 0.15);
    border: 1px solid rgba(10, 132, 255, 0.3);
    border-radius: 10px;
    color: var(--accent-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
}

.order-details-btn:active {
    transform: scale(0.94);
    background: rgba(10, 132, 255, 0.25);
}

.order-details-btn svg {
    width: 14px;
    height: 14px;
}
