/* Checkout Page Styles - Shopify-inspired Design */
.checkout-page {
    background-color: #fafafa;
    min-height: 100vh;
}

.checkout-header {
    background-color: #fff;
    padding: 1.5rem 0;
    border-bottom: 1px solid #e1e3e5;
}

.checkout-header .logo {
    height: 32px;
}

.checkout-main {
    padding: 3rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.checkout-container {
    background-color: transparent;
}

.checkout-content {
    display: grid;
    grid-template-columns: 1fr 480px;
    gap: 4rem;
}

/* Form Styles */
.checkout-form-section {
    background-color: #fff;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 0 0 1px rgba(0,0,0,.05), 0 1px 2px 0 rgba(0,0,0,.1);
}

.form-section {
    margin-bottom: 2.5rem;
}

.form-section h2 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: #202223;
    letter-spacing: -0.01em;
}

.form-group {
    margin-bottom: 1rem;
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.checkout-form input,
.checkout-form select {
    width: 100%;
    padding: 0.875rem 0.875rem;
    border: 1px solid #c9cccf;
    border-radius: 5px;
    font-size: 0.9375rem;
    background-color: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.checkout-form input:focus,
.checkout-form select:focus {
    outline: none;
    border-color: #080046;
    box-shadow: 0 0 0 3px rgba(8, 0, 70, 0.1);
}

.checkout-form input::placeholder {
    color: #8c9196;
}

/* Shipping Method Section Styles */
.shipping-method-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e1e3e5;
}

.shipping-option {
    border: 2px solid #080046;
    border-radius: 8px;
    padding: 0;
    background: #f8f9fa;
    cursor: default;
}

.shipping-option-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
}

.shipping-option-details {
    flex: 1;
}

.shipping-option-name {
    font-size: 1rem;
    font-weight: 600;
    color: #080046;
    margin-bottom: 0.35rem;
}

.shipping-option-description {
    font-size: 0.8125rem;
    color: #6d7175;
}

.shipping-option-price {
    font-size: 1.125rem;
    font-weight: 700;
    color: #080046;
    padding-left: 1rem;
}

/* Payment Section Styles */
.payment-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e1e3e5;
}

.payment-element-container {
    margin-top: 1.25rem;
    margin-bottom: 1.5rem;
    padding: 0;
    background: transparent;
    border-radius: 0;
}

#payment-element {
    margin-bottom: 1.5rem;
}

/* Custom styling for expanded payment methods */
.payment-element-container {
    background: transparent !important;
}

.payment-message {
    display: none;
    margin-top: 1rem;
    margin-bottom: 1rem;
    padding: 0.875rem 1rem;
    border-radius: 5px;
    font-size: 0.875rem;
    line-height: 1.5;
}

.checkout-button {
    width: 100%;
    padding: 1.125rem 1.5rem;
    background-color: #080046;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 1rem;
    letter-spacing: 0.01em;
}

.checkout-button:hover:not(:disabled) {
    background-color: #333333;
}

.checkout-button:disabled {
    background-color: #8c9196;
    cursor: not-allowed;
}

.return-to-cart {
    display: block;
    text-align: center;
    margin-top: 1rem;
    color: #080046;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
}

.return-to-cart:hover {
    color: #333333;
    text-decoration: underline;
}

/* Order Summary Styles */
.checkout-summary-section {
    background-color: #fafafa;
    padding: 2rem;
    border-radius: 8px;
    height: fit-content;
    position: sticky;
    top: 2rem;
}

.order-summary h2 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #202223;
    letter-spacing: -0.01em;
}

.checkout-items {
    margin-bottom: 1.5rem;
}

.checkout-item {
    display: grid;
    grid-template-columns: 64px 1fr auto;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #e1e3e5;
}

.checkout-item:last-child {
    border-bottom: none;
}

.checkout-item img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e1e3e5;
}

.checkout-item-details h3 {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: #202223;
}

.checkout-item-details p {
    font-size: 0.8125rem;
    color: #6d7175;
}

.checkout-item-variant {
    font-size: 0.8125rem;
    color: #6d7175;
    margin: 4px 0;
}

.checkout-item-price {
    font-weight: 600;
    font-size: 0.875rem;
    color: #202223;
}

.summary-totals {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e5e5;
}

/* Discount Code Section */
.discount-code-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e5e5;
}

.discount-input-group {
    display: flex;
    gap: 0.5rem;
}

.discount-input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.discount-input:focus {
    outline: none;
    border-color: #080046;
}

.discount-input::placeholder {
    color: #999;
}

.apply-discount-btn {
    padding: 0.75rem 1.5rem;
    background-color: #080046;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
    white-space: nowrap;
}

.apply-discount-btn:hover {
    opacity: 0.9;
}

.apply-discount-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.discount-message {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    min-height: 20px;
}

.discount-message.success {
    color: #4CAF50;
    font-weight: 500;
}

.discount-message.error {
    color: #f44336;
}

.discount-line {
    color: #4CAF50;
}

.discount-amount {
    color: #4CAF50;
    font-weight: 600;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.875rem;
    font-size: 0.875rem;
    color: #202223;
}

.summary-line.total {
    margin-top: 0.875rem;
    padding-top: 0.875rem;
    border-top: 1px solid #e1e3e5;
    font-size: 1.125rem;
    font-weight: 600;
    color: #202223;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .checkout-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .checkout-summary-section {
        position: static;
        order: -1;
    }
}

@media (max-width: 768px) {
    .checkout-main {
        padding: 1.5rem 1rem;
    }

    .checkout-form-section {
        padding: 1.5rem;
    }

    .checkout-summary-section {
        padding: 1.5rem;
    }

    .form-group {
        grid-template-columns: 1fr;
    }

    .checkout-content {
        gap: 1.5rem;
    }
    
    .shipping-option-content {
        padding: 1rem;
    }
    
    .shipping-option-name {
        font-size: 0.9375rem;
    }
    
    .shipping-option-description {
        font-size: 0.75rem;
    }
    
    .shipping-option-price {
        font-size: 1rem;
        padding-left: 0.75rem;
    }
}

