/* Cart Page Styles - Flipkart Style */

.cart-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px;
}

/* Delivery Pincode Section */
.delivery-pincode-section {
    background: white;
    border-radius: 4px;
    padding: 16px 20px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.pincode-label {
    font-size: 14px;
    color: #212121;
    font-weight: 500;
}

.btn-pincode {
    padding: 8px 16px;
    background: white;
    border: 1px solid var(--mobitez-purple);
    border-radius: 2px;
    color: var(--mobitez-purple);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-pincode:hover {
    background: var(--mobitez-purple);
    color: white;
}

/* Cart Content Layout */
.cart-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 24px;
    align-items: start;
}

/* Cart Items Section */
.cart-items-section {
    background: white;
    border-radius: 4px;
    padding: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow-y: visible;
}

/* Empty Cart */
.empty-cart {
    text-align: center;
    padding: 60px 20px;
}

.empty-cart-icon {
    font-size: 64px;
    color: #e0e0e0;
    margin-bottom: 16px;
}

.empty-cart h2 {
    font-size: 20px;
    font-weight: 500;
    color: #212121;
    margin-bottom: 8px;
}

.empty-cart p {
    font-size: 14px;
    color: #878787;
    margin-bottom: 24px;
}

/* Cart Items List */
.cart-items-list {
    padding: 20px;
    min-height: 200px;
}

.cart-item {
    padding: 20px 0;
    border-bottom: 1px solid #f0f0f0;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-main {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.cart-item-image-wrapper {
    flex-shrink: 0;
}

.cart-item-image {
    width: 112px;
    height: 112px;
    object-fit: contain;
    border: 1px solid #f0f0f0;
    border-radius: 4px;
    background: white;
    padding: 8px;
    cursor: pointer;
}

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

.cart-item-name {
    font-size: 16px;
    font-weight: 500;
    color: #212121;
    text-decoration: none;
    line-height: 1.4;
    margin-bottom: 6px;
    display: block;
}

.cart-item-name:hover {
    color: var(--mobitez-purple);
}

.cart-item-specs {
    font-size: 14px;
    color: #878787;
    margin-bottom: 6px;
}

.cart-item-seller {
    font-size: 14px;
    color: #878787;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.cart-item-seller i {
    font-size: 12px;
}

.cart-item-pricing {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.cart-item-price {
    font-size: 18px;
    font-weight: 500;
    color: #212121;
}

.cart-item-original-price {
    font-size: 14px;
    color: #878787;
    text-decoration: line-through;
}

.cart-item-discount {
    font-size: 13px;
    color: #388e3c;
    font-weight: 500;
}

.cart-item-protect-fee {
    font-size: 14px;
    color: #212121;
    margin-top: 4px;
}

.cart-item-emi {
    font-size: 14px;
    color: #878787;
    margin-top: 4px;
}

.cart-item-delivery {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.delivery-info {
    font-size: 14px;
    color: #212121;
    display: flex;
    align-items: center;
    gap: 6px;
}

.delivery-info i {
    color: #388e3c;
    font-size: 12px;
}

/* Protection Plans (Optional) */
.cart-item-protection {
    margin-top: 16px;
    padding: 16px;
    background: #f5f5f5;
    border-radius: 4px;
}

.protection-title {
    font-size: 14px;
    font-weight: 500;
    color: #212121;
    margin-bottom: 12px;
}

.protection-option {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.protection-info {
    flex: 1;
}

.protection-name {
    font-size: 14px;
    font-weight: 500;
    color: #212121;
    margin-bottom: 4px;
}

.protection-duration {
    font-size: 12px;
    color: #878787;
    margin-bottom: 6px;
}

.protection-pricing {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.protection-price {
    font-size: 14px;
    font-weight: 500;
    color: #212121;
}

.protection-original-price {
    font-size: 12px;
    color: #878787;
    text-decoration: line-through;
}

.protection-discount {
    font-size: 12px;
    color: #388e3c;
    font-weight: 500;
}

.protection-emi {
    font-size: 12px;
    color: #878787;
    margin-top: 4px;
}

.protection-description {
    font-size: 12px;
    color: #878787;
    line-height: 1.4;
    margin-bottom: 8px;
}

.protection-know-more {
    color: var(--mobitez-purple);
    text-decoration: none;
    font-size: 12px;
}

.protection-know-more:hover {
    text-decoration: underline;
}

.btn-add-protection {
    padding: 8px 16px;
    background: white;
    border: 1px solid var(--mobitez-purple);
    border-radius: 2px;
    color: var(--mobitez-purple);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-add-protection:hover {
    background: var(--mobitez-purple);
    color: white;
}

/* Quantity and Actions */
.cart-item-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.quantity-controls {
    display: flex;
    align-items: center;
    border: 1px solid #e0e0e0;
    border-radius: 2px;
}

.quantity-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #212121;
    font-size: 16px;
    font-weight: 500;
}

.quantity-btn:hover:not(:disabled) {
    background: #f5f5f5;
}

.quantity-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.quantity-input {
    width: 50px;
    height: 32px;
    border: none;
    border-left: 1px solid #e0e0f0;
    border-right: 1px solid #e0e0f0;
    text-align: center;
    font-size: 14px;
    color: #212121;
    background: white;
}

.cart-item-action-links {
    display: flex;
    gap: 16px;
}

.cart-action-link {
    color: #2874f0;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    padding: 0;
    text-decoration: none;
}

.cart-action-link:hover {
    text-decoration: underline;
}

/* Place Order Button */
.cart-actions {
    padding: 20px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: flex-end;
}

.btn-place-order-large {
    width: auto;
    min-width: 200px;
    padding: 12px 24px;
    background: var(--mobitez-purple);
    border: none;
    border-radius: 2px;
    color: white;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-block;
}

.btn-place-order-large:hover {
    background: var(--mobitez-purple-dark);
}

.btn-place-order-large:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Price Summary */
.cart-summary-section {
    position: sticky;
    top: 112px;
    align-self: start;
    height: fit-content;
    max-height: calc(100vh - 112px);
    overflow-y: visible;
    z-index: 10;
}

.price-summary {
    background: white;
    border-radius: 4px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.summary-title {
    font-size: 16px;
    font-weight: 500;
    color: #212121;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
    text-transform: capitalize;
}

.summary-content {
    margin-bottom: 16px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 14px;
    color: #212121;
}

#discountRow {
    display: flex;
}

.summary-total {
    font-size: 18px;
    font-weight: 500;
    padding-top: 12px;
    border-top: 1px dashed #e0e0e0;
    margin-top: 12px;
    margin-bottom: 16px;
}

.discount-amount {
    color: #388e3c;
    display: flex;
    align-items: center;
    gap: 4px;
}

.summary-savings {
    display: block;
    color: #388e3c;
    font-size: 14px;
    margin-bottom: 16px;
    padding: 12px;
    background: #e9f2e9;
    border-radius: 4px;
}

.summary-savings strong {
    font-weight: 500;
}

.summary-security {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
    font-size: 12px;
    color: #878787;
}

.summary-security i {
    color: #388e3c;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 968px) {
    .cart-content {
        grid-template-columns: 1fr;
    }
    
    .cart-summary-section {
        position: relative;
        top: 0;
    }
}

@media (max-width: 768px) {
    .cart-item-main {
        flex-direction: column;
    }
    
    .cart-item-image {
        width: 100%;
        height: auto;
        max-height: 300px;
    }
    
    .cart-item-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .delivery-pincode-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}
