/*
 * MG Red Line WooCommerce Styles
 * Extracted and optimized styles for WooCommerce pages
 * 
 * @package MG_Red_Line
 * @version 2.0.0
 */

/* === WOOCOMMERCE GENERAL === */
.woocommerce,
.woocommerce-page {
    font-family: var(--font-primary);
}

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

/* Modern Cart Wrapper */
.mgredline-cart-modern {
    background: var(--light-gray);
    min-height: 70vh;
    padding: 40px 0;
}

/* Enhanced Cart Header */
.mgredline-cart-header-modern {
    position: relative;
    text-align: center;
    margin-bottom: 40px;
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.header-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(135deg, var(--dark-color) 0%, var(--primary-color) 100%);
    opacity: 0.05;
}

.header-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
    opacity: 0.1;
    border-radius: 50%;
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.1; }
    50% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.2; }
}

.header-content {
    position: relative;
    z-index: 2;
    padding: 40px 20px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 30px;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
}

.header-visual {
    position: relative;
}

.cart-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), #e74c3c);
    border-radius: 50%;
    color: var(--white);
    font-size: 2rem;
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.3);
}

.icon-pulse {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: iconPulse 2s infinite;
}

@keyframes iconPulse {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.4); opacity: 0; }
}

.header-text {
    text-align: left;
}

.cart-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-color);
    margin: 0 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cart-subtitle {
    color: var(--secondary-color);
    font-size: 1.1rem;
    margin: 0;
    font-weight: 400;
}

.cart-summary-badge {
    background: var(--primary-color);
    color: var(--white);
    padding: 15px 20px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.badge-content {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.items-count {
    font-size: 0.9rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.total-amount {
    font-size: 1.2rem;
    font-weight: 700;
}

/* Progress Bar */
.mgredline-progress-modern {
    margin-bottom: 40px;
    background: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.progress-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.progress-line {
    position: absolute;
    top: 25px;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--medium-gray);
    border-radius: 2px;
    z-index: 1;
}

.progress-line::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 33.33%;
    height: 100%;
    background: var(--primary-color);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.step-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--medium-gray);
    color: var(--secondary-color);
    font-weight: 600;
    transition: var(--transition);
}

.step.active .step-circle {
    background: var(--primary-color);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.step.completed .step-circle {
    background: var(--success-color);
    color: var(--white);
}

.step-label {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--dark-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
}

/* Cart Content */
.mgredline-cart-content-modern {
    display: grid;
    gap: 40px;
}

/* Error/Empty States */
.woocommerce-not-active-modern,
.mgredline-empty-cart-modern {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 60px 40px;
    text-align: center;
    box-shadow: var(--box-shadow);
}

.notice-visual,
.empty-visual {
    margin-bottom: 30px;
    position: relative;
}

.notice-icon,
.empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    font-size: 3rem;
    position: relative;
}

.notice-icon {
    background: linear-gradient(135deg, #ffc107, #ff9800);
    color: var(--white);
}

.empty-icon {
    background: linear-gradient(135deg, var(--medium-gray), var(--light-gray));
    color: var(--secondary-color);
}

.floating-item {
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    opacity: 0.6;
    animation: float 3s ease-in-out infinite;
}

.floating-item.item-1 {
    top: 20%;
    right: 10%;
    animation-delay: 0s;
}

.floating-item.item-2 {
    bottom: 30%;
    left: 15%;
    animation-delay: 1s;
}

.floating-item.item-3 {
    top: 60%;
    right: 20%;
    animation-delay: 2s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.empty-content h3,
.notice-content h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--dark-color);
    margin-bottom: 15px;
}

.empty-suggestions {
    margin: 30px 0;
    text-align: left;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.empty-suggestions h4 {
    font-family: var(--font-heading);
    color: var(--dark-color);
    margin-bottom: 15px;
    text-align: center;
}

.suggestion-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.suggestion-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: var(--light-gray);
    border-radius: var(--border-radius);
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

.suggestion-link:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateX(5px);
}

.empty-actions,
.notice-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

/* Cart with Items */
.mgredline-cart-with-items-modern {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
    align-items: start;
}

/* Cart Items Section */
.cart-items-section-modern {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.section-header {
    padding: 25px 30px;
    background: var(--dark-color);
    color: var(--white);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-header h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.items-badge {
    background: var(--primary-color);
    color: var(--white);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.clear-cart-btn {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: var(--white);
    padding: 8px 15px;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.clear-cart-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* Cart Form */
.woocommerce-cart-form-modern {
    padding: 0;
}

.mgredline-cart-items-container {
    padding: 0;
}

/* Cart Items */
.cart-item-modern {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 20px;
    padding: 25px 30px;
    border-bottom: 1px solid var(--medium-gray);
    transition: var(--transition);
}

.cart-item-modern:hover {
    background: rgba(220, 53, 69, 0.02);
}

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

/* Product Image */
.item-image-modern {
    position: relative;
    overflow: hidden;
}

.image-container {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: var(--border-radius);
    overflow: hidden;
    background: var(--light-gray);
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    opacity: 0;
    transition: var(--transition);
}

.image-container:hover .image-overlay {
    opacity: 1;
}

.image-container:hover img {
    transform: scale(1.1);
}

/* Product Badges */
.product-badges {
    position: absolute;
    top: 5px;
    left: 5px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 2;
}

.badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sale-badge {
    background: var(--primary-color);
    color: var(--white);
}

.featured-badge {
    background: var(--warning-color);
    color: var(--dark-color);
}

/* Item Info */
.item-info-modern {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

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

.product-name {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark-color);
    margin: 0;
    flex: 1;
}

.product-name a {
    color: var(--dark-color);
    text-decoration: none;
    transition: var(--transition);
}

.product-name a:hover {
    color: var(--primary-color);
}

.item-remove-modern {
    flex-shrink: 0;
}

.remove-item-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: rgba(220, 53, 69, 0.1);
    color: var(--primary-color);
    border-radius: 50%;
    text-decoration: none;
    transition: var(--transition);
}

.remove-item-btn:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: scale(1.1);
}

/* Item Meta */
.item-meta {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

/* Item Controls */
.item-controls-modern {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    align-items: center;
}

.item-price,
.item-subtotal {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.price-label,
.subtotal-label {
    font-size: 0.8rem;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.price-value,
.subtotal-value {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark-color);
}

/* Quantity Controls */
.quantity-controls {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.quantity-controls label {
    font-size: 0.8rem;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.quantity-wrapper-modern {
    display: flex;
    align-items: center;
    background: var(--light-gray);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.quantity-input-modern {
    border: none;
    background: transparent;
    text-align: center;
    font-weight: 600;
    color: var(--dark-color);
    width: 60px;
    padding: 8px;
}

/* Cart Actions */
.cart-actions-modern {
    padding: 30px;
    background: var(--light-gray);
    border-top: 1px solid var(--medium-gray);
}

.actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

/* Coupon Section */
.coupon-section-modern,
.update-cart-section-modern {
    background: var(--white);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.coupon-header,
.update-header {
    margin-bottom: 20px;
}

.coupon-header h4,
.update-header h4 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--dark-color);
    margin: 0 0 5px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.coupon-subtitle,
.update-subtitle {
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin: 0;
}

.coupon-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.coupon-input-modern {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid var(--medium-gray);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.coupon-input-modern:focus {
    border-color: var(--primary-color);
    outline: none;
}

.coupon-apply-btn,
.update-cart-btn {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 12px 20px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-family: var(--font-heading);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.coupon-apply-btn:hover,
.update-cart-btn:hover {
    background: #c82333;
    transform: translateY(-1px);
}

.coupon-examples {
    font-size: 0.8rem;
    color: var(--secondary-color);
    font-style: italic;
}

/* Cart Totals */
.cart-collaterals-modern {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

/* Continue Shopping */
.continue-shopping-modern {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--box-shadow);
    text-align: center;
    margin-top: 30px;
}

.continue-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.continue-text h4 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--dark-color);
    margin: 0 0 10px 0;
}

.continue-text p {
    color: var(--secondary-color);
    margin: 0;
}

/* === CHECKOUT PAGE STYLES === */

/* Checkout Wrapper */
.mgredline-checkout-modern {
    background: var(--light-gray);
    min-height: 70vh;
    padding: 40px 0;
}

/* Checkout Header */
.mgredline-checkout-header {
    background: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.checkout-logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.checkout-logo i {
    font-size: 2rem;
    color: var(--primary-color);
}

.checkout-logo h1 {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--dark-color);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.security-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--success-color);
    color: var(--white);
    padding: 8px 15px;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    font-weight: 600;
}

/* Progress Steps (reuse from cart) */
.mgredline-progress .progress-line::before {
    width: 66.66%; /* Checkout step */
}

/* Error States */
.error-state,
.empty-state,
.login-required-state {
    background: var(--white);
    padding: 60px 40px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--box-shadow);
}

.error-icon,
.empty-icon,
.login-icon {
    font-size: 4rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

/* Trust Indicators */
.trust-indicators {
    display: flex;
    justify-content: center;
    gap: 30px;
    background: var(--white);
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
    box-shadow: var(--box-shadow);
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--dark-color);
    font-weight: 600;
    font-size: 0.9rem;
}

.trust-item i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

/* Checkout Grid */
.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
    align-items: start;
}

/* Checkout Sections */
.checkout-section {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: var(--box-shadow);
}

.section-header {
    padding: 25px 30px;
    background: var(--light-gray);
    border-bottom: 1px solid var(--medium-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    font-size: 1.2rem;
}

.section-title h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--dark-color);
    margin: 0 0 5px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section-title p {
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin: 0;
}

.link-button {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
}

.link-button:hover {
    text-decoration: underline;
}

.section-content {
    padding: 30px;
}

/* Order Summary Card */
.order-summary-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    position: sticky;
    top: 100px;
}

.summary-header {
    background: var(--dark-color);
    color: var(--white);
    padding: 25px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.summary-header h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Summary Items */
.summary-items {
    max-height: 300px;
    overflow-y: auto;
    padding: 20px 30px;
}

.summary-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid var(--medium-gray);
}

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

.item-image {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: var(--border-radius);
    overflow: hidden;
    flex-shrink: 0;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.quantity-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
}

.item-details {
    flex: 1;
}

.item-details h4 {
    font-size: 1rem;
    color: var(--dark-color);
    margin: 0 0 5px 0;
}

.item-meta {
    color: var(--secondary-color);
    font-size: 0.8rem;
    margin-bottom: 5px;
}

.quantity {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.item-total {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--dark-color);
    align-self: flex-start;
}

/* Summary Totals */
.summary-totals {
    padding: 30px;
    border-top: 1px solid var(--medium-gray);
    background: var(--light-gray);
}

/* Security Notice */
.security-notice {
    background: var(--white);
    border: 2px solid var(--success-color);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-top: 20px;
    display: flex;
    gap: 15px;
    align-items: center;
}

.security-icon {
    color: var(--success-color);
    font-size: 1.5rem;
    flex-shrink: 0;
}

.security-text h4 {
    color: var(--dark-color);
    margin: 0 0 5px 0;
    font-size: 1rem;
}

.security-text p {
    color: var(--secondary-color);
    font-size: 0.9rem;
    margin: 0;
}

/* === WOOCOMMERCE GENERAL STYLES === */

/* Debug Info */
.debug-info {
    background: #e3f2fd;
    padding: 15px;
    margin: 20px 0;
    border: 2px solid #2196f3;
    border-radius: 8px;
    font-family: monospace;
    font-size: 12px;
}

/* === WOOCOMMERCE WRAPPER STYLES === */

.mgredline-woocommerce-wrapper {
    padding: 40px 0;
    background: var(--light-gray);
    min-height: 60vh;
}

.mgredline-page-header {
    text-align: center;
    margin-bottom: 40px;
    background: var(--white);
    padding: 40px 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.mgredline-page-header .page-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--dark-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.mgredline-page-header .page-title i {
    color: var(--primary-color);
    font-size: 2rem;
}

.mgredline-success-header .page-title i {
    color: var(--success-color);
}

.mgredline-page-header .page-subtitle {
    color: var(--secondary-color);
    font-size: 1.1rem;
    margin: 0;
}

/* Breadcrumbs */
.mgredline-breadcrumbs {
    margin-bottom: 30px;
}

.breadcrumb {
    display: flex;
    list-style: none;
    padding: 15px 20px;
    background: var(--white);
    border-radius: var(--border-radius);
    margin: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.breadcrumb-item {
    color: var(--secondary-color);
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb-item:not(:last-child)::after {
    content: ' / ';
    margin: 0 8px;
    color: var(--medium-gray);
}

/* Shop Header */
.mgredline-shop-header {
    background: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 30px;
    text-align: center;
}

.mgredline-shop-header .page-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--dark-color);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.archive-description {
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.mgredline-results-count {
    color: var(--secondary-color);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Shop Controls */
.mgredline-shop-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.mgredline-view-toggle {
    display: flex;
    gap: 5px;
    border: 2px solid var(--medium-gray);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.mgredline-view-toggle button {
    background: var(--white);
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    transition: var(--transition);
    color: var(--secondary-color);
}

.mgredline-view-toggle button.active,
.mgredline-view-toggle button:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* Content Layout */
.mgredline-woocommerce-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    align-items: start;
}

.mgredline-woocommerce-content.full-width {
    grid-template-columns: 1fr;
}

.mgredline-woocommerce-main {
    background: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    min-height: 400px;
}

/* Shop Sidebar */
.mgredline-shop-sidebar {
    background: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.sidebar-widget {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--medium-gray);
}

.sidebar-widget:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.sidebar-widget h3 {
    color: var(--dark-color);
    font-family: var(--font-heading);
    font-size: 1.3rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-widget li {
    margin-bottom: 8px;
}

.sidebar-widget a {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

.sidebar-widget a:hover {
    color: var(--primary-color);
}

/* Search Widget */
.search-wrapper {
    display: flex;
    border: 2px solid var(--medium-gray);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.search-wrapper input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    font-size: 1rem;
    outline: none;
}

.search-wrapper button {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 12px 15px;
    cursor: pointer;
    transition: var(--transition);
}

.search-wrapper button:hover {
    background: #c82333;
}

/* Price Filter */
.mgredline-price-filter .price-inputs {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 15px;
}

.mgredline-price-filter input {
    flex: 1;
    padding: 10px;
    border: 2px solid var(--medium-gray);
    border-radius: var(--border-radius);
    outline: none;
}

.mgredline-price-filter input:focus {
    border-color: var(--primary-color);
}

.clear-filters {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 0.9rem;
    margin-left: 15px;
}

.clear-filters:hover {
    color: var(--primary-color);
}

/* Sidebar Products */
.sidebar-products {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-product {
    display: flex;
    gap: 15px;
    align-items: center;
}

.sidebar-product-image {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
}

.sidebar-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.sidebar-product-details h4 {
    margin: 0 0 5px 0;
    font-size: 0.9rem;
}

.sidebar-product-details h4 a {
    color: var(--dark-color);
    text-decoration: none;
}

.sidebar-product-details h4 a:hover {
    color: var(--primary-color);
}

.sidebar-product-details .price {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.9rem;
}

/* No Products Found */
.mgredline-no-products {
    text-align: center;
    padding: 80px 20px;
    background: var(--white);
    border-radius: var(--border-radius);
    margin: 40px 0;
    box-shadow: var(--box-shadow);
}

.mgredline-no-products i {
    font-size: 4rem;
    color: var(--medium-gray);
    margin-bottom: 20px;
}

.mgredline-no-products h3 {
    color: var(--dark-color);
    margin-bottom: 15px;
}

.mgredline-no-products p {
    color: var(--secondary-color);
    margin-bottom: 30px;
}

/* Fallback */
.woocommerce-fallback {
    text-align: center;
    padding: 60px 20px;
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: var(--border-radius);
    margin: 20px 0;
}

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

/* Tablet */
@media (max-width: 1024px) {
    .mgredline-cart-with-items-modern {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .checkout-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .mgredline-woocommerce-content {
        grid-template-columns: 250px 1fr;
        gap: 30px;
    }
    
    .trust-indicators {
        flex-wrap: wrap;
        gap: 20px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .mgredline-cart-modern,
    .mgredline-checkout-modern,
    .mgredline-woocommerce-wrapper {
        padding: 20px 0;
    }
    
    .header-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 20px;
    }
    
    .continue-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .actions-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .cart-item-modern {
        grid-template-columns: 80px 1fr;
        gap: 15px;
        padding: 20px 15px;
    }
    
    .item-controls-modern {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .mgredline-woocommerce-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .mgredline-shop-sidebar {
        order: 2;
        position: static;
        max-height: none;
    }
    
    .mgredline-woocommerce-main {
        order: 1;
        padding: 20px 15px;
    }
    
    .mgredline-shop-controls {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }
    
    .trust-indicators {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        text-align: center;
    }
    
    .trust-item {
        flex-direction: column;
        gap: 5px;
    }
    
    .mgredline-page-header {
        padding: 30px 15px;
        margin-bottom: 20px;
    }
    
    .mgredline-page-header .page-title {
        font-size: 2rem;
        flex-direction: column;
        gap: 10px;
    }
    
    .order-summary-card {
        position: static;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .mgredline-page-header .page-title {
        font-size: 1.5rem;
    }
    
    .breadcrumb {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .sidebar-widget {
        margin-bottom: 20px;
        padding-bottom: 20px;
    }
    
    .mgredline-price-filter .price-inputs {
        flex-direction: column;
        align-items: stretch;
    }
    
    .cart-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .cart-title {
        font-size: 2rem;
    }
    
    .trust-indicators {
        grid-template-columns: 1fr;
    }
    
    .coupon-input-group {
        flex-direction: column;
    }
}

/* === ANIMATIONS === */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Apply animations */
.cart-item-modern {
    animation: fadeInUp 0.5s ease-out;
}

.cart-item-modern:nth-child(odd) {
    animation: slideInLeft 0.5s ease-out;
}

.cart-item-modern:nth-child(even) {
    animation: slideInRight 0.5s ease-out;
}

.checkout-section {
    animation: fadeInUp 0.6s ease-out;
}

.order-summary-card {
    animation: slideInRight 0.7s ease-out;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .floating-item {
        animation: none;
    }
    
    .header-glow {
        animation: none;
    }
    
    .icon-pulse {
        animation: none;
    }
}

/*
 * MG Red Line Checkout & Cart Fixes
 * Complete fixes for billing details, progress bar, and responsive design
 * 
 * @package MG_Red_Line
 * @version 2.1.0
 */

/* === BILLING DETAILS FIXES === */

/* Remove duplicate Billing Details heading */
.woocommerce-checkout h3#billing_details_heading {
    display: none !important;
}

/* Fix left margin on billing details */
.checkout-form-section .section-content {
    padding: 30px !important;
}

.customer-details-enhanced {
    margin: 0 !important;
    padding: 0 !important;
}

.billing-section .section-content,
.shipping-section .section-content,
.additional-info-section .section-content {
    padding-left: 30px !important;
    padding-right: 30px !important;
}

/* === PROGRESS BAR UNIVERSAL FIXES === */

/* Ensure progress bar doesn't wrap on mobile */
.mgredline-progress-modern {
    margin-bottom: 40px;
    background: var(--white);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden; /* Prevent wrapping issues */
}

.progress-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
    min-height: 80px; /* Ensure consistent height */
}

.progress-line {
    position: absolute;
    top: 30px;
    left: 10%;
    right: 10%;
    height: 4px;
    background: var(--medium-gray);
    border-radius: 2px;
    z-index: 1;
}

/* Cart page - 33% progress */
.mgredline-cart-modern .progress-line::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 33.33%;
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), #e74c3c);
    border-radius: 2px;
    transition: width 0.5s ease;
}

/* Checkout page - 66% progress */
.mgredline-checkout-enhanced .progress-line::before,
.checkout-progress-enhanced .progress-line::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 66.66%;
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), #e74c3c);
    border-radius: 2px;
    transition: width 0.5s ease;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 2;
    gap: 20px; /* Add gap to prevent cramping */
}

.progress-steps .step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    cursor: default;
    min-width: 80px; /* Ensure minimum width */
    text-align: center;
}

.progress-steps .step.clickable {
    cursor: pointer;
}

.progress-steps .step.clickable:hover {
    transform: translateY(-3px);
}

.progress-steps .step-circle {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--medium-gray);
    color: var(--secondary-color);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.2rem;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    flex-shrink: 0; /* Prevent shrinking */
}

.progress-steps .step.active .step-circle {
    background: var(--primary-color);
    color: var(--white);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
    transform: scale(1.05);
}

.progress-steps .step.completed .step-circle {
    background: var(--success-color);
    color: var(--white);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.progress-steps .step.completed .step-circle span {
    display: none;
}

.progress-steps .step.completed .step-circle::after {
    content: '✓';
    font-size: 1.5rem;
    font-weight: 700;
}

.progress-steps .step-label {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--dark-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 1rem;
    text-align: center;
    white-space: nowrap; /* Prevent text wrapping */
}

/* Clickable step hover effects */
.progress-steps .step.clickable:hover .step-circle {
    background: var(--primary-color);
    color: var(--white);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.3);
}

.progress-steps .step.clickable:hover .step-label {
    color: var(--primary-color);
}

/* === BACK TO CART BUTTON === */
.checkout-navigation {
    margin-bottom: 30px;
}

.back-to-cart-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 12px 25px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition);
    font-size: 0.9rem;
}

.back-to-cart-btn:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

/* === RESPONSIVE FIXES === */

/* Large Tablet */
@media (max-width: 1024px) {
    .checkout-layout-enhanced {
        grid-template-columns: 1fr 350px;
        gap: 30px;
    }
    
    .mgredline-progress-modern {
        padding: 30px 25px;
    }
    
    .billing-section .section-content,
    .shipping-section .section-content,
    .additional-info-section .section-content {
        padding-left: 25px !important;
        padding-right: 25px !important;
    }
}

/* Tablet */
@media (max-width: 768px) {
    .mgredline-progress-modern {
        padding: 25px 20px;
        margin-bottom: 25px;
    }
    
    .progress-steps {
        max-width: 100%;
        gap: 15px;
        justify-content: center;
    }
    
    .progress-steps .step-circle {
        width: 50px;
        height: 50px;
        font-size: 1rem;
    }
    
    .progress-steps .step-label {
        font-size: 0.85rem;
    }
    
    .progress-line {
        top: 25px;
        left: 15%;
        right: 15%;
    }
    
    .checkout-layout-enhanced {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .order-summary-section {
        order: -1;
        position: static;
        max-height: none;
    }
    
    .billing-section .section-content,
    .shipping-section .section-content,
    .additional-info-section .section-content {
        padding: 20px !important;
    }
    
    .section-header {
        padding: 20px;
    }
    
    /* Fix form layout on tablet */
    .woocommerce-checkout .form-row-first,
    .woocommerce-checkout .form-row-last {
        width: 100%;
        float: none;
        margin-bottom: 20px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .mgredline-progress-modern {
        padding: 20px 15px;
    }
    
    /* Stack progress steps vertically on small mobile */
    .progress-steps {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    
    .progress-steps .step {
        flex-direction: row;
        gap: 15px;
        width: 100%;
        max-width: 200px;
        justify-content: center;
    }
    
    .progress-line {
        display: none; /* Hide connecting line on mobile */
    }
    
    .progress-steps .step-circle {
        width: 45px;
        height: 45px;
        font-size: 0.9rem;
    }
    
    .progress-steps .step-label {
        font-size: 0.9rem;
        text-align: left;
        white-space: normal; /* Allow wrapping on very small screens */
    }
    
    .billing-section .section-content,
    .shipping-section .section-content,
    .additional-info-section .section-content {
        padding: 15px !important;
    }
    
    .section-header {
        padding: 15px;
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .section-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
    
    .section-title h3 {
        font-size: 1.2rem;
    }
    
    .checkout-navigation {
        margin-bottom: 20px;
        text-align: center;
    }
    
    .back-to-cart-btn {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }
}

/* === ADDITIONAL CHECKOUT SPECIFIC FIXES === */

/* Remove any duplicate headings */
.woocommerce-checkout .col-1 h3:first-child,
.woocommerce-checkout .col-2 h3:first-child {
    margin-top: 0;
}

/* Ensure proper spacing in checkout sections */
.woocommerce-checkout .col2-set {
    margin-bottom: 0;
}

.woocommerce-checkout .col-1,
.woocommerce-checkout .col-2 {
    width: 100% !important;
    float: none !important;
    margin-bottom: 0;
}

/* Fix any layout issues with WooCommerce default styles */
.woocommerce-checkout .form-row {
    margin-bottom: 20px;
}

.woocommerce-checkout .form-row::after {
    content: "";
    display: table;
    clear: both;
}

/* Enhanced checkout form styling */
.enhanced-checkout-form {
    background: transparent;
}

.enhanced-checkout-form .woocommerce-NoticeGroup {
    margin-bottom: 20px;
}

/* Payment section specific fixes */
.payment-section {
    margin-top: 30px;
}

.payment-section .section-content {
    padding: 30px !important;
}

/* Order review table fixes */
.woocommerce-checkout-review-order table {
    margin-bottom: 0;
}

.woocommerce-checkout-review-order .cart-subtotal,
.woocommerce-checkout-review-order .shipping,
.woocommerce-checkout-review-order .order-total {
    border-bottom: 1px solid var(--medium-gray);
}

.woocommerce-checkout-review-order .order-total {
    border-bottom: none;
    border-top: 2px solid var(--primary-color);
}

/* Payment methods spacing */
.wc_payment_methods {
    margin: 20px 0 30px 0 !important;
}

.wc_payment_method {
    margin-bottom: 10px;
}

.wc_payment_method:last-child {
    margin-bottom: 0;
}

/* Place order button container */
.form-row.place-order {
    margin-top: 30px;
    margin-bottom: 0;
}

/* Privacy policy and terms */
.woocommerce-checkout .woocommerce-terms-and-conditions-wrapper {
    margin: 20px 0;
}

.woocommerce-checkout .woocommerce-privacy-policy-text {
    margin: 15px 0;
    font-size: 0.9rem;
    color: var(--secondary-color);
}

/* === CART SPECIFIC FIXES === */

/* Fix cart layout on different screen sizes */
.mgredline-cart-with-items-modern {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 40px;
    align-items: start;
}

.cart-items-section-modern {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.cart-collaterals-modern {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

/* Cart responsive fixes */
@media (max-width: 1024px) {
    .mgredline-cart-with-items-modern {
        grid-template-columns: 1fr 350px;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .mgredline-cart-with-items-modern {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .cart-collaterals-modern {
        order: 2;
    }
    
    .continue-shopping-modern {
        order: 3;
    }
}

/* === ENHANCED FORM VALIDATION === */

/* Invalid field styling */
.woocommerce-checkout .form-row.woocommerce-invalid input,
.woocommerce-checkout .form-row.woocommerce-invalid select,
.woocommerce-checkout .form-row.woocommerce-invalid textarea {
    border-color: var(--danger-color) !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1) !important;
}

/* Valid field styling */
.woocommerce-checkout .form-row.woocommerce-validated input,
.woocommerce-checkout .form-row.woocommerce-validated select,
.woocommerce-checkout .form-row.woocommerce-validated textarea {
    border-color: var(--success-color) !important;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1) !important;
}

/* Error messages */
.woocommerce-checkout .woocommerce-error,
.woocommerce-checkout .woocommerce-NoticeGroup .woocommerce-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
}

/* Success messages */
.woocommerce-checkout .woocommerce-message,
.woocommerce-checkout .woocommerce-NoticeGroup .woocommerce-message {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
}

/* === ACCESSIBILITY IMPROVEMENTS === */

/* Focus indicators */
.progress-steps .step.clickable:focus {
    outline: 3px solid rgba(220, 53, 69, 0.3);
    outline-offset: 2px;
    border-radius: var(--border-radius);
}

.back-to-cart-btn:focus {
    outline: 3px solid rgba(220, 53, 69, 0.3);
    outline-offset: 2px;
}

/* Screen reader text */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .progress-steps .step-circle {
        border: 2px solid currentColor;
    }
    
    .section-header {
        border-bottom: 2px solid var(--dark-color);
    }
    
    .wc_payment_method {
        border-width: 3px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .progress-steps .step,
    .progress-steps .step-circle,
    .back-to-cart-btn {
        transition: none !important;
    }
    
    .progress-steps .step.clickable:hover {
        transform: none !important;
    }
    
    .back-to-cart-btn:hover {
        transform: none !important;
    }
}

/* === PRINT STYLES === */
@media print {
    .mgredline-progress-modern,
    .checkout-navigation,
    .back-to-cart-btn {
        display: none !important;
    }
    
    .checkout-layout-enhanced {
        grid-template-columns: 1fr !important;
    }
    
    .order-summary-section {
        order: 2 !important;
    }
    
    .checkout-form-section {
        order: 1 !important;
    }
}

/* === LOADING STATES === */
.checkout-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.checkout-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid var(--medium-gray);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 9999;
}

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

/* === FINAL LAYOUT TWEAKS === */

/* Ensure consistent spacing throughout */
.mgredline-checkout-enhanced .container,
.mgredline-cart-modern .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Fix any overflow issues */
.mgredline-checkout-enhanced,
.mgredline-cart-modern {
    overflow-x: hidden;
}

/* Ensure buttons don't get cut off */
.mgredline-btn {
    white-space: nowrap;
    min-width: fit-content;
}

/* Final responsive adjustments */
@media (max-width: 360px) {
    .progress-steps .step-label {
        font-size: 0.8rem;
    }
    
    .progress-steps .step-circle {
        width: 40px;
        height: 40px;
        font-size: 0.85rem;
    }
    
    .mgredline-checkout-enhanced .container,
    .mgredline-cart-modern .container {
        padding: 0 15px;
    }
}

/*
 * Simple Checkout Styles - Clean WooCommerce Layout
 * 
 * @package MG_Red_Line
 * @version 2.1.0
 */

/* === CHECKOUT MAIN WRAPPER === */
.mgredline-checkout-simple {
    background: var(--light-gray);
    min-height: 70vh;
    padding: 40px 0;
    font-family: var(--font-primary);
}

/* === HEADER === */
.checkout-header {
    background: var(--white);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 30px;
    text-align: center;
}

.checkout-header h1 {
    color: var(--dark-color);
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.checkout-header h1 i {
    color: var(--primary-color);
    font-size: 2rem;
}

.checkout-header p {
    color: var(--secondary-color);
    font-size: 1.1rem;
    margin: 0;
}

/* === SIMPLE PROGRESS BAR === */
.checkout-progress {
    background: var(--white);
    padding: 30px 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 30px;
    position: relative;
}

.progress-line {
    position: absolute;
    top: 50%;
    left: 20%;
    right: 20%;
    height: 3px;
    background: var(--medium-gray);
    border-radius: 2px;
    transform: translateY(-50%);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), #e74c3c);
    border-radius: 2px;
    width: 50%; /* Checkout = 50% */
    transition: width 0.5s ease;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 2;
    max-width: 400px;
    margin: 0 auto;
}

.progress-steps .step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    min-width: 60px;
    padding: 5px;
}

.progress-steps .step:hover {
    transform: translateY(-2px);
}

.step-number {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: var(--medium-gray);
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    transition: var(--transition);
}

.step.active .step-number {
    background: var(--primary-color);
    color: var(--white);
    box-shadow: 0 3px 10px rgba(220, 53, 69, 0.3);
}

.step.completed .step-number {
    background: var(--success-color);
    color: var(--white);
    box-shadow: 0 3px 10px rgba(40, 167, 69, 0.3);
}

.step-label {
    font-weight: 600;
    color: var(--dark-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.8rem;
    font-family: var(--font-heading);
    text-align: center;
}

/* === NAVIGATION === */
.checkout-navigation {
    margin-bottom: 30px;
}

.back-to-cart-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 10px 20px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition);
    font-size: 0.9rem;
}

.back-to-cart-btn:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(220, 53, 69, 0.3);
}

/* === CHECKOUT WRAPPER === */
.checkout-wrapper {
    background: var(--white);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

/* === FORM STYLING === */
.woocommerce-checkout h3 {
    color: var(--dark-color);
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--light-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.woocommerce-checkout h3#order_review_heading {
    border-bottom-color: var(--primary-color);
    color: var(--primary-color);
    margin-top: 30px;
}

/* Two Column Layout */
.col2-set {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
}

.col-1, .col-2 {
    width: 100% !important;
    float: none !important;
}

/* Form Fields */
.woocommerce-checkout .form-row {
    margin-bottom: 15px;
}

.woocommerce-checkout .form-row label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 5px;
    display: block;
    font-size: 0.9rem;
}

.woocommerce-checkout .form-row input[type="text"],
.woocommerce-checkout .form-row input[type="email"],
.woocommerce-checkout .form-row input[type="tel"],
.woocommerce-checkout .form-row select,
.woocommerce-checkout .form-row textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--medium-gray);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background: var(--white);
}

.woocommerce-checkout .form-row input:focus,
.woocommerce-checkout .form-row select:focus,
.woocommerce-checkout .form-row textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.1);
}

/* Order Review */
.woocommerce-checkout-review-order {
    background: var(--light-gray);
    padding: 25px;
    border-radius: var(--border-radius);
    border: 1px solid var(--medium-gray);
}

.woocommerce-checkout-review-order table {
    width: 100%;
    border-collapse: collapse;
}

.woocommerce-checkout-review-order th,
.woocommerce-checkout-review-order td {
    padding: 10px 0;
    text-align: left;
    border-bottom: 1px solid var(--medium-gray);
}

.woocommerce-checkout-review-order th {
    font-weight: 600;
    color: var(--dark-color);
    font-family: var(--font-heading);
    font-size: 0.9rem;
}

.woocommerce-checkout-review-order .order-total {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
    border-top: 2px solid var(--primary-color);
}

/* Payment Methods */
.wc_payment_methods {
    list-style: none !important;
    padding: 0 !important;
    margin: 15px 0 !important;
}

.wc_payment_method {
    background: var(--white);
    border: 1px solid var(--medium-gray);
    border-radius: var(--border-radius);
    margin-bottom: 8px;
    transition: border-color 0.3s ease;
}

.wc_payment_method:hover {
    border-color: var(--primary-color);
}

.wc_payment_method label {
    padding: 12px 15px;
    display: block;
    margin: 0;
    cursor: pointer;
    font-weight: 600;
}

.wc_payment_method input[type="radio"]:checked + label {
    background: rgba(220, 53, 69, 0.05);
    color: var(--primary-color);
    border-radius: var(--border-radius);
}

/* Place Order Button */
.woocommerce-checkout .button,
.woocommerce-checkout #place_order {
    background: var(--primary-color) !important;
    color: var(--white) !important;
    padding: 15px 30px !important;
    border-radius: var(--border-radius) !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    font-family: var(--font-heading) !important;
    font-size: 1rem !important;
    width: 100% !important;
}

.woocommerce-checkout .button:hover,
.woocommerce-checkout #place_order:hover {
    background: #c82333 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4) !important;
}

/* === EMPTY STATES === */
.checkout-empty-cart,
.checkout-login-required {
    background: var(--white);
    padding: 60px 40px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--box-shadow);
}

.checkout-empty-cart i,
.checkout-login-required i {
    font-size: 4rem;
    color: var(--medium-gray);
    margin-bottom: 20px;
    display: block;
}

.checkout-empty-cart h3,
.checkout-login-required h3 {
    color: var(--dark-color);
    margin-bottom: 15px;
    font-family: var(--font-heading);
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 768px) {
    .mgredline-checkout-simple {
        padding: 20px 0;
    }
    
    .checkout-header,
    .checkout-wrapper {
        padding: 25px 20px;
    }
    
    .checkout-progress {
        padding: 25px 20px;
    }
    
    .checkout-header h1 {
        font-size: 2rem;
        flex-direction: column;
        gap: 10px;
    }
    
    .col2-set {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .progress-steps {
        max-width: 300px;
    }
    
    .step-number {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }
    
    .step-label {
        font-size: 0.75rem;
    }
    
    .progress-line {
        left: 15%;
        right: 15%;
    }
}

@media (max-width: 480px) {
    .checkout-header,
    .checkout-wrapper {
        padding: 20px 15px;
    }
    
    .checkout-progress {
        padding: 20px 15px;
    }
    
    .checkout-header h1 {
        font-size: 1.8rem;
    }
    
    .progress-steps {
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
    }
    
    .progress-line {
        display: none;
    }
    
    .back-to-cart-btn {
        width: 100%;
        justify-content: center;
        max-width: 250px;
        margin: 0 auto;
        display: flex;
    }
    
    .checkout-navigation {
        text-align: center;
    }
}

/* === CART PROGRESS BAR (for consistency) === */
.mgredline-cart-modern .checkout-progress .progress-fill {
    width: 25%; /* Cart = 25% */
}

/* === COMPLETED ORDER PROGRESS === */
.order-received .checkout-progress .progress-fill {
    width: 100%; /* Complete = 100% */
}

.order-received .step:last-child {
    color: var(--success-color);
}

.order-received .step:last-child .step-number {
    background: var(--success-color);
    color: var(--white);
}

/* === ACCESSIBILITY === */
@media (prefers-reduced-motion: reduce) {
    .progress-steps .step,
    .back-to-cart-btn,
    .step-number {
        transition: none !important;
    }
    
    .progress-steps .step:hover,
    .back-to-cart-btn:hover {
        transform: none !important;
    }
}

.progress-steps .step:focus,
.back-to-cart-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* === PRINT STYLES === */
@media print {
    .checkout-progress,
    .checkout-navigation {
        display: none !important;
    }
    
    .checkout-wrapper {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
}

/*
 * Cart Progress Bar Styles - Consistent with Checkout
 * 
 * @package MG_Red_Line
 * @version 2.1.0
 */

/* === CART SPECIFIC PROGRESS === */
.mgredline-cart-modern .checkout-progress {
    background: var(--white);
    padding: 30px 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 40px;
    position: relative;
}

.mgredline-cart-modern .checkout-progress .progress-fill {
    width: 25%; /* Cart = 25% progress */
}

.mgredline-cart-modern .step.active .step-number {
    background: var(--primary-color);
    color: var(--white);
    box-shadow: 0 3px 10px rgba(220, 53, 69, 0.3);
}

/* Ensure consistent styling across cart and checkout */
.mgredline-cart-modern .progress-line {
    position: absolute;
    top: 50%;
    left: 20%;
    right: 20%;
    height: 3px;
    background: var(--medium-gray);
    border-radius: 2px;
    transform: translateY(-50%);
}

.mgredline-cart-modern .progress-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 2;
    max-width: 400px;
    margin: 0 auto;
}

.mgredline-cart-modern .progress-steps .step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    min-width: 60px;
    padding: 5px;
}

.mgredline-cart-modern .progress-steps .step:hover {
    transform: translateY(-2px);
}

.mgredline-cart-modern .step-number {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: var(--medium-gray);
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    transition: var(--transition);
}

.mgredline-cart-modern .step-label {
    font-weight: 600;
    color: var(--dark-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.8rem;
    font-family: var(--font-heading);
    text-align: center;
}

/* Hover effect for clickable checkout step */
.mgredline-cart-modern .progress-steps a.step:hover .step-number {
    background: var(--primary-color);
    color: var(--white);
    box-shadow: 0 3px 10px rgba(220, 53, 69, 0.2);
}

.mgredline-cart-modern .progress-steps a.step:hover .step-label {
    color: var(--primary-color);
}

/* Mobile responsiveness for cart progress */
@media (max-width: 768px) {
    .mgredline-cart-modern .checkout-progress {
        padding: 25px 20px;
        margin-bottom: 25px;
    }
    
    .mgredline-cart-modern .progress-steps {
        max-width: 300px;
    }
    
    .mgredline-cart-modern .step-number {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }
    
    .mgredline-cart-modern .step-label {
        font-size: 0.75rem;
    }
    
    .mgredline-cart-modern .progress-line {
        left: 15%;
        right: 15%;
    }
}

@media (max-width: 480px) {
    .mgredline-cart-modern .checkout-progress {
        padding: 20px 15px;
    }
    
    .mgredline-cart-modern .progress-steps {
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
    }
    
    .mgredline-cart-modern .progress-line {
        display: none;
    }
}

/*
 * Enhanced Checkout & Cart Improvements
 * Professional styling for payment methods, cart sections and responsive layout
 * 
 * @package MG_Red_Line
 * @version 2.2.0
 */

/* === CHECKOUT LAYOUT IMPROVEMENTS === */

/* Expand billing details to full width */
.woocommerce-checkout .col2-set {
    display: block !important;
    width: 100% !important;
}

.woocommerce-checkout .col-1 {
    width: 100% !important;
    float: none !important;
    margin-bottom: 30px !important;
}

.woocommerce-checkout .col-2 {
    display: none !important; /* Hide shipping column since billing takes full width */
}

/* If shipping is needed, show it below billing */
.woocommerce-checkout .col-2.woocommerce-shipping-fields {
    display: block !important;
    width: 100% !important;
    float: none !important;
    margin-top: 20px !important;
}

/* === PROFESSIONAL PAYMENT METHODS STYLING === */

/* Payment methods container */
.wc_payment_methods {
    list-style: none !important;
    padding: 0 !important;
    margin: 25px 0 !important;
    display: grid !important;
    gap: 12px !important;
}

/* Individual payment method */
.wc_payment_method {
    background: var(--white) !important;
    border: 2px solid var(--medium-gray) !important;
    border-radius: var(--border-radius) !important;
    overflow: hidden !important;
    transition: all 0.3s ease !important;
    position: relative !important;
}

.wc_payment_method:hover {
    border-color: var(--primary-color) !important;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.15) !important;
    transform: translateY(-1px) !important;
}

/* Hide default radio button */
.wc_payment_method input[type="radio"] {
    position: absolute !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Payment method label */
.wc_payment_method label {
    display: flex !important;
    align-items: center !important;
    padding: 18px 20px !important;
    margin: 0 !important;
    cursor: pointer !important;
    font-family: var(--font-heading) !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    color: var(--dark-color) !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    min-height: 60px !important;
}

/* Custom radio button */
.wc_payment_method label::before {
    content: '' !important;
    width: 20px !important;
    height: 20px !important;
    border: 2px solid var(--medium-gray) !important;
    border-radius: 50% !important;
    margin-right: 15px !important;
    background: var(--white) !important;
    transition: all 0.3s ease !important;
    flex-shrink: 0 !important;
    position: relative !important;
}

/* Custom radio button - checked state */
.wc_payment_method input[type="radio"]:checked + label::before {
    border-color: var(--primary-color) !important;
    background: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1) !important;
}

/* Inner dot for checked radio */
.wc_payment_method input[type="radio"]:checked + label::after {
    content: '' !important;
    position: absolute !important;
    left: 24px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
    background: var(--white) !important;
}

/* Selected payment method styling */
.wc_payment_method input[type="radio"]:checked + label {
    background: rgba(220, 53, 69, 0.05) !important;
    color: var(--primary-color) !important;
}

.wc_payment_method input[type="radio"]:checked {
    border-color: var(--primary-color) !important;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.2) !important;
}

/* Payment method icons (if any) */
.wc_payment_method label img {
    max-height: 24px !important;
    margin-left: auto !important;
    opacity: 0.7 !important;
    transition: opacity 0.3s ease !important;
}

.wc_payment_method input[type="radio"]:checked + label img {
    opacity: 1 !important;
}

/* Payment method description */
.payment_box {
    padding: 20px !important;
    background: var(--light-gray) !important;
    border-top: 1px solid var(--medium-gray) !important;
    color: var(--secondary-color) !important;
    font-size: 0.95rem !important;
    line-height: 1.5 !important;
}

.payment_box p {
    margin: 0 0 10px 0 !important;
}

.payment_box p:last-child {
    margin: 0 !important;
}

/* === CART IMPROVEMENTS === */

/* Cart items section - new background */
.cart-items-section-modern {
    background: var(--white) !important;
    border: 1px solid var(--medium-gray) !important;
    border-radius: var(--border-radius) !important;
    overflow: hidden !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

/* Cart totals - matching background with distinction */
.cart-collaterals-modern,
.mgredline-cart-totals-enhanced {
    background: var(--white) !important;
    border: 1px solid var(--medium-gray) !important;
    border-radius: var(--border-radius) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    overflow: hidden !important;
}

/* Cart totals internal padding */
.cart-collaterals-modern .cart_totals,
.cart-collaterals-modern .woocommerce-cart-form__contents,
.mgredline-cart-totals-enhanced .cart_totals {
    padding: 25px 30px !important;
    margin: 0 !important;
}

.cart-collaterals-modern h2,
.mgredline-cart-totals-enhanced h2 {
    margin: 0 0 20px 0 !important;
    padding-bottom: 15px !important;
    border-bottom: 2px solid var(--light-gray) !important;
    color: var(--dark-color) !important;
    font-family: var(--font-heading) !important;
    font-size: 1.4rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

/* Cart totals table styling */
.cart-collaterals-modern table,
.mgredline-cart-totals-enhanced table {
    width: 100% !important;
    margin: 0 !important;
}

.cart-collaterals-modern table th,
.cart-collaterals-modern table td,
.mgredline-cart-totals-enhanced table th,
.mgredline-cart-totals-enhanced table td {
    padding: 12px 0 !important;
    border-bottom: 1px solid var(--light-gray) !important;
}

.cart-collaterals-modern table th,
.mgredline-cart-totals-enhanced table th {
    font-family: var(--font-heading) !important;
    font-weight: 600 !important;
    color: var(--dark-color) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    font-size: 0.9rem !important;
}

/* Enhanced "Proceed to Checkout" button */
.cart-collaterals-modern .checkout-button,
.cart-collaterals-modern .wc-proceed-to-checkout .checkout-button,
.mgredline-cart-totals-enhanced .checkout-button,
.wc-proceed-to-checkout a.checkout-button {
    background: linear-gradient(135deg, var(--primary-color), #e74c3c) !important;
    color: var(--white) !important;
    padding: 16px 32px !important;
    border-radius: var(--border-radius) !important;
    font-family: var(--font-heading) !important;
    font-weight: 700 !important;
    font-size: 1.1rem !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    min-width: 200px !important;
    margin-top: 20px !important;
    position: relative !important;
    overflow: hidden !important;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3) !important;
}

.cart-collaterals-modern .checkout-button::before,
.wc-proceed-to-checkout a.checkout-button::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: -100% !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent) !important;
    transition: var(--transition) !important;
}

.cart-collaterals-modern .checkout-button:hover::before,
.wc-proceed-to-checkout a.checkout-button:hover::before {
    left: 100% !important;
}

.cart-collaterals-modern .checkout-button:hover,
.wc-proceed-to-checkout a.checkout-button:hover {
    background: linear-gradient(135deg, #c82333, #dc3545) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4) !important;
}

/* Add icon to checkout button */
.cart-collaterals-modern .checkout-button::after,
.wc-proceed-to-checkout a.checkout-button::after {
    content: '\f061' !important; /* FontAwesome arrow-right */
    font-family: 'Font Awesome 5 Free' !important;
    font-weight: 900 !important;
    margin-left: 8px !important;
    transition: transform 0.3s ease !important;
}

.cart-collaterals-modern .checkout-button:hover::after,
.wc-proceed-to-checkout a.checkout-button:hover::after {
    transform: translateX(3px) !important;
}

/* === REMOVE CLEAR CART BUTTON === */
.clear-cart-btn {
    display: none !important;
}

/* === ENHANCED CART LAYOUT === */
.mgredline-cart-with-items-modern {
    display: grid !important;
    grid-template-columns: 1fr 380px !important;
    gap: 30px !important;
    align-items: start !important;
}

/* Cart actions section improvements */
.cart-actions-modern {
    padding: 25px 30px !important;
    background: var(--light-gray) !important;
    border-top: 1px solid var(--medium-gray) !important;
}

.actions-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 25px !important;
}

.coupon-section-modern,
.update-cart-section-modern {
    background: var(--white) !important;
    padding: 20px !important;
    border-radius: var(--border-radius) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06) !important;
    border: 1px solid rgba(220, 53, 69, 0.1) !important;
}

/* === RESPONSIVE IMPROVEMENTS === */
@media (max-width: 1024px) {
    .mgredline-cart-with-items-modern {
        grid-template-columns: 1fr 320px !important;
        gap: 25px !important;
    }
    
    .cart-collaterals-modern .cart_totals,
    .mgredline-cart-totals-enhanced .cart_totals {
        padding: 20px 25px !important;
    }
}

@media (max-width: 768px) {
    .mgredline-cart-with-items-modern {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    
    .cart-collaterals-modern {
        order: 2 !important;
    }
    
    .continue-shopping-modern {
        order: 3 !important;
    }
    
    .actions-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    
    .cart-collaterals-modern .cart_totals,
    .mgredline-cart-totals-enhanced .cart_totals {
        padding: 20px !important;
    }
    
    .cart-actions-modern {
        padding: 20px !important;
    }
    
    .coupon-section-modern,
    .update-cart-section-modern {
        padding: 18px !important;
    }
    
    /* Payment methods mobile adjustments */
    .wc_payment_method label {
        padding: 15px 18px !important;
        min-height: 50px !important;
    }
    
    .wc_payment_method label::before {
        width: 18px !important;
        height: 18px !important;
        margin-right: 12px !important;
    }
    
    .wc_payment_method input[type="radio"]:checked + label::after {
        left: 22px !important;
        width: 6px !important;
        height: 6px !important;
    }
}

@media (max-width: 480px) {
    .cart-collaterals-modern .cart_totals,
    .mgredline-cart-totals-enhanced .cart_totals {
        padding: 15px !important;
    }
    
    .cart-actions-modern {
        padding: 15px !important;
    }
    
    .coupon-section-modern,
    .update-cart-section-modern {
        padding: 15px !important;
    }
    
    .cart-collaterals-modern .checkout-button,
    .wc-proceed-to-checkout a.checkout-button {
        width: 100% !important;
        min-width: auto !important;
        padding: 14px 20px !important;
        font-size: 1rem !important;
    }
    
    /* Payment methods very small screens */
    .wc_payment_method label {
        padding: 12px 15px !important;
        min-height: 45px !important;
        font-size: 0.9rem !important;
    }
    
    .payment_box {
        padding: 15px !important;
        font-size: 0.9rem !important;
    }
}

/* === CART SECTION HEADERS === */
.section-header {
    padding: 20px 30px !important;
    background: var(--dark-color) !important;
    color: var(--white) !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

.section-header h3 {
    font-family: var(--font-heading) !important;
    font-size: 1.3rem !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: var(--white) !important;
}

.items-badge {
    background: var(--primary-color) !important;
    color: var(--white) !important;
    padding: 4px 10px !important;
    border-radius: 12px !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
}

/* === ACCESSIBILITY IMPROVEMENTS === */
.wc_payment_method:focus-within {
    outline: 2px solid var(--primary-color) !important;
    outline-offset: 2px !important;
}

.wc_payment_method label:focus {
    outline: none !important;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .wc_payment_method {
        border-width: 3px !important;
    }
    
    .wc_payment_method label::before {
        border-width: 3px !important;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .wc_payment_method,
    .wc_payment_method label,
    .cart-collaterals-modern .checkout-button {
        transition: none !important;
    }
    
    .wc_payment_method:hover,
    .cart-collaterals-modern .checkout-button:hover {
        transform: none !important;
    }
}

/*
 * Order Received (Thank You) Page Styles
 * Professional styling for post-checkout success page
 * 
 * @package MG_Red_Line
 * @version 2.2.0
 */

/* === ORDER RECEIVED MAIN WRAPPER === */
.mgredline-order-received {
    background: var(--light-gray);
    min-height: 70vh;
    padding: 40px 0;
    font-family: var(--font-primary);
}

/* === SUCCESS HEADER === */
.order-received-header {
    background: linear-gradient(135deg, var(--success-color), #20c997);
    color: var(--white);
    padding: 50px 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.order-received-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: successGlow 3s ease-in-out infinite;
}

@keyframes successGlow {
    0%, 100% { transform: rotate(0deg) scale(1); opacity: 0.3; }
    50% { transform: rotate(180deg) scale(1.2); opacity: 0.6; }
}

.header-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}

.success-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    backdrop-filter: blur(10px);
}

.success-icon i {
    font-size: 4rem;
    color: var(--white);
    z-index: 2;
    position: relative;
}

.success-pulse {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 3px solid var(--white);
    border-radius: 50%;
    animation: successPulse 2s ease-in-out infinite;
}

@keyframes successPulse {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.4); opacity: 0; }
}

.header-text h1 {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    margin: 0 0 15px 0;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.header-text p {
    font-size: 1.3rem;
    margin: 0;
    opacity: 0.95;
    line-height: 1.5;
    max-width: 600px;
}

/* === COMPLETED PROGRESS BAR === */
.checkout-progress.completed {
    background: var(--white);
    padding: 30px 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 40px;
    position: relative;
}

.checkout-progress.completed .progress-fill {
    width: 100% !important; /* Complete = 100% */
    background: linear-gradient(90deg, var(--success-color), #20c997) !important;
}

.checkout-progress.completed .step.completed .step-number {
    background: var(--success-color) !important;
    color: var(--white) !important;
    box-shadow: 0 3px 10px rgba(40, 167, 69, 0.3) !important;
}

.checkout-progress.completed .step.active.completed .step-number {
    background: var(--success-color) !important;
    transform: scale(1.1) !important;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4) !important;
}

/* === ORDER CONTENT === */
.order-received-content {
    display: grid;
    gap: 30px;
}

/* === ORDER SUMMARY CARD === */
.order-summary-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    border: 1px solid var(--medium-gray);
}

.order-header {
    background: var(--dark-color);
    color: var(--white);
    padding: 25px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-header h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.order-number {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.order-label {
    font-size: 0.9rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.order-value {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    background: var(--white);
    padding: 8px 15px;
    border-radius: 20px;
}

/* === ORDER DETAILS GRID === */
.order-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 30px;
}

.order-info-section,
.order-items-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.order-info-section h3,
.order-items-section h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--dark-color);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--light-gray);
}

.order-info-section h3 i,
.order-items-section h3 i {
    color: var(--primary-color);
    font-size: 1.1rem;
}

/* === ORDER INFO === */
.info-grid {
    display: grid;
    gap: 15px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--light-gray);
}

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

.info-label {
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 0.95rem;
}

.info-value {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--dark-color);
    text-align: right;
}

.info-value.order-total {
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: 700;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.status-processing,
.status-badge.status-pending {
    background: rgba(255, 193, 7, 0.2);
    color: #856404;
}

.status-badge.status-completed {
    background: rgba(40, 167, 69, 0.2);
    color: #155724;
}

.status-badge.status-on-hold {
    background: rgba(108, 117, 125, 0.2);
    color: #495057;
}

/* === ORDER ITEMS === */
.order-items-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.order-item {
    display: flex;
    gap: 15px;
    align-items: center;
    padding: 15px;
    background: var(--light-gray);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.order-item:hover {
    background: rgba(220, 53, 69, 0.05);
    transform: translateY(-1px);
}

.order-item .item-image {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: var(--border-radius);
    overflow: hidden;
    flex-shrink: 0;
}

.order-item .item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.quantity-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(220, 53, 69, 0.4);
}

.order-item .item-details {
    flex: 1;
    min-width: 0;
}

.order-item .item-details h4 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark-color);
    margin: 0 0 5px 0;
    line-height: 1.3;
}

.order-item .item-meta {
    color: var(--secondary-color);
    font-size: 0.85rem;
}

.order-item .item-total {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
    white-space: nowrap;
}

/* === ORDER TOTALS === */
.order-totals-section {
    padding: 30px;
    border-top: 1px solid var(--medium-gray);
    background: rgba(248, 249, 250, 0.5);
}

.order-totals-section h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--dark-color);
    margin: 0 0 20px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary-color);
}

.totals-table {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(233, 236, 239, 0.5);
}

.total-row:last-child {
    border-bottom: none;
}

.total-label {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--dark-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.95rem;
}

.total-value {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--dark-color);
    font-size: 1rem;
}

.grand-total {
    border-top: 2px solid var(--primary-color);
    padding-top: 15px;
    margin-top: 10px;
}

.grand-total .total-label,
.grand-total .total-value {
    color: var(--primary-color);
    font-size: 1.3rem;
    font-weight: 700;
}

/* === CUSTOMER DETAILS === */
.customer-details-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.address-section {
    background: var(--white);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    border: 1px solid var(--medium-gray);
}

.address-section h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark-color);
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--light-gray);
}

.address-section h3 i {
    color: var(--primary-color);
}

.address-content {
    color: var(--text-color);
    line-height: 1.6;
    font-size: 1rem;
}

/* === NEXT STEPS === */
.next-steps-section {
    background: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    border: 1px solid var(--medium-gray);
}

.next-steps-section h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--dark-color);
    margin: 0 0 25px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary-color);
}

.next-steps-section h3 i {
    color: var(--primary-color);
}

.steps-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.step-item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.step-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), #e74c3c);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.step-content h4 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-color);
    margin: 0 0 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.step-content p {
    color: var(--secondary-color);
    margin: 0;
    line-height: 1.5;
    font-size: 0.95rem;
}

/* === ORDER ACTIONS === */
.order-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 40px;
    flex-wrap: wrap;
}

.order-actions .mgredline-btn {
    min-width: 200px;
    justify-content: center;
}

/* === ERROR STATES === */
.order-error {
    background: var(--white);
    padding: 60px 40px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--box-shadow);
    border: 1px solid var(--medium-gray);
}

.order-error i {
    font-size: 4rem;
    color: var(--warning-color);
    margin-bottom: 20px;
    display: block;
}

.order-error h3 {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--dark-color);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.order-error p {
    color: var(--secondary-color);
    font-size: 1.1rem;
    margin-bottom: 30px;
    line-height: 1.6;
}

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

/* Large Tablet */
@media (max-width: 1024px) {
    .order-details-grid {
        gap: 30px;
        padding: 25px;
    }
    
    .steps-list {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .order-actions .mgredline-btn {
        min-width: 180px;
    }
}

/* Tablet */
@media (max-width: 768px) {
    .mgredline-order-received {
        padding: 20px 0;
    }
    
    .order-received-header {
        padding: 40px 25px;
        margin-bottom: 25px;
    }
    
    .header-content {
        gap: 20px;
    }
    
    .success-icon {
        width: 80px;
        height: 80px;
    }
    
    .success-icon i {
        font-size: 3rem;
    }
    
    .header-text h1 {
        font-size: 2.5rem;
    }
    
    .header-text p {
        font-size: 1.1rem;
    }
    
    .checkout-progress.completed {
        padding: 25px 20px;
        margin-bottom: 25px;
    }
    
    .order-header {
        padding: 20px 25px;
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .order-number {
        align-items: center;
    }
    
    .order-details-grid {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 20px;
    }
    
    .customer-details-wrapper {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .address-section,
    .next-steps-section {
        padding: 20px;
    }
    
    .order-actions {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .order-actions .mgredline-btn {
        width: 100%;
        max-width: 300px;
        min-width: auto;
    }
    
    .step-item {
        gap: 12px;
    }
    
    .step-icon {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .order-received-header {
        padding: 30px 20px;
    }
    
    .header-text h1 {
        font-size: 2rem;
    }
    
    .header-text p {
        font-size: 1rem;
    }
    
    .success-icon {
        width: 70px;
        height: 70px;
    }
    
    .success-icon i {
        font-size: 2.5rem;
    }
    
    .checkout-progress.completed {
        padding: 20px 15px;
    }
    
    .order-header {
        padding: 18px 20px;
    }
    
    .order-header h2 {
        font-size: 1.3rem;
        flex-direction: column;
        gap: 8px;
    }
    
    .order-value {
        font-size: 1.1rem;
        padding: 6px 12px;
    }
    
    .order-details-grid {
        padding: 15px;
        gap: 20px;
    }
    
    .order-info-section h3,
    .order-items-section h3,
    .address-section h3,
    .next-steps-section h3 {
        font-size: 1.1rem;
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
    
    .info-item {
        flex-direction: column;
        gap: 5px;
        text-align: center;
        padding: 10px 0;
    }
    
    .info-value {
        text-align: center;
    }
    
    .order-item {
        flex-direction: column;
        text-align: center;
        padding: 12px;
    }
    
    .order-item .item-image {
        align-self: center;
    }
    
    .order-item .item-total {
        font-size: 1.2rem;
    }
    
    .total-row {
        flex-direction: column;
        gap: 5px;
        text-align: center;
        padding: 10px 0;
    }
    
    .address-section,
    .next-steps-section {
        padding: 15px;
    }
    
    .steps-list {
        gap: 15px;
    }
    
    .step-item {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .step-icon {
        align-self: center;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .order-error {
        padding: 40px 20px;
    }
    
    .order-error h3 {
        font-size: 1.5rem;
    }
    
    .order-error i {
        font-size: 3rem;
    }
}

/* === ANIMATIONS === */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Apply animations */
.order-summary-card {
    animation: slideInUp 0.6s ease-out;
}

.customer-details-wrapper {
    animation: slideInUp 0.8s ease-out;
}

.next-steps-section {
    animation: slideInUp 1s ease-out;
}

.order-actions {
    animation: fadeIn 1.2s ease-out;
}

/* === ACCESSIBILITY === */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .success-pulse,
    .successGlow {
        animation: none !important;
    }
    
    .order-item:hover {
        transform: none !important;
    }
}

/* Focus styles */
.order-actions .mgredline-btn:focus {
    outline: 3px solid rgba(220, 53, 69, 0.3);
    outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .order-summary-card,
    .address-section,
    .next-steps-section {
        border: 2px solid var(--dark-color);
    }
    
    .status-badge {
        border: 1px solid currentColor;
    }
    
    .step-icon {
        border: 2px solid var(--white);
    }
}

/* Print styles */
@media print {
    .mgredline-order-received {
        background: white !important;
        color: black !important;
    }
    
    .checkout-progress.completed,
    .order-actions,
    .next-steps-section {
        display: none !important;
    }
    
    .order-received-header {
        background: white !important;
        color: black !important;
        border: 2px solid #ccc !important;
    }
    
    .order-summary-card,
    .address-section {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
        break-inside: avoid;
    }
    
    .success-icon,
    .step-icon {
        background: #ccc !important;
        color: black !important;
    }
}

/*
 * Fix for "What happens next" section visibility
 * Ensures proper stacking and visibility on desktop
 * 
 * @package MG_Red_Line
 * @version 2.2.1
 */

/* === FIX FOR NEXT STEPS SECTION === */

/* Ensure proper stacking context and visibility */
.next-steps-section {
    background: var(--white) !important;
    padding: 30px !important;
    border-radius: var(--border-radius) !important;
    box-shadow: var(--box-shadow) !important;
    border: 1px solid var(--medium-gray) !important;
    position: relative !important;
    z-index: 10 !important; /* Ensure it's above other elements */
    margin: 30px 0 !important;
    overflow: visible !important; /* Prevent content clipping */
    display: block !important; /* Force display */
    opacity: 1 !important; /* Force visibility */
    transform: none !important; /* Remove any transforms that might hide it */
}

/* Fix header visibility */
.next-steps-section h3 {
    font-family: var(--font-heading) !important;
    font-size: 1.4rem !important;
    font-weight: 600 !important;
    color: var(--dark-color) !important;
    margin: 0 0 25px 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    padding-bottom: 15px !important;
    border-bottom: 2px solid var(--primary-color) !important;
    position: relative !important;
    z-index: 11 !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.next-steps-section h3 i {
    color: var(--primary-color) !important;
    font-size: 1.2rem !important;
}

/* Fix steps list visibility */
.steps-list {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
    gap: 25px !important;
    position: relative !important;
    z-index: 11 !important;
    opacity: 1 !important;
    visibility: visible !important;
    margin-top: 0 !important;
}

/* Fix individual step items */
.step-item {
    display: flex !important;
    gap: 15px !important;
    align-items: flex-start !important;
    position: relative !important;
    z-index: 12 !important;
    opacity: 1 !important;
    visibility: visible !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Fix step icons */
.step-icon {
    width: 50px !important;
    height: 50px !important;
    background: linear-gradient(135deg, var(--primary-color), #e74c3c) !important;
    color: var(--white) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.2rem !important;
    flex-shrink: 0 !important;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3) !important;
    position: relative !important;
    z-index: 13 !important;
}

/* Fix step content */
.step-content {
    flex: 1 !important;
    position: relative !important;
    z-index: 12 !important;
}

.step-content h4 {
    font-family: var(--font-heading) !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    color: var(--dark-color) !important;
    margin: 0 0 8px 0 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.step-content p {
    color: var(--secondary-color) !important;
    margin: 0 !important;
    line-height: 1.5 !important;
    font-size: 0.95rem !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* === FIX OVERALL LAYOUT ISSUES === */

/* Ensure order-received-content doesn't have overflow issues */
.order-received-content {
    display: grid !important;
    gap: 30px !important;
    position: relative !important;
    z-index: 5 !important;
    overflow: visible !important;
}

/* Fix order summary card stacking */
.order-summary-card {
    position: relative !important;
    z-index: 6 !important;
    overflow: visible !important;
}

/* Fix customer details wrapper */
.customer-details-wrapper {
    position: relative !important;
    z-index: 7 !important;
    overflow: visible !important;
}

/* Ensure proper spacing and visibility */
.mgredline-order-received {
    position: relative !important;
    overflow-x: hidden !important; /* Only hide horizontal overflow */
    overflow-y: visible !important; /* Allow vertical content to show */
}

/* Desktop specific fixes */
@media (min-width: 769px) {
    .next-steps-section {
        min-height: 300px !important; /* Ensure sufficient height */
        padding: 40px !important;
    }
    
    .steps-list {
        grid-template-columns: repeat(3, 1fr) !important; /* Force 3 columns on desktop */
        gap: 30px !important;
    }
    
    .step-item {
        min-height: 120px !important; /* Ensure sufficient height for content */
    }
}

/* Large desktop fixes */
@media (min-width: 1200px) {
    .next-steps-section {
        padding: 50px !important;
        margin: 40px 0 !important;
    }
    
    .steps-list {
        gap: 40px !important;
    }
}

/* === DEBUGGING HELPER (REMOVE AFTER FIXING) === */
/* Uncomment these lines temporarily to debug visibility issues */
/*
.next-steps-section {
    background: #ff0000 !important;
    border: 5px solid #00ff00 !important;
}

.steps-list {
    background: #0000ff !important;
}

.step-item {
    background: #ffff00 !important;
    border: 2px solid #ff00ff !important;
}
*/

/* === ADDITIONAL SAFETY FIXES === */

/* Remove any transforms that might be hiding content */
.next-steps-section * {
    transform: none !important;
}

/* Ensure no parent container is hiding the content */
.order-received-content > * {
    position: relative !important;
    z-index: auto !important;
}

/* Fix any potential animation issues */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1 !important;
        transform: translateY(0) !important;
    }
}

/* Force final state for next steps */
.next-steps-section {
    animation: none !important; /* Remove animation that might cause issues */
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* === MOBILE SAFETY (keep existing mobile styles) === */
@media (max-width: 768px) {
    .next-steps-section {
        padding: 20px !important;
        margin: 20px 0 !important;
    }
    
    .steps-list {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    
    .step-item {
        min-height: auto !important;
    }
}

/*
 * Critical Fixes for Order Received Page
 * Fix progress bar and Order Summary header visibility
 * 
 * @package MG_Red_Line
 * @version 2.2.2 - CRITICAL FIXES
 */

/* === FIX PROGRESS BAR FOR ORDER RECEIVED === */

/* Order received page - 100% progress */
.mgredline-order-received .checkout-progress.completed .progress-fill {
    width: 100% !important; /* Complete = 100% */
    background: linear-gradient(90deg, var(--success-color), #20c997) !important;
}

/* Ensure all steps are completed and visible */
.mgredline-order-received .checkout-progress.completed .step {
    color: var(--success-color) !important;
}

.mgredline-order-received .checkout-progress.completed .step .step-number {
    background: var(--success-color) !important;
    color: var(--white) !important;
    box-shadow: 0 3px 10px rgba(40, 167, 69, 0.3) !important;
}

.mgredline-order-received .checkout-progress.completed .step.active .step-number {
    background: var(--success-color) !important;
    transform: scale(1.1) !important;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4) !important;
}

.mgredline-order-received .checkout-progress.completed .step .step-label {
    color: var(--success-color) !important;
    font-weight: 700 !important;
}

/* === FIX ORDER SUMMARY HEADER VISIBILITY === */

/* Fix dark text on dark background */
.order-header {
    background: var(--dark-color) !important;
    color: var(--white) !important;
    padding: 25px 30px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

.order-header h2 {
    font-family: var(--font-heading) !important;
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: var(--white) !important; /* Force white text */
}

.order-header h2 i {
    color: var(--white) !important; /* Force white icon */
    font-size: 1.3rem !important;
}

.order-number {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    gap: 5px !important;
}

.order-label {
    font-size: 0.9rem !important;
    opacity: 0.8 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: var(--white) !important; /* Force white text */
}

.order-value {
    font-family: var(--font-heading) !important;
    font-size: 1.3rem !important;
    font-weight: 700 !important;
    color: var(--primary-color) !important;
    background: var(--white) !important;
    padding: 8px 15px !important;
    border-radius: 20px !important;
}

/* === ADDITIONAL HEADER FIXES === */

/* Ensure section headers in order details are visible */
.order-info-section h3,
.order-items-section h3 {
    font-family: var(--font-heading) !important;
    font-size: 1.3rem !important;
    font-weight: 600 !important;
    color: var(--dark-color) !important; /* Dark text on white background */
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    padding-bottom: 15px !important;
    border-bottom: 2px solid var(--light-gray) !important;
}

.order-info-section h3 i,
.order-items-section h3 i {
    color: var(--primary-color) !important;
    font-size: 1.1rem !important;
}

/* Order totals section header */
.order-totals-section h3 {
    font-family: var(--font-heading) !important;
    font-size: 1.3rem !important;
    font-weight: 600 !important;
    color: var(--dark-color) !important; /* Dark text on light background */
    margin: 0 0 20px 0 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    padding-bottom: 15px !important;
    border-bottom: 2px solid var(--primary-color) !important;
}

/* === RESPONSIVE FIXES === */
@media (max-width: 768px) {
    .order-header {
        padding: 20px 25px !important;
        flex-direction: column !important;
        gap: 15px !important;
        text-align: center !important;
    }
    
    .order-header h2 {
        font-size: 1.3rem !important;
        flex-direction: column !important;
        gap: 8px !important;
    }
    
    .order-number {
        align-items: center !important;
    }
    
    .order-value {
        font-size: 1.1rem !important;
        padding: 6px 12px !important;
    }
}

@media (max-width: 480px) {
    .order-header {
        padding: 18px 20px !important;
    }
    
    .order-header h2 {
        font-size: 1.2rem !important;
    }
    
    .order-value {
        font-size: 1rem !important;
        padding: 5px 10px !important;
    }
}

/* === CONTRAST IMPROVEMENTS === */

/* High contrast mode support */
@media (prefers-contrast: high) {
    .order-header {
        background: var(--black) !important;
        color: var(--white) !important;
        border: 2px solid var(--white) !important;
    }
    
    .order-header h2,
    .order-header h2 i,
    .order-label {
        color: var(--white) !important;
    }
    
    .order-value {
        border: 2px solid var(--primary-color) !important;
    }
}

/* === DEBUGGING - TEMPORARY === */
/* Uncomment these lines if you still have visibility issues */
/*
.order-header {
    background: red !important;
    color: yellow !important;
    border: 5px solid blue !important;
}

.order-header h2 {
    color: yellow !important;
}

.checkout-progress.completed .progress-fill {
    background: lime !important;
    width: 100% !important;
}
*/

/* === PRODUCT GRID/TILES STYLES === */

/* Shop Product Grid */
.woocommerce ul.products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.woocommerce ul.products li.product {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    padding: 0;
    margin: 0;
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.woocommerce ul.products li.product:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    border-color: rgba(220, 53, 69, 0.2);
}

/* Product Image Area */
.woocommerce ul.products li.product .product-image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
    height: 220px;
}

.woocommerce ul.products li.product a img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.3s ease;
    border-radius: 12px 12px 0 0;
}

.woocommerce ul.products li.product:hover a img {
    transform: scale(1.05);
}

/* Product Badges */
.mgredline-product-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mgredline-product-badges .badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.mgredline-product-badges .sale-badge {
    background: var(--primary-color);
    color: var(--white);
}

.mgredline-product-badges .featured-badge {
    background: #ffc107;
    color: var(--dark-color);
}

.mgredline-product-badges .out-of-stock-badge {
    background: #6c757d;
    color: var(--white);
}

.mgredline-product-badges .new-badge {
    background: #28a745;
    color: var(--white);
}

/* Product Content Area */
.woocommerce ul.products li.product .product-content {
    padding: 18px;
}

/* Product Title */
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-color);
    margin: 0 0 8px 0;
    line-height: 1.3;
    text-transform: none;
    letter-spacing: 0;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title:hover {
    color: var(--primary-color);
}

/* Product Excerpt */
.mgredline-product-excerpt {
    color: var(--secondary-color);
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 12px;
    min-height: 40px;
}

/* Product Price */
.woocommerce ul.products li.product .price {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.woocommerce ul.products li.product .price del {
    color: var(--secondary-color);
    font-weight: 400;
    margin-right: 8px;
}

.woocommerce ul.products li.product .price ins {
    text-decoration: none;
    color: var(--primary-color);
}

/* Add to Cart Button */
.woocommerce ul.products li.product .button {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    text-align: center;
    text-decoration: none;
    display: block;
}

.woocommerce ul.products li.product .button:hover {
    background: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.woocommerce ul.products li.product .button.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Quick View Button (if present) */
.quick-view-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--dark-color);
    border: none;
    padding: 8px;
    border-radius: 50%;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    transform: scale(0.8);
}

.woocommerce ul.products li.product:hover .quick-view-btn {
    opacity: 1;
    transform: scale(1);
}

.quick-view-btn:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: scale(1.1);
}

/* === SINGLE PRODUCT PAGE STYLES === */

/* Fix container width issue */
.single-product .site-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

.single-product .woocommerce {
    width: 100%;
}

.single-product .woocommerce div.product {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
    margin-bottom: 60px;
    width: 100%;
}

/* Product Images */
.single-product .woocommerce div.product .woocommerce-product-gallery {
    position: relative;
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.single-product .woocommerce div.product .woocommerce-product-gallery .woocommerce-product-gallery__image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
}

/* Product Summary */
.single-product .woocommerce div.product .summary {
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.single-product .product_title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 20px;
    line-height: 1.2;
}

.single-product .woocommerce-product-rating {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.single-product .price {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 25px;
}

.single-product .price del {
    color: var(--secondary-color);
    font-weight: 400;
    margin-right: 15px;
}

.single-product .woocommerce-product-details__short-description {
    color: var(--text-color);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 30px;
}

/* Add to Cart Form */
.single-product .cart {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.single-product .cart .quantity {
    position: relative;
}

.single-product .cart .quantity input {
    width: 80px;
    padding: 12px;
    border: 2px solid var(--medium-gray);
    border-radius: 8px;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
}

.single-product .cart .single_add_to_cart_button {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 200px;
}

.single-product .cart .single_add_to_cart_button:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.3);
}

/* Trust Badges */
.mgredline-trust-badges {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 30px;
    padding: 25px;
    background: var(--light-gray);
    border-radius: 8px;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-color);
}

.trust-badge i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

/* Product Meta */
.single-product .product_meta {
    border-top: 1px solid var(--medium-gray);
    padding-top: 20px;
    margin-top: 20px;
}

.single-product .product_meta > span {
    display: block;
    margin-bottom: 8px;
    color: var(--secondary-color);
    font-size: 0.9rem;
}

/* Product Tabs */
.single-product .woocommerce-tabs {
    margin-top: 60px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.single-product .woocommerce-tabs ul.tabs {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
    background: var(--light-gray);
    border-bottom: none;
}

.single-product .woocommerce-tabs ul.tabs li {
    flex: 1;
    margin: 0;
    border: none;
    background: none;
}

.single-product .woocommerce-tabs ul.tabs li a {
    display: block;
    padding: 20px;
    text-align: center;
    text-decoration: none;
    color: var(--secondary-color);
    font-family: var(--font-heading);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border: none;
    background: none;
}

.single-product .woocommerce-tabs ul.tabs li.active a,
.single-product .woocommerce-tabs ul.tabs li a:hover {
    background: var(--white);
    color: var(--primary-color);
}

.single-product .woocommerce-tabs .panel {
    padding: 40px;
    border: none;
    background: var(--white);
}

/* Related Products */
.single-product .related.products {
    margin-top: 80px;
}

.single-product .related.products h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-color);
    text-align: center;
    margin-bottom: 40px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* === RESPONSIVE STYLES === */

@media (max-width: 1024px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .single-product .woocommerce div.product {
        gap: 40px;
    }
    
    .single-product .product_title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
    }
    
    .woocommerce ul.products li.product .product-image-wrapper {
        height: 200px;
    }
    
    .woocommerce ul.products li.product a img {
        height: 200px;
    }
    
    .single-product .woocommerce div.product {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .single-product .summary {
        padding: 25px;
    }
    
    .single-product .product_title {
        font-size: 1.8rem;
    }
    
    .mgredline-trust-badges {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .single-product .woocommerce-tabs .panel {
        padding: 25px;
    }
}

@media (max-width: 480px) {
    .woocommerce ul.products {
        grid-template-columns: 1fr;
    }
    
    .woocommerce ul.products li.product .product-content {
        padding: 15px;
    }
    
    .single-product .summary {
        padding: 20px;
    }
    
    .single-product .product_title {
        font-size: 1.5rem;
    }
    
    .single-product .cart {
        flex-direction: column;
        align-items: stretch;
    }
    
    .single-product .cart .single_add_to_cart_button {
        min-width: auto;
    }
}