.pas-service-header, .pas-assembly-header {
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.pas-service-header h4, 
.pas-assembly-header h4 {
    font-size: 20px;
    color: #222;
    margin-bottom: 0px;
}

.pas-service-details, .pas-assembly-details  {
    margin-bottom: 15px;
}

.pas-service-row,
.pas-assembly-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 15px;
}

.pas-label,
.pas-assembly {
    font-weight: 600;
    color: #555;
}

.pas-value {
    color: #333;
}

/* Bundle discount: the old price stays visible but recedes, the payable price
   leads. The badge below explains WHY it is lower, so the saving reads as a
   reason to add the service rather than as an unexplained number. */
.pas-price-was {
    color: #8a97a3;
    text-decoration: line-through;
    margin-right: 7px;
    font-weight: 400;
}

.pas-price-now {
    color: #0f3d5c;
    font-weight: 700;
}

.pas-discount-row {
    margin-top: -2px;
}

/* Terms under the badge: legally required context (the discount only applies
   when bought with the machine), so present but visually subordinate. */
.pas-discount-terms {
    margin: 6px 0 0;
    font-size: 0.8em;
    line-height: 1.45;
    color: #6b7a88;
}

.pas-discount-tag {
    display: inline-block;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.35;
    color: #0f6d3f;
    background: #e8f7ee;
    border: 1px solid #c9e9d6;
    border-radius: 5px;
    padding: 3px 9px;
}

.pas-service-action {
    margin-top: 10px;
}

.pas-checkbox-label {
    font-size: 15px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pas-checkbox-label input[type="checkbox"] {
    transform: scale(1.2);
    cursor: pointer;
}

.pas-service-notice {
    margin-top: 10px;
    border-top: 1px solid #eee;
    padding-top: 5px;
}

/* Apply background color to the entire row */
.woocommerce-cart-form__cart-item.pas-service-row-cart,
.woocommerce-cart-form__cart-item.pas-assembly-row-cart {
    background-color: #f9f9f9 !important;
    /* Changed from red to subtle grey, but use red if you want to test */
}

/* Indent the product name and remove the 'X' remove button if you want it to look like a sub-item */
.pas-service-row-cart .product-name,
.pas-assembly-row-cart .product-name {
    padding-left: 30px !important;
    position: relative;
}

/* Optional: Add a small return arrow icon before the service name to show it's linked */
.pas-service-row-cart .product-name::before,
.pas-assembly-row-cart .product-name::before {
    content: "↳";
    position: absolute;
    left: 10px;
    color: #ccc;
    font-size: 1.2em;
}

/* Optional: Dim the SKU or other meta in the service row */
.pas-service-row-cart .sku_wrapper,
.pas-service-row-cart .product-thumbnail,
.pas-assembly-row-cart .sku_wrapper,
.pas-assembly-row-cart .product-thumbnail {
    opacity: 0.5;
}


/* Catalog CSS */


.pas-service-catalog__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.pas-service-catalog[data-cols="2"] .pas-service-catalog__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pas-service-catalog[data-cols="4"] .pas-service-catalog__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.pas-service-catalog[data-cols="5"] .pas-service-catalog__grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.pas-service-catalog__card {
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.pas-service-catalog__body {
    padding: 12px;
}

.pas-service-catalog__title {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
    text-decoration: none;
    min-height: 65px;
}
.pas-add-service-btn,
.pas-add-assembly-btn {
    background: rgb(47, 47, 47) !important;
    color: #fff !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px !important;
    width: 100%;
}
.bs-offer-add-service-only,
.bs-offer-add-assembly-only{
    background: #1b99d7 !important;
    color: #fff !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px !important;
    width: 100%;
}
.pas-service-catalog__meta {
    text-align: center;
}

.pas-service-catalog__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
    justify-content: center;
}

.pas-service-catalog__search {
    margin-bottom: 12px;
}

.pas-service-catalog__search-input {
    width: 100%;
    max-width: 420px;
    padding: 10px 12px;
}


/* ==========================================================================
   Service catalogue since 1.22.0 ([pas_service_catalog]): a lookup, the tree
   of categories and the machines as rows, in the shop's current look - one
   blue, pill buttons, soft cards. The older rules above still dress the
   assembly catalogue; where a row carries one of their classes too
   (.pas-service-catalog__card, the two buttons) the rules below are more
   specific, and beat their !important with one of their own.
   Written left to right: bs-rtl.php mirrors this file for Arabic.
   ========================================================================== */
.pas-sc {
    --pas-blue: #1b99d7;
    --pas-blue-dark: #147db1;
    --pas-ink: #0f172a;
    --pas-text: #334155;
    --pas-muted: #64748b;
    --pas-line: #e2e8f0;
    --pas-soft: #f8fafc;
    margin: 8px 0 56px;
    color: var(--pas-text);
}
.pas-sc__intro {
    margin: 0 0 6px;
    font-size: 17px;
    line-height: 1.5;
}
.pas-sc__help {
    margin: 0 0 18px;
    color: var(--pas-muted);
    font-size: 15px;
    line-height: 1.5;
}
.pas-sc__help a {
    color: var(--pas-blue-dark);
    font-weight: 600;
    text-decoration: underline;
}

/* Lookup. It is the quickest way to a machine among 150 rows, so it has to be the first thing seen:
   a tinted band across the page with a field outlined in the shop's blue (Tilen, 5 Oct 2026: the pale
   hairline field of 1.22.0 was easy to miss). */
.pas-sc__search {
    position: relative;
    margin: 0 0 26px;
    padding: 18px;
    border: 1px solid #cfe8f6;
    border-radius: 16px;
    background: #e8f5fc;
}
.pas-sc__search svg {
    position: absolute;
    left: 40px;
    top: 50%;
    width: 24px;
    height: 24px;
    transform: translateY(-50%);
    color: var(--pas-blue-dark);
    pointer-events: none;
}
.pas-sc .pas-sc__search-input {
    width: 100%;
    height: 60px;
    padding: 0 22px 0 60px;
    border: 2px solid var(--pas-blue);
    border-radius: 999px;
    background: #fff;
    color: var(--pas-ink);
    font: inherit;
    font-size: 18px;
    font-weight: 500;
    box-shadow: 0 4px 14px rgba(27, 153, 215, .16);
}
.pas-sc .pas-sc__search-input::placeholder {
    color: #475569;
    opacity: 1;
}
.pas-sc .pas-sc__search-input:focus {
    outline: 0;
    border-color: var(--pas-blue-dark);
    box-shadow: 0 0 0 4px rgba(27, 153, 215, .25);
}

/* Tree beside list */
.pas-sc__layout {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}
.pas-sc--flat .pas-sc__layout {
    grid-template-columns: minmax(0, 1fr);
}
.pas-sc__tree-box {
    position: sticky;
    top: 96px;
    max-height: calc(100vh - 120px);
    overflow: auto;
    padding: 8px;
    border: 1px solid var(--pas-line);
    border-radius: 14px;
    background: #fff;
}
.pas-sc__tree-box > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px 8px;
    list-style: none;
    cursor: default;
    color: var(--pas-muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.pas-sc__tree-box > summary::-webkit-details-marker {
    display: none;
}
.pas-sc__branch {
    margin: 0;
    padding: 0;
    list-style: none;
}
.pas-sc__branch .pas-sc__branch {
    margin-left: 14px;
    padding-left: 8px;
    border-left: 1px solid var(--pas-line);
}
.pas-sc .pas-sc__node {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-height: 0;
    padding: 9px 12px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    box-shadow: none;
    color: var(--pas-ink);
    font: inherit;
    font-size: 14.5px;
    font-weight: 400;
    line-height: 1.3;
    letter-spacing: 0;
    text-align: left;
    text-transform: none;
    cursor: pointer;
}
.pas-sc .pas-sc__node:hover {
    background: var(--pas-soft);
}
.pas-sc .pas-sc__node.is-active {
    background: #e8f5fc;
    color: var(--pas-blue-dark);
    font-weight: 600;
}
.pas-sc__node-n {
    flex: 0 0 auto;
    min-width: 28px;
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--pas-soft);
    color: var(--pas-muted);
    font-size: 12px;
    font-weight: 600;
    text-align: center;
}
.pas-sc__node.is-active .pas-sc__node-n {
    background: #fff;
    color: var(--pas-blue-dark);
}

/* Rows */
.pas-sc__count {
    margin: 0 0 12px;
    color: var(--pas-muted);
    font-size: 14px;
}
.pas-sc .pas-sc__item.pas-service-catalog__card {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr) auto;
    gap: 20px;
    align-items: center;
    margin: 0 0 12px;
    padding: 16px 20px;
    overflow: visible;
    border: 1px solid var(--pas-line);
    border-radius: 14px;
    background: #fff;
    transition: box-shadow .15s ease, border-color .15s ease;
}
.pas-sc .pas-sc__item[hidden] {
    display: none;
}
.pas-sc .pas-sc__item:hover {
    border-color: #cbd5e1;
    box-shadow: 0 6px 20px rgba(15, 23, 42, .06);
}
.pas-sc .pas-sc__item.is-target {
    border-color: var(--pas-blue);
    box-shadow: 0 0 0 3px rgba(27, 153, 215, .18);
}
.pas-sc__thumb img {
    display: block;
    width: 104px;
    height: 104px;
    border-radius: 10px;
    background: #fff;
    object-fit: contain;
}
.pas-sc .pas-sc__title {
    margin: 0 0 4px;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: 0;
    text-transform: none;
}
.pas-sc .pas-sc__title a {
    color: var(--pas-ink);
    text-decoration: none;
}
.pas-sc .pas-sc__title a:hover {
    color: var(--pas-blue-dark);
}
.pas-sc__sku {
    margin: 0 0 8px;
    color: var(--pas-muted);
    font-size: 13px;
}
.pas-sc__where {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
}
.pas-sc__where svg {
    flex: 0 0 auto;
    margin-top: 1px;
    color: var(--pas-blue);
}

/* Price and buttons: the number of services and the price on one line, the two buttons below it */
.pas-sc__buy {
    display: grid;
    gap: 8px;
    width: 300px;
}
.pas-sc__buy-top {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 2px;
}
.pas-sc__price {
    margin: 0;
    line-height: 1.2;
    text-align: right;
}
.pas-sc__price-label {
    display: block;
    color: var(--pas-muted);
    font-size: 12px;
}
.pas-sc__price strong {
    color: var(--pas-ink);
    font-size: 24px;
    font-weight: 700;
}
.pas-sc__price small {
    margin-left: 4px;
    color: var(--pas-muted);
    font-size: 12px;
}
.pas-sc .pas-sc__buy .pas-sc__btn.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    margin: 0;
    padding: 10px 16px;
    border-radius: 999px;
    box-shadow: none;
    font-size: 14px !important;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0;
    text-transform: none;
    cursor: pointer;
}
.pas-sc .pas-sc__buy .pas-sc__btn--buy.button {
    border: 1px solid var(--pas-blue);
    background: var(--pas-blue) !important;
    color: #fff !important;
}
.pas-sc .pas-sc__buy .pas-sc__btn--buy.button:hover {
    border-color: var(--pas-blue-dark);
    background: var(--pas-blue-dark) !important;
}
.pas-sc .pas-sc__buy .pas-sc__btn--offer.button {
    min-height: 40px;
    border: 1px solid #b9dff2;
    background: #fff !important;
    color: var(--pas-blue-dark) !important;
}
.pas-sc .pas-sc__buy .pas-sc__btn--offer.button:hover {
    background: #e8f5fc !important;
}
.pas-sc .pas-sc__buy .pas-sc__btn.button:disabled {
    opacity: .7;
    cursor: default;
}
/* The page "Order a spare part": the same rows, links instead of the basket button */
.pas-sc--parts .pas-sc__buy {
    align-content: center;
}
.pas-sc .pas-sc__buy a.pas-sc__btn.button {
    text-align: center;
    text-decoration: none;
}
.pas-sc__none,
.pas-sc__empty {
    margin: 0;
    padding: 28px;
    border: 1px dashed var(--pas-line);
    border-radius: 14px;
    color: var(--pas-muted);
    text-align: center;
}

/* Tablet: the tree becomes a box above the list that opens on a tap */
@media (max-width: 991.98px) {
    .pas-sc__layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }
    .pas-sc__tree-box {
        position: static;
        max-height: none;
    }
    .pas-sc__tree-box > summary {
        cursor: pointer;
    }
    .pas-sc__tree-box > summary::after {
        content: "+";
        color: var(--pas-blue);
        font-size: 20px;
        font-weight: 400;
        line-height: 1;
    }
    .pas-sc__tree-box[open] > summary::after {
        content: "\2212";
    }
}

/* Phone: picture and name, then price and buttons across the row */
@media (max-width: 767.98px) {
    .pas-sc .pas-sc__item.pas-service-catalog__card {
        grid-template-columns: 72px minmax(0, 1fr);
        gap: 14px;
        padding: 14px;
    }
    .pas-sc__thumb img {
        width: 72px;
        height: 72px;
    }
    .pas-sc .pas-sc__title {
        font-size: 15.5px;
    }
    .pas-sc__search {
        padding: 12px;
    }
    .pas-sc__search svg {
        left: 30px;
    }
    .pas-sc .pas-sc__search-input {
        height: 54px;
        padding-left: 52px;
        font-size: 16px;
    }
    .pas-sc__buy {
        grid-column: 1 / -1;
        width: auto;
    }
}

/* "Your machines" on the parts page (1.26.0): the customer's own machines and their catalogue */
.pas-sc__mine {
    margin: 0 0 18px;
}
.pas-sc__mine-box {
    padding: 16px 18px;
    border: 1px solid var(--pas-line, #e2e8f0);
    border-left: 4px solid var(--pas-blue, #1b99d7);
    border-radius: 12px;
    background: #f5fafd;
}
.pas-sc__mine-box--guest {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 20px;
}
.pas-sc__mine-title {
    margin: 0 0 10px;
    font-size: 18px;
    line-height: 1.3;
}
.pas-sc__mine-text {
    margin: 0;
    max-width: 70ch;
}
.pas-sc__mine-text--more {
    margin-top: 12px;
    font-size: 14px;
    color: #475569;
}
.pas-sc__mine-list {
    margin: 0;
    padding: 0;
    list-style: none;
}
.pas-sc__mine-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    padding: 10px 0;
    border-top: 1px solid var(--pas-line, #e2e8f0);
}
.pas-sc__mine-item:first-child {
    border-top: 0;
}
.pas-sc__mine-name {
    font-weight: 600;
    min-width: 0;
}
.pas-sc__mine-name small {
    margin-left: 6px;
    font-weight: 400;
    color: #64748b;
}
.pas-sc__mine .pas-sc__buy {
    display: inline-flex;
    flex: 0 0 auto;
}
/* 1.26.4: the delivery time of spare parts, under the block for everybody. */
.pas-sc__mine-delivery {
    margin: 10px 0 0;
    padding: 7px 10px;
    font-weight: 600;
    color: #065f46;
    background: #f0f9f4;
    border: 1px solid #bbe5c8;
    border-radius: 6px;
}
/* 1.26.3: under a machine with a catalogue, a line of its own - above the catalogue when it is open. */
.pas-sc__mine-alt {
    flex: 1 1 100%;
    font-size: 14px;
    font-weight: 600;
    color: var(--pas-blue, #1b99d7);
    text-decoration: none;
}
.pas-sc__mine-alt:hover,
.pas-sc__mine-alt:focus {
    text-decoration: underline;
}
.pas-sc__mine-frame {
    flex: 1 1 100%;
    width: 100%;
    min-height: 980px;
    border: 1px solid var(--pas-line, #e2e8f0);
    border-radius: 10px;
    background: #fff;
}
