/* Checkout Page Styling */
.checkout-page {
    background-color: #f8f9fa;
    min-height: 100vh;
}

.checkout-container {
    max-width: 100%;

    margin: 0 auto;
}

/* Checkout Header */
.checkout-header {
    text-align: center;
    margin-bottom: 30px;
    background: white;
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-around;
}

.checkout-header h1 {
    color: #2c3e50;
    font-size: 2.5rem;
    font-weight: 600;
}

.checkout-progress {
    display: flex;
    justify-content: center;
    gap: 50px;
}

.progress-step {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #6c757d;
    font-size: 14px;
    transition: color 0.3s;
}

.progress-step.active {
    color: #007bff;
}

.step-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    transition: background 0.3s;
}

.progress-step.active .step-number {
    background: #007bff;
    color: white;
}

/* Empty Cart */
.empty-cart {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

.empty-cart-icon {
    font-size: 4rem;
    color: #6c757d;
    margin-bottom: 20px;
}

.empty-cart h2 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.empty-cart p {
    color: #6c757d;
    margin-bottom: 30px;
}

.btn-continue-shopping {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.3s;
}

.btn-continue-shopping:hover {
    background: #0056b3;
    color: white;
}

/* Checkout Content */
.checkout-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

/* Cart Items Section */
.checkout-cart-items {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.cart-items-header {
    background: #f8f9fa;
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-items-header h3 {
    color: #2c3e50;
    margin: 0;
    font-size: 1.2rem;
}

.cart-total-preview {
    font-size: 1.2rem;
    font-weight: bold;
    color: #28a745;
}

.cart-items-list {
    max-height: 600px;
    overflow-y: auto;
}

.checkout-cart-item {
    display: grid;
    grid-template-columns: 80px 1fr auto auto auto;
    gap: 15px;
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    align-items: center;
    transition: background 0.3s;
}

.checkout-cart-item:hover {
    background: #f8f9fa;
}

.checkout-cart-item.updating {
    opacity: 0.7;
    pointer-events: none;
}

.item-image img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.item-details {
    min-width: 0;
}

.item-name {
    margin: 0 0 8px 0;
    font-size: 1rem;
    line-height: 1.4;
}

.item-name a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s;
}

.item-name a:hover {
    color: #007bff;
}

.item-sku {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 4px;
}

.item-stock {
    font-size: 0.85rem;
}

.stock-available {
    color: #28a745;
}

.stock-unavailable {
    color: #dc3545;
}

.item-quantity {
    display: flex;
    align-items: center;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.quantity-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #dee2e6;
    background: white;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.quantity-btn:hover {
    background: #f8f9fa;
    border-color: #007bff;
}

.quantity-input {
    width: 60px;
    height: 32px;
    text-align: center;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 0 8px;
}

.item-price {
    text-align: right;
    min-width: 100px;
}

.price-per-unit {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 4px;
}

.price-total {
    font-weight: bold;
    color: #2c3e50;
    font-size: 1.1rem;
}

.item-actions {
    display: flex;
    align-items: center;
}

.remove-item-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: #dc3545;
    color: white;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s;
}

.remove-item-btn:hover {
    background: #c82333;
}

/* Checkout Form */
.checkout-form-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    padding: 5px 20px;
    overflow-y: auto;
    font-size: 13px;
}

.checkout-section {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
}

.checkout-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.checkout-section h3 {
    color: #2c3e50;
    font-size: 1.3rem;
    font-weight: 600;
}

/* Authentication Options */
.auth-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.auth-option {
    display: flex;
    align-items: center;
}

.auth-option input[type="radio"] {
    /*HIDDEN*/
    display: none;
    margin-right: 12px;
}

.auth-option label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 12px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    width: 100%;
    transition: all 0.3s;
}

.auth-option label:hover {
    background: #f8f9fa;
    border-color: #007bff;
}

.auth-option input[type="radio"]:checked + label {
    background: #e3f2fd;
    border-color: #007bff;
    color: #007bff;
}

/* Auth Buttons */
.auth-buttons {
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.auth-buttons p {
    margin-bottom: 15px;
    color: #6c757d;
    font-size: 0.95rem;
    text-align: center;
}

.auth-button-group {
    display: flex;
    gap: 15px;
    flex-direction: column;
}

.btn-auth {
    width: 50%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    justify-content: center;
    border: 2px solid transparent;
}

.btn-auth:hover {
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-register {
    background: #28a745;
    color: white;
    border-color: #28a745;
}

.btn-register:hover {
    background: #218838;
    color: white;
    border-color: #218838;
}

@media (min-width: 576px) {
    .auth-button-group {
        flex-direction: row;
    }
}

/* Form Elements */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 5px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 500;
    color: #2c3e50;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.form-group input[required],
.form-group select[required],
.form-group textarea[required] {
    border-left: 3px solid #ffc107;
}

.form-group input[required]:valid,
.form-group select[required]:valid,
.form-group textarea[required]:valid {
    border-left: 3px solid #28a745;
}

/* Delivery Options */
.delivery-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.delivery-option {
    display: flex;
    align-items: center;
}

.delivery-option input[type="radio"] {
    margin-right: 12px;
}

.delivery-option label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 12px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    width: 100%;
    transition: all 0.3s;
}

.delivery-option label:hover {
    background: #f8f9fa;
    border-color: #007bff;
}

.delivery-option input[type="radio"]:checked + label {
    background: #e3f2fd;
    border-color: #007bff;
    color: #007bff;
}

/* Payment Methods */
.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.payment-method {
    display: flex;
    align-items: center;
}

.payment-method input[type="radio"] {
    /*HIDDEN*/
    display: none;
    margin-right: 12px;
}

.payment-method label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 15px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    width: 100%;
    transition: all 0.3s;
}

.payment-method label:hover {
    background: #f8f9fa;
    border-color: #007bff;
}

.payment-method input[type="radio"]:checked + label {
    background: #e3f2fd;
    border-color: #007bff;
    color: #007bff;
}

.payment-method-icon {
    width: 40px;
    height: 40px;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.payment-method-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.method-name {
    font-weight: 500;
    color: #2c3e50;
}

.method-type {
    font-size: 0.85rem;
    color: #6c757d;
}

/* Order Summary */
.order-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.summary-line:last-child {
    border-bottom: none;
}

.summary-line.total {
    font-weight: bold;
    font-size: 1.2rem;
    color: #2c3e50;
    padding-top: 15px;
    border-top: 2px solid #007bff;
}

.free {
    color: #28a745;
    font-weight: bold;
}

.cost {
    color: #6c757d;
}

/* Free Delivery Progress */
.free-delivery-info {
    background: #e3f2fd;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
}

.free-delivery-text {
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: #1565c0;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #007bff;
    transition: width 0.3s;
}

/* Terms Agreement */
.terms-acceptance {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.terms-acceptance input[type="checkbox"] {
    margin-top: 2px;
}

.terms-acceptance label {
    font-size: 0.9rem;
    color: #6c757d;
    line-height: 1.5;
}

.terms-acceptance a {
    color: #007bff;
    text-decoration: none;
}

.terms-acceptance a:hover {
    text-decoration: underline;
}

/* Checkout Actions */
.checkout-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
}

.btn-place-order {
    width: 100%;
    padding: 15px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-place-order:hover {
    background: #218838;
}

.btn-place-order:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.btn-login {
    padding: 12px;
    background: #ed3b24;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-login:hover {
    background: #d33722;
}

/* Messages */
.checkout-message {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease-out;
}

.checkout-message-success {
    background: #28a745;
}

.checkout-message-error {
    background: #dc3545;
}

.checkout-message-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.checkout-message-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .checkout-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .checkout-progress {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }

    .checkout-cart-item {
        grid-template-columns: 60px 1fr;
        gap: 10px;
        padding: 15px;
    }

    .item-image img {
        width: 60px;
        height: 60px;
    }

    .item-quantity,
    .item-price,
    .item-actions {
        grid-column: 1 / -1;
        justify-self: start;
        margin-top: 10px;
    }

    .item-price {
        text-align: left;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .checkout-form-container {
        padding: 20px;
        max-height: none;
    }

    .checkout-header h1 {
        font-size: 2rem;
    }

    .checkout-container {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .checkout-header {
        padding: 20px 15px;
    }

    .checkout-header h1 {
        font-size: 1.8rem;
    }

    .step-text {
        display: none;
    }

    .checkout-form-container {
        padding: 15px;
    }

    .checkout-section {
        margin-bottom: 5px;
        padding-bottom: 5px;
        border-bottom: 1px solid #e9ecef;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px;
    }

    .btn-place-order {
        padding: 12px;
        font-size: 1rem;
    }

    .checkout-message {
        top: 10px;
        right: 10px;
        left: 10px;
        padding: 12px 15px;
    }
}

/* Utility Classes */
.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.updating {
    transition: all 0.3s ease;
}

.updating:hover {
    transform: scale(1.02);
} 

/* Cart option indicator styles */
.item-image {
    position: relative;
}

.option-indicator {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #00980b;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.item-option {
    font-size: 0.9em;
    color: #666;
    font-style: italic;
    margin-bottom: 5px;
} 