
/* ============================================
   EDMART CUSTOM CHECKOUT STYLES
   ============================================ */

   .edmart-checkout-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

.checkout-container {
    display: grid;
    grid-template-columns: 1fr 450px;
    gap: 50px;
    align-items: start;
}

/* ============================================
   CART PAGE STYLES
   ============================================ */

.edmart-cart-page {
    padding: 80px 0;
    background: #f8f9fa;
}

.cart-title {
    color: #2c3e50;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
}



/* Coupon Section */
.coupon-section {
    background: #ffffff;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 123, 255, 0.1);
    border: 1px solid #e9ecef;
}

.coupon-form h3 {
    color: #2c3e50;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
}

.coupon-form p {
    color: #6c757d;
    margin-bottom: 20px;
}

.coupon-input-group {
    display: flex;
    gap: 12px;
    align-items: center;
}

.coupon-input-group input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.coupon-input-group input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.empty-cart {
    text-align: center;
    padding: 80px 40px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.empty-cart-icon {
    font-size: 72px;
    color: #007bff;
    margin-bottom: 30px;
}

.empty-cart h3 {
    color: #2c3e50;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 15px;
}

.empty-cart p {
    color: #6c757d;
    font-size: 16px;
    margin-bottom: 30px;
}

/* Cart Items */
.cart-items {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 30px;
}

.cart-item {
    border-bottom: 1px solid #e9ecef;
    padding: 25px;
    transition: all 0.3s ease;
}

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

.cart-item:hover {
    background-color: #f8f9fa;
}

.cart-item-inner {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.product-remove {
    flex-shrink: 0;
    margin-top: 5px;
}

.product-remove .remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    text-decoration: none;
    font-size: 20px;
    transition: all 0.3s ease;
}

.product-remove .remove:hover {
    background: #c82333;
    transform: scale(1.1);
}

.product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.product-name {
    flex: 1;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.4;
}

.product-name a {
    color: inherit;
    text-decoration: none;
}

.product-name a:hover {
    color: #007bff;
}

.product-price {
    font-weight: 600;
    color: #2c3e50;
    font-size: 18px;
    white-space: nowrap;
}

.product-quantity {
    display: flex;
    align-items: center;
}

.quantity input {
    width: 90px;
    padding: 10px 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    text-align: center;
    font-size: 16px;
    transition: all 0.3s ease;
}

.quantity input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.product-subtotal {
    font-weight: 700;
    color: #007bff;
    font-size: 18px;
    white-space: nowrap;
}

.cart-actions {
    padding: 25px 0;
}

.cart-actions .btn {
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.btn-outline-primary {
    background: transparent;
    color: #007bff;
    border: 2px solid #007bff;
}

.btn-outline-primary:hover {
    background: #007bff;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

/* Cart Totals */
.cart-totals {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 30px;
    position: sticky;
    top: 20px;
}

.cart-totals h3 {
    color: #2c3e50;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
}

.cart_totals table {
    width: 100%;
    border-collapse: collapse;
}

.cart_totals th,
.cart_totals td {
    padding: 15px 0;
    border-bottom: 1px solid #e9ecef;
    text-align: left;
}

.cart_totals th {
    font-weight: 500;
    color: #6c757d;
    font-size: 15px;
}

.cart_totals td {
    font-weight: 600;
    color: #2c3e50;
    text-align: right;
    font-size: 16px;
}

.cart_totals .order-total th,
.cart_totals .order-total td {
    font-size: 20px;
    color: #007bff;
    border-bottom: none;
    padding-top: 25px;
    font-weight: 700;
}

.wc-proceed-to-checkout {
    margin-top: 30px;
}

.wc-proceed-to-checkout .btn {
    width: 100%;
    padding: 18px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 700;
    transition: all 0.3s ease;
}

.wc-proceed-to-checkout .btn:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

/* Coupon Section in Checkout */
.checkout-page .coupon-section {
    background: #ffffff;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 123, 255, 0.1);
    border: 1px solid #e9ecef;
}

.checkout-page .coupon-form h3 {
    color: #2c3e50;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
}

.checkout-page .coupon-form p {
    color: #6c757d;
    margin-bottom: 20px;
}

.checkout-page .coupon-input-group {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 20px;
}

.checkout-page .coupon-input-group input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.checkout-page .coupon-input-group input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.checkout-page .coupon-input-group .btn {
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.coupon-eligible-products,
.coupon-ineligible-products {
    margin-top: 20px;
    padding: 20px;
    border-radius: 8px;
    background: #f8f9fa;
}

.coupon-eligible-products h4,
.coupon-ineligible-products h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #2c3e50;
}

.coupon-eligible-products h4 {
    color: #28a745;
}

.coupon-ineligible-products h4 {
    color: #dc3545;
}

.coupon-eligible-products ul,
.coupon-ineligible-products ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.coupon-eligible-products li,
.coupon-ineligible-products li {
    padding: 8px 0;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.text-success {
    color: #28a745;
}

.text-muted {
    color: #6c757d;
}

/* Product Category Display */
.checkout-cart-item .product-name {
    font-size: 14px;
    line-height: 1.4;
}

.checkout-cart-item .product-name strong {
    color: #2c3e50;
    font-weight: 600;
}

.checkout-cart-item .product-name .category {
    color: #6c757d;
    font-weight: 400;
    font-size: 13px;
}

/* WooCommerce Order Review Integration */
#order_review {
    margin-top: 20px;
}

#order_review .woocommerce-checkout-review-order-table {
    margin-bottom: 0;
}

#order_review .wc_payment_methods {
    margin-top: 20px;
}

#order_review .payment_box {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin-top: 10px;
}

#order_review .place-order {
    margin-top: 20px;
}

#order_review .place-order .button {
    width: 100%;
    padding: 18px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 700;
    transition: all 0.3s ease;
}

#order_review .place-order .button:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

/* WooCommerce Coupon Form - Always Visible - Enhanced Styling with Theme Colors */
.edmart-coupon-form-wrapper {
    margin: 40px auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #C3DBFF;
    box-shadow: 0 2px 10px rgba(0, 86, 210, 0.08);
    position: relative;
    overflow: hidden;
    max-width: 1200px;
}

.edmart-coupon-form-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #0056D2;
}

.edmart-coupon-form-wrapper .coupon-form-header {
    margin-bottom: 25px;
    text-align: center;
}

.edmart-coupon-form-wrapper .coupon-form-header h4 {
    color: #262D46;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.edmart-coupon-form-wrapper .coupon-form-header p {
    color: #71759C;
    font-size: 15px;
    margin: 0;
    font-weight: 400;
}

/* Coupon Form - Always Visible */
.edmart-coupon-form-wrapper .checkout_coupon {
    display: block !important;
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
}

.edmart-coupon-form-wrapper .checkout_coupon .coupon-form-wrapper {
    display: flex;
    gap: 12px;
    align-items: stretch;
    flex-wrap: wrap;
    background: #F0F6FF;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #C3DBFF;
    box-shadow: inset 0 2px 4px rgba(0, 86, 210, 0.02);
}

.edmart-coupon-form-wrapper .checkout_coupon .form-row-first {
    flex: 1;
    min-width: 280px;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
}

.edmart-coupon-form-wrapper .checkout_coupon .form-row-last {
    margin-bottom: 0;
    display: flex;
    align-items: flex-end;
}

.edmart-coupon-form-wrapper .checkout_coupon input#coupon_code {
    width: 100%;
    padding: 16px 20px;
    border: 1px solid #C3DBFF;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
    color: #262D46;
    box-shadow: 0 1px 3px rgba(0, 86, 210, 0.05);
}

.edmart-coupon-form-wrapper .checkout_coupon input#coupon_code::placeholder {
    color: #71759C;
    font-weight: 400;
}

.edmart-coupon-form-wrapper .checkout_coupon input#coupon_code:focus {
    outline: none;
    border-color: #0056D2;
    box-shadow: 0 0 0 3px rgba(0, 86, 210, 0.15), 0 2px 8px rgba(0, 86, 210, 0.1);
    transform: translateY(-1px);
}

.edmart-coupon-form-wrapper .checkout_coupon .button {
    padding: 16px 32px;
    background: #0056D2;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 86, 210, 0.25);
    min-width: 160px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.edmart-coupon-form-wrapper .checkout_coupon .button:hover {
    background: #0045A8;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 86, 210, 0.35);
}

.edmart-coupon-form-wrapper .checkout_coupon .button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 86, 210, 0.25);
}

/* Hide the default toggle message and ensure form is always visible */
.woocommerce-form-coupon-toggle {
    display: none !important;
}

/* Force coupon form to be visible */
#woocommerce-checkout-form-coupon {
    display: block !important;
    visibility: visible !important;
}

.coupon-form-section h4 {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
}

.coupon-form-section p {
    color: #6c757d;
    margin-bottom: 20px;
    font-size: 14px;
}

.coupon-form-section .woocommerce-coupon-form {
    display: block;
}

.coupon-form-section .coupon-input-wrapper {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.coupon-form-section .coupon-input-wrapper input {
    flex: 1;
    min-width: 250px;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.coupon-form-section .coupon-input-wrapper input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.coupon-form-section .coupon-input-wrapper .btn {
    padding: 12px 25px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.coupon-form-section .coupon-input-wrapper .btn:hover {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

/* WooCommerce Native Coupon Form in Sidebar */
.coupon-section {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.coupon-section .woocommerce-form-coupon {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.coupon-section .coupon-field {
    flex: 1;
    min-width: 200px;
}

.coupon-section .coupon-field label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 14px;
}

.coupon-section .coupon-field input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.coupon-section .coupon-field input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.coupon-section .button {
    padding: 10px 20px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.coupon-section .button:hover {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

/* Show applied coupons and messages - Enhanced Styling */
.edmart-coupon-form-wrapper .woocommerce-info,
.edmart-coupon-form-wrapper .woocommerce-message,
.edmart-coupon-form-wrapper .woocommerce-error {
    padding: 16px 20px;
    margin-top: 20px;
    margin-bottom: 0;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    display: flex !important;
    align-items: center;
    gap: 12px;
    visibility: visible !important;
    position: relative !important;
    left: auto !important;
    height: auto !important;
    overflow: visible !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.edmart-coupon-form-wrapper .woocommerce-info {
    background: #F0F6FF;
    border: 2px solid #C3DBFF;
    color: #262D46;
}

.edmart-coupon-form-wrapper .woocommerce-info::before {
    content: 'ℹ️';
    font-size: 20px;
}

.edmart-coupon-form-wrapper .woocommerce-message {
    background: #F0F6FF;
    border: 2px solid #0056D2;
    color: #262D46;
    font-weight: 600;
    display: none !important;
}

.edmart-coupon-form-wrapper .woocommerce-message::before {
    content: '✓';
    font-size: 20px;
    font-weight: bold;
    background: #0056D2;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.edmart-coupon-form-wrapper .woocommerce-error {
    background: #FFF5F5;
    border: 2px solid #EE651B;
    color: #721c24;
    font-weight: 600;
}

.edmart-coupon-form-wrapper .woocommerce-error::before {
    content: '✕';
    font-size: 18px;
    font-weight: bold;
    background: #EE651B;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Applied Coupon Display in Order Summary - Enhanced Styling with Theme Colors */
.checkout-totals .cart-discount {
    background: #F0F6FF;
    padding: 12px 16px;
    border-radius: 8px;
    margin: 8px 0;
    border: 1px solid #C3DBFF;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideDown 0.3s ease-out;
}

.checkout-totals .cart-discount span:first-child {
    color: #262D46;
    font-weight: 600;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkout-totals .cart-discount span:first-child::before {
    content: '🎟️';
    font-size: 18px;
}

.checkout-totals .cart-discount span:last-child {
    color: #0056D2;
    font-weight: 700;
    font-size: 16px;
}

.edmart-woocommerce-wrapper .wc-block-components-text-input input:focus,
.edmart-woocommerce-wrapper .wc-blocks-components-select__select:focus {
    border-color: #2563eb !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.15) !important;
    outline: none !important;
}


span:not(.fw-semibold) {
    color:#222 ;
}

.woocommerce-checkout {
    background: #fff;
}

.woocommerce form.checkout_coupon {
    border: 0px;
    padding: 0px;
    margin: 0px;
}

tr,h3 {
    color: #262D46;
}

/* ============================================
   LEFT COLUMN - Billing & Payment
   ============================================ */

.edmart-checkout-page {
    padding: 80px 0;
}

/* Coupon Form at Top of Checkout Page - Enhanced Positioning with Header Spacing */
body.woocommerce-checkout .edmart-coupon-form-wrapper {
    max-width: 1200px;
    margin: 0 auto 50px auto;
    padding: 30px;
}

body.woocommerce-checkout .edmart-coupon-form-wrapper:first-of-type {
    margin-top: 0;
}

/* Additional spacing for checkout page to account for fixed navbar */
body.woocommerce-checkout {
    padding-top: 160px;
}

/* Ensure coupon form appears before checkout form */
body.woocommerce-checkout form.checkout {
    margin-top: 0;
}

/* Container wrapper for coupon form at top */
body.woocommerce-checkout > .edmart-coupon-form-wrapper,
body.woocommerce-checkout .woocommerce-checkout > .edmart-coupon-form-wrapper {
    max-width: 1200px;
    margin: 50px auto;
    padding: 0 20px;
}


/* ============================================
   FIX FOR COUPON FORM LAYOUT ISSUE
   ============================================ */

/* Restructure coupon form wrapper to handle error messages properly */
.edmart-coupon-form-wrapper .checkout_coupon {
    display: block !important;
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
}

/* Make the form wrapper a flex container */
.edmart-coupon-form-wrapper .checkout_coupon .coupon-form-wrapper {
    display: flex;
    gap: 12px;
    align-items: flex-start; /* Changed from stretch to flex-start */
    flex-wrap: nowrap; /* Prevent wrapping */
    background: #F0F6FF;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #C3DBFF;
    box-shadow: inset 0 2px 4px rgba(0, 86, 210, 0.02);
}

/* Keep input field flexible but maintain inline layout */
.edmart-coupon-form-wrapper .checkout_coupon .form-row-first {
    flex: 1;
    min-width: 250px;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
}

/* Keep button fixed width and aligned */
.edmart-coupon-form-wrapper .checkout_coupon .form-row-last {
    margin-bottom: 0;
    display: flex;
    align-items: flex-start; /* Align to top */
    flex-shrink: 0; /* Prevent button from shrinking */
}

/* Input field styling */
.edmart-coupon-form-wrapper .checkout_coupon input#coupon_code {
    width: 100%;
    padding: 16px 20px;
    border: 1px solid #C3DBFF;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
    color: #262D46;
    box-shadow: 0 1px 3px rgba(0, 86, 210, 0.05);
    height: 54px; /* Fixed height to match button */
}

/* Button styling with fixed dimensions */
.edmart-coupon-form-wrapper .checkout_coupon .button {
    padding: 16px 32px;
    background: #0056D2;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 86, 210, 0.25);
    min-width: 160px;
    height: 54px; /* Fixed height */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0; /* Prevent button shrinking */
}

/* Error message positioning - place OUTSIDE the flex container */
.edmart-coupon-form-wrapper .woocommerce-error,
.edmart-coupon-form-wrapper .woocommerce-message,
.edmart-coupon-form-wrapper .woocommerce-info {
    padding: 16px 20px;
    margin-top: 15px !important; /* Space from form */
    margin-bottom: 0;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    display: flex !important;
    align-items: center;
    gap: 12px;
    width: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    animation: slideDown 0.3s ease-out;
    position: relative; /* Ensure it doesn't break flex layout */
}

/* Error message specific styling */
.edmart-coupon-form-wrapper .woocommerce-error {
    background: #FFF5F5;
    border: 2px solid #EE651B;
    color: #721c24;
    font-weight: 600;
}

.edmart-coupon-form-wrapper .woocommerce-error::before {
    content: '✕';
    font-size: 18px;
    font-weight: bold;
    background: #EE651B;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Info message styling */
.edmart-coupon-form-wrapper .woocommerce-info {
    background: #F0F6FF;
    border: 2px solid #C3DBFF;
    color: #262D46;
}

.edmart-coupon-form-wrapper .woocommerce-info::before {
    content: 'ℹ️';
    font-size: 20px;
    flex-shrink: 0;
}

/* Success message styling */
.edmart-coupon-form-wrapper .woocommerce-message {
    background: #F0F6FF;
    border: 2px solid #0056D2;
    color: #262D46;
    font-weight: 600;
}

.edmart-coupon-form-wrapper .woocommerce-message::before {
    content: '✓';
    font-size: 20px;
    font-weight: bold;
    background: #0056D2;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Make sure error messages don't interfere with form layout */
.edmart-coupon-form-wrapper .form-row-first .woocommerce-error,
.edmart-coupon-form-wrapper .form-row-first .woocommerce-info {
    position: absolute;
    top: calc(100% + 8px); /* Position below the input */
    left: 0;
    right: 0;
    z-index: 10;
}

/* Adjust form-row-first to be position relative for absolute positioning of errors */
.edmart-coupon-form-wrapper .checkout_coupon .form-row-first {
    position: relative;
}

/* Alternative approach: Keep messages outside the flex container entirely */
.edmart-coupon-form-wrapper > .woocommerce-error,
.edmart-coupon-form-wrapper > .woocommerce-message,
.edmart-coupon-form-wrapper > .woocommerce-info {
    margin-top: 15px !important;
    width: 100%;
}


/* Responsive adjustments for coupon form */
@media (max-width: 768px) {
    body.woocommerce-checkout .edmart-coupon-form-wrapper {
        padding-top: 100px; /* Reduced padding for mobile */
        margin: 20px auto;
        padding-left: 20px;
        padding-right: 20px;
        padding-bottom: 25px;
    }
    
    body.woocommerce-checkout {
        padding-top: 60px; /* Reduced for mobile */
    }
    
    .edmart-coupon-form-wrapper .coupon-form-header h4 {
        font-size: 20px;
    }
    
    .edmart-coupon-form-wrapper .checkout_coupon .coupon-form-wrapper {
        flex-direction: column;
        gap: 15px;
    }
    
    .edmart-coupon-form-wrapper .checkout_coupon .form-row-first,
    .edmart-coupon-form-wrapper .checkout_coupon .form-row-last {
        width: 100%;
    }
    
    .edmart-coupon-form-wrapper .checkout_coupon .button {
        width: 100%;
        min-width: auto;
    }

    .edmart-coupon-form-wrapper .checkout_coupon .coupon-form-wrapper {
        flex-direction: column;
        gap: 15px;
    }
    
    .edmart-coupon-form-wrapper .checkout_coupon .form-row-first,
    .edmart-coupon-form-wrapper .checkout_coupon .form-row-last {
        width: 100%;
    }
    
    .edmart-coupon-form-wrapper .checkout_coupon .button {
        width: 100%;
        min-width: auto;
    }
    
    /* On mobile, error messages should be full width below */
    .edmart-coupon-form-wrapper .form-row-first .woocommerce-error,
    .edmart-coupon-form-wrapper .form-row-first .woocommerce-info {
        position: static;
        margin-top: 10px;
    }
}

.checkout-left-column {
    width: 100%;
}

.billing-section,
.order-section, .order-summary-section, .order-summary {
    background: #F0F6FF;
    padding: 35px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.edmart-checkout-page .divider {
    margin-bottom: 20px;
}

#payment.woocommerce-checkout-payment {
    margin-top: 20px !important;
}

#order_review > table:nth-child(1) thead, #order_review > table:nth-child(1) tbody {
    display: none !important;
    margin-bottom: 20px;
}

.section-title {
    color: #2c3e50;
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 20px;
}

/* Form Fields */
.woocommerce-billing-fields .form-row {
    margin-bottom: 25px;
}

.woocommerce-billing-fields label {
    display: block;
    font-weight: 600;
    font-size: 15px;
    color: #2c3e50;
    margin-bottom: 8px;
}

.woocommerce-billing-fields input,
.woocommerce-billing-fields select,
.woocommerce-billing-fields textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #ffffff;
}

.woocommerce-billing-fields input:focus,
.woocommerce-billing-fields select:focus,
.woocommerce-billing-fields textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.woocommerce-billing-fields .form-row-first,
.woocommerce-billing-fields .form-row-last {
    width: 48%;
}

.woocommerce-billing-fields .form-row-wide {
    width: 100%;
}

.order-summary {
    background: #ffffff;
    border-radius: 12px;
    padding: 30px;
}

.woocommerce-input-wrapper input, .woocommerce-input-wrapperselect, .woocommerce-input-wrapper span, .woocommerce-input-wrapper textarea {
    border: unset !important;
}
.woocommerce-input-wrapper input, .woocommerce-input-wrapper select, .woocommerce-input-wrapper textarea {
    padding: 20px !important;
}

.order-summary h3 {
    color: #2c3e50;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
}

.checkout-cart-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px 0;
    border-bottom: 1px solid #e9ecef;
}

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

.checkout-cart-item .product-info {
    flex: 1;
    padding-right: 20px;
}

.checkout-cart-item .product-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    line-height: 1.5;
}

.checkout-cart-item .product-quantity {
    color: #6c757d;
    font-size: 14px;
}

.checkout-cart-item .product-total {
    font-weight: 700;
    color: #2c3e50;
    font-size: 16px;
}

.checkout-totals {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px solid #e9ecef;
}

.checkout-totals > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    font-size: 15px;
}

.checkout-totals .order-total {
    font-size: 20px;
    font-weight: 700;
    color: #007bff;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
    margin-top: 10px;
}

/* Payment Methods */
.payment-methods {
    margin-top: 25px;
}

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

.wc_payment_methods li {
    margin-bottom: 15px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s ease;
}

.wc_payment_methods li:hover {
    border-color: #007bff;
    background: #ffffff;
}

.wc_payment_methods li.selected {
    border-color: #007bff;
    background: #ffffff;
}

.payment_box {
    background: #ffffff;
    padding: 20px;
    border-radius: 6px;
    margin-top: 15px;
    border: 1px solid #e9ecef;
}

/* Place Order Button */
.place-order {
    margin-top: 30px;
}

.place-order .btn {
    width: 100%;
    padding: 18px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 700;
    transition: all 0.3s ease;
    cursor: pointer;
}

.place-order .btn:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

/* Terms and Conditions */
.woocommerce-terms-and-conditions {
    margin-bottom: 20px;
}

.woocommerce-terms-and-conditions label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: #6c757d;
    line-height: 1.5;
}

.woocommerce-terms-and-conditions input[type="checkbox"] {
    margin-top: 2px;
    width: 18px;
    height: 18px;
}

/* Responsive Styles */
@media (max-width: 991px) {
    .edmart-cart-page,
    .edmart-checkout-page {
        padding: 50px 0;
    }
    
    .cart-item-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .product-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .product-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .product-info {
        width: 100%;
    }
    
    .checkout-sidebar {
        position: relative;
        margin-top: 30px;
    }
    
    .woocommerce-billing-fields .form-row-first,
    .woocommerce-billing-fields .form-row-last {
        width: 100%;
    }
    
    .coupon-input-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .coupon-input-group input {
        margin-bottom: 15px;
    }
}

@media (max-width: 576px) {
    .cart-item {
        padding: 20px 15px;
    }
    
    .billing-section,
    .order-section,
    .order-summary {
        padding: 25px 20px;
    }
    
    .cart-totals {
        padding: 20px;
    }
    
    .cart-title {
        font-size: 28px;
    }
    
    .section-title {
        font-size: 22px;
    }
    
    .product-price,
    .product-subtotal {
        font-size: 16px;
    }
    
    .quantity input {
        width: 80px;
        padding: 8px 10px;
    }
    
    .woocommerce-billing-fields label .required {
        color: #ff0000;
        margin-left: 3px;
    }

    .edmart-coupon-form-wrapper {
        padding: 20px 15px;
    }
    
    .edmart-coupon-form-wrapper .coupon-form-header h4 {
        font-size: 18px;
    }
    
    .edmart-coupon-form-wrapper .checkout_coupon input#coupon_code {
        padding: 14px 16px;
        font-size: 15px;
        height: 50px;
    }
    
    .edmart-coupon-form-wrapper .checkout_coupon .button {
        padding: 14px 24px;
        font-size: 15px;
        height: 50px;
    }


.edmart-checkout-page .container{
    padding: 0 !important;
}

.order-summary-section {
    padding: 0px !important;
}
.order-summary {
    background: 
#F0F6FF;
}

.product-info {
    padding: 0 !important;
}
}

.woocommerce-billing-fields input[type="text"],
.woocommerce-billing-fields input[type="email"],
.woocommerce-billing-fields input[type="tel"],
.woocommerce-billing-fields select,
.woocommerce-billing-fields textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    transition: all 0.3s ease;
}

.woocommerce-billing-fields input:focus,
.woocommerce-billing-fields select:focus,
.woocommerce-billing-fields textarea:focus {
    outline: none;
    border-color: #0078D4;
    box-shadow: 0 0 0 3px rgba(0, 120, 212, 0.1);
}

/* Payment Methods */
.payment-section #payment {
    background: transparent;
    padding: 0;
    border: none;
}

#payment .payment_methods {
    list-style: none;
    margin: 0 0 25px 0;
    padding: 0;
}

#payment .payment_method {
    margin-bottom: 12px;
    padding: 18px 20px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
}

#payment .payment_method:hover,
#payment .payment_method input[type="radio"]:checked + label {
    border-color: #0078D4;
    background: #fff;
}

#payment .payment_method label {
    font-weight: 500;
    font-size: 15px;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
}

#payment .payment_method input[type="radio"] {
    margin: 0;
    width: 18px;
    height: 18px;
}

#payment .payment_box {
    background: transparent;
    padding: 15px 0 0 30px;
    margin: 15px 0 0 0;
    border: none;
}

/* Place Order Button */
#place_order {
    width: 100%;
    padding: 16px 30px;
    background: #0078D4;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

#place_order:hover {
    background: #005a9e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 120, 212, 0.3);
}

/* Terms and Conditions */
.woocommerce-terms-and-conditions-wrapper {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.woocommerce-privacy-policy-text {
    font-size: 13px;
    color: #666;
}

/* ============================================
   RIGHT COLUMN - Order Summary
   ============================================ */

.checkout-right-column {
    width: 100%;
}

.order-summary-sticky {
    position: sticky;
    top: 20px;
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.order-summary-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 25px 0;
    color: #333;
}

/* Order Summary Item */
.order-summary-item {
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.order-summary-item:last-of-type {
    margin-bottom: 25px;
}

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

.item-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex: 1;
}

.item-quantity {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    background: #333;
    color: #fff;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    padding: 0 6px;
}

.item-name {
    font-size: 15px;
    font-weight: 500;
    color: #333;
    margin: 0;
    line-height: 1.5;
    flex: 1;
}

.item-price {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    margin-left: 15px;
}

/* Registration Details */
.registration-details {
    margin-top: 12px;
    padding: 12px;
    background: #fff;
    border-radius: 4px;
    font-size: 13px;
}

.reg-detail-item {
    display: flex;
    gap: 8px;
    margin-bottom: 6px;
    line-height: 1.5;
}

.reg-detail-item:last-child {
    margin-bottom: 0;
}

.reg-label {
    font-weight: 500;
    color: #666;
    min-width: 90px;
}

.reg-value {
    color: #333;
}

/* Registration cards inside checkout order summary */
.checkout-cart-item .product-name .registration-card {
    margin-top: 16px;
    padding: 16px 18px;
    border-radius: 10px;
    border: 1px solid #dde4ff;
    background: #f5f7ff;
}

.checkout-cart-item .product-name .registration-card + .registration-card {
    margin-top: 12px;
}

.checkout-cart-item .product-name .registration-card-title {
    font-weight: 700;
    color: #1f3a93;
    margin-bottom: 8px;
    display: block;
}

.checkout-cart-item .product-name .registration-card dt {
    margin-top: 6px;
    font-weight: 600;
    color: #444;
}

.checkout-cart-item .product-name .registration-card dd {
    margin: 0 0 6px 0;
    padding-left: 0;
    line-height: 1.5;
}

.checkout-cart-item .product-name .registration-card dd:last-of-type {
    margin-bottom: 0;
}

/* Coupon Section */
.coupon-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.toggle-coupon-btn {
    background: none;
    border: none;
    color: #0078D4;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    transition: all 0.3s ease;
}

.toggle-coupon-btn:hover {
    color: #005a9e;
}

.toggle-coupon-btn.active svg {
    transform: rotate(180deg);
}

.toggle-coupon-btn svg {
    transition: transform 0.3s ease;
}

.coupon-form-wrapper {
    margin-top: 15px;
}

.coupon-form {
    display: flex;
    gap: 10px;
}

.coupon-form input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    font-size: 14px;
}

.coupon-form button {
    padding: 10px 20px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.coupon-form button:hover {
    background: #000;
}

/* Order Totals */
.order-summary-totals {
    margin-top: 20px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    font-size: 14px;
}

.total-row .total-label {
    color: #666;
    font-weight: 400;
}

.total-row .total-value {
    color: #333;
    font-weight: 500;
}

.grand-total-row {
    border-top: 2px solid #333;
    padding-top: 20px !important;
    margin-top: 8px;
}

.grand-total-row .total-label,
.grand-total-row .total-value {
    font-size: 20px;
    font-weight: 700;
    color: #333;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1024px) {
    .checkout-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .order-summary-sticky {
        position: static;
        order: -1;
    }
}

@media (max-width: 768px) {
    .edmart-checkout-wrapper {
        padding: 20px 15px;
    }
    
    .checkout-section {
        padding: 20px;
    }
    
    .order-summary-sticky {
        padding: 20px;
    }
    
    .item-header {
        flex-direction: column;
        gap: 8px;
    }
    
    .item-price {
        margin-left: 0;
    }
}
