.tdb-shop-page {
    --shop-water: #092e3c;
    --shop-foam: #bceee0;
    --shop-active: #075f63;
    --shop-active-text: #fff;
}

html[data-theme="dark"] .tdb-shop-page {
    --shop-active: #a9e7d9;
    --shop-active-text: #082d33;
}

.tdb-shop-page .shop-masthead {
    position: relative;
    isolation: isolate;
    display: grid;
    align-items: center;
    min-block-size: 350px;
    overflow: hidden;
    background: var(--shop-water);
    color: #fff;
}

.tdb-shop-page .shop-masthead-photo {
    position: absolute;
    z-index: -2;
    inset: 0 0 0 auto;
    width: 70%;
    height: 100%;
    object-fit: cover;
    object-position: center 24%;
}

.tdb-shop-page .shop-masthead::before {
    position: absolute;
    z-index: -1;
    inset: 0;
    background: linear-gradient(90deg, var(--shop-water) 32%, #092e3cf5 40%, #092e3c20 74%, transparent);
    content: "";
}

.tdb-shop-page .shop-masthead-content {
    padding-block: 44px;
}

.tdb-shop-page .shop-masthead h1 {
    max-inline-size: 21ch;
    margin-block: 0 18px;
    font-family: var(--display);
    font-size: clamp(2.75rem, 5vw, 4.65rem);
    font-weight: 700;
    letter-spacing: -.04em;
    line-height: 1.04;
}

.tdb-shop-page .shop-masthead h1 span {
    display: block;
    color: var(--shop-foam);
}

.tdb-shop-page .shop-masthead p {
    max-inline-size: 41ch;
    margin: 0;
    color: #e2f3f3;
    font-size: clamp(1rem, 1.35vw, 1.125rem);
    line-height: 1.6;
}

.tdb-shop-page .shop-masthead ::selection {
    color: var(--shop-water);
    background: var(--shop-foam);
}

.tdb-shop-page .shop-catalog {
    padding-block: 31px 76px;
}

.tdb-shop-page .shop-filters {
    margin-block-end: 20px;
}

.tdb-shop-page .shop-filters h2 {
    margin: 0 0 16px;
    color: var(--ink);
    font-family: var(--display);
    font-size: clamp(1.55rem, 2.35vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -.032em;
    line-height: 1.16;
}

.tdb-shop-page .shop-package-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface-soft);
}

.tdb-shop-page .shop-package-tabs > a {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    min-block-size: 48px;
    padding: 8px clamp(8px, 1.4vw, 20px);
    border-radius: 8px;
    color: var(--ink);
    font-size: clamp(.875rem, 1.3vw, 1rem);
    font-weight: 700;
    line-height: 1.25;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.tdb-shop-page .shop-package-tabs > a:hover {
    background: var(--surface);
}

.tdb-shop-page .shop-package-tabs > a.active {
    color: var(--shop-active-text);
    background: var(--shop-active);
}

.tdb-shop-page .shop-category-count {
    min-inline-size: 1.75rem;
    padding: 3px 5px;
    border-radius: 5px;
    background: color-mix(in srgb, currentColor 12%, transparent);
    font-size: .8125rem;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.tdb-shop-page .shop-course-filter {
    margin-block-start: 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
}

.tdb-shop-page .shop-course-filter > summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 2px 12px;
    min-block-size: 58px;
    padding: 8px 16px;
    border-radius: 9px;
    color: var(--shop-active);
    line-height: 1.35;
    list-style: none;
    cursor: pointer;
}

.tdb-shop-page .shop-course-filter > summary:hover {
    background: var(--surface-soft);
}

.tdb-shop-page .shop-course-filter > summary::-webkit-details-marker {
    display: none;
}

.tdb-shop-page .shop-course-filter > summary::after {
    grid-column: 2;
    grid-row: 1 / span 2;
    width: 8px;
    height: 8px;
    margin-inline: 3px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    content: "";
}

.tdb-shop-page .shop-course-filter[open] > summary::after {
    transform: rotate(225deg);
}

.tdb-shop-page .shop-course-label {
    color: var(--muted);
    font-size: .8125rem;
    font-weight: 600;
}

.tdb-shop-page .shop-course-selection {
    font-size: .9375rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.tdb-shop-page .shop-course-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 4px 12px 12px;
}

.tdb-shop-page .shop-course-tabs > a {
    display: grid;
    place-items: center;
    min-height: 44px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--ink);
    background: var(--surface-soft);
    font-size: .875rem;
    font-weight: 650;
    line-height: 1.3;
    text-align: center;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.tdb-shop-page .shop-course-tabs > a:hover {
    border-color: var(--shop-active);
}

.tdb-shop-page .shop-course-tabs > a.active {
    border-color: var(--shop-active);
    color: var(--shop-active-text);
    background: var(--shop-active);
}

.tdb-shop-page .shop-intro {
    margin-block: 0 24px;
}

.tdb-shop-page :is(.shop-intro, .shop-specialty-heading) :is(h2, h3, h4) {
    margin: 0;
    color: var(--ink);
    font-family: var(--display);
    font-size: clamp(1.25rem, 2vw, 1.75rem);
    font-weight: 700;
    letter-spacing: -.025em;
    line-height: 1.2;
}

.tdb-shop-page .shop-intro p,
.tdb-shop-page .shop-card-details {
    max-inline-size: 65ch;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}

.tdb-shop-page .shop-intro p {
    margin: 8px 0 0;
}

.tdb-shop-page .shop-intro h2 {
    font-size: clamp(1.65rem, 3.5vw, 2.625rem);
    text-wrap: balance;
}

.tdb-shop-page .shop-intro:not([hidden]) {
    display: grid;
    gap: 16px;
    align-items: center;
    padding: clamp(16px, 3vw, 32px);
    border-radius: 14px;
    background: var(--surface-soft);
}

.tdb-shop-page .shop-intro h3 {
    color: var(--shop-active);
    font-size: clamp(1rem, 1.6vw, 1.25rem);
}

.tdb-shop-page .shop-catalog .shop-snorkeling-guide {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--shop-active);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: .2em;
}

.tdb-shop-page .shop-specialty-heading {
    grid-column: 1 / -1;
    padding-block: 8px;
    border-bottom: 1px solid var(--line);
}

.tdb-shop-page .shop-pricing {
    margin-block-start: 4px;
}

.tdb-shop-page .shop-pricing > summary {
    display: flex;
    align-items: center;
    gap: 8px;
    inline-size: max-content;
    max-inline-size: 100%;
    min-block-size: 44px;
    margin-inline-start: auto;
    padding: 6px 10px;
    border-radius: 8px;
    color: var(--shop-active);
    font-size: .875rem;
    font-weight: 700;
    line-height: 1.35;
    list-style: none;
    cursor: pointer;
}

.tdb-shop-page .shop-pricing > summary::-webkit-details-marker {
    display: none;
}

.tdb-shop-page .shop-pricing[open] > summary,
.tdb-shop-page .shop-pricing > summary:hover {
    background: var(--surface-soft);
}

.tdb-shop-page .shop-pricing-icon {
    display: grid;
    flex: 0 0 18px;
    place-items: center;
    block-size: 18px;
    border: 1px solid currentColor;
    border-radius: 50%;
    line-height: 1;
}

.tdb-shop-page .shop-pricing-note {
    max-inline-size: 56ch;
    margin-block: 4px 0;
    margin-inline: auto 0;
    padding: 10px 14px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--shop-active) 7%, var(--surface));
    color: var(--muted);
    font-size: .875rem;
    line-height: 1.55;
}

.tdb-shop-page .shop-pricing-note strong {
    color: var(--ink);
}

.tdb-shop-page .shop-catalog .package-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: clamp(15px, 2vw, 28px);
}

.tdb-shop-page .shop-catalog .package-slot {
    grid-column: span 2;
    min-width: 0;
}

.tdb-shop-page .shop-catalog .package-card {
    height: 100%;
}

.tdb-shop-page .shop-card-link {
    display: flex;
    height: 100%;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    color: var(--ink);
    text-decoration: none;
}

.tdb-shop-page .shop-catalog .package-image {
    height: auto;
    aspect-ratio: 16 / 9;
    border-radius: 13px 13px 0 0;
}

.tdb-shop-page .shop-catalog .package-image img {
    display: block;
    transition: transform 450ms cubic-bezier(.16, 1, .3, 1);
}

.tdb-shop-page .shop-card-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: clamp(15px, 1.45vw, 22px);
}

.tdb-shop-page .shop-catalog .package-meta {
    justify-content: flex-start;
    align-items: baseline;
    column-gap: 9px;
    row-gap: 1px;
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

.tdb-shop-page .shop-catalog .package-meta > span:first-child {
    color: var(--shop-active);
    font-weight: 700;
}

.tdb-shop-page .shop-catalog .package-meta > span:last-child {
    display: inline;
    font-size: inherit;
    letter-spacing: normal;
}

.tdb-shop-page .shop-catalog .package-meta > span:last-child::before {
    display: inline-block;
    width: 3px;
    height: 3px;
    margin-inline-end: 9px;
    border-radius: 50%;
    background: currentColor;
    vertical-align: .2em;
    content: "";
}

.tdb-shop-page .shop-catalog .package-card h3 {
    margin: 0 0 15px;
    color: var(--ink);
    font-size: clamp(1.125rem, 1.6vw, 1.375rem);
    font-weight: 700;
    letter-spacing: -.024em;
    line-height: 1.28;
}

.tdb-shop-page .shop-card-details {
    margin: -4px 0 16px;
}

.tdb-shop-page .shop-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 3px 12px;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid var(--line);
}

.tdb-shop-page .shop-catalog .package-price {
    color: var(--muted);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    line-height: 1.35;
}

.tdb-shop-page .shop-catalog .package-price strong {
    margin-inline: 2px;
    color: var(--ink);
    font-size: clamp(1.025rem, 1.45vw, 1.275rem);
    font-weight: 750;
    white-space: nowrap;
}

.tdb-shop-page .shop-card-action {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 44px;
    color: var(--shop-active);
    font-size: 13px;
    font-weight: 700;
    text-underline-offset: .2em;
}

.tdb-shop-page .shop-card-action::after {
    width: 6px;
    height: 6px;
    border-top: 1.5px solid currentColor;
    border-right: 1.5px solid currentColor;
    transform: rotate(45deg);
    content: "";
}

.tdb-shop-page .shop-card-link:is(:hover, :focus-visible) .shop-card-action {
    text-decoration: underline;
}

.tdb-shop-page :is([data-shop-intro="course-intro"], [data-shop-intro="snorkeling"]):not([hidden]) ~ .package-grid .package-slot:not([hidden]) {
    grid-column: 1 / -1;
}

@media (min-width: 761px) {
    .tdb-shop-page .shop-intro:not([hidden]) {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
        gap: 32px;
    }

    .tdb-shop-page :is([data-shop-intro="course-intro"], [data-shop-intro="snorkeling"]):not([hidden]) ~ .package-grid {
        .shop-card-link {
            display: grid;
            grid-template-columns: min(42%, 460px) minmax(0, 1fr);
        }

        .package-image {
            min-block-size: 210px;
            border-radius: 13px 0 0 13px;
        }

        .package-image img {
            position: absolute;
            inset: 0;
        }

        .shop-card-content {
            padding: clamp(20px, 3vw, 36px);
        }

        .package-card h3 {
            font-size: clamp(1.3rem, 2.2vw, 2rem);
        }
    }
}

@media (min-width: 901px) {
    .tdb-shop-page :is([data-shop-intro="course-beginner"], [data-shop-intro="course-advanced"], [data-shop-intro="fundive"]):not([hidden]) ~ .package-grid .package-slot:not([hidden]) {
        grid-column: span 3;
    }
}

.tdb-shop-page .shop-catalog .shop-specialty-heading[data-shop-specialty-category="dry"] h3 {
    color: var(--shop-active);
    font-size: clamp(1.125rem, 2vw, 1.375rem);
}

.tdb-shop-page .shop-catalog .shop-specialty-heading[data-shop-specialty-category="dry"]:not([hidden]) ~ .package-slot[data-shop-specialty-category="dry"] {
    grid-column: 1 / -1;

    @media (min-width: 901px) {
        grid-column: span 3;
    }

    .shop-card-link {
        display: grid;
        grid-template-columns: min(38%, 245px) minmax(0, 1fr);
        min-block-size: clamp(175px, 17vw, 220px);
    }

    .package-image {
        align-self: stretch;
        height: auto;
        aspect-ratio: auto;
        border-radius: 13px 0 0 13px;
    }

    .package-image img {
        position: absolute;
        inset: 0;
        object-position: 45% center;
    }

    .shop-card-content {
        min-width: 0;
        padding: clamp(14px, 1.6vw, 24px);
    }

    .package-card h3 {
        overflow-wrap: anywhere;
    }

    .shop-card-footer {
        column-gap: 14px;
        row-gap: 10px;
        padding-top: 12px;
    }

    .shop-card-action {
        min-block-size: 36px;
        padding-inline: 11px;
        border-radius: 7px;
        background: var(--shop-active);
        color: var(--shop-active-text);
    }

    @media (max-width: 600px) {
        .shop-card-link {
            grid-template-columns: clamp(80px, 27vw, 112px) minmax(0, 1fr);
            grid-template-rows: auto 1fr auto;
            column-gap: 12px;
            min-block-size: 0;
            padding: 12px;
        }

        .package-image {
            grid-row: 1 / 3;
            align-self: start;
            aspect-ratio: 1;
            border-radius: 8px;
        }

        .package-image img {
            object-position: center;
        }

        .shop-card-content {
            display: contents;
        }

        .package-meta {
            grid-column: 2;
        }

        .package-card h3 {
            grid-column: 2;
            align-self: start;
            margin-bottom: 0;
        }

        .shop-card-footer {
            grid-column: 1 / -1;
            margin-top: 12px;
            padding-top: 10px;
        }
    }
}

.tdb-shop-page .shop-catalog :is(a, button, summary):focus-visible {
    outline: 2px solid var(--shop-active);
    outline-offset: 2px;
}

.tdb-shop-page .shop-course-filter > summary:focus-visible {
    outline-offset: -2px;
}

.tdb-shop-page .shop-catalog .empty-filter {
    margin: 0;
    padding-block: 18px 30px;
    color: var(--muted);
}

@media (min-width: 1100px) {
    .tdb-shop-page .shop-course-tabs {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .tdb-shop-page .shop-catalog .package-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tdb-shop-page .shop-catalog .package-slot {
        grid-column: auto;
    }
}

@media (max-width: 760px) {
    .tdb-shop-page .shop-package-tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .tdb-shop-page .shop-masthead {
        min-block-size: 290px;
        align-items: end;
    }

    .tdb-shop-page .shop-masthead-photo {
        width: 100%;
        object-position: 68% 43%;
    }

    .tdb-shop-page .shop-masthead::before {
        background:
            linear-gradient(0deg, var(--shop-water) 4%, #092e3cf0 24%, #092e3c2b 82%),
            linear-gradient(90deg, #092e3ce8, #092e3c36 93%);
    }

    .tdb-shop-page .shop-masthead-content {
        padding-block: 54px 24px;
    }

    .tdb-shop-page .shop-masthead h1 {
        margin-bottom: 12px;
        font-size: clamp(2.1rem, 9vw, 3.15rem);
    }

    .tdb-shop-page .shop-masthead p {
        font-size: 15px;
        line-height: 1.5;
    }

    .tdb-shop-page .shop-catalog {
        padding-block: 24px 50px;
    }

    .tdb-shop-page .shop-course-tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tdb-shop-page .shop-catalog .package-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tdb-shop-page .shop-catalog .package-image img {
        transition: none;
    }

    .tdb-shop-page .shop-catalog .package-image:hover img {
        transform: none;
    }
}
