/*
 * IndoSurgicals Desktop Product Discovery System — Patch 26 v1.0
 * --------------------------------------------------------------------------
 * Scope: desktop only (>= 901px).
 * Pages: Products Directory -> Category -> Subcategory.
 *
 * Goals:
 * - one consistent catalogue journey across the three discovery levels;
 * - denser, more deliberate desktop spacing;
 * - stronger visual hierarchy and image treatment;
 * - visible SKU metadata on product cards;
 * - no changes to mobile, data, URLs, product logic or enquiry logic.
 */

@media (min-width: 901px) {
    /* ================================================================
       Shared discovery foundation
       ================================================================ */
    html body .isp-products-directory-page,
    html body .isp-category-page,
    html body .isp-subcategory-page {
        width: 100% !important;
        max-width: var(--isp-ds-content-max) !important;
        margin: 0 auto !important;
        padding: 22px 0 46px;
        background: transparent;
    }

    html body .isp-products-directory-shell,
    html body .isp-category-shell,
    html body .isp-subcategory-shell {
        display: grid;
        gap: 18px;
        width: 100%;
    }

    /* The legacy content files use 15px outer margins on every section. The
       desktop system owns the page gutter now, so sections sit on one grid. */
    html body .isp-products-directory-page :is(
        .isp-products-directory-hero,
        .isp-products-directory-search-section,
        .isp-products-directory-section,
        .isp-products-directory-enquiry
    ),
    html body .isp-category-page :is(
        .isp-category-hero,
        .isp-category-grid-section,
        .isp-category-enquiry,
        .isp-category-information
    ),
    html body .isp-subcategory-page :is(
        .isp-subcategory-hero,
        .isp-products-section,
        .isp-subcategory-information,
        .isp-related-section
    ) {
        margin: 0;
    }

    html body .isp-products-directory-hero,
    html body .isp-category-hero,
    html body .isp-subcategory-hero {
        border: 1px solid #d9e4e5;
        border-radius: 18px;
        box-shadow: 0 10px 28px rgba(39, 60, 77, .065);
        background:
            radial-gradient(circle at 92% 4%, rgba(99, 196, 173, .16), transparent 29%),
            linear-gradient(135deg, #ffffff 0%, #f5faf9 100%);
    }

    html body .isp-products-directory-hero::before,
    html body .isp-category-hero::before,
    html body .isp-subcategory-hero::before {
        width: 4px;
    }

    html body :is(
        .isp-products-directory-eyebrow,
        .isp-category-eyebrow,
        .isp-subcategory-eyebrow,
        .isp-products-directory-search-copy > span,
        .isp-products-directory-section-heading > div > span,
        .isp-section-heading > div > span,
        .isp-products-directory-enquiry > div > span,
        .isp-category-enquiry-copy > span
    ) {
        margin-bottom: 6px;
        color: var(--isp-ds-teal-dark);
        font-size: 10.5px;
        line-height: 1.35;
        font-weight: 800;
        letter-spacing: .13em;
    }

    html body .isp-products-directory-hero h1,
    html body .isp-category-hero h1,
    html body .isp-subcategory-hero h1 {
        color: var(--isp-ds-navy-dark) !important;
        font-size: clamp(34px, 3.2vw, 46px) !important;
        line-height: 1.08 !important;
        letter-spacing: -.035em;
    }

    html body .isp-products-directory-hero-copy > p,
    html body .isp-category-intro,
    html body .isp-subcategory-intro {
        margin-top: 12px;
        color: #667b89;
        font-size: 15px;
        line-height: 1.68;
    }

    html body :is(
        .isp-products-directory-meta,
        .isp-category-meta,
        .isp-subcategory-meta
    ) {
        gap: 7px;
        margin-top: 16px;
    }

    html body :is(
        .isp-products-directory-meta span,
        .isp-category-meta span,
        .isp-subcategory-meta span
    ) {
        min-height: 31px;
        padding: 6px 10px;
        border-color: #d8e7e5;
        background: rgba(255, 255, 255, .82);
        font-size: 11px;
    }

    html body :is(
        .isp-products-directory-actions,
        .isp-category-hero-actions
    ) {
        gap: 9px;
        margin-top: 19px;
    }

    html body :is(
        .isp-products-directory-primary-action,
        .isp-category-primary-action,
        .isp-subcategory-primary-action
    ) {
        min-height: 43px;
        padding: 10px 17px;
        border-color: var(--isp-ds-teal);
        border-radius: 10px;
        background: var(--isp-ds-teal);
        color: #fff !important;
        box-shadow: 0 7px 18px rgba(0, 143, 135, .16);
    }

    html body :is(
        .isp-products-directory-secondary-action,
        .isp-category-secondary-action,
        .isp-subcategory-secondary-action
    ) {
        min-height: 43px;
        padding: 10px 17px;
        border-color: #c5d4d8;
        border-radius: 10px;
        background: #fff;
        color: var(--isp-ds-navy-dark) !important;
    }

    html body :is(
        .isp-products-directory-primary-action,
        .isp-products-directory-secondary-action,
        .isp-category-primary-action,
        .isp-category-secondary-action,
        .isp-subcategory-primary-action,
        .isp-subcategory-secondary-action
    ):hover {
        transform: translateY(-1px);
    }

    html body :is(
        .isp-products-directory-section,
        .isp-category-grid-section,
        .isp-products-section,
        .isp-category-information,
        .isp-subcategory-information,
        .isp-related-section
    ) {
        padding: 26px;
        border: 1px solid #dbe5e6;
        border-radius: 18px;
        background: #fff;
        box-shadow: 0 9px 26px rgba(39, 60, 77, .055);
    }

    html body :is(
        .isp-products-directory-section-heading,
        .isp-section-heading
    ) {
        align-items: flex-end;
        gap: 20px;
        margin-bottom: 20px;
        padding-bottom: 15px;
        border-bottom-color: #e2e9ea;
    }

    html body .isp-products-directory-section-heading h2,
    html body .isp-section-heading h2 {
        color: var(--isp-ds-navy-dark) !important;
        font-size: 27px !important;
        line-height: 1.18 !important;
        letter-spacing: -.02em;
    }

    html body :is(
        .isp-products-directory-section-heading p,
        .isp-section-heading p
    ) {
        margin-top: 6px;
        color: #6c7d8a;
        font-size: 13px;
        line-height: 1.55;
    }

    html body :is(
        .isp-products-directory-count,
        .isp-category-count,
        .isp-product-count
    ) {
        min-height: 34px;
        height: auto;
        width: auto;
        padding: 7px 12px;
        border: 1px solid #cee4e0;
        border-radius: 999px;
        background: #edf8f6;
        color: var(--isp-ds-teal-dark);
        font-size: 11px;
        line-height: 1.2;
        box-shadow: none;
    }

    /* ================================================================
       Products directory
       ================================================================ */
    html body .isp-products-directory-hero {
        grid-template-columns: minmax(0, 1.35fr) minmax(285px, .65fr);
        gap: 32px;
        padding: 32px 34px;
    }

    html body .isp-products-directory-trust {
        gap: 8px;
    }

    html body .isp-products-directory-trust > div {
        min-height: 66px;
        padding: 11px 13px 11px 49px;
        border-color: #d7e5e4;
        border-radius: 11px;
        box-shadow: none;
    }

    html body .isp-products-directory-trust > div::before {
        left: 14px;
        width: 23px;
        height: 23px;
        background: #e4f5f1;
        color: var(--isp-ds-teal-dark);
    }

    html body .isp-products-directory-trust strong {
        font-size: 13px;
    }

    html body .isp-products-directory-trust span {
        margin-top: 2px;
        font-size: 11px;
    }

    html body .isp-products-directory-search-section {
        grid-template-columns: minmax(280px, .72fr) minmax(380px, 1.28fr);
        gap: 28px;
        padding: 19px 22px;
        border-color: #d2e7e3;
        border-radius: 15px;
        background: #eef8f6;
    }

    html body .isp-products-directory-search-copy h2 {
        font-size: 20px !important;
    }

    html body .isp-products-directory-search-copy p {
        margin-top: 5px;
        font-size: 12px;
    }

    html body .isp-products-directory-search-box input {
        height: 48px !important;
        padding-left: 45px !important;
        border-radius: 10px !important;
        box-shadow: 0 5px 14px rgba(39, 60, 77, .05) !important;
    }

    html body .isp-products-directory-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
        align-items: start;
    }

    html body .isp-directory-card {
        border-color: #dbe4e5;
        border-radius: 14px;
        box-shadow: 0 5px 16px rgba(39, 60, 77, .045);
        content-visibility: auto;
        contain-intrinsic-size: 470px;
    }

    html body .isp-directory-card:hover,
    html body .isp-directory-card:focus-within {
        transform: translateY(-2px);
        border-color: #a8cfca;
        box-shadow: 0 11px 27px rgba(39, 60, 77, .085);
    }

    html body .isp-directory-card-header {
        min-height: 114px;
        /*grid-template-columns: 104px minmax(0, 1fr);*/
        gap: 14px;
        /*padding: 13px;*/
        background: linear-gradient(145deg, #fbfdfd 0%, #f4f8f8 100%);
    }

    html body .isp-directory-card-image {
        /*width: 104px;
        height: 88px;*/
        overflow: hidden;
        /*padding: 6px;
        border-color: #e0e8e9;
        border-radius: 10px;*/
    }

    html body .isp-directory-card-image img {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain;
        /*border-radius: 7px;*/
    }

    html body .isp-directory-card-title > span {
        margin-bottom: 4px;
        font-size: 9px;
        letter-spacing: .09em;
    }

    html body .isp-directory-card-title h2 {
        font-size: 16px !important;
        line-height: 1.28 !important;
    }

    html body .isp-directory-card-title p {
        margin-top: 5px;
        font-size: 11px;
    }

    html body .isp-directory-subcategory-list {
        max-height: 205px;
        gap: 3px;
        padding: 10px 12px 2px;
    }

    html body .isp-directory-subcategory-link {
        min-height: 31px;
        padding: 5px 8px;
        border-radius: 7px;
        font-size: 11px;
        font-weight: 600;
    }

    html body .isp-directory-subcategory-link small {
        font-size: 16px;
    }

    html body .isp-directory-expand {
        min-height: 34px;
        margin: 7px 12px 0;
        padding: 6px 9px;
        border-radius: 7px;
        font-size: 10.5px;
    }

    html body .isp-directory-view-category {
        min-height: 40px;
        margin: 10px 12px 12px;
        padding: 8px 10px;
        border-color: #c7dcda;
        border-radius: 8px;
        background: #f8fbfb;
        font-size: 12px;
    }

    html body .isp-directory-view-category:hover,
    html body .isp-directory-view-category:focus-visible {
        background: var(--isp-ds-teal);
        color: #fff !important;
    }

    html body .isp-products-directory-enquiry {
        min-height: 88px;
        padding: 18px 22px;
        border-left-width: 4px;
        border-radius: 14px;
        background: #f0f8f7;
    }

    html body .isp-products-directory-enquiry h2 {
        font-size: 20px !important;
    }

    html body .isp-products-directory-enquiry p {
        margin-top: 4px;
        font-size: 12px;
    }

    html body .isp-products-directory-enquiry > a {
        min-height: 41px;
        padding: 9px 14px;
        border-radius: 9px;
        background: #fff;
        color: var(--isp-ds-teal-dark) !important;
        box-shadow: none;
    }

    html body .isp-products-directory-enquiry > a:hover,
    html body .isp-products-directory-enquiry > a:focus-visible {
        background: var(--isp-ds-teal);
        color: #fff !important;
    }

    /* ================================================================
       Main category pages
       ================================================================ */
    html body .isp-category-hero {
        grid-template-columns: minmax(0, 1.15fr) minmax(310px, .85fr);
        gap: 28px;
        padding: 30px 32px;
    }

    html body .isp-category-hero.has-banner {
        min-height: 330px;
    }

    html body .isp-category-hero-media {
        min-height: 250px;
        overflow: hidden;
        border: 1px solid #dfe8e9;
        border-radius: 14px;
        background: #fff;
        box-shadow: 0 7px 19px rgba(39, 60, 77, .06);
    }

    html body .isp-category-hero-media img {
        width: 100% !important;
        height: 250px !important;
        object-fit: contain;
        padding: 10px;
    }

    html body .isp-category-trust-panel {
        gap: 8px;
    }

    html body .isp-category-trust-panel > div {
        min-height: 67px;
        border-radius: 11px;
        box-shadow: none;
    }

    html body .isp-category-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 16px;
    }

    html body .isp-category-card {
        border-color: #dbe4e5;
        border-radius: 14px;
        box-shadow: 0 5px 16px rgba(39, 60, 77, .045);
    }

    html body .isp-category-card:hover,
    html body .isp-category-card:focus-within {
        transform: translateY(-2px);
        border-color: #a8cfca;
        box-shadow: 0 11px 27px rgba(39, 60, 77, .085);
    }

    html body .isp-category-image {
        /*aspect-ratio: 4 / 3;*/
        min-height: 0;
        overflow: hidden;
        /*padding: 10px;*/
        background: #f7f9f9;
    }

    html body .isp-category-image img {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain;
        border-radius: 8px;
    }

    html body .isp-category-card-body {
        padding: 15px;
    }

    html body .isp-category-card-label {
        margin-bottom: 5px;
        font-size: 9px;
    }

    html body .isp-category-card h2 {
        min-height: 46px;
        margin-bottom: 6px !important;
        font-size: 16px !important;
        line-height: 1.32 !important;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
    }

    html body .isp-category-card p {
        min-height: 37px;
        margin-bottom: 11px;
        color: #6e7f8b;
        font-size: 11.5px;
        line-height: 1.5;
    }

    html body .isp-view-category {
        min-height: 37px;
        padding: 7px 10px;
        border-radius: 8px;
        background: #f5faf9;
        font-size: 11.5px;
    }

    html body .isp-category-enquiry {
        min-height: 88px;
        padding: 18px 22px;
        border-left-width: 4px;
        border-radius: 14px;
        background: #f0f8f7;
    }

    html body .isp-category-enquiry h2 {
        font-size: 20px !important;
    }

    html body .isp-category-enquiry p {
        margin-top: 4px;
        font-size: 12px;
    }

    html body .isp-category-enquiry > a {
        min-height: 41px;
        padding: 9px 14px;
        border-radius: 9px;
        background: #fff;
        color: var(--isp-ds-teal-dark) !important;
        box-shadow: none;
    }

    html body .isp-category-enquiry > a:hover,
    html body .isp-category-enquiry > a:focus-visible {
        background: var(--isp-ds-teal);
        color: #fff !important;
    }

    html body .isp-category-description,
    html body .isp-description-content {
        width: 100%;
        max-width: none;
        padding-top: 0;
        color: #435562;
        font-size: 14px;
        line-height: 1.72;
    }

    html body .isp-category-information-note,
    html body .isp-bulk-enquiry-note {
        margin-top: 20px;
        padding: 14px 16px;
        border-left-width: 3px;
        border-radius: 9px;
    }

    /* ================================================================
       Subcategory / product listing pages
       ================================================================ */
    html body .isp-subcategory-hero {
        grid-template-columns: minmax(0, 1fr) 190px;
        gap: 28px;
        padding: 29px 32px;
    }

    html body .isp-subcategory-hero-actions {
        min-width: 0;
        gap: 8px;
    }

    html body .isp-product-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 16px;
    }

    html body .isp-product-card {
        border-color: #dbe4e5;
        border-radius: 14px;
        box-shadow: 0 5px 16px rgba(39, 60, 77, .045);
    }

    html body .isp-product-card:hover,
    html body .isp-product-card:focus-within {
        transform: translateY(-2px);
        border-color: #a8cfca;
        box-shadow: 0 11px 27px rgba(39, 60, 77, .085);
    }

    html body .isp-product-image {
        /*aspect-ratio: 1 / .82;*/
        min-height: 0;
        overflow: hidden;
        /*padding: 10px;*/
        background: #f7f9f9;
    }

    html body .isp-product-image img {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain;
        /*border-radius: 8px;*/
    }

    html body .isp-product-card-body {
        padding: 14px 15px 15px;
    }

    html body .isp-product-category-label {
        margin-bottom: 5px;
        font-size: 9px;
        letter-spacing: .09em;
    }

    html body .isp-product-card h2 {
        min-height: 47px;
        margin-bottom: 8px !important;
        font-size: 15.5px !important;
        line-height: 1.35 !important;
        -webkit-line-clamp: 2;
    }

    /* Existing markup already contains the SKU. Show it on desktop as useful
       catalogue metadata rather than adding or changing any product data. */
    html body .isp-product-sku {
        min-height: 28px;
        display: inline-flex;
        align-items: center;
        align-self: flex-start;
        gap: 5px;
        margin: 0 0 11px;
        padding: 5px 8px;
        border: 1px solid #d9e4e4;
        border-radius: 7px;
        background: #f7faf9;
        color: #5f7280;
        font-size: 10.5px;
        line-height: 1.2;
    }

    html body .isp-product-sku strong {
        margin: 0;
        color: var(--isp-ds-navy);
        font-size: 9px;
        letter-spacing: .08em;
        text-transform: uppercase;
    }

    html body .isp-view-product {
        min-height: 39px;
        padding: 8px 10px;
        border-radius: 8px;
        background: #f6faf9;
        font-size: 11.5px;
    }

    html body .isp-view-product:hover,
    html body .isp-view-product:focus-visible {
        background: var(--isp-ds-teal);
        color: #fff !important;
    }

    html body .isp-related-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 10px;
    }

    html body .isp-related-card {
        min-height: 70px;
        padding: 12px 14px;
        border-radius: 9px;
        background: #f8fbfb;
    }

    html body .isp-related-card > span {
        font-size: 12.5px;
    }

    html body .isp-related-card small {
        margin-top: 3px;
        font-size: 10px;
    }

    html body :is(.isp-category-pagination, .isp-subcategory-pagination) {
        margin: 0;
        padding: 3px 0;
    }

    html body :is(.isp-category-pagination, .isp-subcategory-pagination) a,
    html body :is(.isp-category-pagination, .isp-subcategory-pagination) span {
        min-width: 35px;
        min-height: 35px;
        border-radius: 8px;
        font-size: 11.5px;
    }

    html body :is(.isp-category-read-more, .isp-read-more-button) {
        min-height: 39px;
        margin-top: 14px;
        padding: 8px 14px;
        border-radius: 8px;
        background: #fff;
        color: var(--isp-ds-teal-dark);
        font-size: 11.5px;
    }

}

/* Compact desktop / laptop. Still strictly above the completed mobile breakpoint. */
@media (min-width: 901px) and (max-width: 1180px) {
    html body .isp-products-directory-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    html body .isp-category-grid,
    html body .isp-product-grid,
    html body .isp-related-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 901px) and (max-width: 1010px) {
    html body .isp-products-directory-hero,
    html body .isp-category-hero {
        grid-template-columns: minmax(0, 1.1fr) minmax(265px, .9fr);
        gap: 22px;
        padding: 26px;
    }

    html body .isp-products-directory-search-section {
        grid-template-columns: minmax(230px, .7fr) minmax(350px, 1.3fr);
        gap: 20px;
    }

    html body .isp-category-card-body,
    html body .isp-product-card-body {
        padding: 13px;
    }
}

@media (min-width: 901px) and (prefers-reduced-motion: reduce) {
    html body .isp-products-directory-page *,
    html body .isp-category-page *,
    html body .isp-subcategory-page * {
        scroll-behavior: auto !important;
    }
}
