/* Waply Connect Cart and Checkout Styles */

/* Clean Cart Help Section Styling */
.waply-cart-container .empty-cart-help {
    padding: 50px 20px !important;
    text-align: center !important;
    margin: 0 auto !important; /* Center the container horizontally */
    max-width: 600px !important; /* Limit width so it can be centered */
    display: block !important; /* Ensure it's a block element */
    border-top: 1px solid #e2e8f0 !important;
    margin-top: 50px !important;
}

.waply-cart-container .empty-cart-help h4 {
    text-align: center !important;
    margin: 0 0 20px !important;
    color: #1a202c !important;
    font-size: 1.5rem !important;
    font-weight: 600 !important;
}

.waply-cart-container .empty-cart-help p {
    text-align: center !important;
    margin: 0 0 30px auto !important; /* Center the paragraph */
    color: #4a5568 !important;
    font-size: 1.1rem !important;
    line-height: 2.0 !important;
    display: block !important;
}

/* Empty Checkout Styling */
.waply-checkout-empty {
    text-align: center;
    padding: 80px 40px;
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin: 40px 0;
}

.empty-checkout-icon {
    font-size: 4rem;
    margin-bottom: 30px;
    opacity: 0.7;
}

.waply-checkout-empty h3 {
    margin: 0 0 20px;
    color: #1a202c;
    font-size: 1.8rem;
    font-weight: 600;
}

.waply-checkout-empty p {
    margin: 0 0 30px;
    color: #4a5568;
    font-size: 1.1rem;
    line-height: 1.6;
}

.empty-checkout-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Force Full Width Layout for Waply Store Pages */
body.page .waply-cart-container,
body.page .waply-checkout-container,
body.page .waply-thank-you-container {
    max-width: 100% !important;
    width: 100% !important;
}

/* Hide sidebar on Waply store pages */
body.page-template-cart #secondary,
body.page-template-checkout #secondary,
body.page-template-thank-you #secondary,
body.page-id-cart #secondary,
body.page-id-checkout #secondary,
body.page-id-thank-you #secondary,
.waply-cart-container + aside,
.waply-checkout-container + aside,
.waply-thank-you-container + aside,
.waply-cart-container ~ aside,
.waply-checkout-container ~ aside,
.waply-thank-you-container ~ aside {
    display: none !important;
}

/* Force main content to full width when sidebar is hidden */
body.page .waply-cart-container,
body.page .waply-checkout-container,
body.page .waply-thank-you-container {
    margin: 0 auto !important;
    padding: 20px !important;
}

/* Theme-specific full-width overrides */
.site-main:has(.waply-cart-container),
.site-main:has(.waply-checkout-container),
.site-main:has(.waply-thank-you-container),
.content-area:has(.waply-cart-container),
.content-area:has(.waply-checkout-container),
.content-area:has(.waply-thank-you-container) {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
}

/* Body class based full-width styling */
body.waply-full-width-page .site-main,
body.waply-full-width-page .content-area,
body.waply-store-page .site-main,
body.waply-store-page .content-area {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    margin-right: 0 !important;
}

body.waply-full-width-page #secondary,
body.waply-full-width-page .sidebar,
body.waply-store-page #secondary,
body.waply-store-page .sidebar,
body.no-sidebar #secondary,
body.no-sidebar .sidebar {
    display: none !important;
}

/* Container adjustments for full-width */
body.waply-full-width-page .site-content,
body.waply-store-page .site-content,
body.no-sidebar .site-content {
    display: block !important;
    width: 100% !important;
}

/* Popular theme specific overrides */
/* Twenty Twenty-One */
body.waply-store-page.wp-embed-responsive .site-main {
    width: 100% !important;
}

/* Astra Theme */
body.waply-store-page.ast-separate-container .ast-article-post,
body.waply-store-page.ast-separate-container .site-main {
    width: 100% !important;
    max-width: 100% !important;
}

/* GeneratePress */
body.waply-store-page.right-sidebar .content-area,
body.waply-store-page.left-sidebar .content-area {
    width: 100% !important;
    float: none !important;
}

/* OceanWP */
body.waply-store-page #content-wrap .container {
    max-width: 100% !important;
}

body.waply-store-page #primary {
    width: 100% !important;
    float: none !important;
}

/* Enhanced Checkout Container - DEBUG VERSION */
.waply-checkout-container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 30px !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif !important;
}

.waply-checkout-container h2 {
    text-align: center !important;
    font-size: 2.5rem !important;
    font-weight: 700 !important;
    color: #1a202c !important;
    margin: 0 0 40px !important;
    line-height: 1.3 !important;
}

/* Enhanced Page Header and Footer Styles with Better Spacing */
.waply-page-header {
    text-align: center;
    margin-bottom: 50px;
    padding: 40px 30px;
    background: linear-gradient(135deg, #4a6ee4 0%, #6e8efb 100%);
    color: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.waply-page-header h1 {
    margin: 0 0 25px;
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    line-height: 1.3;
}

.waply-page-header p {
    margin: 0;
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

.waply-success-header {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    display: block;
}

.waply-page-footer {
    margin-top: 60px;
    padding: 50px 30px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.waply-security-notice,
.waply-support-info,
.waply-next-steps,
.waply-support-section {
    margin-bottom: 40px;
    text-align: center;
}

.waply-security-notice h3,
.waply-support-info h3,
.waply-next-steps h3,
.waply-support-section h3 {
    margin: 0 0 20px;
    color: #1a202c;
    font-size: 1.4rem;
    font-weight: 600;
    line-height: 1.4;
}

.waply-checkout-benefits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.benefit-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.benefit-item h4 {
    margin: 0 0 8px;
    color: #1a202c;
    font-size: 1.1rem;
    font-weight: 600;
}

.benefit-item p {
    margin: 0;
    color: #4a5568;
    font-size: 1rem;
    line-height: 1.7;
}

.waply-next-steps ol {
    padding-left: 25px;
    line-height: 1.8;
    margin: 20px 0;
}

.waply-next-steps li {
    margin-bottom: 15px;
    color: #4a5568;
    font-size: 1.1rem;
    line-height: 1.7;
}

.waply-return-home {
    display: inline-block;
    margin-top: 15px;
    padding: 12px 24px;
    background: #4a6ee4;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.waply-return-home:hover {
    background: #5a67d8;
    text-decoration: none;
    color: white;
    transform: translateY(-2px);
}

/* Enhanced Empty Cart Styling with Larger Container and Better Line Spacing */
.empty-cart-message {
    text-align: center;
    padding: 100px 60px;
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin: 60px 0;
    line-height: 2.0;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.empty-cart-icon {
    font-size: 5rem;
    margin-bottom: 40px;
    opacity: 0.7;
    display: block;
}

.empty-cart-message h3 {
    margin: 0 0 35px;
    color: #1a202c;
    font-size: 2.2rem;
    font-weight: 600;
    line-height: 1.5;
}

.empty-cart-message p {
    margin: 0 0 50px;
    color: #4a5568;
    font-size: 1.2rem;
    line-height: 2.0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.empty-cart-actions {
    display: flex;
    gap: 25px;
    justify-content: center;
    margin-bottom: 60px;
    flex-wrap: wrap;
}

.waply-btn {
    display: inline-block;
    padding: 20px 40px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    line-height: 1.6;
    min-width: 180px;
    text-align: center;
}

.waply-btn-primary {
    background: #4a6ee4;
    color: white;
}

.waply-btn-primary:hover {
    background: #5a67d8;
    text-decoration: none;
    color: white;
    transform: translateY(-2px);
}

.waply-btn-secondary {
    background: #f7fafc;
    color: #4a5568;
    border: 1px solid #e2e8f0;
}

.waply-btn-secondary:hover {
    background: #edf2f7;
    text-decoration: none;
    color: #2d3748;
}

.empty-cart-help {
    padding-top: 50px;
    border-top: 1px solid #e2e8f0;
    margin-top: 50px;
    width: 100%;
    text-align: center !important;
}

/* FORCE ALL CONTENT IN HELP SECTION TO CENTER */
.empty-cart-help,
.empty-cart-help h4,
.empty-cart-help p,
.empty-cart-help a {
    text-align: center !important;
}

.empty-cart-help h4 {
    margin: 0 0 30px;
    color: #1a202c;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.5;
}

/* Center the support text in empty cart - FORCE CENTER */
.empty-cart-help p,
.empty-cart-message .empty-cart-help p,
.waply-cart-container .empty-cart-help p,
.waply-cart-container .waply-cart-items .empty-cart-message .empty-cart-help p,
div.empty-cart-message div.empty-cart-help p {
    margin: 0 0 30px !important;
    color: #4a5568 !important;
    font-size: 1.1rem !important;
    line-height: 2.0 !important;
    text-align: center !important;
    width: 100% !important;
    display: block !important;
    text-align: center !important; /* Double declaration for emphasis */
}

/* SPECIFIC FIX: Target the exact text content */
.empty-cart-help p:contains("Contact our support team") {
    text-align: center !important;
}

/* ALTERNATIVE: Target all paragraphs in empty-cart-help */
.empty-cart-help {
    text-align: center !important;
}

.empty-cart-help * {
    text-align: center !important;
}

.empty-cart-help a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    margin-top: 25px;
    padding: 18px 35px;
    background: #4a6ee4;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.empty-cart-help a:hover {
    background: #5a67d8;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Main container styles */
.waply-cart-container,
.waply-checkout-container,
.waply-thank-you-container {
    max-width: 900px;
    margin: 2em auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Enhanced Cart Items and Checkout Items */
.cart-item,
.checkout-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 2px solid #e2e8f0;
    padding: 30px;
    margin-bottom: 25px;
    border-radius: 15px;
    background-color: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.checkout-item {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-color: #4a6ee4;
    position: relative;
}

.checkout-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #4a6ee4 0%, #6e8efb 100%);
}

.checkout-item::after {
    content: '✓';
    position: absolute;
    top: 20px;
    right: 25px;
    background: #48bb78;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(72, 187, 120, 0.3);
}

/* Checkout Progress Indicator */
.checkout-progress {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0 40px;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.progress-step {
    display: flex;
    align-items: center;
    color: #4a5568;
    font-weight: 500;
    position: relative;
}

.progress-step.active {
    color: #4a6ee4;
    font-weight: 600;
}

.progress-step.completed {
    color: #48bb78;
}

.progress-step::before {
    content: attr(data-step);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #4a5568;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    font-weight: bold;
    font-size: 14px;
}

.progress-step.active::before {
    background: #4a6ee4;
    color: white;
}

.progress-step.completed::before {
    background: #48bb78;
    color: white;
    content: '✓';
}

.progress-step:not(:last-child)::after {
    content: '';
    width: 60px;
    height: 2px;
    background: #e2e8f0;
    margin: 0 20px;
}

.progress-step.completed:not(:last-child)::after {
    background: #48bb78;
}

/* Styling Tip Container */
.waply-styling-tip {
    background: #f8f9fa;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 30px;
    color: #4a5568;
}

.waply-styling-tip h4 {
    margin: 0 0 10px;
    color: #2d3748;
    font-size: 1rem;
    font-weight: 600;
}

.waply-styling-tip p {
    margin: 0;
    color: #4a5568;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Checkout Security Notice */
.checkout-security-notice {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin: 30px 0;
    text-align: center;
    position: relative;
}

.checkout-security-notice::before {
    content: '🔒';
    font-size: 2rem;
    display: block;
    margin-bottom: 10px;
}

.checkout-security-notice h4 {
    margin: 0 0 10px;
    color: #1a202c;
    font-size: 1.2rem;
    font-weight: 600;
}

.checkout-security-notice p {
    margin: 0;
    color: #4a5568;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Checkout Total Enhancement */
.checkout-total-container {
    background: linear-gradient(135deg, #4a6ee4 0%, #6e8efb 100%);
    color: white;
    padding: 25px;
    border-radius: 12px;
    margin: 30px 0;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.checkout-total-container h3 {
    margin: 0 0 15px;
    font-size: 1.3rem;
    font-weight: 600;
}

.checkout-total-breakdown {
    margin-bottom: 20px;
}

.checkout-total-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 1rem;
}

.checkout-total-line.final {
    border-top: 2px solid rgba(255, 255, 255, 0.3);
    padding-top: 15px;
    margin-top: 15px;
    font-size: 1.2rem;
    font-weight: 700;
}

.cart-item:hover,
.checkout-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
    border-color: #4a6ee4;
}

.cart-item:hover {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.cart-item h3,
.checkout-item h4 {
    margin: 0 0 12px;
    color: #1a202c;
    font-size: 1.3em;
    font-weight: 600;
    line-height: 1.4;
}

.item-details {
    flex: 1;
    padding-right: 20px;
}

.item-price {
    font-weight: 700;
    font-size: 1.4em;
    color: #4a6ee4;
    text-align: right;
    min-width: 100px;
    background: #f7fafc;
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.item-tier {
    color: #4a5568;
    font-size: 0.95em;
    margin: 0;
    padding: 6px 14px;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-radius: 20px;
    display: inline-block;
    font-weight: 500;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.item-actions {
    margin-left: 20px;
    display: flex;
    align-items: center;
}

/* Continue Shopping Button */
.cart-actions {
    margin-top: 30px;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.continue-shopping {
    display: inline-block;
    padding: 12px 24px;
    background: #f7fafc;
    color: #4a5568;
    text-decoration: none;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    font-weight: 500;
    transition: all 0.3s ease;
}

.continue-shopping:hover {
    background: #edf2f7;
    color: #2d3748;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Enhanced Cart and Checkout Totals */
.cart-total,
.waply-checkout-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 30px 0;
    padding: 20px 25px;
    background: linear-gradient(135deg, #4a6ee4 0%, #6e8efb 100%);
    color: white;
    border-radius: 12px;
    border: none;
    font-weight: 700;
    font-size: 1.4em;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    position: relative;
}

.cart-total::before,
.waply-checkout-total::before {
    content: '💰';
    font-size: 1.2em;
    margin-right: 10px;
}

/* Enhanced Checkout Summary - Multiple Selectors */
.waply-checkout-summary,
.waply-checkout-container .waply-checkout-summary {
    margin-bottom: 40px !important;
    padding: 30px !important;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%) !important;
    border-radius: 12px !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08) !important;
}

.waply-checkout-summary h3 {
    margin: 0 0 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #4a6ee4;
    color: #1a202c;
    font-size: 1.5rem;
    font-weight: 600;
    position: relative;
}

.waply-checkout-summary h3::before {
    content: '📋';
    margin-right: 10px;
}

/* Enhanced Checkout Form - Multiple Selectors for Compatibility */
.checkout-form,
.waply-checkout-form,
.waply-checkout-container .waply-checkout-form,
.waply-checkout-container form,
#payment-form {
    margin-top: 50px;
    padding: 40px;
    background: #fff;
    border-radius: 15px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.checkout-form::before,
.waply-checkout-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #4a6ee4 0%, #6e8efb 100%);
}

.checkout-form h3,
.waply-checkout-form h3 {
    margin: 0 0 30px;
    color: #1a202c;
    font-size: 1.8rem;
    font-weight: 600;
    padding-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
    position: relative;
    line-height: 1.4;
}

.checkout-form h3::before,
.waply-checkout-form h3::before {
    content: '🔒';
    margin-right: 12px;
    font-size: 1.2em;
}

.form-row {
    margin-bottom: 30px;
    position: relative;
}

.form-row label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    color: #1a202c;
    font-size: 1.1rem;
    line-height: 1.5;
}

.form-row label::after {
    content: ' *';
    color: #e53e3e;
    font-weight: bold;
}

.form-row input,
.form-row select,
.form-row textarea,
.waply-checkout-container input,
.waply-checkout-container select,
.waply-checkout-container textarea,
#payment-form input,
#payment-form select,
#payment-form textarea {
    width: 100% !important;
    padding: 18px 20px !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 10px !important;
    font-size: 16px !important;
    transition: all 0.3s ease !important;
    background: #f8fafc !important;
    box-sizing: border-box !important;
    font-family: inherit !important;
    line-height: 1.5 !important;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
    outline: none;
    border-color: #4a6ee4;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
    background: #fff;
    transform: translateY(-2px);
}

.form-row input:hover,
.form-row select:hover,
.form-row textarea:hover {
    border-color: #cbd5e0;
    background: #fff;
}

.form-row .description {
    margin-top: 8px;
    font-size: 0.95rem;
    color: #4a5568;
    line-height: 1.6;
    font-style: italic;
}

.form-row .error {
    margin-top: 8px;
    font-size: 0.9rem;
    color: #e53e3e;
    font-weight: 500;
}

.form-row.has-error input,
.form-row.has-error select,
.form-row.has-error textarea {
    border-color: #e53e3e;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

/* Enhanced Stripe Elements */
#card-element,
.StripeElement {
    padding: 18px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    font-size: 16px;
    line-height: 1.5;
}

#card-element:focus,
.StripeElement--focus {
    outline: none;
    border-color: #4a6ee4;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
    background: #fff;
    transform: translateY(-1px);
}

#card-element:hover,
.StripeElement:hover {
    border-color: #cbd5e0;
    background: #fff;
}

#card-errors {
    color: #e53e3e;
    margin-bottom: 20px;
    font-size: 0.95rem;
    min-height: 24px;
    font-weight: 500;
    padding: 8px 12px;
    background: #fed7d7;
    border-radius: 6px;
    border-left: 4px solid #e53e3e;
    display: none;
}

#card-errors.show {
    display: block;
}

/* Buttons */
button.remove-item {
    background: transparent;
    color: #e53e3e;
    border: 1px solid #e53e3e;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.9em;
    position: relative;
}

button.remove-item:hover {
    background: #e53e3e;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(229, 62, 62, 0.3);
}

button.remove-item:active {
    transform: translateY(0);
}

button[type="submit"],
.waply-checkout-container button[type="submit"],
#payment-form button[type="submit"],
.waply-checkout-form button[type="submit"] {
    background: linear-gradient(135deg, #4a6ee4 0%, #6e8efb 100%) !important;
    color: white !important;
    padding: 16px 32px !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    width: 100% !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3) !important;
    position: relative !important;
    overflow: hidden !important;
}

button[type="submit"]:hover,
.waply-checkout-container button[type="submit"]:hover,
#payment-form button[type="submit"]:hover,
.waply-checkout-form button[type="submit"]:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4) !important;
}

button[type="submit"]:active {
    transform: translateY(0);
}

button[type="submit"]:disabled {
    background: #cbd5e0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Empty cart message */
.empty-cart-message {
    text-align: center;
    padding: 30px;
    background: #f9f9f9;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.empty-cart-message h3 {
    margin-top: 0;
    color: #333;
}

.empty-cart-message a {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    background: #0073aa;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.empty-cart-message a:hover {
    background: #005f8b;
}

/* Success message */
.waply-success-message {
    text-align: center;
    padding: 30px;
    background: #d4edda;
    border-radius: 4px;
    border: 1px solid #c3e6cb;
    color: #155724;
    margin-bottom: 20px;
}

.waply-success-message h3 {
    color: #155724;
    margin-top: 0;
}

/* Secure payment info */
.secure-payment {
    text-align: center;
    margin-top: 20px;
    color: #666;
    font-size: 0.9em;
}

.secure-payment .dashicons {
    vertical-align: middle;
    margin-right: 5px;
    color: #0073aa;
}

/* Thank you page styles */
.waply-thank-you-header {
    text-align: center;
    margin-bottom: 30px;
}

.waply-thank-you-header .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: #28a745;
    margin-bottom: 15px;
}

.waply-thank-you-message {
    text-align: center;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 4px;
    margin-bottom: 30px;
}

.waply-thank-you-next-steps,
.waply-thank-you-support {
    margin-bottom: 30px;
    padding: 20px;
    background: #fff;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.waply-thank-you-next-steps h3,
.waply-thank-you-support h3 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

.waply-thank-you-next-steps ol {
    padding-left: 20px;
}

.waply-thank-you-next-steps li {
    margin-bottom: 10px;
}

.waply-thank-you-footer {
    text-align: center;
    margin-top: 30px;
}

.waply-thank-you-footer .button {
    display: inline-block;
    padding: 10px 20px;
    background: #0073aa;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.waply-thank-you-footer .button:hover {
    background: #005f8b;
}

/* Enhanced Responsive Design */
@media screen and (max-width: 768px) {
    .waply-page-header {
        padding: 20px 15px;
        margin-bottom: 30px;
    }

    .waply-page-header h1 {
        font-size: 2rem;
    }

    .waply-page-header p {
        font-size: 1rem;
    }

    /* Responsive empty cart adjustments */
    .empty-cart-message {
        padding: 60px 30px;
        min-height: 500px;
        margin: 30px 0;
    }

    .empty-cart-icon {
        font-size: 4rem;
        margin-bottom: 30px;
    }

    .empty-cart-message h3 {
        font-size: 1.8rem;
        margin-bottom: 25px;
    }

    .empty-cart-message p {
        font-size: 1.1rem;
        margin-bottom: 40px;
        line-height: 1.8;
    }

    .waply-btn {
        padding: 16px 32px;
        font-size: 1.1rem;
        min-width: 160px;
    }

    .empty-cart-help {
        padding-top: 40px;
        margin-top: 40px;
    }

    .empty-cart-help h4 {
        font-size: 1.3rem;
        margin-bottom: 20px;
    }

    .empty-cart-help p {
        font-size: 1rem;
        line-height: 1.8;
    }

    /* Responsive checkout styling */
    .checkout-form,
    .waply-checkout-form {
        padding: 25px 20px;
        margin-top: 30px;
    }

    .checkout-form h3,
    .waply-checkout-form h3 {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }

    .form-row {
        margin-bottom: 25px;
    }

    .form-row input,
    .form-row select,
    .form-row textarea {
        padding: 16px 18px;
        font-size: 16px;
    }

    .checkout-progress {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }

    .progress-step:not(:last-child)::after {
        display: none;
    }

    .checkout-security-notice {
        padding: 15px;
        margin: 20px 0;
    }

    .checkout-total-container {
        padding: 20px;
        margin: 20px 0;
    }

    .checkout-item {
        padding: 20px;
        margin-bottom: 15px;
    }

    .checkout-item::after {
        top: 15px;
        right: 15px;
        width: 24px;
        height: 24px;
        font-size: 14px;
    }

    .waply-checkout-benefits {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .benefit-item {
        padding: 15px;
    }

    .empty-cart-actions {
        flex-direction: column;
        align-items: center;
    }

    .waply-btn {
        width: 100%;
        max-width: 250px;
        text-align: center;
    }

    .waply-cart-container,
    .waply-checkout-container,
    .waply-thank-you-container {
        margin: 1em auto;
        padding: 15px;
    }

    .cart-item,
    .checkout-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .item-price {
        align-self: flex-end;
        font-size: 1.2em;
        margin-top: 10px;
        text-align: left;
    }

    .item-actions {
        margin-left: 0;
        margin-top: 15px;
        align-self: flex-end;
    }
}

@media screen and (max-width: 480px) {
    .waply-page-header h1 {
        font-size: 1.8rem;
    }

    .success-icon {
        font-size: 3rem;
    }

    .empty-cart-icon {
        font-size: 3rem;
    }

    .benefit-icon {
        font-size: 1.5rem;
    }

    .waply-page-footer {
        padding: 30px 15px;
    }
}

/* Checkout Loading and Success Animations */
.checkout-loading {
    text-align: center;
    padding: 50px;
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    margin: 30px 0;
}

.checkout-loading .spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #4a6ee4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 25px;
}

.checkout-loading h3 {
    margin: 0 0 10px;
    color: #1a202c;
    font-size: 1.3rem;
}

.checkout-loading p {
    margin: 0;
    color: #4a5568;
    font-size: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.checkout-success {
    text-align: center;
    padding: 50px;
    background: #fff;
    border-radius: 15px;
    border: 1px solid #e2e8f0;
    margin: 30px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.checkout-success .success-icon {
    font-size: 4rem;
    color: #48bb78;
    margin-bottom: 25px;
    animation: bounce 0.8s ease-in-out;
    display: block;
}

.checkout-success h3 {
    margin: 0 0 15px;
    color: #1a202c;
    font-size: 1.5rem;
    font-weight: 600;
}

.checkout-success p {
    margin: 0;
    color: #4a5568;
    font-size: 1.1rem;
    line-height: 1.6;
}

@keyframes bounce {
    0%, 20%, 60%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-15px);
    }
    80% {
        transform: translateY(-8px);
    }
}

/* Cart Checkout Actions - Center the Proceed to Checkout Button */
.cart-checkout-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
    text-align: center;
}

.cart-checkout-actions .waply-checkout-btn {
    display: inline-block;
    padding: 18px 40px;
    background: linear-gradient(135deg, #4a6ee4 0%, #6e8efb 100%);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    min-width: 250px;
    text-align: center;
}

.cart-checkout-actions .waply-checkout-btn:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #7c3aed 100%);
    text-decoration: none;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.cart-checkout-actions .secure-payment-notice {
    color: #4a5568;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

.cart-checkout-actions .secure-payment-notice .dashicons {
    color: #10b981;
    font-size: 16px;
}