/* ============================================
   NXTCORE — Modern Cart Page
   Apple-inspired clean white design
   ============================================ */

/* --- Reset HostX dark theme for cart --- */
.hostx-cart-body-section {
    background: #fff !important;
    color: #1d1d1f !important;
    min-height: 60vh;
}
.view-cart-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px 80px;
}
.view-cart-page .cart-body > .row {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
}

/* --- Hide HostX product group list (tabs) on cart --- */
.hostx-cart-body-section > .hostx-cart-tabs-section,
.hostx-cart-body-section > .product-group-list,
.hostx-cart-body-section > .hostx-tabs-nav,
#order-standard_cart > .product-group-list {
    display: none !important;
}

/* --- Left Column: Cart Items --- */
.secondary-cart-body {
    flex: 1 1 0%;
    min-width: 0;
    padding-right: 48px;
}

/* Cart heading */
.secondary-cart-body .header-lined {
    border: none;
    margin-bottom: 8px;
    padding: 0;
}
.secondary-cart-body .header-lined h1,
.secondary-cart-body .header-lined .font-size-36 {
    font-size: 32px !important;
    font-weight: 700 !important;
    color: #1d1d1f !important;
    letter-spacing: -0.02em;
    border: none;
    padding: 0;
    margin: 0;
}

/* --- Free shipping banner --- */
.nxc-cart-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f0f7ff;
    border: 1px solid #d0e4ff;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 24px;
    font-size: 14px;
    color: #1d1d1f;
}
.nxc-cart-banner svg {
    flex-shrink: 0;
    color: #34c759;
}
.nxc-cart-banner strong {
    font-weight: 600;
}

/* --- Column headers --- */
.view-cart-items-header {
    background: none !important;
    border-bottom: 1px solid #e8e8ed;
    padding: 0 0 12px !important;
    margin-bottom: 0;
    font-size: 12px;
    font-weight: 600;
    color: #86868b !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.view-cart-items-header .row {
    display: flex;
    align-items: center;
}

/* --- Cart Items --- */
.view-cart-items {
    background: none !important;
    border: none !important;
    padding: 0 !important;
}
.view-cart-items .item {
    border-bottom: 1px solid #e8e8ed;
    padding: 24px 0 !important;
    margin: 0 !important;
    background: none !important;
    transition: background 0.2s;
}
.view-cart-items .item:hover {
    background: #fafafa !important;
}
.view-cart-items .item > .row {
    display: flex;
    align-items: flex-start;
}

/* Product name */
.view-cart-items .item-title {
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #1d1d1f !important;
    display: block;
    margin-bottom: 4px;
    line-height: 1.3;
}

/* Group name */
.view-cart-items .item-group {
    font-size: 13px !important;
    color: #86868b !important;
    display: block;
    margin-bottom: 8px;
}

/* Config options — key specs shown, rest collapsed */
.view-cart-items .item small {
    display: block;
    font-size: 13px !important;
    color: #424245 !important;
    line-height: 1.8;
}
.nxc-specs-key {
    display: block;
    font-size: 13px;
    color: #424245;
    line-height: 1.8;
}
.nxc-specs-all {
    display: none;
    font-size: 13px;
    color: #6e6e73;
    line-height: 1.8;
    padding-top: 4px;
    border-top: 1px solid #f0f0f0;
    margin-top: 4px;
}
.nxc-specs-all.open {
    display: block;
}
.nxc-specs-toggle {
    display: inline-block;
    background: none;
    border: none;
    padding: 4px 0;
    color: #0071e3;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 4px;
}
.nxc-specs-toggle:hover {
    text-decoration: underline;
}

/* Price column */
.view-cart-items .item-price {
    text-align: right !important;
}
.view-cart-items .item-price > span:first-child {
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #1d1d1f !important;
    display: block;
}
.view-cart-items .item-price .cycle {
    font-size: 12px !important;
    color: #86868b !important;
    display: block;
    margin-top: 2px;
}

/* Edit / Remove links */
.edit-link-view-area {
    margin-top: 12px !important;
}
.edit-link-view-area .btn-link {
    color: #0071e3 !important;
    font-size: 13px;
    padding: 4px 8px;
    text-decoration: none;
    transition: color 0.2s;
}
.edit-link-view-area .btn-link:hover {
    color: #0077ed !important;
    text-decoration: underline;
}
.btn-remove-from-cart {
    color: #ff3b30 !important;
}
.btn-remove-from-cart:hover {
    color: #d70015 !important;
}

/* Quantity input */
.item-qty .form-control {
    width: 60px !important;
    height: 36px !important;
    border: 1px solid #d2d2d7 !important;
    border-radius: 8px !important;
    text-align: center !important;
    font-size: 14px !important;
    color: #1d1d1f !important;
    background: #fff !important;
    margin: 0 auto;
}
.item-qty .btn {
    font-size: 11px !important;
    color: #0071e3 !important;
    background: none !important;
    border: none !important;
    padding: 4px 0 !important;
    margin-top: 4px;
    display: block;
    text-align: center;
    width: 100%;
}

/* Empty / Continue buttons */
.empty-continue-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 0 0;
    border-top: none;
    background: none !important;
}
.empty-cart button {
    color: #ff3b30 !important;
    font-size: 13px !important;
    background: none !important;
    border: none !important;
}
.empty-cart button:hover {
    text-decoration: underline;
}
#continueShopping {
    background: none !important;
    color: #0071e3 !important;
    border: 1px solid #0071e3 !important;
    border-radius: 980px !important;
    padding: 10px 24px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    transition: all 0.2s !important;
}
#continueShopping:hover {
    background: #0071e3 !important;
    color: #fff !important;
}

/* --- Right Column: Order Summary --- */
.secondary-cart-sidebar {
    flex: 0 0 380px;
    width: 380px;
}
#order-standard_cart .order-summary {
    background: #1d1d1f !important;
    background-color: #1d1d1f !important;
    border-radius: 16px !important;
    padding: 28px !important;
    border: none !important;
    position: sticky;
    top: 100px;
}
#order-standard_cart .order-summary h2,
#order-standard_cart .order-summary .font-size-30 {
    font-size: 22px !important;
    font-weight: 700 !important;
    color: #f5f5f7 !important;
    margin: 0 0 20px !important;
    padding: 0 !important;
    border: none !important;
}
.summary-container {
    background: none !important;
    border: none !important;
    padding: 0 !important;
}

/* Subtotal row */
.subtotal {
    display: flex !important;
    justify-content: space-between !important;
    padding: 12px 0 !important;
    font-size: 14px !important;
    color: #424245 !important;
    border-bottom: 1px solid #d2d2d7 !important;
}
.subtotal span {
    color: #424245 !important;
    font-size: 14px !important;
}

/* Tax / discount rows */
.bordered-totals {
    border: none !important;
    padding: 0 !important;
}
.bordered-totals > .clearfix {
    display: flex !important;
    justify-content: space-between !important;
    padding: 10px 0 !important;
    font-size: 13px !important;
    color: #424245 !important;
}

/* Recurring totals */
.recurring-totals {
    display: none !important;
}

/* Promo code */
.promo-code-form {
    padding: 16px 0 !important;
    border-top: 1px solid #d2d2d7 !important;
    margin-top: 12px !important;
    background: none !important;
}
.promo-code-form h3,
.promo-code-form .promo-code-header {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #1d1d1f !important;
    margin: 0 0 10px !important;
    padding: 0 !important;
}
.promo-code-form form {
    display: flex !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
}
.promo-code-form .form-group {
    flex: 1 1 0% !important;
    min-width: 0 !important;
    margin-bottom: 0 !important;
}
.promo-code-form .form-group .field-icon {
    display: none !important;
}
.promo-code-form .form-control,
.promo-code-form #inputPromotionCode {
    width: 100% !important;
    height: 44px !important;
    border: 1px solid #d2d2d7 !important;
    border-radius: 10px !important;
    padding: 0 14px !important;
    font-size: 14px !important;
    color: #1d1d1f !important;
    background: #fff !important;
    outline: none !important;
    box-sizing: border-box !important;
}
.promo-code-form .form-control:focus,
.promo-code-form #inputPromotionCode:focus {
    border-color: #0071e3 !important;
    box-shadow: 0 0 0 3px rgba(0,113,227,0.15) !important;
}
.promo-code-form button[type="submit"],
.promo-code-form .hx-primary-btn {
    background: #1d1d1f !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 0 20px !important;
    height: 44px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s !important;
    flex-shrink: 0 !important;
}
.promo-code-form button[type="submit"]:hover,
.promo-code-form .hx-primary-btn:hover {
    background: #333336 !important;
}

/* Applied promo */
.promo-code-view {
    padding: 12px 0;
}
.view-cart-promotion-code {
    font-size: 13px !important;
    color: #34c759 !important;
    font-weight: 500;
    padding: 8px 12px;
    background: rgba(52,199,89,0.1);
    border-radius: 8px;
    text-align: center;
}
.remove-promo-btn .btn {
    font-size: 12px !important;
    color: #ff3b30 !important;
    margin-top: 8px;
}

/* Tax calculator */
.tax-calculator,
#calcTaxes {
    display: none !important;
}

/* Total due today */
.total-due-today {
    background: none !important;
    border-top: 2px solid #1d1d1f !important;
    margin-top: 16px !important;
    padding: 16px 0 0 !important;
    display: flex !important;
    flex-direction: column-reverse !important;
    align-items: center !important;
    text-align: center !important;
}
.total-due-today .amt,
.total-due-today #totalDueToday {
    font-size: 32px !important;
    font-weight: 700 !important;
    color: #1d1d1f !important;
    letter-spacing: -0.02em;
    display: block;
    margin-bottom: 2px;
}
.total-due-today > span:last-child {
    font-size: 12px !important;
    color: #86868b !important;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Express checkout */
.express-checkout-buttons .separator {
    font-size: 12px;
    color: #86868b;
    text-align: center;
    margin: 12px 0;
}

/* Checkout button */
.btn-checkout,
#checkout {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100% !important;
    background: #0071e3 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 980px !important;
    padding: 16px 32px !important;
    font-size: 17px !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: background 0.2s !important;
    margin-top: 20px !important;
    text-decoration: none !important;
    text-align: center !important;
}
.btn-checkout:hover,
#checkout:hover {
    background: #0077ed !important;
    color: #fff !important;
}
.btn-checkout.disabled,
#checkout.disabled {
    background: #d2d2d7 !important;
    color: #86868b !important;
    pointer-events: none;
}
.btn-checkout i,
#checkout i {
    font-size: 14px;
}

/* --- Nxtcore security strip --- */
.nxc-cart-trust {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e8e8ed;
}
.nxc-cart-trust__item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #86868b;
    font-weight: 500;
}
.nxc-cart-trust__item svg {
    flex-shrink: 0;
}

/* --- Empty Cart State --- */
.cart-is-empty-view {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 24px !important;
    min-height: 300px;
    text-align: center;
}
.empty-cart-sec {
    text-align: center;
}
.empty-cart-sec img {
    width: 80px;
    height: 80px;
    opacity: 0.3;
    margin-bottom: 24px;
}
.empty-cart-sec h3 {
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #1d1d1f !important;
    margin: 0 0 8px !important;
}
.nxc-empty-sub {
    font-size: 15px;
    color: #86868b;
    margin: 0 0 24px;
}
.empty-cart-sec .btn,
.empty-cart-sec .hx-secondary {
    background: #0071e3 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 980px !important;
    padding: 12px 32px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    transition: background 0.2s !important;
}
.empty-cart-sec .btn:hover,
.empty-cart-sec .hx-secondary:hover {
    background: #0077ed !important;
}

/* --- Modals --- */
#order-standard_cart .modal-remove-item .modal-content {
    border-radius: 16px !important;
    border: none !important;
    overflow: hidden;
    background: #fff !important;
}
#order-standard_cart .modal-remove-item .modal-body {
    padding: 32px 32px 20px !important;
    text-align: center !important;
    color: #1d1d1f !important;
    font-size: 15px !important;
}
#order-standard_cart .modal-remove-item .modal-body .close {
    font-size: 28px !important;
    width: 40px !important;
    height: 40px !important;
    opacity: 0.5 !important;
    line-height: 40px !important;
    padding: 0 !important;
    background: none !important;
    border: none !important;
    color: #1d1d1f !important;
}
#order-standard_cart .modal-remove-item .modal-body .close:hover {
    opacity: 1 !important;
}
#order-standard_cart .modal-remove-item .modal-title {
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #1d1d1f !important;
}
#order-standard_cart .modal-remove-item .modal-title i {
    color: #ff3b30 !important;
    background: rgba(255,59,48,0.1) !important;
    display: flex !important;
    width: 56px !important;
    height: 56px !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 auto 12px !important;
    border-radius: 50% !important;
    font-size: 24px !important;
}
#order-standard_cart .modal-remove-item .modal-footer {
    border: none !important;
    padding: 0 32px 32px !important;
    display: flex !important;
    gap: 12px !important;
    justify-content: center !important;
    background: #fff !important;
}
#order-standard_cart .modal-remove-item .modal-footer .btn-default {
    background: #e8e8ed !important;
    border: none !important;
    border-radius: 980px !important;
    padding: 10px 28px !important;
    font-weight: 500 !important;
    color: #1d1d1f !important;
    font-size: 14px !important;
    min-width: 100px !important;
}
#order-standard_cart .modal-remove-item .modal-footer .btn-default:hover {
    background: #d2d2d7 !important;
}
#order-standard_cart .modal-remove-item .modal-footer .btn-primary {
    background: #ff3b30 !important;
    border: none !important;
    border-radius: 980px !important;
    padding: 10px 28px !important;
    font-weight: 600 !important;
    color: #fff !important;
    font-size: 14px !important;
    min-width: 100px !important;
}
#order-standard_cart .modal-remove-item .modal-footer .btn-primary:hover {
    background: #d70015 !important;
}

/* --- Alerts --- */
.hostx-cart-body-section .alert {
    border-radius: 12px !important;
    border: none !important;
    font-size: 14px !important;
    padding: 14px 20px !important;
}
.hostx-cart-body-section .alert-success {
    background: rgba(52,199,89,0.1) !important;
    color: #1d7a34 !important;
}
.hostx-cart-body-section .alert-warning {
    background: rgba(255,159,10,0.1) !important;
    color: #995c00 !important;
}
.hostx-cart-body-section .alert-danger {
    background: rgba(255,59,48,0.1) !important;
    color: #d70015 !important;
}
.hostx-cart-body-section .alert-info {
    background: rgba(0,113,227,0.08) !important;
    color: #0055a5 !important;
}

/* --- Hook output / recommendations --- */
.recommendations-product-market-connect {
    margin-top: 32px;
    padding: 24px;
    background: #f5f5f7;
    border-radius: 16px;
}

/* --- Loader --- */
.order-summary .loader {
    text-align: center;
    padding: 8px 0;
    color: #0071e3;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 991px) {
    .secondary-cart-body {
        padding-right: 0;
        flex: 1 1 100%;
    }
    .secondary-cart-sidebar {
        flex: 1 1 100% !important;
        width: 100% !important;
        margin-top: 32px;
    }
    .order-summary {
        position: static !important;
    }
}

@media (max-width: 768px) {
    .view-cart-page {
        padding: 16px 16px 60px;
    }
    .secondary-cart-body .header-lined h1,
    .secondary-cart-body .header-lined .font-size-36 {
        font-size: 24px !important;
    }
    .view-cart-items .item-title {
        font-size: 16px !important;
    }
    .view-cart-items .item-price > span:first-child {
        font-size: 16px !important;
    }
    .view-cart-items-header {
        display: none !important;
    }
    .view-cart-items .item > .row {
        flex-direction: column;
    }
    .view-cart-items .item-price {
        text-align: left !important;
        margin-top: 12px;
    }
    .order-summary {
        padding: 20px !important;
    }
    .total-due-today .amt,
    .total-due-today #totalDueToday {
        font-size: 24px !important;
    }
    .btn-checkout,
    #checkout {
        font-size: 15px !important;
        padding: 14px 24px !important;
    }
    .empty-continue-button {
        flex-direction: column-reverse;
        gap: 12px;
    }
    .nxc-cart-trust {
        flex-wrap: wrap;
        gap: 12px;
    }
    .nxc-cart-banner {
        font-size: 13px;
    }
    /* Promo form — stack on mobile */
    .promo-code-form form {
        flex-direction: column !important;
    }
    .promo-code-form .form-group {
        flex: 1 1 100% !important;
    }
    .promo-code-form button[type="submit"],
    .promo-code-form .hx-primary-btn {
        width: 100% !important;
        height: 44px !important;
    }
    .promo-code-form .form-control,
    .promo-code-form #inputPromotionCode {
        height: 44px !important;
        font-size: 16px !important;  /* prevent iOS zoom */
    }
    /* Order summary full bleed on mobile */
    #order-standard_cart .order-summary {
        border-radius: 12px !important;
        margin: 0 -4px !important;
    }
}


/* ============================================
   ORDER SUMMARY — Black Background Override
   (uses #order-standard_cart to beat HostX specificity)
   ============================================ */
#order-standard_cart .order-summary,
div#orderSummary,
.view-cart-page div#orderSummary {
    background: #1d1d1f !important;
    background-color: #1d1d1f !important;
}
#order-standard_cart .order-summary h2,
#order-standard_cart .order-summary .font-size-30 {
    color: #f5f5f7 !important;
}
#order-standard_cart .order-summary .subtotal,
#order-standard_cart .order-summary .subtotal span {
    color: #d2d2d7 !important;
}
#order-standard_cart .order-summary .bordered-totals > .clearfix,
#order-standard_cart .order-summary .bordered-totals span {
    color: #d2d2d7 !important;
}
#order-standard_cart .order-summary .subtotal {
    border-bottom-color: rgba(255,255,255,0.15) !important;
}
#order-standard_cart .order-summary .promo-code-form {
    border-top-color: rgba(255,255,255,0.15) !important;
}
#order-standard_cart .order-summary .promo-code-form h3,
#order-standard_cart .order-summary .promo-code-form .promo-code-header {
    color: #f5f5f7 !important;
}
#order-standard_cart .order-summary .promo-code-form .form-control,
#order-standard_cart .order-summary .promo-code-form #inputPromotionCode {
    background: rgba(255,255,255,0.1) !important;
    border-color: rgba(255,255,255,0.2) !important;
    color: #fff !important;
}
#order-standard_cart .order-summary .promo-code-form .form-control::placeholder,
#order-standard_cart .order-summary .promo-code-form #inputPromotionCode::placeholder {
    color: rgba(255,255,255,0.4) !important;
}
#order-standard_cart .order-summary .promo-code-form .form-control:focus,
#order-standard_cart .order-summary .promo-code-form #inputPromotionCode:focus {
    border-color: #0071e3 !important;
    box-shadow: 0 0 0 3px rgba(0,113,227,0.3) !important;
}
#order-standard_cart .order-summary .promo-code-form button[type="submit"],
#order-standard_cart .order-summary .promo-code-form .hx-primary-btn {
    background: #fff !important;
    color: #1d1d1f !important;
}
#order-standard_cart .order-summary .promo-code-form button[type="submit"]:hover,
#order-standard_cart .order-summary .promo-code-form .hx-primary-btn:hover {
    background: #e8e8ed !important;
}
#order-standard_cart .order-summary .total-due-today {
    border-top-color: rgba(255,255,255,0.25) !important;
}
#order-standard_cart .order-summary .total-due-today .amt,
#order-standard_cart .order-summary .total-due-today #totalDueToday {
    color: #fff !important;
}
#order-standard_cart .order-summary .total-due-today > span:last-child {
    color: rgba(255,255,255,0.6) !important;
}
#order-standard_cart .order-summary .btn-checkout,
#order-standard_cart .order-summary #checkout {
    background: #0071e3 !important;
    color: #fff !important;
}
#order-standard_cart .order-summary .nxc-cart-trust {
    border-top-color: rgba(255,255,255,0.12) !important;
}
#order-standard_cart .order-summary .nxc-cart-trust__item {
    color: rgba(255,255,255,0.5) !important;
}
#order-standard_cart .order-summary .view-cart-promotion-code {
    color: #30d158 !important;
    background: rgba(48,209,88,0.15) !important;
}
#order-standard_cart .order-summary .loader {
    color: #64d2ff !important;
}
#order-standard_cart .order-summary .recurring-totals {
    color: #d2d2d7 !important;
}
#order-standard_cart .order-summary .recurring-totals span {
    color: #d2d2d7 !important;
}

/* ============================================
   Edit/Remove Buttons Fix
   ============================================ */
.edit-link-view-area {
    display: flex !important;
    gap: 4px !important;
    flex-wrap: wrap !important;
}
.edit-link-view-area .btn-link {
    font-size: 12px !important;
    padding: 2px 6px !important;
    white-space: nowrap !important;
}

/* ============================================
   Edit/Remove Buttons — Overflow Fix
   ============================================ */
.view-cart-items .item-price {
    overflow: visible !important;
}
.edit-link-view-area {
    display: flex !important;
    gap: 2px !important;
    flex-wrap: nowrap !important;
    justify-content: flex-end !important;
}
.edit-link-view-area .btn-link {
    font-size: 12px !important;
    padding: 2px 4px !important;
    white-space: nowrap !important;
}
.edit-link-view-area .btn-link i {
    font-size: 11px !important;
}

/* ============================================
   Edit/Remove — Icon-only on desktop, compact
   ============================================ */
.edit-link-view-area {
    display: inline-flex !important;
    gap: 8px !important;
    align-items: center !important;
    justify-content: flex-end !important;
    margin-top: 8px !important;
}
.edit-link-view-area .btn-link {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    border-radius: 8px !important;
    font-size: 0 !important;
    background: #f5f5f7 !important;
    transition: background 0.2s, color 0.2s !important;
}
.edit-link-view-area .btn-link i {
    font-size: 13px !important;
}
.edit-link-view-area .btn-link:hover {
    background: #e8e8ed !important;
    text-decoration: none !important;
}
.edit-link-view-area .btn-remove-from-cart {
    background: rgba(255,59,48,0.08) !important;
}
.edit-link-view-area .btn-remove-from-cart:hover {
    background: rgba(255,59,48,0.15) !important;
}
/* Hide text labels, show only icons */
.edit-link-view-area .btn-remove-from-cart span {
    display: none !important;
}
