/**
 * DevPortfolio Cart Styles
 * Extracted from inline styles for better performance and maintainability
 */

/* Hide WooCommerce weird empty cart icon (broken font icon) */
.wc-block-cart__empty-cart__title::before,
.with-empty-cart-icon::before,
.woocommerce-cart-form .cart-empty::before,
.woocommerce .cart-empty::before {
    display: none !important;
    content: '' !important;
}

/* Cart Container */
.dp-cart-container {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
    align-items: start;
}

.dp-cart-items-wrapper {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 35px;
    backdrop-filter: blur(10px);
}

.dp-cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}

.dp-cart-header h2 {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    color: #fff;
}

.dp-cart-count-badge {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    font-size: 0.85rem;
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 600;
}

/* Cart Items */
.dp-cart-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.dp-cart-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--primary-color);
    transform: translateX(5px);
}

.dp-cart-item-image {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--glass-bg);
    flex-shrink: 0;
}

.dp-cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dp-cart-item-info {
    flex: 1;
}

.dp-cart-item-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 5px;
}

.dp-cart-item-price {
    color: var(--secondary-color);
    font-weight: 500;
}

.dp-cart-item-remove {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 12px;
    color: #ef4444;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.dp-cart-item-remove:hover {
    background: #ef4444;
    color: white;
    transform: scale(1.1);
}

/* Cart Summary */
.dp-cart-summary {
    padding: 35px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
}

.dp-cart-summary h2 {
    font-size: 1.4rem;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
}

.dp-summary-rows {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

.dp-summary-row {
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
}

.dp-summary-row span:last-child {
    color: #fff;
    font-weight: 500;
}

.dp-summary-row.total {
    border-top: 1px solid var(--glass-border);
    padding-top: 20px;
    margin-top: 10px;
    font-size: 1.3rem;
    font-weight: 700;
}

.dp-summary-row.total span:last-child {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.dp-checkout-btn {
    width: 100%;
    padding: 18px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.1rem;
}

.dp-trust-badges {
    margin-top: 25px;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.dp-trust-badges span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.dp-trust-badges i {
    color: #10b981;
}

/* Empty Cart */
.dp-cart-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 40px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 24px;
    border: 1px solid var(--glass-border);
}

.dp-empty-icon {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    box-shadow: 0 20px 40px rgba(108, 92, 231, 0.3);
}

.dp-empty-icon i {
    font-size: 3.5rem;
    color: #fff;
}

.dp-cart-empty h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #fff;
}

.dp-cart-empty p {
    color: var(--text-muted);
    margin-bottom: 35px;
    font-size: 1.1rem;
}

/* Loading Spinner */
.dp-cart-loading {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Checkout Container */
.dp-checkout-container {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
    align-items: start;
}

.dp-checkout-header {
    margin-bottom: 30px;
}

.dp-checkout-header h2 {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 0;
    color: #fff;
}

.dp-checkout-header .icon-box {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
}

/* Form Groups */
.dp-form-group {
    margin-bottom: 20px;
}

.dp-form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
}

.dp-form-group .required {
    color: var(--accent-color);
}

.dp-form-group input {
    width: 100%;
    padding: 15px 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid var(--glass-border);
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.dp-form-group input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.15);
}

/* Checkout Items */
.dp-checkout-items {
    margin-bottom: 25px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 5px;
}

.dp-checkout-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid var(--glass-border);
}

.dp-checkout-item-title {
    color: #fff;
    font-weight: 500;
}

.dp-checkout-item-price {
    color: var(--text-muted);
}

/* Checkout Totals */
.dp-checkout-totals {
    padding-top: 20px;
    border-top: 2px solid var(--glass-border);
    margin-bottom: 30px;
}

.dp-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.3rem;
    font-weight: 700;
}

.dp-total-row .amount {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Payment Section */
.dp-payment-section h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: #fff;
}

.dp-payment-method {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--primary-color);
    border-radius: 14px;
    color: #fff;
    font-weight: 500;
}

.dp-payment-method i:first-child {
    font-size: 1.5rem;
}

.dp-payment-method .check-icon {
    margin-left: auto;
    color: var(--primary-color);
}

.dp-secure-notice {
    margin-top: 25px;
    text-align: center;
    color: #10b981;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 12px;
}

/* Responsive */
@media (max-width: 992px) {

    .dp-cart-container,
    .dp-checkout-container {
        grid-template-columns: 1fr;
    }

    .dp-checkout-sidebar {
        order: -1;
    }
}