/* =========================================================
   ATMS Custom Single Product / Online Fee Payment Page
   Product: Fee Payment
   Theme: Hello Elementor Child
========================================================= */

body.single-product {
    margin: 0;
    background: #f4f7fb;
}

/* Hide default WooCommerce page elements */
.single-product .woocommerce-breadcrumb,
.single-product .woocommerce-tabs,
.single-product .related,
.single-product .upsells,
.single-product #reviews,
.single-product .tabs,
.single-product .woocommerce-Tabs-panel {
    display: none !important;
}

/* Prevent WooCommerce default product layout from breaking custom layout */
.single-product .atms-fee-payment-card,
.single-product .atms-fee-payment-card div,
.single-product .atms-fee-payment-card .summary,
.single-product .atms-fee-payment-card .entry-summary {
    float: none !important;
    clear: none !important;
}

/* Page wrapper */
.atms-product-page {
    background: #f4f7fb;
    min-height: 100vh;
    font-family: inherit;
}

/* =========================================================
   Product Header
========================================================= */

.atms-product-header {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    padding: 22px 0;
}

.atms-product-header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 30px;
}

.atms-product-logo img {
    width: 155px !important;
    max-width: 155px !important;
    height: auto !important;
    display: block;
}

/* =========================================================
   Product Main Layout
========================================================= */

.atms-fee-payment-wrap {
    padding: 60px 24px;
    background: #f4f7fb;
}

.single-product .atms-fee-payment-card {
    width: 100% !important;
    max-width: 1280px !important;
    margin: 0 auto !important;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    display: grid !important;
    grid-template-columns: 58% 42% !important;
    align-items: stretch !important;
}

/* Left Image */
.single-product .atms-fee-payment-image {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 680px !important;
    background: #eef3f8;
}

.single-product .atms-fee-payment-image img {
    width: 100% !important;
    height: 100% !important;
    min-height: 680px !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
}

/* Right Content */
.single-product .atms-fee-payment-content {
    float: none !important;
    clear: none !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    padding: 70px 80px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
    background: #ffffff;
}

.single-product .atms-fee-payment-content > h1 {
    width: 100% !important;
    max-width: 520px !important;
    font-size: 46px !important;
    line-height: 1.12 !important;
    margin: 0 0 18px !important;
    color: #1f2a44 !important;
    font-weight: 800 !important;
    letter-spacing: -0.5px;
}

.single-product .atms-fee-payment-subtitle {
    width: 100% !important;
    max-width: 520px !important;
    font-size: 18px !important;
    line-height: 1.65 !important;
    color: #667085 !important;
    margin: 0 0 36px !important;
}

/* Hide unwanted WooCommerce summary items but keep Tabby + cart */
.single-product .atms-fee-form-box .product_title,
.single-product .atms-fee-form-box .price,
.single-product .atms-fee-form-box .woocommerce-product-details__short-description,
.single-product .atms-fee-form-box .product_meta,
.single-product .atms-fee-form-box .woocommerce-product-rating,
.single-product .atms-fee-form-box .woocommerce-review-link,
.single-product .atms-fee-form-box .stock,
.single-product .atms-fee-form-box .posted_in,
.single-product .atms-fee-form-box .tagged_as {
    display: none !important;
}

/* Form Box */
.single-product .atms-fee-form-box {
    width: 100% !important;
    max-width: 520px !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
}

/* Tabby Widget - visible and aligned */
.single-product .atms-fee-form-box #tabbyPromo,
.single-product .atms-fee-form-box .tabbyPromo,
.single-product .atms-fee-form-box .tabby-promo,
.single-product .atms-fee-form-box .tabby-product-widget,
.single-product .atms-fee-form-box .tabby-installments,
.single-product .atms-fee-form-box [class*="tabby"],
.single-product .atms-fee-form-box [id*="tabby"] {
    width: 100% !important;
    max-width: 520px !important;
    box-sizing: border-box !important;
    margin: 0 0 34px !important;
    border-radius: 12px !important;
    overflow: hidden !important;
}

.single-product .atms-fee-form-box iframe[src*="tabby"] {
    width: 100% !important;
    max-width: 520px !important;
    min-height: 76px !important;
    display: block !important;
    border-radius: 12px !important;
}

/* WooCommerce / Cart Form */
.single-product .atms-fee-form-box form.cart {
    width: 100% !important;
    max-width: 520px !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
}

/* Hide quantity field completely */
.single-product .atms-fee-form-box .quantity {
    display: none !important;
}

/* YITH Name Your Price Form */
.single-product .atms-fee-form-box #ywcnp_form_name_your_price {
    width: 100% !important;
    max-width: 520px !important;
    display: block !important;
    margin: 0 0 26px !important;
    padding: 0 !important;
}

/* Override plugin CSS:
   .ywcnp_amount, .ywcnp_sugg_price { width:40%!important; margin:10px; }
*/
.single-product .atms-fee-form-box .ywcnp_amount,
.single-product .atms-fee-form-box .ywcnp_sugg_price,
.single-product .atms-fee-form-box .ywcnp_suggest_price_single {
    width: 100% !important;
    max-width: 520px !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    display: block !important;
}

.single-product .atms-fee-form-box .ywcnp_suggest_price_single {
    margin-bottom: 0 !important;
}

/* Label */
.single-product .atms-fee-form-box label[for="ywcnp_suggest_price_single"],
.single-product .atms-fee-form-box .ywcnp_suggest_price_single label,
.single-product .atms-fee-form-box label {
    display: inline-block !important;
    font-size: 18px !important;
    line-height: 1.3 !important;
    font-weight: 700 !important;
    color: #1f2a44 !important;
    margin: 0 6px 12px 0 !important;
}

/* Hide currency beside field */
.single-product .atms-fee-form-box .ywcnp_currency,
.single-product .atms-fee-form-box .woocommerce-Price-currencySymbol,
.single-product .atms-fee-form-box .amount {
    display: none !important;
}

/* Actual visible YITH Name Your Price input */
.single-product .atms-fee-form-box #ywcnp_suggest_price_single,
.single-product .atms-fee-form-box input[name="ywcnp_amount"],
.single-product .atms-fee-form-box input.ywcnp_amount,
.single-product .atms-fee-form-box input.ywcnp_sugg_price {
    width: 100% !important;
    max-width: 520px !important;
    height: 58px !important;
    display: block !important;
    clear: both !important;
    border: 1px solid #d8dee8 !important;
    border-radius: 12px !important;
    background-color: #ffffff !important;
    padding: 0 18px !important;
    font-size: 20px !important;
    color: #1f2a44 !important;
    box-shadow: none !important;
    outline: none !important;
    box-sizing: border-box !important;
}

.single-product .atms-fee-form-box #ywcnp_suggest_price_single:focus,
.single-product .atms-fee-form-box input[name="ywcnp_amount"]:focus,
.single-product .atms-fee-form-box input.ywcnp_amount:focus,
.single-product .atms-fee-form-box input.ywcnp_sugg_price:focus {
    border-color: #204b82 !important;
    box-shadow: 0 0 0 3px rgba(32, 75, 130, 0.14) !important;
}

/* Hide hidden YITH/plugin fields */
.single-product .atms-fee-form-box input[type="hidden"] {
    display: none !important;
}

/* Hide helper/minimum/from/free labels */
.single-product .atms-fee-form-box .ywcnp_sugg_label,
.single-product .atms-fee-form-box .ywcnp_min_label,
.single-product .atms-fee-form-box .ywcnp_max_label,
.single-product .atms-fee-form-box .minimum-price,
.single-product .atms-fee-form-box .nyp-minimum-price,
.single-product .atms-fee-form-box .nyp-terms,
.single-product .atms-fee-form-box .nyp-description,
.single-product .atms-fee-form-box .nyp-suggested-price {
    display: none !important;
}

/* Add to Cart Button */
.single-product .atms-fee-form-box .single_add_to_cart_button {
    display: inline-block !important;
    margin: 18px 0 0 0 !important;
    width: 220px !important;
    height: 56px !important;
    line-height: 56px !important;
    border-radius: 12px !important;
    background: #204b82 !important;
    color: #ffffff !important;
    border: 1px solid #204b82 !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    text-align: center !important;
    padding: 0 30px !important;
    box-shadow: none !important;
    transition: 0.2s ease-in-out;
}

.single-product .atms-fee-form-box .single_add_to_cart_button:hover {
    background: #035695 !important;
    border-color: #035695 !important;
    color: #ffffff !important;
}

.single-product .atms-fee-form-box .single_add_to_cart_button.disabled,
.single-product .atms-fee-form-box .single_add_to_cart_button:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
}

/* Product notices */
.single-product .atms-fee-form-box .woocommerce-error,
.single-product .atms-fee-form-box .woocommerce-message,
.single-product .atms-fee-form-box .woocommerce-info {
    width: 100% !important;
    max-width: 520px !important;
    margin: 15px 0 !important;
    border-radius: 10px !important;
}

/* Product Footer */
.atms-product-footer {
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
    padding: 24px;
    text-align: center;
    color: #667085;
    font-size: 14px;
}

.atms-product-footer p {
    margin: 0;
}

/* Product Responsive */
@media (max-width: 1100px) {
    .single-product .atms-fee-payment-card {
        grid-template-columns: 54% 46% !important;
    }

    .single-product .atms-fee-payment-content {
        padding: 55px 45px !important;
    }

    .single-product .atms-fee-payment-content > h1 {
        font-size: 40px !important;
    }
}

@media (max-width: 900px) {
    .atms-fee-payment-wrap {
        padding: 35px 16px;
    }

    .single-product .atms-fee-payment-card {
        grid-template-columns: 1fr !important;
        border-radius: 14px;
    }

    .single-product .atms-fee-payment-image,
    .single-product .atms-fee-payment-image img {
        min-height: auto !important;
        height: auto !important;
    }

    .single-product .atms-fee-payment-content {
        padding: 40px 24px !important;
    }

    .single-product .atms-fee-payment-content > h1 {
        font-size: 34px !important;
    }

    .single-product .atms-fee-payment-subtitle {
        font-size: 16px !important;
    }

    .single-product .atms-fee-form-box,
    .single-product .atms-fee-form-box form.cart,
    .single-product .atms-fee-form-box #ywcnp_form_name_your_price,
    .single-product .atms-fee-form-box .ywcnp_amount,
    .single-product .atms-fee-form-box .ywcnp_sugg_price,
    .single-product .atms-fee-form-box .ywcnp_suggest_price_single,
    .single-product .atms-fee-form-box #ywcnp_suggest_price_single,
    .single-product .atms-fee-form-box input[name="ywcnp_amount"],
    .single-product .atms-fee-form-box input.ywcnp_amount,
    .single-product .atms-fee-form-box input.ywcnp_sugg_price,
    .single-product .atms-fee-form-box #tabbyPromo,
    .single-product .atms-fee-form-box .tabbyPromo,
    .single-product .atms-fee-form-box [class*="tabby"],
    .single-product .atms-fee-form-box [id*="tabby"],
    .single-product .atms-fee-form-box iframe[src*="tabby"] {
        max-width: 100% !important;
    }
}

@media (max-width: 480px) {
    .atms-product-logo img {
        width: 130px !important;
        max-width: 130px !important;
    }

    .single-product .atms-fee-payment-content {
        padding: 32px 18px !important;
    }

    .single-product .atms-fee-payment-content > h1 {
        font-size: 30px !important;
    }

    .single-product .atms-fee-form-box .single_add_to_cart_button {
        width: 100% !important;
    }
}

/* =========================================================
   ATMS WooCommerce Blocks Cart Page
========================================================= */

body.woocommerce-cart {
    margin: 0 !important;
    background: #f4f7fb !important;
}

/* Main page spacing */
.woocommerce-cart .atms-default-page-section {
    padding: 50px 24px !important;
}

/* Page container */
.woocommerce-cart .atms-default-page-container {
    max-width: 1280px !important;
    margin: 0 auto !important;
}

/* Cart title */
.woocommerce-cart .atms-default-page-title {
    font-size: 42px !important;
    line-height: 1.2 !important;
    font-weight: 800 !important;
    color: #1f2a44 !important;
    margin: 0 0 30px !important;
}

/* Cart block wrapper */
.woocommerce-cart .wp-block-woocommerce-cart,
.woocommerce-cart .wc-block-cart {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
}

/* Stop alignwide from overflowing */
.woocommerce-cart .wp-block-woocommerce-cart.alignwide {
    max-width: 100% !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Main cart layout */
.woocommerce-cart .wc-block-components-sidebar-layout {
    width: 100% !important;
    max-width: 100% !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 380px !important;
    gap: 32px !important;
    align-items: start !important;
    box-sizing: border-box !important;
}

/* Left cart items area */
.woocommerce-cart .wc-block-components-main {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

/* Right totals sidebar */
.woocommerce-cart .wc-block-cart__sidebar,
.woocommerce-cart .wc-block-components-sidebar {
    width: 100% !important;
    max-width: 380px !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

/* Cart item table/card */
.woocommerce-cart .wc-block-cart-items,
.woocommerce-cart .wc-block-cart-items__row,
.woocommerce-cart .wc-block-components-sidebar,
.woocommerce-cart .wc-block-cart__sidebar {
    background: #ffffff !important;
    border-radius: 16px !important;
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06) !important;
}

/* Cart items table */
.woocommerce-cart table.wc-block-cart-items {
    width: 100% !important;
    border-collapse: collapse !important;
    overflow: hidden !important;
}

/* Table cells */
.woocommerce-cart .wc-block-cart-items th,
.woocommerce-cart .wc-block-cart-items td {
    padding: 20px !important;
    border-color: #e5e7eb !important;
    vertical-align: middle !important;
}

/* Product title */
.woocommerce-cart .wc-block-components-product-name {
    color: #1f2a44 !important;
    font-weight: 700 !important;
    font-size: 17px !important;
    text-decoration: none !important;
}

/* Product image */
.woocommerce-cart .wc-block-cart-item__image img {
    width: 76px !important;
    height: 76px !important;
    object-fit: cover !important;
    border-radius: 10px !important;
}

/* Price text */
.woocommerce-cart .wc-block-components-product-price,
.woocommerce-cart .wc-block-components-totals-item__value,
.woocommerce-cart .wc-block-cart-item__total-price-and-sale-badge-wrapper {
    color: #1f2a44 !important;
    font-weight: 700 !important;
}

/* Quantity selector */
.woocommerce-cart .wc-block-components-quantity-selector {
    border: 1px solid #d8dee8 !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    height: 42px !important;
    background: #ffffff !important;
}

.woocommerce-cart .wc-block-components-quantity-selector__input {
    min-width: 48px !important;
    height: 40px !important;
    font-size: 16px !important;
    color: #1f2a44 !important;
}

.woocommerce-cart .wc-block-components-quantity-selector__button {
    color: #1f2a44 !important;
    background: #f8fafc !important;
}

/* Remove/delete button */
.woocommerce-cart .wc-block-cart-item__remove-link {
    color: #667085 !important;
    text-decoration: none !important;
}

.woocommerce-cart .wc-block-cart-item__remove-link:hover {
    color: #b42318 !important;
}

/* Sidebar inner spacing */
.woocommerce-cart .wc-block-cart__sidebar {
    padding: 28px !important;
}

/* Cart totals title */
.woocommerce-cart .wp-block-woocommerce-cart-order-summary-heading-block,
.woocommerce-cart .wc-block-components-title {
    font-size: 22px !important;
    font-weight: 800 !important;
    color: #1f2a44 !important;
    margin-bottom: 18px !important;
}

/* Coupon row */
.woocommerce-cart .wc-block-components-panel__button {
    color: #1f2a44 !important;
    font-weight: 600 !important;
}

/* Totals rows */
.woocommerce-cart .wc-block-components-totals-item {
    padding: 14px 0 !important;
    border-color: #e5e7eb !important;
}

.woocommerce-cart .wc-block-components-totals-footer-item {
    font-size: 20px !important;
    font-weight: 800 !important;
}

/* Buttons - WooCommerce Blocks */
.woocommerce-cart .wc-block-components-button,
.woocommerce-cart .wc-block-components-button:not(.is-link),
.woocommerce-cart .wp-element-button {
    background: #204b82 !important;
    color: #ffffff !important;
    border: 1px solid #204b82 !important;
    border-radius: 12px !important;
    min-height: 54px !important;
    padding: 0 28px !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    box-shadow: none !important;
    text-decoration: none !important;
}

/* Button text */
.woocommerce-cart .wc-block-components-button__text {
    color: #ffffff !important;
    font-weight: 700 !important;
}

/* Button hover */
.woocommerce-cart .wc-block-components-button:hover,
.woocommerce-cart .wc-block-components-button:not(.is-link):hover,
.woocommerce-cart .wp-element-button:hover {
    background: #035695 !important;
    border-color: #035695 !important;
    color: #ffffff !important;
}

/* Proceed to checkout button full width */
.woocommerce-cart .wc-block-cart__submit-button,
.woocommerce-cart .wc-block-components-button.wc-block-cart__submit-button {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Inputs */
.woocommerce-cart .wc-block-components-text-input input,
.woocommerce-cart .wc-block-components-form .wc-block-components-text-input input {
    border: 1px solid #d8dee8 !important;
    border-radius: 10px !important;
    min-height: 48px !important;
    color: #1f2a44 !important;
}

/* Prevent any child from overflowing */
.woocommerce-cart .wc-block-components-sidebar-layout *,
.woocommerce-cart .wp-block-woocommerce-cart * {
    box-sizing: border-box !important;
}

/* Empty cart: keep message, hide separator + New in store products */
.woocommerce-cart .wp-block-woocommerce-empty-cart-block .wp-block-separator,
.woocommerce-cart .wp-block-woocommerce-empty-cart-block h2.wp-block-heading:not(.wc-block-cart__empty-cart__title),
.woocommerce-cart .wp-block-woocommerce-empty-cart-block .wp-block-product-new,
.woocommerce-cart .wp-block-woocommerce-empty-cart-block .wp-block-woocommerce-product-new,
.woocommerce-cart .wp-block-woocommerce-empty-cart-block .wc-block-grid,
.woocommerce-cart .wp-block-woocommerce-empty-cart-block [data-block-name="woocommerce/product-new"] {
    display: none !important;
}

/* Empty cart message */
.woocommerce-cart .wc-block-cart__empty-cart__title {
    display: block !important;
    color: #204b82 !important;
    font-size: 24px !important;
    font-weight: 800 !important;
    text-align: center !important;
    margin: 24px auto 0 !important;
}

/* Cart Responsive */
@media (max-width: 900px) {
    .woocommerce-cart .wc-block-components-sidebar-layout {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
    }

    .woocommerce-cart .wc-block-cart__sidebar,
    .woocommerce-cart .wc-block-components-sidebar {
        max-width: 100% !important;
    }

    .woocommerce-cart .atms-default-page-title {
        font-size: 34px !important;
    }
}

@media (max-width: 600px) {
    .woocommerce-cart .atms-default-page-section {
        padding: 32px 14px !important;
    }

    .woocommerce-cart .wc-block-cart-items th,
    .woocommerce-cart .wc-block-cart-items td {
        padding: 14px !important;
    }

    .woocommerce-cart .wc-block-cart-item__image img {
        width: 60px !important;
        height: 60px !important;
    }
}

/* =========================================================
   Global WooCommerce Button Colors
   Normal: #204b82
   Hover:  #035695
========================================================= */

.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce .button,
.woocommerce-page a.button,
.woocommerce-page button.button,
.woocommerce-page input.button,
.woocommerce-page #respond input#submit {
    background-color: #204b82 !important;
    color: #ffffff !important;
    border-color: #204b82 !important;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover,
.woocommerce .button:hover,
.woocommerce-page a.button:hover,
.woocommerce-page button.button:hover,
.woocommerce-page input.button:hover,
.woocommerce-page #respond input#submit:hover {
    background-color: #035695 !important;
    color: #ffffff !important;
    border-color: #035695 !important;
}

.single-product .single_add_to_cart_button {
    background-color: #204b82 !important;
    color: #ffffff !important;
    border-color: #204b82 !important;
}

.single-product .single_add_to_cart_button:hover {
    background-color: #035695 !important;
    color: #ffffff !important;
    border-color: #035695 !important;
}

.wc-block-components-button,
.wc-block-components-button:not(.is-link),
.wp-block-woocommerce-cart .wc-block-components-button,
.wp-block-woocommerce-checkout .wc-block-components-button,
.wp-element-button {
    background-color: #204b82 !important;
    color: #ffffff !important;
    border-color: #204b82 !important;
}

.wc-block-components-button:hover,
.wc-block-components-button:not(.is-link):hover,
.wp-block-woocommerce-cart .wc-block-components-button:hover,
.wp-block-woocommerce-checkout .wc-block-components-button:hover,
.wp-element-button:hover {
    background-color: #035695 !important;
    color: #ffffff !important;
    border-color: #035695 !important;
}

.wc-block-components-button__text {
    color: #ffffff !important;
}

/* =========================================================
   FINAL FIX: Remove extra space below footer on Cart page
========================================================= */

/* Make only the cart page use viewport-height grid */
html {
    min-height: 100%;
}

body.woocommerce-cart {
    min-height: 100vh !important;
    display: grid !important;
    grid-template-rows: auto minmax(0, 1fr) auto !important;
    background: #f4f7fb !important;
}

/* Header */
body.woocommerce-cart .atms-site-header {
    grid-row: 1 !important;
}

/* Main page content fills available height */
body.woocommerce-cart .atms-default-page {
    grid-row: 2 !important;
    min-height: 0 !important;
    background: #f4f7fb !important;
}

/* Cart section fills its row but does not create extra bottom gap */
body.woocommerce-cart .atms-default-page-section {
    min-height: 0 !important;
    padding-bottom: 50px !important;
}

/* Footer stays at the bottom */
body.woocommerce-cart .atms-site-footer {
    grid-row: 3 !important;
    margin: 0 !important;
}

/* Remove default bottom margins that can create space */
body.woocommerce-cart .atms-default-page,
body.woocommerce-cart .atms-default-page-section,
body.woocommerce-cart .atms-default-page-container,
body.woocommerce-cart .atms-default-page-content,
body.woocommerce-cart .wp-block-woocommerce-cart,
body.woocommerce-cart .wp-block-woocommerce-empty-cart-block {
    margin-bottom: 0 !important;
}

/* Empty cart page: remove unnecessary bottom space */
body.woocommerce-cart .wp-block-woocommerce-empty-cart-block {
    padding-bottom: 0 !important;
}

/* If browser still shows any area after footer, make page background footer-blue */
body.woocommerce-cart::after {
    content: none !important;
}