/* =========================================================
   Hosting Malaya Cart - css/custom.css
   Loaded automatically on every cart page by
   standard_cart/common.tpl ({assetExists file="custom.css"}).

   Uses the Hosting Malaya theme tokens (--hm-*) when the
   "Hosting Malaya" system theme is active, with fallbacks so the
   order form still looks right under other system themes.
   ========================================================= */

#order-standard_cart {
    --hmc-blue: var(--hm-blue, #004AAD);
    --hmc-blue-600: var(--hm-blue-600, #1F5FD6);
    --hmc-blue-bright: var(--hm-blue-bright, #2F7BFF);
    --hmc-blue-soft: var(--hm-blue-soft, #E8F0FF);
    --hmc-yellow: var(--hm-yellow, #FFCC00);
    --hmc-yellow-hover: var(--hm-yellow-hover, #FFD83D);
    --hmc-navy: var(--hm-navy-950, #020A1C);
    --hmc-ink: var(--hm-ink, #0B1220);
    --hmc-text: var(--hm-text, #1C2638);
    --hmc-muted: var(--hm-muted, #5A6880);
    --hmc-line: var(--hm-line, #E4E9F2);
    --hmc-soft: var(--hm-soft, #F4F7FC);
    --hmc-display: var(--hm-font-display, 'Poppins', ui-sans-serif, system-ui, sans-serif);
    --hmc-shadow: 0 12px 34px -26px rgba(2, 10, 28, .5);
    --hmc-shadow-hover: 0 24px 54px -28px rgba(2, 10, 28, .55);
    --hmc-ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Layout ---------- */
/* Standard Cart's own column gutters. The Nexus theme removes them (pushing the cart
   15px past the header), so set them explicitly - every cart page then lines up. */
body #order-standard_cart .cart-body {
    padding-right: 15px !important;
    padding-left: 15px !important;
}

/* ---------- Page headings ---------- */
body #order-standard_cart .header-lined h1,
body #order-standard_cart .cart-body .header-lined h1 {
    color: var(--hmc-ink);
    font-family: var(--hmc-display);
    font-weight: 800;
    letter-spacing: -.02em;
}

body #order-standard_cart .header-lined p {
    margin: 6px 0 0;
    color: var(--hmc-muted);
    font-size: 1.02rem;
}

/* ---------- Phones & tablets: no category/actions/currency dropdowns ----------
   Below 1200px Standard Cart repeats the sidebar as dropdown boxes above every cart
   page, which customers mistook for a required step. Categories are in the header's
   Store menu (and as chips under the plans in products.tpl); currency is in the footer. */
#order-standard_cart .sidebar-collapsed {
    display: none !important;
}

#order-standard_cart .hm-other-cats {
    display: none;
    margin-top: 28px;
    padding: 20px;
    background: #fff;
    border: 1px solid var(--hmc-line);
    border-radius: 16px;
    box-shadow: var(--hmc-shadow);
}

@media (max-width: 1199.98px) {
    #order-standard_cart .hm-other-cats {
        display: block;
    }
}

#order-standard_cart .hm-other-cats-title {
    margin: 0 0 12px;
    color: var(--hmc-ink);
    font: 700 1rem/1.3 var(--hmc-display);
}

#order-standard_cart .hm-other-cats-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

#order-standard_cart a.hm-cat-chip {
    display: inline-flex;
    align-items: center;
    padding: 7px 13px;
    background: var(--hmc-soft);
    border: 1px solid var(--hmc-line);
    border-radius: 999px;
    color: var(--hmc-text);
    font-size: .86rem;
    font-weight: 500;
    line-height: 1.3;
    text-decoration: none;
    transition: background-color .15s, border-color .15s, color .15s;
}

#order-standard_cart a.hm-cat-chip:hover,
#order-standard_cart a.hm-cat-chip:focus {
    background: var(--hmc-blue-soft);
    border-color: #C6D5F2;
    color: var(--hmc-blue);
}

#order-standard_cart a.hm-cat-chip.active {
    background: var(--hmc-blue);
    border-color: var(--hmc-blue);
    color: #fff;
}

/* ---------- Category sidebar ---------- */
body #order-standard_cart .cart-sidebar .card {
    overflow: hidden;
    border: 1px solid var(--hmc-line);
    border-radius: 16px;
    box-shadow: var(--hmc-shadow);
}

body #order-standard_cart .cart-sidebar .card-header {
    background: #fff;
    border-bottom: 1px solid var(--hmc-line);
    font-family: var(--hmc-display);
}

body #order-standard_cart .cart-sidebar .list-group-item {
    padding: 10px 18px;
    color: var(--hmc-text);
    transition: background-color .15s, color .15s;
}

body #order-standard_cart .cart-sidebar a.list-group-item:hover,
body #order-standard_cart .cart-sidebar a.list-group-item:focus {
    background-color: var(--hmc-soft);
    color: var(--hmc-blue);
}

body #order-standard_cart .cart-sidebar .list-group-item.active,
body #order-standard_cart .cart-sidebar .list-group-item.active:hover,
body #order-standard_cart .cart-sidebar .list-group-item.active:focus {
    background-color: var(--hmc-blue-soft);
    color: var(--hmc-blue);
    font-weight: 600;
    box-shadow: inset 3px 0 0 var(--hmc-blue);
}

/* ---------- Product cards (products.tpl) ---------- */
#order-standard_cart.hm-cart .products.hm-products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
    align-items: stretch;
    margin: 6px 0 10px;
    padding-top: 14px;
}

#order-standard_cart.hm-cart .products .product.hm-product {
    position: relative;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 26px 22px 22px;
    background: #fff;
    border: 1px solid var(--hmc-line);
    border-radius: 20px;
    box-shadow: var(--hmc-shadow);
    transition: transform .25s var(--hmc-ease), box-shadow .25s, border-color .25s;
}

#order-standard_cart.hm-cart .products .product.hm-product:hover {
    border-color: #C6D5F2;
    box-shadow: var(--hmc-shadow-hover);
    transform: translateY(-4px);
}

#order-standard_cart.hm-cart .products .product.hm-product-featured {
    border: 2px solid var(--hmc-blue-bright);
    box-shadow: 0 20px 50px -26px rgba(47, 123, 255, .7);
}

#order-standard_cart.hm-cart .hm-product-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--hmc-blue);
    color: #fff;
    font: 700 .68rem/1.3 var(--hmc-display);
    letter-spacing: .05em;
    text-transform: uppercase;
    white-space: nowrap;
    transform: translateX(-50%);
}

#order-standard_cart.hm-cart .products .product.hm-product header {
    position: static;
    display: block; /* Nexus makes this a flex row, which squeezes the name next to the stock count */
    margin: 0;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 0;
}

#order-standard_cart.hm-cart .products .product.hm-product header .hm-product-name {
    color: var(--hmc-ink);
    font: 700 1.25rem/1.25 var(--hmc-display);
}

/* Stock control: "1 Available" as a small badge under the product name */
#order-standard_cart.hm-cart .products .product.hm-product header .qty {
    float: none;
    display: inline-block;
    margin-top: 8px;
    padding: 3px 10px;
    border-radius: 999px;
    background: #FFF4C2;
    color: #8A6500;
    font-size: .74rem;
    font-style: normal;
    font-weight: 600;
    line-height: 1.4;
}

#order-standard_cart.hm-cart .hm-product-desc {
    margin: 6px 0 0;
    color: var(--hmc-muted);
    font-size: .88rem;
    line-height: 1.5;
}

#order-standard_cart.hm-cart .products .product div.hm-product-pricing {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 16px 0;
}

#order-standard_cart.hm-cart .hm-price-label {
    color: var(--hmc-muted);
    font-size: .74rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
}

#order-standard_cart.hm-cart .products .product div.hm-product-pricing span.price {
    color: var(--hmc-ink);
    font: 800 1.65rem/1.15 var(--hmc-display);
    letter-spacing: -.02em;
}

#order-standard_cart.hm-cart .hm-price-cycle {
    color: var(--hmc-muted);
    font-size: .9rem;
    font-weight: 600;
}

#order-standard_cart.hm-cart .hm-price-setup {
    color: var(--hmc-muted);
}

#order-standard_cart.hm-cart .btn-order-now.hm-btn-order {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5em;
    width: 100%;
    padding: .8em 1em;
    background: var(--hmc-yellow);
    border: 0;
    border-radius: 12px;
    color: #111827;
    font: 600 .95rem/1.2 var(--hmc-display);
    box-shadow: 0 10px 28px -10px rgba(255, 204, 0, .7);
    transition: transform .2s var(--hmc-ease), box-shadow .2s, background-color .2s;
}

#order-standard_cart.hm-cart .btn-order-now.hm-btn-order:hover,
#order-standard_cart.hm-cart .btn-order-now.hm-btn-order:focus {
    background: var(--hmc-yellow-hover);
    color: #111827;
    box-shadow: 0 16px 36px -12px rgba(255, 204, 0, .85);
    transform: translateY(-2px);
}

#order-standard_cart.hm-cart .hm-product-featured .btn-order-now.hm-btn-order,
#order-standard_cart.hm-cart .hm-product-featured .btn-order-now.hm-btn-order:hover,
#order-standard_cart.hm-cart .hm-product-featured .btn-order-now.hm-btn-order:focus {
    background: linear-gradient(135deg, var(--hmc-blue-600), var(--hmc-blue));
    color: #fff;
    box-shadow: 0 10px 28px -12px rgba(31, 95, 214, .8);
}

#order-standard_cart.hm-cart .hm-product-specs {
    display: grid;
    gap: 9px;
    margin: 18px 0 0;
    padding: 16px 0 0;
    border-top: 1px dashed var(--hmc-line);
    color: #3A4A66;
    font-size: .88rem;
    list-style: none;
}

#order-standard_cart.hm-cart .hm-product-specs li {
    position: relative;
    padding-left: 23px;
    line-height: 1.45;
}

#order-standard_cart.hm-cart .hm-product-specs li::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 0;
    width: 15px;
    height: 15px;
    background: #22C55E;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
}

#order-standard_cart.hm-cart .products .product span.feature-value {
    color: var(--hmc-ink);
    font-weight: 700;
}

/* ---------- Configure product ---------- */
body #order-standard_cart .product-info {
    background: #fff;
    border: 1px solid var(--hmc-line);
    border-left: 4px solid var(--hmc-yellow);
    border-radius: 14px;
}

body #order-standard_cart .product-info .product-title {
    color: var(--hmc-ink);
    font-family: var(--hmc-display);
    font-weight: 700;
}

body #order-standard_cart .sub-heading span,
body #order-standard_cart .sub-heading-borderless span {
    background: var(--hm-soft, #F8F9FA);
    color: var(--hmc-ink);
    font-family: var(--hmc-display);
    font-weight: 600;
}

/* ---------- View cart & order summary ---------- */
body #order-standard_cart .cart-body .view-cart-items-header {
    background-color: var(--hmc-soft);
    border-color: var(--hmc-line);
    border-radius: 14px 14px 0 0;
    font-family: var(--hmc-display);
    font-weight: 600;
}

body #order-standard_cart .cart-body .view-cart-items .item {
    background: #fff;
    border-color: var(--hmc-line);
}

body #order-standard_cart .cart-body .view-cart-items .item:last-child {
    border-radius: 0 0 14px 14px;
}

body #order-standard_cart .order-summary {
    overflow: hidden;
    border-radius: 16px;
    box-shadow: var(--hmc-shadow);
}

body #order-standard_cart .order-summary h2 {
    margin: 0;
    padding: 14px 18px;
    background: var(--hmc-navy);
    border: 0;
    border-radius: 16px 16px 0 0;
    color: #fff;
    font: 700 1.1rem/1.3 var(--hmc-display);
}

body #order-standard_cart .order-summary .summary-container {
    border-color: var(--hmc-line);
    border-radius: 0 0 16px 16px;
}

body #order-standard_cart .order-summary .total-due-today .amt {
    color: var(--hmc-blue);
    font-family: var(--hmc-display);
    font-weight: 800;
}

body #order-standard_cart .btn-checkout,
body #order-standard_cart .text-right .btn-checkout {
    background: var(--hmc-yellow);
    border-color: var(--hmc-yellow);
    border-radius: 12px;
    color: #111827;
    font-family: var(--hmc-display);
    font-weight: 700;
    box-shadow: 0 10px 28px -10px rgba(255, 204, 0, .7);
}

body #order-standard_cart .btn-checkout:hover,
body #order-standard_cart .btn-checkout:focus,
body #order-standard_cart .text-right .btn-checkout:hover,
body #order-standard_cart .text-right .btn-checkout:focus {
    background: var(--hmc-yellow-hover);
    border-color: var(--hmc-yellow-hover);
    color: #111827;
}

body #order-standard_cart .order-summary .btn-continue-shopping {
    color: var(--hmc-blue);
}

/* ---------- Domain search ---------- */
#order-standard_cart .domain-checker-container {
    background: linear-gradient(135deg, #004AAD 0%, #0A2E7A 55%, #05163D 100%);
    border-radius: 20px;
    box-shadow: 0 30px 70px -40px rgba(0, 74, 173, .9);
}

#order-standard_cart .domain-checker-container .btn-primary {
    background: var(--hmc-yellow);
    border-color: var(--hmc-yellow);
    color: #111827;
    box-shadow: none;
}

#order-standard_cart .domain-checker-container .btn-primary:hover,
#order-standard_cart .domain-checker-container .btn-primary:focus {
    background: var(--hmc-yellow-hover);
    border-color: var(--hmc-yellow-hover);
    color: #111827;
}

/* Standard Cart's globe artwork is drawn for its yellow box; on our blue it overwhelms */
#order-standard_cart .domain-checker-bg {
    padding: 48px 0;
    border-radius: inherit; /* keeps the glow inside the rounded box (no overflow:hidden - it would clip dropdowns) */
    background-image: radial-gradient(420px 420px at 100% 0%, rgba(255, 204, 0, .22), transparent 65%);
    background-position: 0 0;
    background-size: auto;
}

@media (max-width: 991.98px) {
    #order-standard_cart .domain-checker-bg {
        padding: 28px 0;
    }
}

/* WHMCS 9 AI domain search ("AI Domain Namespinning"): full-width textarea,
   then one row with the filters on the left and the Search button on the right */
#order-standard_cart .domain-checker-advanced .input-group-box {
    align-items: center;
    gap: 6px 8px;
    padding: 10px;
    border-radius: 16px;
    box-shadow: 0 20px 50px -24px rgba(0, 0, 0, .55);
}

#order-standard_cart .domain-checker-advanced .input-group-box > * {
    order: 1;
}

#order-standard_cart .domain-checker-advanced textarea {
    display: block;
    flex: 0 0 100%;
    width: 100%;
    height: 112px;
    padding: 12px 14px;
    background: var(--hmc-soft);
    border: 1px solid #D5DEEC;
    border-radius: 12px;
    color: var(--hmc-ink);
    font: 500 .98rem/1.55 var(--hm-font-body, 'Inter', ui-sans-serif, system-ui, sans-serif);
    outline: 0;
    resize: none;
    transition: border-color .2s, box-shadow .2s, background-color .2s;
}

#order-standard_cart .domain-checker-advanced textarea::placeholder {
    color: #7B8AA3;
}

#order-standard_cart .domain-checker-advanced textarea:focus {
    background: #fff;
    border-color: var(--hmc-yellow);
    box-shadow: 0 0 0 4px rgba(255, 204, 0, .35);
}

.domain-checker-container.domain-checker-advanced #btnCheckAvailability {
    position: static;
    order: 2;
    width: auto;
    min-width: 128px;
    height: 44px;
    margin-left: auto;
    border-radius: 12px;
    font-family: var(--hmc-display);
    font-weight: 600;
    white-space: nowrap;
}

#order-standard_cart .domain-checker-advanced label {
    color: var(--hmc-text);
    font-size: .8rem;
}

@media (max-width: 575.98px) {
    #order-standard_cart .domain-checker-advanced textarea {
        height: 150px;
    }

    .domain-checker-container.domain-checker-advanced #btnCheckAvailability {
        flex: 0 0 100%;
        margin: 4px 0 0;
    }
}

/* ---------- Responsive ---------- */
@media (max-width: 575.98px) {
    #order-standard_cart.hm-cart .products.hm-products {
        grid-template-columns: minmax(0, 1fr);
    }
}
