/* Isolated Custom Cart, Checkout & My Account Styling - Explicit Typography & Hover Fixes */

/* 1. Explicitly assign theme typography (Fraunces for headings, Manrope for body text) */
body.woocommerce-cart, 
body.woocommerce-checkout,
body.woocommerce-account,
.nwc-cart-container,
.nwc-item-title,
.nwc-checkout-container,
.nwc-account-container,
.nwc-cart-container *, 
.nwc-checkout-container *,
.nwc-account-container * {
    font-family: 'Manrope', sans-serif !important;
}

/* Headings and prominent titles explicitly using Fraunces */
.nwc-page-title,
.nwc-items-count,
.nwc-coupon-heading,
.nwc-summary-card h3,
.nwc-step-heading,
.nwc-auth-page-title,
body.woocommerce-checkout .nwc-page-title,
.nwc-cart-container h1, .nwc-cart-container h2, .nwc-cart-container h3, .nwc-cart-container h4, .nwc-cart-container h5, .nwc-cart-container h6,
.nwc-checkout-container h1, .nwc-checkout-container h2, .nwc-checkout-container h3, .nwc-checkout-container h4, .nwc-checkout-container h5, .nwc-checkout-container h6,
.nwc-account-container h1, .nwc-account-container h2, .nwc-account-container h3, .nwc-account-container h4, .nwc-account-container h5, .nwc-account-container h6 {
    font-family: 'Fraunces', serif !important;
}

/* 2. Fix link/text hover colors to prevent color change on hover */
.nwc-chk-coupon-toggle a,
.woocommerce-form-coupon-toggle a,
.nwc-returning-customer-notice a,
.woocommerce-form-login__forgot a,
.woocommerce-LostPassword a,
.nwc-forgot-pass-link,
.nwc-item-title:hover,
.woocommerce-form-coupon-toggle a:hover,
.woocommerce-form-coupon-toggle a:focus,
.nwc-chk-coupon-toggle a:hover,
.nwc-chk-coupon-toggle a:focus {
    color: inherit !important;
    text-decoration: none !important;
}

.nwc-chk-coupon-toggle a:hover,
.nwc-chk-coupon-toggle a:focus,
.woocommerce-form-coupon-toggle a:hover,
.woocommerce-form-coupon-toggle a:focus,
.nwc-returning-customer-notice a:hover,
.nwc-returning-customer-notice a:focus,
.woocommerce-form-login__forgot a:hover,
.woocommerce-form-login__forgot a:focus,
.woocommerce-LostPassword a:hover,
.woocommerce-LostPassword a:focus,
.nwc-forgot-pass-link:hover,
.nwc-forgot-pass-link:focus,
.nwc-item-title:hover {
    color: inherit !important;
    text-decoration: none !important;
}

/* 3. Reduced Cart Font Sizes (decreased by 1px across elements) */
body.woocommerce-cart .nwc-page-title,
body.woocommerce-account .nwc-page-title {
    font-size: 26px;
}

body.woocommerce-cart .nwc-items-count {
    font-size: 21px !important;
}

.nwc-item-title {
    font-size: 13px !important;
}

.nwc-item-desc {
    font-size: 10px !important;
}

div.nwc-item-qty-box .nwc-qty-btn {
    font-size: 13px !important;
}

div.nwc-item-qty-box .nwc-qty-btn:hover {
    background-color: #c36;
    color: #c36!important;
    text-decoration: none;
}

div.nwc-item-qty-box .nwc-qty-input {
    font-size: 11px !important;
}

.nwc-item-price-box {
    font-size: 15px !important;
}

.nwc-remove-btn {
    font-size: 10px !important;
}

.nwc-trust-badge-box p {
    font-size: 10px !important;
}

.nwc-coupon-heading {
    font-size: 17px !important;
}

.nwc-summary-card h3 {
    font-size: 17px !important;
}

.nwc-summary-row {
    font-size: 11px !important;
}

.nwc-summary-row.total-row {
    font-size: 15px !important;
}

.nwc-checkout-btn,
button#place_order,
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button {
    font-size: 12px !important;
}

/* Base Body & Layout Rules */
body.woocommerce-cart, 
body.woocommerce-checkout,
body.woocommerce-account {
    background-color: #fcfbf7 !important;
    color: #222222;
}

.nwc-cart-container {
    max-width: 1366px;
    margin: 40px auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.nwc-cart-layout-grid {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.nwc-cart-main-col {
    flex: 1;
}

.nwc-cart-sidebar-col {
    width: 380px;
    flex-shrink: 0;
    position: sticky;
    top: 30px;
}

.nwc-items-list-card {
    background: #ffffff;
    border: 1px solid #eaeaea;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.nwc-cart-row-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eaeaea;
}

.nwc-cart-row-item:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.nwc-item-thumb img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #eee;
    display: block;
}

.nwc-item-info {
    flex: 1;
}

.nwc-item-title {
    font-weight: 700;
    color: #1a1a1a;
    text-decoration: none;
    display: block;
    margin-bottom: 4px;
}

div.nwc-item-qty-box .nwc-qty-wrapper {
    display: inline-flex !important;
    align-items: center !important;
    flex-direction: row !important;
    border: 1px solid #dcdcdc !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    background: #fff !important;
    height: 36px !important;
    width: auto !important;
}

div.nwc-item-qty-box .nwc-qty-btn {
    background: transparent !important;
    border: none !important;
    width: 32px !important;
    height: 36px !important;
    font-weight: bold !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
}

div.nwc-qty-btn:hover {
    background: #f4f6f4 !important;
}

div.nwc-item-qty-box .nwc-qty-input {
    width: 36px !important;
    height: 36px !important;
    border: none !important;
    border-left: 1px solid #dcdcdc !important;
    border-right: 1px solid #dcdcdc !important;
    text-align: center !important;
    font-weight: 600 !important;
    background: #fff !important;
    outline: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
}

.nwc-item-price-col {
    text-align: right;
    min-width: 100px;
}

.nwc-item-price-box {
    font-weight: 700;
    color: #ec7d12;
    margin-bottom: 4px;
}

.nwc-remove-btn {
    color: #e32d64;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}

.nwc-remove-btn:hover {
    text-decoration: underline;
    color: #b5224e;
}

.nwc-trust-badge-box {
    background: #edf7f0;
    border: 1px solid #cce8d5;
    border-radius: 12px;
    padding: 16px 20px;
    margin-top: 24px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.nwc-trust-badge-box p {
    margin: 0;
    color: #1b5e36;
    line-height: 1.5;
    font-weight: 500;
}

.nwc-shield-icon {
    font-size: 22px;
}

.nwc-coupon-section-outer {
    margin-top: 30px;
}

.nwc-coupon-box-wrapper {
    display: flex;
    gap: 12px;
    background: #ffffff;
    border: 1px solid #eaeaea;
    border-radius: 16px;
    padding: 20px 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.nwc-input-text {
    flex: 1;
    height: 46px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 0 16px;
    background: #fafafa;
    color: #1a1a1a;
}

/* Global Button & Submit Fixes */
.nwc-btn-primary,
button.nwc-btn-primary,
input[type="submit"].nwc-btn-primary,
button.woocommerce-form-login__submit,
button.woocommerce-Button,
input.woocommerce-form-login__submit {
    height: 46px !important;
    padding: 0 28px !important;
    background-color: #ec7d12 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    transition: background-color 0.2s, color 0.2s !important;
}

.nwc-btn-primary:hover,
button.nwc-btn-primary:hover,
input[type="submit"].nwc-btn-primary:hover,
button.woocommerce-form-login__submit:hover,
button.woocommerce-Button:hover,
input.woocommerce-form-login__submit:hover {
    background-color: #bd5f08 !important;
    color: #ffffff !important;
}

.nwc-summary-card {
    background: #ffffff;
    border: 1px solid #eaeaea;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.nwc-summary-card h3 {
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 15px;
    margin-bottom: 20px;
    color: #1a1a1a;
    margin-top: 0;
}

.nwc-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    color: #555555;
}

.nwc-summary-row span:last-child {
    font-weight: 600;
    color: #1a1a1a;
}

.nwc-summary-row.total-row {
    border-top: 1px solid #f0f0f0;
    padding-top: 18px;
    margin-top: 15px;
    font-weight: 700;
    color: #ec7d12;
}

.nwc-summary-row.total-row span:last-child {
    color: #ec7d12;
}

.nwc-checkout-btn,
button#place_order,
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button {
    display: block !important;
    text-align: center !important;
    background-color: #ec7d12 !important;
    color: #ffffff !important;
    border-radius: 10px !important;
    padding: 16px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    margin-top: 24px !important;
    letter-spacing: 0.5px !important;
    box-shadow: 0 4px 12px rgba(236, 125, 18, 0.2) !important;
    border: none !important;
    width: 100% !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
    transition: background-color 0.2s, color 0.2s !important;
}

.nwc-checkout-btn:hover,
button#place_order:hover,
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover {
    background-color: #bd5f08 !important;
    color: #ffffff !important;
}

.nwc-checkout-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
    box-sizing: border-box;
}

body.woocommerce-checkout .nwc-page-title {
    font-size: 34px !important;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1a1a1a;
    text-align: center;
}

.nwc-wizard-steps-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border: 1px solid #eaeaea;
    border-radius: 16px;
    padding: 24px 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.nwc-wizard-step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    opacity: 0.45;
    transition: all 0.3s ease;
}

.nwc-wizard-step-item.active, 
.nwc-wizard-step-item.completed {
    opacity: 1;
}

.nwc-step-icon-circle {
    width: 44px;
    height: 44px;
    background: #f4f6f4;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

.nwc-wizard-step-item.active .nwc-step-icon-circle {
    background: #ec7d12;
    border-color: #ec7d12;
    color: #fff;
    box-shadow: 0 0 0 4px rgba(236, 125, 18, 0.12);
}

.nwc-wizard-step-item.completed .nwc-step-icon-circle {
    background: #fff2e5;
    border-color: #ec7d12;
    color: #ec7d12;
}

.nwc-wizard-step-item span {
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #666666;
}

.nwc-wizard-step-item.active span {
    color: #ec7d12;
}

.nwc-step-divider {
    flex: 1;
    height: 2px;
    background: #e0e0e0;
    margin: 0 15px;
    position: relative;
    top: -12px;
}

.nwc-checkout-single-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.nwc-section-card {
    background: #ffffff;
    border: 1px solid #eaeaea;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.nwc-step-header-box {
    margin-bottom: 24px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 14px;
}

.nwc-step-badge {
    display: inline-block;
    text-transform: uppercase;
    font-weight: 700;
    color: #ec7d12;
    background: #fff2e5;
    padding: 4px 10px;
    border-radius: 6px;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.nwc-step-heading {
    margin: 0;
    color: #1a1a1a;
}

.nwc-returning-customer-notice {
    background: #f4f6f4;
    border: 1px solid #dcdcdc;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    color: #333333;
}

.nwc-form-row-2 {
    display: flex;
    gap: 16px;
}

.nwc-form-row-2 .nwc-field-wrap {
    flex: 1;
}

.nwc-field-wrap {
    margin-bottom: 18px;
}

.nwc-field-wrap label {
    display: block;
    font-weight: 600;
    color: #333333;
    margin-bottom: 6px;
}

.nwc-field-wrap label abbr.required {
    color: #e32d64;
    text-decoration: none;
}

.nwc-input, .nwc-select, .nwc-textarea {
    width: 100%;
    height: 46px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 0 16px;
    background: #ffffff;
    box-sizing: border-box;
    color: #1a1a1a;
    transition: border-color 0.2s;
}

.nwc-input:focus, .nwc-select:focus, .nwc-textarea:focus {
    border-color: #ec7d12;
    outline: none;
    box-shadow: 0 0 0 3px rgba(236, 125, 18, 0.08);
}

.nwc-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #333333;
    cursor: pointer;
    font-weight: 500;
}

.nwc-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #ec7d12;
}

.nwc-checkout-products-list {
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.nwc-checkout-product-header {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    color: #1a1a1a;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 10px;
    margin-bottom: 12px;
}

.nwc-checkout-product-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.nwc-chk-prod-info strong {
    color: #333333;
    font-weight: 500;
}

.nwc-chk-prod-price {
    font-weight: 600;
    color: #1a1a1a;
    white-space: nowrap;
}

.nwc-payment-methods-box {
    border: 1px solid #eaeaea;
    border-radius: 10px;
    padding: 16px;
    background: #fafafa;
}

.nwc-payment-option label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1a1a1a;
    font-weight: 600;
    cursor: pointer;
}

.nwc-payment-option input[type="radio"] {
    accent-color: #ec7d12;
}

.nwc-payment-option p {
    margin: 6px 0 0 22px;
    color: #666666;
    line-height: 1.4;
}

/* My Account Container & Auth Card */
.nwc-account-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.nwc-auth-card-box {
    max-width: 520px;
    margin: 0 auto;
    background: #ffffff;
    border: 2px solid #ec7d12;
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.03);
}

.nwc-auth-page-title {
    font-weight: 600;
    text-align: center;
    margin-top: 0;
    margin-bottom: 30px;
    color: #1a1a1a;
}

.nwc-auth-tabs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.nwc-auth-tab-btn {
    background: transparent !important;
    border: none !important;
    border-bottom: 2px solid transparent !important;
    font-weight: 600 !important;
    color: #777777 !important;
    cursor: pointer !important;
    padding: 4px 8px !important;
    box-shadow: none !important;
}

.nwc-auth-tab-btn.active {
    color: #ec7d12 !important;
    border-bottom: 2px solid #ec7d12 !important;
    background: transparent !important;
}

.nwc-auth-line-input {
    width: 100%;
    height: 38px;
    border: none;
    border-bottom: 1px solid #b0b0b0;
    background: transparent;
    color: #1a1a1a;
    outline: none;
    padding: 0;
    box-sizing: border-box;
}

.nwc-auth-line-input:focus {
    border-bottom-color: #ec7d12;
}

.nwc-auth-actions-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 30px;
}

.nwc-auth-submit-btn {
    background-color: #ec7d12 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 4px !important;
    padding: 10px 32px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: background-color 0.2s, color 0.2s !important;
}

.nwc-auth-submit-btn:hover {
    background-color: #bd5f08 !important;
    color: #ffffff !important;
}

/* Logged-in Dashboard Layout */
.nwc-account-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.nwc-account-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: #ffffff;
    border: 1px solid #eaeaea;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.nwc-account-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nwc-account-nav-list li a {
    display: block;
    padding: 12px 16px;
    font-weight: 600;
    color: #333333;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
}

.nwc-account-nav-list li a:hover,
.nwc-account-nav-list li a.active {
    background-color: #fff2e5 !important;
    color: #ec7d12 !important;
}

.nwc-account-content {
    flex: 1;
}

/* Modal Popup Styles */
.nwc-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nwc-modal-box {
    background: #ffffff;
    width: 100%;
    max-width: 600px;
    border-radius: 16px;
    padding: 30px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    max-height: 90vh;
    overflow-y: auto;
    box-sizing: border-box;
}

.nwc-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: transparent;
    border: none;
    color: #777;
    cursor: pointer;
    line-height: 1;
}

.nwc-modal-close:hover {
    color: #1a1a1a;
}

.nwc-prev-step-btn {
    background-color: transparent !important;
    background: transparent !important;
    color: #333333 !important;
    border: 1px solid #dcdcdc !important;
}

.nwc-prev-step-btn:hover {
    background-color: #f4f6f4 !important;
    color: #1a1a1a !important;
}

@media screen and (max-width: 900px) {
    .nwc-wizard-steps-bar {
        padding: 15px 10px;
    }
    .nwc-step-divider {
        top: -8px;
    }
    .nwc-cart-layout-grid,
    .nwc-account-layout {
        flex-direction: column;
    }
    .nwc-cart-sidebar-col,
    .nwc-account-sidebar {
        width: 100%;
        position: static;
    }
    .nwc-cart-row-item {
        flex-wrap: wrap;
    }
    .nwc-item-price-col {
        text-align: left;
    }
    .nwc-form-row-2 {
        flex-direction: column;
        gap: 0;
    }

     body.woocommerce-cart .nwc-page-title, body.woocommerce-account .nwc-page-title {
    font-size: 22px !important;
}
}