/* --- Extracted from 21_PREMIUM_CART_SYSTEM_Pro_Upgrade_v134.css --- */
/* === PREMIUM CART SYSTEM (Pro Upgrade v134) === */
.p-cart-wrapper {
    display: flex;
    flex-direction: column;
    gap: 25px;
    padding: 24px;
    /* Default for large screens */
}

@media (max-width: 768px) {
    .p-cart-wrapper {
        padding: 15px 12px;
        /* Responsive padding for mobile */
        gap: 20px;
    }

    .view-section #cart-container.glass-card {
        margin-left: 0;
        margin-right: 0;
        width: 100%;
    }
}

.p-cart-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background: white;
    padding: 16px;
    border-radius: 20px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.p-cart-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
    border-color: #e2e8f0;
}

.p-cart-img-wrap {
    width: 64px;
    height: 64px;
    background: #f8fafc;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

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

.p-cart-title {
    font-weight: 800;
    color: #1e293b;
    font-size: 0.95rem;
    line-height: 1.2;
}

.p-cart-meta {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 4px;
}

.p-cart-desc {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-top: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.p-cart-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.p-cart-line-price {
    text-align: right;
    width: 90px;
}

.p-cart-line-sub {
    font-size: 0.8rem;
    color: #64748b;
}

.p-cart-line-total {
    font-weight: 900;
    color: var(--primary);
    font-size: 1.1rem;
}

.p-btn-delete-mini {
    background: #fee2e2;
    color: #ef4444;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.p-btn-delete-mini:hover {
    background: #fecaca;
    transform: scale(1.1);
}

.p-checkout-form {
    background: #f8fafc;
    padding: 24px;
    border-radius: 24px;
    border: 1px solid #e2e8f0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

@media (max-width: 480px) {
    .p-checkout-form {
        padding: 16px;
        border-radius: 20px;
    }
}

.p-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.p-form-label {
    font-size: 0.75rem;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.p-input-elegant {
    background: white;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    padding: 12px 16px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e293b;
    transition: border-color 0.2s;
}

.p-input-elegant:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(211, 22, 40, 0.1);
}

.p-summary-card {
    border-top: 2px dashed #e2e8f0;
    padding-top: 24px;
}

.p-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 1rem;
    color: #64748b;
}

.p-summary-total-label {
    font-size: 1.4rem;
    color: #1e293b;
    font-weight: 800;
}

.p-summary-total-val {
    font-size: 2.8rem;
    font-weight: 900;
    color: #1e293b;
    line-height: 1;
}

@media (max-width: 480px) {
    .p-summary-total-val {
        font-size: 2.2rem;
    }
}

.p-summary-bs {
    font-size: 1.2rem;
    color: #64748b;
    font-weight: 700;
    background: #f1f5f9;
    padding: 6px 12px;
    border-radius: 10px;
    display: inline-block;
    margin-top: 8px;
}

.p-btn-checkout {
    width: 100%;
    background: #D31628 !important;
    /* Fallback */
    background: var(--primary-gradient) !important;
    color: white !important;
    padding: 18px;
    border: none;
    border-radius: 18px;
    font-size: 1.2rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 10px 15px -3px rgba(211, 22, 40, 0.3);
    transition: all 0.3s;
}

.p-btn-checkout:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(211, 22, 40, 0.4);
}

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

@media (max-width: 600px) {
    .p-cart-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .p-cart-actions {
        width: 100%;
        justify-content: space-between;
    }

    .p-summary-total-val {
        font-size: 2.2rem;
    }
}

/* HEADER USER BADGE & LOGOUT STYLES */
.header-user-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface);
    padding: 4px 6px 4px 12px;
    border-radius: 30px;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.header-user-badge .user-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    font-size: 0.8rem;
    text-align: right;
}

.header-user-badge .user-text .muted {
    font-size: 0.7rem;
    color: var(--text-light);
    text-transform: uppercase;
    font-weight: 600;
}

.header-user-badge .user-text .name {
    font-weight: 700;
    color: var(--text-main);
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.btn-logout-icon:hover {
    background: #ef4444;
    color: white;
    transform: rotate(90deg);
}

.btn-logout-icon i {
    font-size: 1.1rem;
}

@media (max-width: 600px) {
    .header-user-badge {
        background: transparent;
        border: none;
        padding: 0;
        gap: 8px;
    }

    .header-user-badge .user-text .muted {
        display: none;
    }

    .header-user-badge .user-text .name {
        max-width: 90px;
        font-size: 0.85rem;
    }
}

/* MODERN CART ITEM STYLES */
.p-cart-main {
    display: flex;
    gap: 15px;
    flex: 1;
}

.p-cart-price-group {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 0.85rem;
}

.p-cart-price-unit {
    color: var(--primary);
    font-weight: 800;
}

.p-cart-price-qty {
    color: #94a3b8;
    font-weight: 600;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 0.75rem;
}

.p-cart-line-label {
    display: none;
    font-size: 0.7rem;
    color: #94a3b8;
    text-transform: uppercase;
    font-weight: 700;
}

@media (max-width: 600px) {
    .p-cart-item {
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        gap: 12px;
    }

    .p-cart-main {
        align-items: flex-start;
    }

    .p-cart-img-wrap {
        width: 50px;
        height: 50px;
        flex-shrink: 0;
    }

    .p-cart-title {
        font-size: 0.9rem;
    }

    .p-cart-actions {
        display: flex;
        justify-content: space-between;
        align-items: flex-end;
        padding-top: 10px;
        border-top: 1px dashed #e2e8f0;
        width: 100%;
        gap: 0;
    }

    .p-cart-line-price {
        text-align: left;
        display: flex;
        flex-direction: column;
        gap: 2px;
        width: auto;
    }

    .p-cart-line-label {
        display: block;
    }

    .p-cart-line-total {
        font-size: 1.2rem;
        color: #2F76BD;
        /* Matching the orange theme in image */
    }

    .p-btn-delete-mini {
        width: 36px;
        height: 36px;
        border-radius: 12px;
    }
}

/* REFINED CART ITEM STYLES */
.p-cart-price-unit {
    color: var(--primary);
    font-weight: 800;
    font-size: 0.95rem;
}

.p-cart-price-qty {
    color: var(--text-light);
    font-weight: 500;
}

.p-cart-line-total {
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--text-main);
    /* High contrast */
}

@media (max-width: 600px) {
    .p-cart-item {
        background: white;
        border-radius: 20px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
        margin-bottom: 4px;
        border: 1px solid #f1f5f9;
        overflow: hidden;
    }

    .p-cart-main {
        padding: 4px 0 0 0;
    }

    .p-cart-img-wrap {
        width: 70px;
        height: 70px;
        border-radius: 12px;
        background: #f8fafc;
        border: 1px solid #f1f5f9;
    }

    .p-cart-title {
        font-size: 1rem;
        color: var(--text-main);
        margin-bottom: 4px;
    }

    .p-cart-meta {
        font-size: 0.75rem;
        color: var(--text-light);
        opacity: 0.8;
    }

    .p-cart-price-group {
        background: var(--primary-soft);
        padding: 4px 10px;
        border-radius: 10px;
        display: inline-flex;
        width: auto;
        margin-top: 10px;
    }

    .p-cart-actions {
        padding: 15px;
        background: #fafafa;
        border-top: 1px solid #f1f5f9;
        margin-top: 5px;
    }

    .p-cart-line-label {
        font-size: 0.65rem;
        letter-spacing: 0.5px;
    }

    .p-cart-line-total {
        font-size: 1.3rem;
        color: var(--primary);
        /* Vibrant blue for the final amount */
    }
}

/* DESKTOP FIX FOR REORGANIZED CART ITEM */
@media (min-width: 601px) {
    .p-cart-main {
        display: flex;
        align-items: center;
        gap: 16px;
        flex: 1;
    }

    .p-cart-price-group {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-top: 5px;
    }

    .p-cart-line-label {
        display: none;
    }
}

/* VIEW CART TOP CLEARANCE FIX */
#view-cart {
    margin-top: 45px;
}

@media (max-width: 768px) {
    #view-cart {
        margin-top: 15px;
    }
}



