/* Digital service details only; leave physical product galleries and file checkout unchanged. */
body .site-shell .order-page-shell > .detail-hero-card:not(.is-physical-product) {
    padding: 10px 16px;
}

body .site-shell .order-page-shell > .detail-hero-card:not(.is-physical-product) .detail-hero-main {
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
}

body .site-shell .order-page-shell > .detail-hero-card:not(.is-physical-product) .detail-hero-thumb {
    width: 104px;
    height: 112px;
}

body .site-shell .order-page-shell > .detail-hero-card:not(.is-physical-product) .detail-hero-content {
    padding-top: 0;
}

body .site-shell .order-page-shell > .detail-hero-card:not(.is-physical-product) .detail-summary-grid {
    margin-top: 8px;
    gap: 8px;
}

body .site-shell .order-page-shell > .detail-hero-card:not(.is-physical-product) .detail-summary-card {
    min-height: 60px;
    padding: 6px 10px;
    gap: 4px;
}

body .site-shell .order-page-shell > .detail-hero-card:not(.is-physical-product) .detail-summary-head {
    gap: 6px;
    min-width: 0;
}

body .site-shell .order-page-shell > .detail-hero-card:not(.is-physical-product) .detail-summary-icon {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
}

body .site-shell .order-page-shell > .detail-hero-card:not(.is-physical-product) + .detail-workspace .vjs-slide-submit__track {
    min-height: 52px;
    padding: 4px 56px;
}

body .site-shell .order-page-shell > .detail-hero-card:not(.is-physical-product) + .detail-workspace .vjs-slide-submit__handle {
    width: 44px;
    height: 44px;
}

body .site-shell .order-page-shell > .detail-hero-card:not(.is-physical-product) + .detail-workspace .vjs-slide-submit__label {
    white-space: normal;
    line-height: 1.25;
}

@media (max-width: 1100px) {
    body .site-shell .order-page-shell > .detail-hero-card:not(.is-physical-product) .detail-hero-main {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }
}

@media (max-width: 380px) {
    body .site-shell .order-page-shell > .detail-hero-card:not(.is-physical-product) .detail-summary-head {
        display: grid;
        justify-items: start;
        gap: 4px;
    }

    body .site-shell .order-page-shell > .detail-hero-card:not(.is-physical-product) .detail-summary-head .tiny {
        max-width: 100%;
        overflow-wrap: anywhere;
    }
}

/* Shared catalog title/search bars, including the public and customer file library. */
html body .vjs-created-order-overlay[data-vjs-created-order-status-key="waiting"],
html body .vjs-created-order-overlay .vjs-created-order-step--waiting {
    --vjs-created-step-accent: #2563eb;
}

html body .vjs-created-order-overlay[data-vjs-created-order-status-key="processing"],
html body .vjs-created-order-overlay .vjs-created-order-step--processing {
    --vjs-created-step-accent: #e58a00;
}

html body .vjs-created-order-overlay[data-vjs-created-order-status-key="success"],
html body .vjs-created-order-overlay .vjs-created-order-step--completed {
    --vjs-created-step-accent: #16a34a;
}

html body .vjs-created-order-overlay[data-vjs-created-order-status-key="rejected"],
html body .vjs-created-order-overlay .vjs-created-order-step--rejected {
    --vjs-created-step-accent: #dc2626;
}

html body .vjs-created-order-overlay .vjs-created-order-summary [data-vjs-created-order-status-label] {
    color: var(--vjs-created-step-accent, #0f172a) !important;
}

body .site-shell .order-page-shell .vjs-catalog-service-card::before,
body .site-shell .order-page-shell .vjs-catalog-list-card::before {
    content: none !important;
    display: none !important;
}

body .site-shell .order-page-shell .vjs-catalog-pagination-slot > .vjs-pagination-arrows {
    padding-top: 6px !important;
    padding-bottom: 6px !important;
}

/* Price, title and deadline precede the photo; physical galleries stay unchanged. */
body .site-shell .order-page-shell .vjs-catalog-card-grid:not(.vjs-catalog-physical-grid) .vjs-catalog-service-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "price price" "title title" "deadline download" "media media";
    grid-template-rows: 96px 60px minmax(44px, auto) auto;
    gap: 10px 0;
    padding: 40px 0 0 !important;
}

/* The decorative quality seal is shared by initial and search-rendered cards. */
body .site-shell .order-page-shell .vjs-catalog-card-grid:not(.vjs-catalog-physical-grid) .vjs-catalog-service-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--vjs-catalog-card-seal);
    background-position: left 6px top 36px;
    background-size: 84px 84px;
    background-repeat: no-repeat;
    pointer-events: none;
}

body .site-shell .order-page-shell .vjs-catalog-card-grid:not(.vjs-catalog-physical-grid) .vjs-catalog-service-card.is-new-service::after {
    background-image: var(--vjs-catalog-card-seal), var(--vjs-catalog-card-new-seal);
    background-position: left 6px top 36px, right 10px top 4px;
    background-size: 84px 84px, 64px 64px;
    background-repeat: no-repeat, no-repeat;
    mix-blend-mode: multiply;
}

/* Transparent retail-card hanger, kept above the price to avoid collisions. */
@supports (mask-composite: exclude) or (-webkit-mask-composite: xor) {
    body .site-shell .order-page-shell .vjs-catalog-card-grid:not(.vjs-catalog-physical-grid) .vjs-catalog-service-card {
        --vjs-catalog-hanger: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 84 24'%3E%3Cpath fill='white' d='M12 10H32a10 10 0 0 1 20 0H72a7 7 0 0 1 0 14H12a7 7 0 0 1 0-14Z'/%3E%3C/svg%3E");
        padding-top: 40px !important;
        -webkit-mask-image: linear-gradient(#fff 0 0), var(--vjs-catalog-hanger);
        mask-image: linear-gradient(#fff 0 0), var(--vjs-catalog-hanger);
        -webkit-mask-size: 100% 100%, 84px 24px;
        mask-size: 100% 100%, 84px 24px;
        -webkit-mask-position: 0 0, center 10px;
        mask-position: 0 0, center 10px;
        -webkit-mask-repeat: no-repeat;
        mask-repeat: no-repeat;
        -webkit-mask-composite: xor;
        mask-composite: exclude;
    }
}

body .site-shell .order-page-shell .vjs-catalog-card-open {
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
}

body .site-shell .order-page-shell .vjs-catalog-service-card.vjs-catalog-local-hidden {
    display: none !important;
}

body .site-shell .order-page-shell .vjs-catalog-card-download {
    grid-area: download;
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: auto;
    min-height: 44px;
    align-self: center;
    justify-self: end;
    margin-right: 14px;
    padding: 0;
    color: var(--vjs-client-ink-strong, #13243b);
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    font-size: 12px;
    font-weight: 400;
    line-height: 18px;
    white-space: nowrap;
    text-decoration: none;
}

body .site-shell .order-page-shell .vjs-catalog-card-download-icon {
    display: grid;
    place-items: center;
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    color: var(--brand);
}

body .site-shell .order-page-shell .vjs-catalog-card-download-icon svg {
    width: 14px;
    height: 14px;
}

body .site-shell .order-page-shell .vjs-catalog-card-download:hover {
    color: var(--brand);
    background: transparent;
    text-decoration: underline;
    text-underline-offset: 3px;
}

body .site-shell .order-page-shell .vjs-catalog-card-open:focus-visible,
body .site-shell .order-page-shell .vjs-catalog-card-download:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: -3px;
}

body .site-shell .order-page-shell .vjs-catalog-detail-title-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

body .site-shell .order-page-shell .vjs-catalog-detail-title-row > h1 {
    flex: 1;
    min-width: 0;
}

body .site-shell .order-page-shell .vjs-catalog-card-grid:not(.vjs-catalog-physical-grid) .vjs-catalog-card-top,
body .site-shell .order-page-shell .vjs-catalog-card-grid:not(.vjs-catalog-physical-grid) .vjs-catalog-card-info {
    display: contents;
}

body .site-shell .order-page-shell .vjs-catalog-card-grid:not(.vjs-catalog-physical-grid) .vjs-catalog-service-card .vjs-catalog-card-thumb {
    --vjs-client-premium-radius-icon: 0px;
    grid-area: media;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

body .site-shell .order-page-shell .vjs-catalog-card-grid:not(.vjs-catalog-physical-grid) .vjs-catalog-service-card .vjs-catalog-card-thumb > :is(img, video) {
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    object-fit: contain !important;
}

body .site-shell .order-page-shell .vjs-catalog-card-grid:not(.vjs-catalog-physical-grid) .vjs-catalog-card-thumb .vjs-photo-frame-placeholder {
    --vjs-client-premium-radius-icon: var(--vjs-client-radius-sm, 16px);
}

body .site-shell .order-page-shell .vjs-catalog-card-grid:not(.vjs-catalog-physical-grid) .vjs-catalog-service-card .vjs-catalog-card-title {
    grid-area: title;
    padding-inline: 14px !important;
    min-height: 60px;
    font-size: 16px;
    line-height: 20px;
    -webkit-line-clamp: 3;
}

body .site-shell .order-page-shell .vjs-catalog-card-grid:not(.vjs-catalog-physical-grid) .vjs-catalog-card-info-item {
    display: flex;
    gap: 6px;
    min-height: 0;
    padding: 0 14px !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

body .site-shell .order-page-shell .vjs-catalog-card-grid:not(.vjs-catalog-physical-grid) .vjs-catalog-card-info-item.is-price {
    grid-area: price;
    justify-content: flex-end;
    padding-left: 108px !important;
    text-align: right;
}

body .site-shell .order-page-shell .vjs-catalog-card-grid:not(.vjs-catalog-physical-grid) .vjs-catalog-card-info-item.is-deadline {
    grid-area: deadline;
}

body .site-shell .order-page-shell .vjs-catalog-card-grid:not(.vjs-catalog-physical-grid) .vjs-catalog-card-info-text > span,
body .site-shell .order-page-shell .vjs-catalog-card-grid:not(.vjs-catalog-physical-grid) .is-price .vjs-catalog-card-icon {
    display: none;
}

body .site-shell .order-page-shell .vjs-catalog-card-grid:not(.vjs-catalog-physical-grid) .is-price .vjs-catalog-card-info-text strong {
    display: block;
    color: var(--brand);
    font-size: 20px;
    font-weight: 700;
    line-height: 26px;
    white-space: normal;
}

body .site-shell .order-page-shell .vjs-catalog-card-grid:not(.vjs-catalog-physical-grid) .vjs-catalog-card-info-text {
    gap: 2px;
    min-width: 0;
    overflow-wrap: anywhere;
}

body .site-shell .order-page-shell .vjs-catalog-card-grid:not(.vjs-catalog-physical-grid) .vjs-catalog-card-icon {
    order: -1;
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    border: 0 !important;
    background: transparent !important;
}

body .site-shell .order-page-shell .vjs-catalog-card-grid:not(.vjs-catalog-physical-grid) .vjs-catalog-card-icon svg {
    width: 14px;
    height: 14px;
}

body .site-shell .order-page-shell .vjs-catalog-list-hero {
    min-height: 56px !important;
    padding: 6px 18px !important;
    gap: 8px 16px !important;
}

body .site-shell .order-page-shell .vjs-catalog-list-hero > div {
    min-width: 0;
}

body .site-shell .order-page-shell .vjs-catalog-list-hero .vjs-catalog-list-title-heading {
    margin: 0 !important;
    letter-spacing: 0 !important;
    overflow-wrap: anywhere;
}

body .site-shell .order-page-shell .vjs-catalog-list-hero .vjs-catalog-search-input {
    height: 40px !important;
    min-height: 40px !important;
    padding-top: 6px !important;
    padding-bottom: 6px !important;
}

/* Compact file rows without changing text sizes or truncating additional content. */
body .site-shell .order-page-shell .vjs-file-entry {
    min-height: 0;
    padding-top: 6px;
    padding-bottom: 6px;
}

body .site-shell .order-page-shell .vjs-file-entry__icon {
    height: 52px;
}

body .site-shell .order-page-shell .vjs-file-entry__icon svg {
    width: 44px;
    height: 44px;
}

body .site-shell .order-page-shell .vjs-file-entry__body {
    gap: 3px;
}

body .site-shell .order-page-shell .vjs-file-entry__meta {
    row-gap: 3px;
}

body .site-shell .order-page-shell .vjs-file-entry__open {
    margin-top: 0;
}

@media (max-width: 980px) {
    body .site-shell .order-page-shell .vjs-catalog-list-hero {
        padding: 8px 14px !important;
    }

    body .site-shell .order-page-shell .vjs-catalog-list-hero .vjs-catalog-search-form,
    body .site-shell .order-page-shell .vjs-catalog-list-hero .vjs-catalog-search-field {
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        margin: 0 !important;
    }

    body .site-shell .order-page-shell .vjs-catalog-list-hero .vjs-catalog-search-input {
        width: 100% !important;
        height: 44px !important;
        min-height: 44px !important;
    }
}
