/* ==========================================
   ENHANCED SHOPPING CART PAGE
   Professional & User-Friendly Design
   ========================================== */

/* Cart Page Wrapper */
.cart-page-wrapper {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: calc(100vh - 132px);
    padding: 2rem 0;
}

/* Continue Shopping Button */
.continue-shopping-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.75rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.continue-shopping-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.5s;
}

.continue-shopping-btn:hover::before {
    left: 100%;
}

.continue-shopping-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
    color: white;
}

.continue-shopping-btn i {
    font-size: 1.25rem;
}

/* Cart Header Section */
.cart-header-section {
    background: white;
    border-radius: 16px;
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.cart-title {
    font-size: 2rem;
    font-weight: 800;
    margin: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cart-title i {
    color: #667eea;
    -webkit-text-fill-color: #667eea;
}

.cart-item-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50px;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

/* Empty Cart State */
.empty-cart-container {
    background: white;
    border-radius: 16px;
    padding: 4rem 2rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.empty-cart-icon {
    font-size: 5rem;
    color: #cbd5e0;
    margin-bottom: 1.5rem;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.empty-cart-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.75rem;
}

.empty-cart-message {
    color: #718096;
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

/* Cart Item Card - Enhanced */
.cart-item-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

/* Cart Item Row - Flexbox Layout */
.cart-item-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
}

.cart-item-col {
    display: flex;
    align-items: center;
}

.cart-item-image-col {
    flex: 0 0 120px;
    justify-content: center;
}

.cart-item-details-col {
    flex: 1 1 auto;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0; /* Allow text truncation */
}

.cart-item-quantity-col {
    flex: 0 0 auto;
    justify-content: center;
}

.cart-item-price-col {
    flex: 0 0 auto;
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 1rem;
    min-width: 200px;
}

.cart-item-price-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

.cart-item-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: scaleY(0);
    transition: transform 0.3s;
}

.cart-item-card:hover::before {
    transform: scaleY(1);
}

.cart-item-card:hover {
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
    border-color: rgba(102, 126, 234, 0.2);
}

.cart-item-image-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    padding: 0.5rem;
}

.cart-item-image {
    width: 100%;
    height: auto;
    max-height: 150px;
    object-fit: contain;
    border-radius: 8px;
    transition: transform 0.3s;
}

.cart-item-card:hover .cart-item-image {
    transform: scale(1.05);
}

/* Product Badges */
.cart-item-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.cart-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cart-badge.flash-sale {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    animation: pulse 2s infinite;
}

.cart-badge.combo {
    background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
    color: white;
}

.cart-badge.variant {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* Cart Item Title */
.cart-item-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    transition: color 0.3s;
}

.cart-item-card:hover .cart-item-title {
    color: #667eea;
}

.cart-item-variant-display {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #718096;
    margin-bottom: 0.75rem;
    padding: 0.375rem 0.75rem;
    background: #f7fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.cart-item-variant-display i {
    color: #667eea;
    font-size: 0.875rem;
}

.cart-item-variant-info {
    font-size: 0.875rem;
    color: #718096;
    margin-bottom: 0.5rem;
}

/* Quantity Controls - Enhanced */
.cart-quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #f7fafc;
    border-radius: 12px;
    padding: 0.5rem;
    border: 2px solid #e2e8f0;
}

.cart-quantity-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    font-weight: 700;
}

.cart-quantity-btn:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.cart-quantity-btn i {
    font-size: 1rem;
}

.cart-quantity-input {
    width: 60px;
    height: 36px;
    text-align: center;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    background: transparent;
    color: #2d3748;
    border-radius: 8px;
}

/* Price Display */
.cart-item-price-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

.cart-item-price-section {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
}

.cart-item-unit-price {
    font-size: 0.875rem;
    color: #718096;
    margin-bottom: 0.25rem;
}

.cart-item-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: #667eea;
    margin: 0;
    line-height: 1.2;
}

.cart-item-total {
    font-size: 0.875rem;
    color: #a0aec0;
    margin-top: 0.25rem;
}

.cart-item-price.original-price {
    text-decoration: line-through;
    color: #cbd5e0;
    font-size: 1rem;
    margin-right: 0.5rem;
}

.cart-item-price.sale-price {
    color: #48bb78;
}

/* Delete Button */
.cart-delete-btn {
    color: #e53e3e;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(229, 62, 62, 0.1);
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 0;
}

.cart-delete-btn:hover {
    color: white;
    background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 4px 12px rgba(229, 62, 62, 0.4);
}

/* Cart Total Card - Enhanced */
.cart-total-card {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    border-radius: 16px;
    padding: 2.5rem;
    text-align: center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 2rem;
}

.cart-total-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cart-total-amount {
    color: white;
    font-size: 2.75rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    line-height: 1;
    background: linear-gradient(135deg, #fff 0%, #f0f0f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cart-summary-btn {
    display: block;
    width: 100%;
    padding: 1.125rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    position: relative;
    overflow: hidden;
}

.cart-summary-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.5s;
}

.cart-summary-btn:hover::before {
    left: 100%;
}

.cart-summary-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.6);
    color: white;
}

.cart-summary-btn i {
    font-size: 1.25rem;
}

/* Responsive Design */
@media (max-width: 992px) {
    .cart-header-section {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .cart-total-card {
        position: relative;
        top: 0;
        margin-top: 2rem;
    }
}

@media (max-width: 992px) {
    .cart-item-row {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .cart-item-image-col {
        flex: 0 0 100px;
    }

    .cart-item-details-col {
        flex: 1 1 calc(100% - 220px);
        min-width: 200px;
    }

    .cart-item-quantity-col {
        flex: 0 0 auto;
        order: 3;
        width: 100%;
        justify-content: center;
    }

    .cart-item-price-col {
        flex: 0 0 auto;
        order: 4;
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    .cart-page-wrapper {
        padding: 1rem 0;
    }

    .cart-title {
        font-size: 1.5rem;
    }

    .cart-item-card {
        padding: 1rem;
    }

    .cart-item-row {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .cart-item-image-col {
        flex: 0 0 auto;
        width: 100%;
        justify-content: center;
    }

    .cart-item-image {
        max-height: 150px;
        max-width: 150px;
    }

    .cart-item-details-col {
        flex: 1 1 auto;
        width: 100%;
        text-align: center;
    }

    .cart-item-title {
        font-size: 1rem;
        text-align: center;
    }

    .cart-item-variant-display {
        margin: 0 auto 0.75rem auto;
    }

    .cart-item-badges {
        justify-content: center;
        margin-top: 0.5rem;
    }

    .cart-item-quantity-col {
        width: 100%;
        justify-content: center;
        order: 3;
    }

    .cart-quantity-controls {
        justify-content: center;
        margin: 0 auto;
    }

    .cart-item-price-col {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        order: 4;
    }

    .cart-item-price-wrapper {
        align-items: flex-start;
    }

    .cart-item-price {
        font-size: 1.25rem;
    }

    .cart-delete-btn {
        flex-shrink: 0;
    }

    .cart-total-amount {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .continue-shopping-btn {
        width: 100%;
        justify-content: center;
        font-size: 0.9rem;
        padding: 0.75rem 1.5rem;
    }

    .cart-header-section {
        padding: 1rem;
    }

    .cart-title {
        font-size: 1.25rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    .cart-item-count-badge {
        margin-left: 0;
        margin-top: 0.5rem;
    }

    .cart-item-card {
        padding: 0.75rem;
        margin-bottom: 1rem;
    }

    .cart-item-card .row > div {
        padding: 0.25rem;
        margin-bottom: 0.75rem;
    }

    .cart-item-image-wrapper {
        max-width: 120px;
        margin: 0 auto;
    }

    .cart-item-image {
        max-height: 100px;
    }

    .cart-item-title {
        font-size: 0.95rem;
        line-height: 1.3;
        text-align: center;
    }

    .cart-item-variant-info {
        text-align: center;
        font-size: 0.8rem;
    }

    .cart-item-badges {
        justify-content: center;
        gap: 0.375rem;
    }

    .cart-badge {
        font-size: 0.65rem;
        padding: 0.25rem 0.5rem;
    }

    .cart-quantity-controls {
        justify-content: center;
        padding: 0.375rem;
        gap: 0.5rem;
    }

    .cart-quantity-btn {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }

    .cart-quantity-input {
        width: 50px;
        height: 32px;
        font-size: 0.9rem;
    }

    .cart-item-price-wrapper {
        align-items: center !important;
    }
    
    .cart-item-price-col {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
    }

    .cart-item-price {
        font-size: 1.125rem;
    }

    .cart-item-total {
        font-size: 0.875rem;
    }

    .cart-delete-btn {
        width: 36px;
        height: 36px;
        font-size: 1.25rem;
        margin: 0 auto;
    }

    .cart-total-card {
        padding: 1.5rem 1rem;
        margin-top: 1.5rem;
    }

    .cart-total-amount {
        font-size: 1.75rem;
    }

    .cart-summary-btn {
        padding: 1rem;
        font-size: 1rem;
    }

    .empty-cart-container {
        padding: 2rem 1rem;
    }

    .empty-cart-icon {
        font-size: 3rem;
    }

    .empty-cart-title {
        font-size: 1.5rem;
    }

    .empty-cart-message {
        font-size: 1rem;
    }
}

@media (max-width: 400px) {
    .cart-item-image-wrapper {
        max-width: 100px;
    }

    .cart-item-image {
        max-height: 80px;
    }

    .cart-quantity-btn {
        width: 28px;
        height: 28px;
    }

    .cart-quantity-input {
        width: 45px;
        height: 28px;
    }
}

/* Loading Animation */
.cart-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

.cart-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e2e8f0;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

