/* ===================================
   NexMart - Cart & Checkout CSS
   Shopping cart and checkout pages
   =================================== */

/* ===================================
   1. CART PAGE
   =================================== */
.cart-page {
    padding: 40px 0;
    background: #f8f9fa;
    min-height: 100vh;
}

/* Container already defined in violet-theme.css */

.cart-container {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 25px;
}

/* Cart Items Section */
.cart-items-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 20px;
}

.cart-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

.cart-count {
    color: #666;
    font-size: 14px;
}

/* Cart Item */
.cart-item {
    display: flex;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid #f0f0f0;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 120px;
    height: 120px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f8f9fa;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.cart-item-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
    text-decoration: none;
}

.cart-item-name:hover {
    color: #667eea;
}

.cart-item-variant {
    font-size: 13px;
    color: #999;
    margin-bottom: 10px;
}

.cart-item-price {
    font-size: 20px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 15px;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: auto;
}

/* Quantity Controls */
.cart-qty-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8f9fa;
    padding: 5px 10px;
    border-radius: 8px;
}

.cart-qty-btn {
    width: 30px;
    height: 30px;
    border: none;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #667eea;
    font-weight: 700;
    transition: all 0.3s ease;
}

.cart-qty-btn:hover {
    background: #667eea;
    color: white;
}

.cart-qty-value {
    min-width: 30px;
    text-align: center;
    font-weight: 600;
    font-size: 15px;
}

.cart-remove-btn {
    color: #e74c3c;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.cart-remove-btn:hover {
    background: #fee;
}

/* Cart Summary */
.cart-summary {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: sticky;
    top: 100px;
    height: fit-content;
}

.summary-title {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 14px;
}

.summary-label {
    color: #666;
}

.summary-value {
    color: #333;
    font-weight: 600;
}

.summary-discount {
    color: #2ecc71;
}

.summary-total {
    padding-top: 15px;
    margin-top: 15px;
    border-top: 2px solid #f0f0f0;
}

.summary-total .summary-label {
    font-size: 16px;
    font-weight: 700;
    color: #333;
}

.summary-total .summary-value {
    font-size: 24px;
    font-weight: 700;
    color: #667eea;
}

.checkout-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.continue-shopping {
    width: 100%;
    padding: 12px;
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 12px;
    transition: all 0.3s ease;
}

.continue-shopping:hover {
    background: #f8f9ff;
}

/* Coupon Section */
.coupon-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.coupon-input {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.coupon-input input {
    flex: 1;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
}

.coupon-input button {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

/* Empty Cart */
.empty-cart {
    text-align: center;
    padding: 80px 20px;
}

.empty-cart-icon {
    font-size: 100px;
    color: #ddd;
    margin-bottom: 20px;
}

.empty-cart h2 {
    font-size: 24px;
    color: #333;
    margin-bottom: 10px;
}

.empty-cart p {
    color: #666;
    margin-bottom: 25px;
}

/* ===================================
   2. CHECKOUT PAGE (Flipkart Style)
   =================================== */
.checkout-page {
    padding: 40px 0;
    background: #f1f3f6;
}

/* Checkout Steps */
.checkout-steps {
    display: flex;
    justify-content: space-between;
    background: white;
    padding: 20px 30px;
    margin-bottom: 20px;
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.step {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    opacity: 0.5;
}

.step.active {
    opacity: 1;
}

.step.completed {
    opacity: 1;
}

.step.completed .step-number {
    background: #388e3c;
    color: white;
}

.step.completed .step-number::after {
    content: '✓';
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #757575;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}

.step.active .step-number {
    background: #2874f0;
    color: white;
}

.step-info {
    display: flex;
    flex-direction: column;
}

.step-title {
    font-size: 12px;
    font-weight: 600;
    color: #878787;
}

.step.active .step-title {
    color: #2874f0;
}

.step-subtitle {
    font-size: 14px;
    color: #212121;
}

/* Container already defined in violet-theme.css */

.checkout-container {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 15px;
}

.checkout-main {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Checkout Sections */
.checkout-section {
    background: white;
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    overflow: hidden;
}

.checkout-section:not(.active) {
    opacity: 0.6;
    pointer-events: none;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: #fafafa;
    border-bottom: 1px solid #f0f0f0;
}

.section-header h2 {
    font-size: 14px;
    font-weight: 600;
    color: #878787;
    margin: 0;
}

.checkout-section.active .section-header h2 {
    color: #212121;
}

.section-header .fa-check-circle {
    color: #388e3c;
    font-size: 18px;
}

.btn-change {
    background: none;
    border: none;
    color: #2874f0;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 5px 10px;
}

.btn-change:hover {
    text-decoration: underline;
}

.section-content {
    padding: 30px;
}

/* Checkout Steps */
.checkout-steps {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    background: white;
    padding: 20px;
    border-radius: 12px;
}

.step {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    border-radius: 8px;
    background: #f8f9fa;
    position: relative;
}

.step.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.step.completed {
    background: #d4edda;
    color: #155724;
}

.step-number {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}

.step.active .step-number {
    background: white;
    color: #667eea;
}

.step.completed .step-number {
    background: #2ecc71;
    color: white;
}

/* Checkout Sections */
.checkout-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Form Styles */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Saved Addresses */
.saved-addresses {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.address-card {
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.address-card:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.address-card.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

/* Payment Methods */
.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.payment-option {
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
}

.payment-option:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.payment-option.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

.payment-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

/* Order Summary in Checkout */
.checkout-summary {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: sticky;
    top: 100px;
}

.summary-items {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.summary-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.summary-item-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
}

.summary-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.summary-item-details {
    flex: 1;
}

.summary-item-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.summary-item-qty {
    font-size: 12px;
    color: #999;
}

.summary-item-price {
    font-size: 14px;
    font-weight: 700;
    color: #667eea;
}

.place-order-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.place-order-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(46, 204, 113, 0.4);
}

/* ===================================
   3. RESPONSIVE
   =================================== */
@media (max-width: 1024px) {
    .cart-container,
    .checkout-container {
        grid-template-columns: 1fr;
    }
    
    .cart-summary,
    .checkout-summary {
        position: static;
    }
}

@media (max-width: 768px) {
    .cart-item {
        flex-direction: column;
    }
    
    .cart-item-image {
        width: 100%;
        height: 200px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .saved-addresses {
        grid-template-columns: 1fr;
    }
    
    .checkout-steps {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .cart-page,
    .checkout-page {
        padding: 20px 0;
    }
    
    .cart-items-section,
    .checkout-section,
    .cart-summary {
        padding: 15px;
    }
}

/* Login Info */
.login-info {
    padding: 20px;
    background: #fafafa;
    border-radius: 3px;
    margin-bottom: 20px;
}

.login-info p {
    margin: 5px 0;
    color: #212121;
}

.btn-continue {
    background: #fb641b;
    color: white;
    border: none;
    padding: 14px 40px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-continue:hover {
    background: #e55a13;
}

/* Address Form */
.address-form {
    margin-top: 20px;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-save {
    background: #fb641b;
    color: white;
    border: none;
    padding: 14px 30px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 3px;
    cursor: pointer;
}

.btn-save:hover {
    background: #e55a13;
}

.btn-cancel {
    background: white;
    border: 1px solid #e0e0e0;
    color: #212121;
    padding: 14px 30px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 3px;
    cursor: pointer;
}

.btn-cancel:hover {
    background: #fafafa;
}

/* Order Items */
.order-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.order-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 3px;
}

.order-item-details h4 {
    margin: 0 0 5px 0;
    font-size: 14px;
    color: #212121;
}

.order-item-details p {
    margin: 3px 0;
    font-size: 13px;
    color: #878787;
}

.order-item-details .price {
    color: #212121;
    font-weight: 600;
}

/* Payment Methods */
.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.payment-option {
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 15px;
}

.payment-option:hover {
    border-color: #2874f0;
    background: #f0f7ff;
}

.payment-option.selected {
    border-color: #2874f0;
    background: #f0f7ff;
}

.payment-option input[type='radio'] {
    width: 18px;
    height: 18px;
}

.payment-option label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    color: #212121;
    font-weight: 500;
    flex: 1;
}

.payment-option i {
    font-size: 20px;
    color: #2874f0;
}

.btn-place-order {
    background: #fb641b;
    color: white;
    border: none;
    padding: 16px 40px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 3px;
    cursor: pointer;
    margin-top: 20px;
    width: 100%;
    transition: all 0.3s;
}

.btn-place-order:hover {
    background: #e55a13;
    transform: translateY(-2px);
}

/* Checkout Summary Sidebar */
.checkout-summary {
    background: white;
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    padding: 25px;
    position: sticky;
    top: 20px;
    height: fit-content;
}

.checkout-summary h3 {
    margin: 0 0 20px 0;
    font-size: 14px;
    font-weight: 600;
    color: #878787;
    text-transform: uppercase;
}

.summary-divider {
    border-top: 1px dashed #e0e0e0;
    margin: 20px 0;
}

.savings-info {
    background: #f0f7ff;
    padding: 12px;
    border-radius: 3px;
    margin-top: 20px;
    font-size: 13px;
    color: #388e3c;
    text-align: center;
}

.savings-info strong {
    font-weight: 700;
}

/* Flipkart Style Vertical Steps */
.checkout-steps-vertical {
    position: fixed;
    left: 50px;
    top: 200px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    z-index: 100;
}

.step-vertical {
    display: flex;
    align-items: center;
    gap: 15px;
    opacity: 0.4;
}

.step-vertical.active {
    opacity: 1;
}

.step-vertical.completed {
    opacity: 1;
}

.step-num {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
    color: #2874f0;
    border: 2px solid #2874f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
}

.step-vertical.active .step-num {
    background: #2874f0;
    color: white;
}

.step-vertical.completed .step-num {
    background: white;
    color: #2874f0;
}

.step-label {
    font-size: 14px;
    font-weight: 600;
    color: #878787;
    text-transform: uppercase;
}

.step-vertical.active .step-label {
    color: #2874f0;
}

/* Checkout Container - Full Width */
.checkout-container {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 20px;
    max-width: none;
    margin-left: 200px;
}

/* Login Section Split */
.section-header-full {
    background: #2874f0;
    color: white;
    padding: 20px 30px;
    font-size: 18px;
}

.section-header-full h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.section-content-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 400px;
}

.login-left {
    padding: 40px;
    background: white;
}

.login-right {
    padding: 40px;
    background: #f0f7ff;
}

.login-input {
    width: 100%;
    padding: 15px;
    border: none;
    border-bottom: 2px solid #e0e0e0;
    font-size: 16px;
    outline: none;
    margin-bottom: 20px;
}

.login-input:focus {
    border-bottom-color: #2874f0;
}

.terms-text {
    font-size: 12px;
    color: #878787;
    margin-bottom: 30px;
}

.terms-text a {
    color: #2874f0;
    text-decoration: none;
}

.btn-continue-orange {
    width: 100%;
    background: #fb641b;
    color: white;
    border: none;
    padding: 16px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 3px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.btn-continue-orange:hover {
    background: #e55a13;
}

.login-right h3 {
    font-size: 16px;
    color: #878787;
    font-weight: 600;
    margin: 0 0 25px 0;
}

.advantages-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.advantages-list li {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #212121;
}

.advantages-list i {
    color: #2874f0;
    font-size: 18px;
    margin-top: 2px;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .checkout-steps-vertical {
        position: static;
        flex-direction: row;
        margin-bottom: 20px;
    }
    
    .checkout-container {
        margin-left: 0;
        grid-template-columns: 1fr;
    }
    
    .step-label {
        display: none;
    }
}

@media (max-width: 768px) {
    .section-content-split {
        grid-template-columns: 1fr;
    }
    
    .login-right {
        display: none;
    }
}

/* Additional Login Styles */
.input-label {
    display: block;
    font-size: 12px;
    color: #878787;
    margin-bottom: 8px;
    font-weight: 500;
}

.mobile-input-group {
    display: flex;
    align-items: center;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 15px;
    position: relative;
}

.mobile-input-group:focus-within {
    border-bottom-color: #2874f0;
}

.country-code {
    font-size: 16px;
    color: #212121;
    font-weight: 600;
    padding: 15px 10px 15px 0;
}

.mobile-input-group .login-input {
    border: none;
    border-bottom: none;
    margin: 0;
    padding: 15px 10px;
    flex: 1;
}

.btn-change-small {
    background: none;
    border: none;
    color: #2874f0;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 5px 10px;
}

.btn-change-small:hover {
    text-decoration: underline;
}

.btn-link {
    background: none;
    border: none;
    color: #2874f0;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    margin: 10px 0 20px 0;
    text-align: left;
}

.btn-link:hover {
    text-decoration: underline;
}
