/* =========================================
   CART PAGE
   ========================================= */

#hikashop_show_cart_form,
.hika_toolbar {
    max-width: 1280px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.hika_toolbar {
    background: rgba(31, 22, 17, 0.78) !important;
    border: 1px solid var(--fj-border-soft) !important;
    border-radius: 18px !important;
    padding: 12px 14px !important;
    margin-bottom: 14px !important;
    box-shadow: var(--fj-shadow-soft) !important;
}

.hika_toolbar .hika_toolbar_btn {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
}

.hika_toolbar .hikabtn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    min-height: 44px !important;
    padding: 10px 16px !important;
    margin: 0 !important;
}

.hika_toolbar .btnIcon,
.hika_toolbar .btnName {
    color: inherit !important;
}

#hikashop_cart_product_listing {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    background: rgba(31, 22, 17, 0.78) !important;
    border: 1px solid var(--fj-border-soft) !important;
    border-radius: 18px !important;
    overflow: hidden !important;
    box-shadow: var(--fj-shadow-soft) !important;
    table-layout: auto !important;
    margin-top: 20px !important;
}

#hikashop_cart_product_listing thead th {
    background: rgba(14, 9, 6, 0.96) !important;
    color: var(--fj-heading-2) !important;
    border: 0 !important;
    padding: 14px 16px !important;
    font-size: 1rem !important;
    font-weight: 800 !important;
    vertical-align: middle !important;
}

#hikashop_cart_product_listing tbody td,
#hikashop_cart_product_listing tfoot td {
    background: rgba(36, 25, 19, 0.88) !important;
    color: #ead8ca !important;
    border-top: 1px solid rgba(255, 184, 120, 0.10) !important;
    border-bottom: 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
    padding: 12px 14px !important;
    vertical-align: top !important;
}

#hikashop_cart_product_listing tbody tr td {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

/* checkbox column — ONLY body rows, not totals/footer */
#hikashop_cart_product_listing thead th:first-child,
#hikashop_cart_product_listing tbody td:first-child,
#hikashop_cart_product_listing tbody .hikashop_show_cart_form_checkbox {
    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
    text-align: center !important;
    vertical-align: middle !important;
}

/* name column */
#hikashop_cart_product_listing td[data-title="Name"] {
    min-width: 240px !important;
    padding-left: 10px !important;
}

#hikashop_cart_product_listing .hikashop_cart_product_image {
    width: 36px !important;
    height: 48px !important;
    object-fit: cover !important;
    border-radius: 6px !important;
    border: 1px solid var(--fj-border-soft) !important;
    margin-right: 8px !important;
    margin-left: 0 !important;
    float: left !important;
}

#hikashop_cart_product_listing .hikashop_cart_product_name,
#hikashop_cart_product_listing .hikashop_cart_product_name a,
#hikashop_cart_product_listing td[data-title="Name"] a {
    color: #ffbe84 !important;
    font-weight: 800 !important;
    text-decoration: none !important;
    display: inline-block !important;
    vertical-align: middle !important;
    margin-left: 0 !important;
}

#hikashop_cart_product_listing td[data-title="Name"] a:hover {
    color: #ffd7b6 !important;
}

/* status + price */
#hikashop_cart_product_listing td[data-title="Status"] {
    text-align: center !important;
    vertical-align: middle !important;
}

#hikashop_cart_product_listing td[data-title="Status"] i {
    color: #f2e4d8 !important;
}

#hikashop_cart_product_listing td[data-title="Unit price"],
#hikashop_cart_product_listing td[data-title="Total price"] {
    color: #ffbe84 !important;
    font-weight: 900 !important;
    vertical-align: middle !important;
}

/* quantity column — ONLY product rows, NOT totals/footer */
#hikashop_cart_product_listing tbody td[data-title="Quantity"]:not(.hika_show_cart_total_quantity) {
    vertical-align: middle !important;
    white-space: nowrap !important;
    min-width: 420px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    flex-wrap: nowrap !important;
}

#hikashop_cart_product_listing tbody td[data-title="Quantity"]:not(.hika_show_cart_total_quantity) .hikashop_product_quantity_input_div_default_main,
#hikashop_cart_product_listing tbody td[data-title="Quantity"]:not(.hika_show_cart_total_quantity) .hikashop_product_quantity_input_div_default,
#hikashop_cart_product_listing tbody td[data-title="Quantity"]:not(.hika_show_cart_total_quantity) .hikashop_product_quantity_change_div_default,
#hikashop_cart_product_listing tbody td[data-title="Quantity"]:not(.hika_show_cart_total_quantity) .hikashop_product_quantity_change_div_plus_default,
#hikashop_cart_product_listing tbody td[data-title="Quantity"]:not(.hika_show_cart_total_quantity) .hikashop_product_quantity_change_div_minus_default,
#hikashop_cart_product_listing tbody td[data-title="Quantity"]:not(.hika_show_cart_total_quantity) .hikashop_cart_product_quantity_refresh,
#hikashop_cart_product_listing tbody td[data-title="Quantity"]:not(.hika_show_cart_total_quantity) > a.hikashop_no_print {
    display: inline-flex !important;
    align-items: center !important;
    vertical-align: middle !important;
    margin: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

#hikashop_cart_product_listing tbody td[data-title="Quantity"]:not(.hika_show_cart_total_quantity) .hikashop_product_quantity_input_div_default_main {
    order: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex-wrap: nowrap !important;
    width: auto !important;
}

#hikashop_cart_product_listing tbody td[data-title="Quantity"]:not(.hika_show_cart_total_quantity) .hikashop_product_quantity_change_div_default {
    display: inline-flex !important;
    align-items: center !important;
    flex-direction: row !important;
    gap: 8px !important;
}

#hikashop_cart_product_listing tbody td[data-title="Quantity"]:not(.hika_show_cart_total_quantity) .hikashop_cart_product_quantity_refresh {
    order: 2 !important;
}

#hikashop_cart_product_listing tbody td[data-title="Quantity"]:not(.hika_show_cart_total_quantity) > a.hikashop_no_print {
    order: 3 !important;
}

#hikashop_cart_product_listing tbody td[data-title="Quantity"]:not(.hika_show_cart_total_quantity) .hikashop_product_quantity_field {
    width: 92px !important;
    height: 40px !important;
    min-height: 40px !important;
    border-radius: var(--fj-radius-pill) !important;
    border: 1px solid rgba(255, 184, 120, 0.20) !important;
    background: rgba(49, 36, 29, 0.92) !important;
    color: #fff3e8 !important;
    text-align: center !important;
    font-weight: 700 !important;
    padding: 0 12px !important;
    margin: 0 !important;
    box-shadow: none !important;
}

#hikashop_cart_product_listing tbody td[data-title="Quantity"]:not(.hika_show_cart_total_quantity) .hikashop_product_quantity_field_change {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 8px !important;
    background: rgba(54, 41, 34, 0.96) !important;
    border: 1px solid var(--fj-border-input) !important;
    color: #fff3e8 !important;
    text-decoration: none !important;
    font-weight: 900 !important;
    padding: 0 !important;
    margin: 0 !important;
}

#hikashop_cart_product_listing tbody td[data-title="Quantity"]:not(.hika_show_cart_total_quantity) .hikashop_product_quantity_field_change:hover {
    background: rgba(70, 52, 43, 0.98) !important;
}

#hikashop_cart_product_listing tbody td[data-title="Quantity"]:not(.hika_show_cart_total_quantity) .hikashop_cart_product_quantity_refresh a,
#hikashop_cart_product_listing tbody td[data-title="Quantity"]:not(.hika_show_cart_total_quantity) > a.hikashop_no_print {
    width: 28px !important;
    height: 28px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    margin: 0 !important;
    color: #ffbe84 !important;
}

#hikashop_cart_product_listing tbody td[data-title="Quantity"]:not(.hika_show_cart_total_quantity) .hikashop_cart_product_quantity_refresh a:hover,
#hikashop_cart_product_listing tbody td[data-title="Quantity"]:not(.hika_show_cart_total_quantity) > a.hikashop_no_print:hover {
    color: #ffd7b6 !important;
}

/* replace refresh icon with check icon */
#hikashop_cart_product_listing .hikashop_cart_product_quantity_refresh i:before {
    content: "\f00c" !important;
}

/* totals footer */
#hikashop_cart_product_listing tfoot {
    display: table-footer-group !important;
}

#hikashop_cart_product_listing tfoot tr {
    display: table-row !important;
}

#hikashop_cart_product_listing tfoot td,
#hikashop_cart_product_listing .hika_show_cart_total_text_2 td {
    display: table-cell !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    background: rgba(20, 14, 11, 0.96) !important;
    color: #f2e3d7 !important;
    border-top: 1px solid var(--fj-border-soft) !important;
    font-weight: 800 !important;
    padding: 12px !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
}

#hikashop_cart_product_listing .hika_show_cart_total_quantity {
    display: table-cell !important;
    width: 64px !important;
    min-width: 64px !important;
    max-width: 64px !important;
    text-align: center !important;
    vertical-align: middle !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    color: #f3c7a1 !important;
    background: rgba(20, 14, 11, 0.96) !important;
    padding: 12px 8px !important;
    border: 0 !important;
    border-top: 1px solid var(--fj-border-soft) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

#hikashop_cart_product_listing .hika_show_cart_total_price,
#hikashop_cart_product_listing .hika_show_cart_total_text_2 .hika_show_cart_total_price {
    display: table-cell !important;
    text-align: left !important;
    vertical-align: middle !important;
    font-size: 20px !important;
    font-weight: 900 !important;
    color: #ffbe84 !important;
    background: rgba(20, 14, 11, 0.96) !important;
    padding: 12px 14px !important;
    white-space: nowrap !important;
}

/* =========================================
   MOBILE CART FIXES
   ========================================= */

@media (max-width: 768px) {

    #hikashop_cart_product_listing,
    #hikashop_cart_product_listing tbody {
        display: block !important;
        width: 100% !important;
    }

    #hikashop_cart_product_listing thead {
        display: none !important;
    }

    /* product rows become cards */
    #hikashop_cart_product_listing tbody tr {
        display: grid !important;
        grid-template-columns: 28px minmax(0, 1fr) auto !important;
        grid-template-areas:
            "check name total"
            "check qty qty";
        gap: 10px 12px !important;
        width: 100% !important;
        padding: 14px !important;
        margin: 0 0 14px 0 !important;
        background: rgba(36, 25, 19, 0.92) !important;
        border: 1px solid rgba(255, 184, 120, 0.10) !important;
        border-radius: 16px !important;
        box-sizing: border-box !important;
    }

    #hikashop_cart_product_listing tbody tr td {
        display: block !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        border: 0 !important;
        background: transparent !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    /* checkbox */
    #hikashop_cart_product_listing tbody tr td:first-child,
    #hikashop_cart_product_listing tbody .hikashop_show_cart_form_checkbox {
        grid-area: check !important;
        width: 28px !important;
        min-width: 28px !important;
        max-width: 28px !important;
        text-align: left !important;
        overflow: visible !important;
    }

    /* name */
    #hikashop_cart_product_listing td[data-title="Name"] {
        grid-area: name !important;
        min-width: 0 !important;
        padding-left: 0 !important;
    }

    #hikashop_cart_product_listing td[data-title="Name"] .hikashop_product_name_main,
    #hikashop_cart_product_listing td[data-title="Name"] {
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
    }

    #hikashop_cart_product_listing .hikashop_cart_product_image {
        float: none !important;
        flex: 0 0 52px !important;
        width: 52px !important;
        height: 52px !important;
        margin: 0 !important;
        object-fit: cover !important;
    }

    #hikashop_cart_product_listing .hikashop_cart_product_name,
    #hikashop_cart_product_listing .hikashop_cart_product_name a,
    #hikashop_cart_product_listing td[data-title="Name"] a {
        display: block !important;
        margin: 0 !important;
        line-height: 1.2 !important;
        word-break: break-word !important;
        white-space: normal !important;
    }

    /* price */
    #hikashop_cart_product_listing td[data-title="Total price"],
    #hikashop_cart_product_listing td[data-title="Unit price"] {
        grid-area: total !important;
        align-self: center !important;
        justify-self: end !important;
        text-align: right !important;
        white-space: nowrap !important;
        font-size: 1.05rem !important;
    }

    #hikashop_cart_product_listing td[data-title="Status"] {
        display: none !important;
    }

    /* quantity */
    #hikashop_cart_product_listing tbody td[data-title="Quantity"]:not(.hika_show_cart_total_quantity) {
        grid-area: qty !important;
        min-width: 0 !important;
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 8px !important;
        flex-wrap: wrap !important;
        white-space: normal !important;
        overflow: visible !important;
    }

    #hikashop_cart_product_listing tbody td[data-title="Quantity"]:not(.hika_show_cart_total_quantity) .hikashop_product_quantity_input_div_default_main {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 8px !important;
        flex-wrap: nowrap !important;
        width: auto !important;
        min-width: 0 !important;
    }

    #hikashop_cart_product_listing tbody td[data-title="Quantity"]:not(.hika_show_cart_total_quantity) .hikashop_product_quantity_change_div_default {
        display: inline-flex !important;
        align-items: center !important;
        gap: 8px !important;
        flex-wrap: nowrap !important;
    }

    #hikashop_cart_product_listing tbody td[data-title="Quantity"]:not(.hika_show_cart_total_quantity) .hikashop_product_quantity_field {
        width: 68px !important;
        min-width: 68px !important;
        height: 38px !important;
        padding: 0 8px !important;
    }

    #hikashop_cart_product_listing tbody td[data-title="Quantity"]:not(.hika_show_cart_total_quantity) .hikashop_product_quantity_field_change {
        width: 34px !important;
        min-width: 34px !important;
        height: 34px !important;
    }

    /* KEEP TOTALS AS A REAL TABLE FOOTER */
    #hikashop_cart_product_listing tfoot {
        display: table-footer-group !important;
        width: 100% !important;
    }

    #hikashop_cart_product_listing tfoot tr {
        display: table-row !important;
        width: auto !important;
        padding: 0 !important;
        margin: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        border: 0 !important;
    }

    #hikashop_cart_product_listing tfoot td {
        display: table-cell !important;
        width: auto !important;
        padding: 10px 12px !important;
        text-align: left !important;
        box-sizing: border-box !important;
        background: rgba(20, 14, 11, 0.96) !important;
        border-top: 1px solid var(--fj-border-soft) !important;
    }

    #hikashop_cart_product_listing .hika_show_cart_total_quantity {
        width: 56px !important;
        min-width: 56px !important;
        max-width: 56px !important;
        text-align: center !important;
    }

    #hikashop_cart_product_listing .hika_show_cart_total_price {
        width: auto !important;
        text-align: left !important;
        font-size: 18px !important;
    }
}

@media (max-width: 480px) {
    #hikashop_cart_product_listing tbody tr {
        grid-template-columns: 24px minmax(0, 1fr) auto !important;
        gap: 8px 10px !important;
        padding: 12px !important;
    }

    #hikashop_cart_product_listing .hikashop_cart_product_image {
        width: 46px !important;
        height: 46px !important;
    }

    #hikashop_cart_product_listing tbody td[data-title="Quantity"]:not(.hika_show_cart_total_quantity) .hikashop_product_quantity_field {
        width: 60px !important;
        min-width: 60px !important;
    }

    #hikashop_cart_product_listing .hika_show_cart_total_quantity {
        width: 52px !important;
        min-width: 52px !important;
        max-width: 52px !important;
    }

    #hikashop_cart_product_listing .hika_show_cart_total_price {
        font-size: 17px !important;
    }
}

/* =========================================================
   FAT JACK'S — CART TOTAL ROW FIX
   Add at the VERY END of your CSS
   ========================================================= */

/* 1) Do NOT treat the totals quantity cell like a product quantity cell */
#hikashop_cart_product_listing tfoot td[data-title="Quantity"],
#hikashop_cart_product_listing td.hika_show_cart_total_quantity {
    display: table-cell !important;
    width: 64px !important;
    min-width: 64px !important;
    max-width: 64px !important;
    padding: 12px 10px !important;
    text-align: center !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
    background: rgba(20, 14, 11, 0.96) !important;
    color: #f3c7a1 !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    border-top: 1px solid var(--fj-border-soft) !important;
    border-bottom: 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    float: none !important;
    position: static !important;
    flex: none !important;
}

/* 2) Keep the total price cell normal */
#hikashop_cart_product_listing tfoot td[data-title="Final total"],
#hikashop_cart_product_listing td.hika_show_cart_total_price {
    display: table-cell !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    padding: 12px 14px !important;
    text-align: left !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
    background: rgba(20, 14, 11, 0.96) !important;
    color: #ffbe84 !important;
    font-size: 20px !important;
    font-weight: 900 !important;
    border-top: 1px solid var(--fj-border-soft) !important;
    border-bottom: 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    float: none !important;
    position: static !important;
    flex: none !important;
}

/* 3) Footer rows must stay real table rows */
#hikashop_cart_product_listing tfoot {
    display: table-footer-group !important;
}

#hikashop_cart_product_listing tfoot tr,
#hikashop_cart_product_listing tr.hika_show_cart_total_text_2 {
    display: table-row !important;
    width: auto !important;
    background: transparent !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    position: static !important;
}

/* 4) Cancel the first-column checkbox sizing on totals only */
#hikashop_cart_product_listing tfoot td:first-child,
#hikashop_cart_product_listing td.hika_show_cart_total_quantity:first-child {
    width: 64px !important;
    min-width: 64px !important;
    max-width: 64px !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
}

/* 5) Product quantity flex styling should apply ONLY to body rows */
#hikashop_cart_product_listing tbody td[data-title="Quantity"] {
    vertical-align: middle !important;
    white-space: nowrap !important;
    min-width: 420px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    flex-wrap: nowrap !important;
}

/* 6) Totals cells should never become flex items */
#hikashop_cart_product_listing tfoot td {
    display: table-cell !important;
}

/* 7) Mobile: keep product cards, but totals as a normal footer row */
@media (max-width: 768px) {
    #hikashop_cart_product_listing tfoot {
        display: table-footer-group !important;
        width: 100% !important;
    }

    #hikashop_cart_product_listing tfoot tr,
    #hikashop_cart_product_listing tr.hika_show_cart_total_text_2 {
        display: table-row !important;
        width: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
    }

    #hikashop_cart_product_listing tfoot td,
    #hikashop_cart_product_listing td.hika_show_cart_total_quantity,
    #hikashop_cart_product_listing td.hika_show_cart_total_price {
        display: table-cell !important;
        width: auto !important;
        padding: 10px 12px !important;
        text-align: left !important;
        background: rgba(20, 14, 11, 0.96) !important;
        white-space: nowrap !important;
    }

    #hikashop_cart_product_listing td.hika_show_cart_total_quantity {
        width: 56px !important;
        min-width: 56px !important;
        max-width: 56px !important;
        text-align: center !important;
    }

    #hikashop_cart_product_listing td.hika_show_cart_total_price {
        font-size: 18px !important;
    }
}

@media (max-width: 480px) {
    #hikashop_cart_product_listing td.hika_show_cart_total_quantity {
        width: 52px !important;
        min-width: 52px !important;
        max-width: 52px !important;
    }

    #hikashop_cart_product_listing td.hika_show_cart_total_price {
        font-size: 17px !important;
    }
}

/* =========================================================
   FAT JACK'S — REAL FIX FOR DUPLICATE / BUNCHED TOTAL ROWS
   Add at the VERY END
   ========================================================= */

/* HikaShop outputs two total rows on this page.
   Hide the tfoot one and keep the tbody one. */
#hikashop_cart_product_listing tfoot {
    display: none !important;
}

/* Make the tbody total row behave like a normal totals row */
#hikashop_cart_product_listing tbody tr.hika_show_cart_total_text_2 {
    display: table-row !important;
    background: rgba(20, 14, 11, 0.96) !important;
    border: 0 !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}

#hikashop_cart_product_listing tbody tr.hika_show_cart_total_text_2 td {
    display: table-cell !important;
    background: rgba(20, 14, 11, 0.96) !important;
    border-top: 1px solid var(--fj-border-soft) !important;
    border-bottom: 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
    margin: 0 !important;
    float: none !important;
    position: static !important;
    box-sizing: border-box !important;
}

/* quantity total cell */
#hikashop_cart_product_listing tbody tr.hika_show_cart_total_text_2 td.hika_show_cart_total_quantity {
    width: 64px !important;
    min-width: 64px !important;
    max-width: 64px !important;
    padding: 12px 10px !important;
    text-align: center !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #f3c7a1 !important;
}

/* final total price cell */
#hikashop_cart_product_listing tbody tr.hika_show_cart_total_text_2 td.hika_show_cart_total_price {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    padding: 12px 14px !important;
    text-align: left !important;
    font-size: 20px !important;
    font-weight: 900 !important;
    color: #ffbe84 !important;
}

/* Cancel body-row checkbox width rules on the special total row */
#hikashop_cart_product_listing tbody tr.hika_show_cart_total_text_2 td:first-child {
    width: 64px !important;
    min-width: 64px !important;
    max-width: 64px !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
    text-align: center !important;
}

/* Cancel the product quantity flex rule on the total row */
#hikashop_cart_product_listing tbody tr.hika_show_cart_total_text_2 td[data-title="Quantity"],
#hikashop_cart_product_listing tbody tr.hika_show_cart_total_text_2 td.hika_show_cart_total_quantity {
    display: table-cell !important;
    min-width: 64px !important;
    flex: none !important;
    gap: 0 !important;
    justify-content: center !important;
    align-items: middle !important;
    white-space: nowrap !important;
}

/* =========================================================
   MOBILE OVERRIDES
   Keep product rows as cards, but NOT the total row
   ========================================================= */
@media (max-width: 768px) {

    /* your mobile rule turns all tbody tr into cards;
       cancel that for the total row */
    #hikashop_cart_product_listing tbody tr.hika_show_cart_total_text_2 {
        display: table-row !important;
        grid-template-columns: none !important;
        grid-template-areas: none !important;
        gap: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        border-radius: 0 !important;
        border: 0 !important;
        background: rgba(20, 14, 11, 0.96) !important;
    }

    #hikashop_cart_product_listing tbody tr.hika_show_cart_total_text_2 td {
        display: table-cell !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        padding: 10px 12px !important;
        margin: 0 !important;
        overflow: visible !important;
        background: rgba(20, 14, 11, 0.96) !important;
        border-top: 1px solid var(--fj-border-soft) !important;
        text-align: left !important;
    }

    #hikashop_cart_product_listing tbody tr.hika_show_cart_total_text_2 td.hika_show_cart_total_quantity {
        width: 56px !important;
        min-width: 56px !important;
        max-width: 56px !important;
        text-align: center !important;
    }

    #hikashop_cart_product_listing tbody tr.hika_show_cart_total_text_2 td.hika_show_cart_total_price {
        font-size: 18px !important;
        text-align: left !important;
    }
}

@media (max-width: 480px) {
    #hikashop_cart_product_listing tbody tr.hika_show_cart_total_text_2 td.hika_show_cart_total_quantity {
        width: 52px !important;
        min-width: 52px !important;
        max-width: 52px !important;
    }

    #hikashop_cart_product_listing tbody tr.hika_show_cart_total_text_2 td.hika_show_cart_total_price {
        font-size: 17px !important;
    }
}

/* =========================================================
   FAT JACK'S — CART TOTALS REAL FIX
   Use the proper tfoot row, hide HikaShop's duplicate tbody row
   ========================================================= */

/* hide the duplicate broken total row inside tbody */
#hikashop_cart_product_listing tbody tr.hika_show_cart_total_text_2 {
    display: none !important;
}

/* keep the real footer totals row visible */
#hikashop_cart_product_listing tfoot {
    display: table-footer-group !important;
}

#hikashop_cart_product_listing tfoot tr {
    display: table-row !important;
}

/* total label cell */
#hikashop_cart_product_listing tfoot .hika_show_cart_total_text {
    display: table-cell !important;
    background: rgba(20, 14, 11, 0.96) !important;
    color: #f2e3d7 !important;
    border-top: 1px solid var(--fj-border-soft) !important;
    border-bottom: 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
    padding: 12px 14px !important;
    font-weight: 800 !important;
    text-align: right !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
}

/* quantity total */
#hikashop_cart_product_listing tfoot .hika_show_cart_total_quantity {
    display: table-cell !important;
    width: 64px !important;
    min-width: 64px !important;
    max-width: 64px !important;
    background: rgba(20, 14, 11, 0.96) !important;
    color: #f3c7a1 !important;
    border-top: 1px solid var(--fj-border-soft) !important;
    border-bottom: 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
    padding: 12px 10px !important;
    text-align: center !important;
    vertical-align: middle !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
}

/* final total */
#hikashop_cart_product_listing tfoot .hika_show_cart_total_price {
    display: table-cell !important;
    background: rgba(20, 14, 11, 0.96) !important;
    color: #ffbe84 !important;
    border-top: 1px solid var(--fj-border-soft) !important;
    border-bottom: 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
    padding: 12px 14px !important;
    text-align: left !important;
    vertical-align: middle !important;
    font-size: 20px !important;
    font-weight: 900 !important;
    white-space: nowrap !important;
}

/* mobile: keep footer as real table footer */
@media (max-width: 768px) {
    #hikashop_cart_product_listing tfoot {
        display: table-footer-group !important;
    }

    #hikashop_cart_product_listing tfoot tr {
        display: table-row !important;
    }

    #hikashop_cart_product_listing tfoot td {
        display: table-cell !important;
        width: auto !important;
        padding: 10px 12px !important;
    }

    #hikashop_cart_product_listing tfoot .hika_show_cart_total_text {
        text-align: right !important;
    }

    #hikashop_cart_product_listing tfoot .hika_show_cart_total_quantity {
        width: 56px !important;
        min-width: 56px !important;
        max-width: 56px !important;
    }

    #hikashop_cart_product_listing tfoot .hika_show_cart_total_price {
        font-size: 18px !important;
    }
}

@media (max-width: 480px) {
    #hikashop_cart_product_listing tfoot .hika_show_cart_total_quantity {
        width: 52px !important;
        min-width: 52px !important;
        max-width: 52px !important;
    }

    #hikashop_cart_product_listing tfoot .hika_show_cart_total_price {
        font-size: 17px !important;
    }
}

/* =========================================================
   FAT JACK'S — MOBILE CART TOTALS FIX
   ========================================================= */

/* Never show HikaShop's duplicate tbody totals row */
#hikashop_cart_product_listing tbody tr.hika_show_cart_total_text_2 {
    display: none !important;
}

/* Always use the real footer total row */
#hikashop_cart_product_listing tfoot {
    display: table-footer-group !important;
}

#hikashop_cart_product_listing tfoot tr {
    display: table-row !important;
}

#hikashop_cart_product_listing tfoot td {
    display: table-cell !important;
}

/* Mobile product-card layout should apply ONLY to real product rows */
@media (max-width: 768px) {
    #hikashop_cart_product_listing tbody tr:not(.hika_show_cart_total_text_2) {
        display: grid !important;
        grid-template-columns: 28px minmax(0, 1fr) auto !important;
        grid-template-areas:
            "check name total"
            "check qty qty";
        gap: 10px 12px !important;
        width: 100% !important;
        padding: 14px !important;
        margin: 0 0 14px 0 !important;
        background: rgba(36, 25, 19, 0.92) !important;
        border: 1px solid rgba(255, 184, 120, 0.10) !important;
        border-radius: 16px !important;
        box-sizing: border-box !important;
    }

    #hikashop_cart_product_listing tbody tr:not(.hika_show_cart_total_text_2) td {
        display: block !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        border: 0 !important;
        background: transparent !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    /* keep footer totals as real table cells on mobile */
    #hikashop_cart_product_listing tfoot {
        display: table-footer-group !important;
        width: 100% !important;
    }

    #hikashop_cart_product_listing tfoot tr {
        display: table-row !important;
        width: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
    }

    #hikashop_cart_product_listing tfoot td {
        display: table-cell !important;
        width: auto !important;
        padding: 10px 12px !important;
        text-align: left !important;
        background: rgba(20, 14, 11, 0.96) !important;
        white-space: nowrap !important;
        border-top: 1px solid var(--fj-border-soft) !important;
    }
}

/* =========================================================
   FAT JACK'S — MOBILE CART PRICE FIX
   Keep unit price separate from row total
   ========================================================= */
@media (max-width: 768px) {

    /* only the actual row total goes in the top-right total slot */
    #hikashop_cart_product_listing td[data-title="Total price"] {
        grid-area: total !important;
        align-self: center !important;
        justify-self: end !important;
        text-align: right !important;
        white-space: nowrap !important;
        font-size: 1.05rem !important;
        display: block !important;
    }

    /* unit price should sit under the product name, not in the total slot */
    #hikashop_cart_product_listing td[data-title="Unit price"] {
        grid-area: name !important;
        display: block !important;
        width: 100% !important;
        text-align: left !important;
        white-space: nowrap !important;
        margin-top: 4px !important;
        font-size: 0.92rem !important;
        font-weight: 700 !important;
        color: #cfb7a6 !important;
    }

    /* make the name cell stack title + unit price nicely */
    #hikashop_cart_product_listing td[data-title="Name"] {
        grid-area: name !important;
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
        flex-wrap: wrap !important;
    }

    /* hide the duplicate tbody total helper row on mobile */
    #hikashop_cart_product_listing tbody tr.hika_show_cart_total_text_2 {
        display: none !important;
    }
}

/* =========================================================
   FAT JACK'S — CLEANER CHECKOUT / CART MOBILE POLISH
   Add at the VERY END
   ========================================================= */

@media (max-width: 768px) {

    /* overall checkout sections */
    #hikashop_checkout > div[id^="hikashop_checkout_"] {
        padding: 16px !important;
        border-radius: 18px !important;
    }

    /* payment method card */
    #hikashop_checkout .hikashop_payment_methods_table,
    #hikashop_checkout .hikashop_payment_methods_table tbody,
    #hikashop_checkout .hikashop_payment_methods_table tr,
    #hikashop_checkout .hikashop_payment_methods_table td {
        width: 100% !important;
    }

    #hikashop_checkout .hikashop_payment_methods_table td {
        background: rgba(27, 19, 15, 0.92) !important;
        border: 1px solid rgba(255, 184, 120, 0.16) !important;
        border-radius: 16px !important;
        padding: 16px !important;
        color: #f3e4d8 !important;
    }

    #hikashop_checkout .hikashop_checkout_payment_name {
        color: #fff3e8 !important;
        font-weight: 800 !important;
        font-size: 1rem !important;
    }

    #hikashop_checkout .hikashop_checkout_payment_description {
        color: #cfb7a6 !important;
        margin-top: 8px !important;
        line-height: 1.45 !important;
    }

    /* coupon area — more padding and cleaner spacing */
    #hikashop_checkout .hikashop_checkout_coupon {
        padding: 16px !important;
        margin: 0 0 18px 0 !important;
        border-radius: 16px !important;
        background: rgba(27, 19, 15, 0.92) !important;
        border: 1px solid rgba(255, 184, 120, 0.14) !important;
    }

    #hikashop_checkout .hikashop_checkout_coupon .input-group {
        display: flex !important;
        align-items: stretch !important;
        gap: 10px !important;
        flex-wrap: nowrap !important;
    }

    #hikashop_checkout .hikashop_checkout_coupon_field {
        height: 46px !important;
        min-height: 46px !important;
        padding: 0 14px !important;
        border-radius: 12px !important;
        background: rgba(49, 36, 29, 0.92) !important;
        border: 1px solid rgba(255, 184, 120, 0.18) !important;
        color: #fff3e8 !important;
    }

    #hikashop_checkout .hikabtn_checkout_coupon_add {
        height: 46px !important;
        min-width: 84px !important;
        padding: 0 18px !important;
        border-radius: 12px !important;
        font-weight: 800 !important;
    }

    /* checkout cart table wrapper */
    #hikashop_checkout .hikashop_checkout_cart {
        margin-top: 6px !important;
    }

    #hikashop_checkout .hikashop_checkout_cart table {
        border-collapse: separate !important;
        border-spacing: 0 !important;
        background: rgba(27, 19, 15, 0.92) !important;
        border: 1px solid rgba(255, 184, 120, 0.12) !important;
        border-radius: 16px !important;
        overflow: hidden !important;
    }

    /* header row */
    #hikashop_checkout .hikashop_checkout_cart th {
        background: rgba(15, 10, 7, 0.96) !important;
        color: #fff3e8 !important;
        padding: 10px 8px !important;
        font-size: 0.95rem !important;
        font-weight: 800 !important;
        text-align: left !important;
    }

    /* body cells */
    #hikashop_checkout .hikashop_checkout_cart td {
        background: transparent !important;
        color: #ead8ca !important;
        padding: 12px 8px !important;
        vertical-align: top !important;
        border-top: 1px solid rgba(255, 184, 120, 0.10) !important;
    }

    /* product image */
    #hikashop_checkout .hikashop_cart_product_image_thumb img,
    #hikashop_checkout .hikashop_product_checkout_cart_image {
        width: 54px !important;
        max-width: 54px !important;
        border-radius: 10px !important;
        border: 1px solid rgba(255, 184, 120, 0.14) !important;
    }

    /* product name */
    #hikashop_checkout .hikashop_cart_product_name,
    #hikashop_checkout .hikashop_cart_product_name a {
        color: #ffbe84 !important;
        font-weight: 800 !important;
        line-height: 1.25 !important;
        text-decoration: none !important;
    }

    /* unit / total price */
    #hikashop_checkout td[data-title="Unit price"],
    #hikashop_checkout td[data-title="Total price"],
    #hikashop_checkout .hikashop_cart_product_price {
        color: #ffbe84 !important;
        font-weight: 800 !important;
        white-space: nowrap !important;
    }

    /* quantity cell */
    #hikashop_checkout td.hikashop_cart_product_quantity_value {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 8px !important;
        flex-wrap: wrap !important;
        white-space: normal !important;
        padding-top: 8px !important;
    }

    #hikashop_checkout .hikashop_product_quantity_input_div_default_main {
        display: inline-flex !important;
        align-items: center !important;
        gap: 8px !important;
        flex-wrap: nowrap !important;
        width: auto !important;
        min-width: 0 !important;
    }

    #hikashop_checkout .hikashop_product_quantity_field {
        width: 64px !important;
        min-width: 64px !important;
        max-width: 64px !important;
        height: 38px !important;
        min-height: 38px !important;
        border-radius: 10px !important;
        text-align: center !important;
        padding: 0 8px !important;
        background: rgba(49, 36, 29, 0.92) !important;
        color: #fff3e8 !important;
        border: 1px solid rgba(255, 184, 120, 0.18) !important;
    }

    #hikashop_checkout .hikashop_product_quantity_field_change {
        width: 34px !important;
        min-width: 34px !important;
        height: 34px !important;
        min-height: 34px !important;
        border-radius: 8px !important;
        background: rgba(54, 41, 34, 0.96) !important;
        border: 1px solid rgba(255, 184, 120, 0.18) !important;
        color: #fff3e8 !important;
    }

    /* refresh + delete icons */
    #hikashop_checkout .hikashop_cart_product_quantity_refresh a,
    #hikashop_checkout .hikashop_cart_product_quantity_delete a,
    #hikashop_checkout td.hikashop_cart_product_quantity_value > a.hikashop_no_print {
        width: 28px !important;
        height: 28px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        color: #ffbe84 !important;
        text-decoration: none !important;
    }

    /* subtotal / shipping / total rows */
    #hikashop_checkout .hikashop_cart_subtotal_row td,
    #hikashop_checkout .hikashop_cart_shipping_row td,
    #hikashop_checkout .hikashop_cart_total_row td {
        background: rgba(20, 14, 11, 0.96) !important;
        padding: 12px 10px !important;
        border-top: 1px solid rgba(255, 184, 120, 0.12) !important;
        vertical-align: middle !important;
    }

    #hikashop_checkout .hikashop_cart_subtotal_title,
    #hikashop_checkout .hikashop_cart_shipping_title,
    #hikashop_checkout .hikashop_cart_total_title {
        color: #f2e3d7 !important;
        font-weight: 800 !important;
    }

    #hikashop_checkout .hikashop_cart_subtotal_value,
    #hikashop_checkout .hikashop_cart_shipping_value,
    #hikashop_checkout .hikashop_cart_total_value,
    #hikashop_checkout .hikashop_checkout_cart_final_total {
        color: #ffbe84 !important;
        font-weight: 900 !important;
        white-space: nowrap !important;
    }
}

/* Let the PayPal area use the full checkout width */
#hikashop_checkout_page .paypal-buttons,
#hikashop_checkout_page .paypal-buttons iframe,
#hikashop_checkout_page [data-funding-source],
#hikashop_checkout_page .hikashop_payment_methods,
#hikashop_checkout_page .hikashop_payment_method,
#hikashop_checkout_page .hikashop_checkout_payment,
#hikashop_checkout_page .hikashop_checkout_payment_container {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

/* Prevent flex/grid parents from squeezing the PayPal block */
#hikashop_checkout_page .hikashop_payment_method,
#hikashop_checkout_page .hikashop_checkout_payment,
#hikashop_checkout_page .hikashop_checkout_payment_container {
  flex: 1 1 auto !important;
}

/* If an inner wrapper is capped, remove the cap */
#hikashop_checkout_page .paypal-buttons {
  display: block !important;
}


#hikashop_paypalcheckout_end #paypal-button-container,
#hikashop_paypalcheckout_end #paypal-applepay-container,
#hikashop_paypalcheckout_end #paypal-googlepay-container {
  max-width: 100% !important;
  width: 100% !important;
  margin: 0 auto !important;
}

#hikashop_paypalcheckout_end .paypal-buttons,
#hikashop_paypalcheckout_end iframe {
  width: 100% !important;
  max-width: 100% !important;
}

#hikashop_paypalcheckout_end {
  max-width: 760px;
  margin: 0 auto;
}

#paypal-select-message {
  text-align: center;
  margin: 5px 0 15px;
}

#paypal-button-container,
#paypal-applepay-container,
#paypal-googlepay-container,
#paypal_cancel_button_div {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 auto 12px !important;
}

#paypal_cancel_button {
  display: block;
  width: 100%;
  text-align: center;
  box-sizing: border-box;
}

#hikashop_paypalcheckout_end .paypal-buttons,
#hikashop_paypalcheckout_end iframe {
  width: 100% !important;
  max-width: 100% !important;
}

/* Overall PayPal checkout area */
#hikashop_paypalcheckout_end {
  max-width: 760px;
  margin: 0 auto;
  padding: 10px 0 30px;
}

/* Message above buttons */
#paypal-select-message {
  text-align: center;
  color: #fff;
  margin: 0 0 16px;
  font-weight: 700;
  line-height: 1.4;
}

/* Keep PayPal buttons aligned and consistent */
#paypal-button-container,
#paypal-applepay-container,
#paypal-googlepay-container,
#paypal_cancel_button_div {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 auto 14px !important;
}

/* Clean card form panel */
.card_container {
  max-width: 620px;
  margin: 20px auto 0;
  background: #ffffff !important;
  color: #1f2937 !important;
  padding: 24px !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 16px !important;
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);
}

/* Better labels */
.card_container label,
.card_container .paypal_card_label,
.card_container h3,
.card_container h4 {
  color: #374151 !important;
  font-weight: 600;
}

/* Inputs */
#card-number,
#expiration-date,
#cvv,
.card_container input,
.card_container select {
  background: #ffffff !important;
  color: #111827 !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 10px !important;
  height: 46px !important;
  box-shadow: none !important;
}

/* Placeholder/readability */
.card_container input::placeholder {
  color: #6b7280;
}

/* Billing address heading */
.card_container .billing-address,
.card_container .billing_address,
.card_container .address_title {
  color: #111827 !important;
  font-size: 1rem;
  font-weight: 700;
  margin: 18px 0 10px;
}

/* Cancel button */
#paypal_cancel_button {
  display: block;
  width: 100%;
  text-align: center;
  border-radius: 10px;
}

#hikashop_paypalcheckout_end {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 20px 40px;
}

#paypal-select-message {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 18px;
}

#paypal-button-container,
#paypal-applepay-container,
#paypal-googlepay-container {
  max-width: 760px !important;
  margin: 0 auto 16px !important;
}

#paypal_cancel_button_div {
  max-width: 760px;
  margin: 18px auto 0;
}

#paypal_cancel_button {
  display: block;
  width: 100%;
  text-align: center;
}

#root,
#root * {
  color: #fff !important;
}

#root p[style],
#root div[style],
#root label[style],
#root span[style] {
  color: #fff !important;
}



#hikashop_paypalcheckout_end p[data-testid="legal-agreement"],
#hikashop_paypalcheckout_end p[data-testid="legal-agreement"] *,
#hikashop_paypalcheckout_end .text-customTextColorBase,
#hikashop_paypalcheckout_end .text-fixedPrivacyLinkColor {
  color: #fff !important;
}

#hikashop_paypalcheckout_end {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
}

#hikashop_paypalcheckout_end a {
  text-decoration: underline;
}

#hikashop_paypalcheckout_end button,
#hikashop_paypalcheckout_end .hikabtn {
  border-radius: 12px !important;
}

#hikashop_paypalcheckout_end {
  max-width: 920px;
  margin: 28px auto;
  padding: 26px 28px 30px;
  background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.015) 100%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 22px;
  box-shadow: 0 18px 50px rgba(0,0,0,0.28);
}

#paypal-select-message {
  color: #fff !important;
  text-align: center;
  font-size: 16px;
  line-height: 1.45;
  font-weight: 700;
  margin: 0 0 18px;
}

#paypal-button-container,
#paypal-applepay-container,
#paypal-googlepay-container {
  max-width: 760px !important;
  margin: 0 auto 16px !important;
}

#hikashop_paypalcheckout_end iframe,
#hikashop_paypalcheckout_end .paypal-buttons {
  border-radius: 12px !important;
}

#hikashop_paypalcheckout_end .paypal-powered-by,
#hikashop_paypalcheckout_end [class*="powered"] {
  opacity: 0.9;
  margin-top: 6px;
}

/* optional: a little more breathing room on mobile */
@media (max-width: 768px) {
  #hikashop_paypalcheckout_end {
    margin: 18px 12px;
    padding: 18px 16px 22px;
    border-radius: 18px;
  }

  #paypal-select-message {
    font-size: 15px;
    margin-bottom: 14px;
  }
}

#hikashop_paypalcheckout_end {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#paypal-select-message,
#paypal-button-container,
#paypal-applepay-container,
#paypal-googlepay-container {
  width: 100%;
  max-width: 700px !important;
}

#hikashop_paypalcheckout_end {
  text-align: center;
}

#paypal-button-container,
#paypal-applepay-container,
#paypal-googlepay-container {
  width: 100% !important;
  max-width: 700px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

#hikashop_paypalcheckout_end {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
}

#paypal-select-message,
#paypal-button-container,
#paypal-applepay-container,
#paypal-googlepay-container {
  width: 100% !important;
  max-width: 700px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: center !important;
}

/* Center the PayPal-rendered inner wrappers */
#paypal-button-container > div,
#paypal-button-container iframe,
#paypal-applepay-container > div,
#paypal-googlepay-container > div {
  margin-left: auto !important;
  margin-right: auto !important;
}

/* If PayPal injects its own button wrapper */
#paypal-button-container .paypal-buttons,
#paypal-button-container .paypal-button-layout-vertical {
  margin-left: auto !important;
  margin-right: auto !important;
}