/* ========================================
   CART & CHECKOUT IMPROVEMENTS
   Modern Card Design with Full Responsiveness
   ======================================== */

/* ========================================
   1. CART PAGE ENHANCEMENTS
   ======================================== */

.cart-page {
    padding: 60px 0;
    background: #F8F9FA;
}

.cart-container {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
    align-items: start;
}

/* Cart Items Section */
.cart-items-section {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #F0F0F0;
}

.cart-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: #2C3E50;
    margin: 0;
}

.cart-count-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

/* Cart Item Card */
.cart-item {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid #F0F0F0;
    transition: all 0.3s ease;
}

.cart-item:hover {
    background: #FAFBFC;
    padding: 20px;
    margin: 0 -20px;
    border-radius: 12px;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    overflow: hidden;
    background: #F8F9FA;
    position: relative;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.cart-item:hover .cart-item-image img {
    transform: scale(1.05);
}

.cart-item-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #E74C3C;
    color: white;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 700;
}

.cart-item-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cart-item-title {
    font-size: 16px;
    font-weight: 600;
    color: #2C3E50;
    margin: 0;
    line-height: 1.4;
}

.cart-item-title a {
    color: inherit;
    transition: color 0.3s ease;
}

.cart-item-title a:hover {
    color: #E8C547;
}

.cart-item-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #7F8C8D;
}

.cart-item-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cart-item-meta i {
    color: #95A5A6;
}

.cart-item-price {
    font-size: 18px;
    font-weight: 700;
    color: #2C3E50;
    margin-top: 4px;
}

.cart-item-price-old {
    font-size: 14px;
    color: #95A5A6;
    text-decoration: line-through;
    margin-left: 8px;
}

.cart-item-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 0;
    border: 2px solid #E0E0E0;
    border-radius: 8px;
    overflow: hidden;
}

.qty-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: none;
    color: #2C3E50;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.qty-btn:hover {
    background: #E8C547;
    color: white;
}

.qty-input {
    width: 50px;
    height: 36px;
    border: none;
    text-align: center;
    font-weight: 600;
    color: #2C3E50;
    background: #F8F9FA;
}

.cart-item-remove {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #FFF5F5;
    border: none;
    border-radius: 8px;
    color: #E74C3C;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cart-item-remove:hover {
    background: #E74C3C;
    color: white;
    transform: scale(1.05);
}

.cart-item-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.cart-item-total {
    font-size: 22px;
    font-weight: 700;
    color: #2C3E50;
}

.cart-item-savings {
    font-size: 12px;
    color: #27AE60;
    background: #ECFDF5;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
}

/* Cart Summary Sidebar */
.cart-summary {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    position: sticky;
    top: 100px;
}

.cart-summary h3 {
    font-size: 22px;
    font-weight: 700;
    color: #2C3E50;
    margin: 0 0 24px 0;
    padding-bottom: 16px;
    border-bottom: 2px solid #F0F0F0;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    font-size: 15px;
    color: #2C3E50;
}

.summary-row.total {
    font-size: 20px;
    font-weight: 700;
    border-top: 2px solid #F0F0F0;
    margin-top: 12px;
    padding-top: 20px;
}

.summary-savings {
    color: #27AE60;
    font-weight: 600;
}

.coupon-section {
    margin: 24px 0;
    padding: 20px;
    background: linear-gradient(135deg, #FFF9E6 0%, #FFFBF0 100%);
    border-radius: 12px;
    border: 2px dashed #E8C547;
}

.coupon-section h4 {
    font-size: 14px;
    font-weight: 600;
    color: #2C3E50;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.coupon-section i {
    color: #E8C547;
}

.coupon-input-group {
    display: flex;
    gap: 8px;
}

.coupon-input {
    flex: 1;
    padding: 12px;
    border: 2px solid #E8C547;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
}

.coupon-input:focus {
    box-shadow: 0 0 0 3px rgba(232, 197, 71, 0.2);
}

.coupon-btn {
    padding: 12px 20px;
    background: #E8C547;
    color: #2C3E50;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.coupon-btn:hover {
    background: #2C3E50;
    color: white;
    transform: translateY(-2px);
}

.coupon-message {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    font-weight: 600;
}
.coupon-message.coupon-success {
    background: #E6FFEF;
    color: #0B6B3A;
    border: 1px solid #B6F0C9;
}
.coupon-message.coupon-error {
    background: #FFF5F5;
    color: #8B1E1E;
    border: 1px solid #F1C0C0;
}

.checkout-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 24px;
}

.checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}

.trust-badges {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #F0F0F0;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #7F8C8D;
}

.trust-badge i {
    color: #27AE60;
}

/* Empty Cart State */
.empty-cart {
    text-align: center;
    padding: 80px 20px;
}

.empty-cart-icon {
    font-size: 80px;
    color: #E0E0E0;
    margin-bottom: 20px;
}

.empty-cart h2 {
    font-size: 28px;
    color: #2C3E50;
    margin-bottom: 12px;
}

.empty-cart p {
    font-size: 16px;
    color: #7F8C8D;
    margin-bottom: 30px;
}

/* ========================================
   2. CHECKOUT PAGE IMPROVEMENTS
   ======================================== */

.checkout-page {
    padding: 60px 0;
    background: #F8F9FA;
}

.checkout-container {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
    align-items: start;
}

.checkout-form-section {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.checkout-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
}

.checkout-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 3px;
    background: #E0E0E0;
    z-index: 0;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1;
    flex: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: 3px solid #E0E0E0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #95A5A6;
    transition: all 0.3s ease;
}

.step.active .step-number {
    background: #E8C547;
    border-color: #E8C547;
    color: #2C3E50;
}

.step.completed .step-number {
    background: #27AE60;
    border-color: #27AE60;
    color: white;
}

.step-label {
    font-size: 13px;
    font-weight: 600;
    color: #95A5A6;
}

.step.active .step-label {
    color: #2C3E50;
}

.form-section {
    margin-bottom: 32px;
}

.form-section h3 {
    font-size: 20px;
    font-weight: 700;
    color: #2C3E50;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #F0F0F0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-section h3 i {
    color: #E8C547;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-grid.full {
    grid-template-columns: 1fr;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: #2C3E50;
}

.form-group label span {
    color: #E74C3C;
}

.form-input {
    padding: 12px 16px;
    border: 2px solid #E0E0E0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-input:focus {
    border-color: #E8C547;
    outline: none;
    box-shadow: 0 0 0 3px rgba(232, 197, 71, 0.1);
}

.form-select {
    padding: 12px 16px;
    border: 2px solid #E0E0E0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-select:focus {
    border-color: #E8C547;
    outline: none;
}

/* Shipping & Payment Options */
.option-cards {
    display: grid;
    gap: 12px;
}

.option-card {
    padding: 16px;
    border: 2px solid #E0E0E0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.option-card:hover {
    border-color: #E8C547;
    background: #FFFBF0;
}

.option-card.selected {
    border-color: #E8C547;
    background: linear-gradient(135deg, #FFF9E6 0%, #FFFBF0 100%);
}

.option-radio {
    width: 20px;
    height: 20px;
    border: 2px solid #E0E0E0;
    border-radius: 50%;
    position: relative;
    transition: all 0.3s ease;
}

.option-card.selected .option-radio {
    border-color: #E8C547;
}

.option-card.selected .option-radio::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #E8C547;
}

.option-info {
    flex: 1;
}

.option-title {
    font-size: 15px;
    font-weight: 600;
    color: #2C3E50;
    margin-bottom: 4px;
}

.option-desc {
    font-size: 12px;
    color: #7F8C8D;
}

.option-price {
    font-size: 16px;
    font-weight: 700;
    color: #2C3E50;
}

/* Order Summary in Checkout */
.order-summary {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    position: sticky;
    top: 100px;
}

.order-summary h3 {
    font-size: 22px;
    font-weight: 700;
    color: #2C3E50;
    margin: 0 0 24px 0;
    padding-bottom: 16px;
    border-bottom: 2px solid #F0F0F0;
}

.order-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #F0F0F0;
}

.order-item-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    background: #F8F9FA;
}

.order-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.order-item-info {
    flex: 1;
}

.order-item-title {
    font-size: 13px;
    font-weight: 600;
    color: #2C3E50;
    margin-bottom: 4px;
}

.order-item-meta {
    font-size: 11px;
    color: #7F8C8D;
}

.order-item-price {
    font-size: 14px;
    font-weight: 700;
    color: #2C3E50;
    text-align: right;
}

/* ========================================
   3. RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 1200px) {
    .cart-container,
    .checkout-container {
        grid-template-columns: 1fr 350px;
        gap: 24px;
    }
    
    .cart-item {
        grid-template-columns: 100px 1fr auto;
    }
    
    .cart-item-image {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 992px) {
    .cart-container,
    .checkout-container {
        grid-template-columns: 1fr;
    }
    
    .cart-summary,
    .order-summary {
        position: static;
    }
    
    .cart-item {
        grid-template-columns: 90px 1fr;
    }
    
    .cart-item-right {
        grid-column: 2;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .checkout-form-section {
        padding: 30px;
    }
}

@media (max-width: 768px) {
    .cart-page,
    .checkout-page {
        padding: 40px 0;
    }
    
    .cart-items-section,
    .checkout-form-section {
        padding: 20px;
        border-radius: 12px;
    }
    
    .cart-header h2 {
        font-size: 24px;
    }
    
    .cart-item {
        grid-template-columns: 80px 1fr;
        gap: 12px;
    }
    
    .cart-item-image {
        width: 80px;
        height: 80px;
    }
    
    .cart-item-title {
        font-size: 14px;
    }
    
    .cart-item-meta {
        font-size: 12px;
        flex-direction: column;
        gap: 4px;
    }
    
    .cart-item-price {
        font-size: 16px;
    }
    
    .cart-item-actions {
        flex-direction: column;
    }
    
    .cart-summary,
    .order-summary {
        padding: 20px;
    }
    
    .checkout-steps {
        margin-bottom: 30px;
    }
    
    .step-label {
        font-size: 11px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .cart-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .cart-item {
        padding: 16px 0;
    }
    
    .cart-item:hover {
        padding: 16px;
    }
    
    .cart-item-image {
        width: 70px;
        height: 70px;
    }
    
    .cart-item-title {
        font-size: 13px;
    }
    
    .cart-item-qty {
        width: 100%;
    }
    
    .qty-input {
        flex: 1;
    }
    
    .cart-item-total {
        font-size: 18px;
    }
    
    .checkout-steps {
        flex-direction: column;
        align-items: stretch;
    }
    
    .checkout-steps::before {
        display: none;
    }
    
    .step {
        flex-direction: row;
        justify-content: flex-start;
    }
    
    .step-number {
        width: 36px;
        height: 36px;
    }
}
