/* Restrained neon framing for shared storefront product photography. */
body:not(.admin-shell) .product-card {
    --product-image-neon: #68d8ef;
    --product-image-neon-soft: color-mix(in srgb, var(--product-image-neon), transparent 84%);
    --product-image-neon-faint: color-mix(in srgb, var(--product-image-neon), transparent 92%);
}

body:not(.admin-shell) .product-grid > .product-card:nth-child(6n + 2),
body:not(.admin-shell) .product-card-list > .product-card:nth-child(6n + 2) {
    --product-image-neon: #b58cff;
}

body:not(.admin-shell) .product-grid > .product-card:nth-child(6n + 3),
body:not(.admin-shell) .product-card-list > .product-card:nth-child(6n + 3) {
    --product-image-neon: #ff7eb6;
}

body:not(.admin-shell) .product-grid > .product-card:nth-child(6n + 4),
body:not(.admin-shell) .product-card-list > .product-card:nth-child(6n + 4) {
    --product-image-neon: #e8c85a;
}

body:not(.admin-shell) .product-grid > .product-card:nth-child(6n + 5),
body:not(.admin-shell) .product-card-list > .product-card:nth-child(6n + 5) {
    --product-image-neon: #62d8ad;
}

body:not(.admin-shell) .product-grid > .product-card:nth-child(6n),
body:not(.admin-shell) .product-card-list > .product-card:nth-child(6n) {
    --product-image-neon: #ff9b6b;
}

body:not(.admin-shell) .product-card .product-media {
    position: relative;
    isolation: isolate;
    border: 1px solid color-mix(in srgb, var(--product-image-neon), transparent 50%);
    box-shadow:
        inset 0 0 0 1px color-mix(in srgb, var(--product-image-neon), transparent 86%),
        0 0 10px var(--product-image-neon-faint),
        0 7px 18px rgba(0, 0, 0, .12);
    transition: border-color .22s ease, box-shadow .22s ease, transform .22s ease;
}

body:not(.admin-shell) .product-card .product-media::after {
    position: absolute;
    z-index: 5;
    inset: 0;
    border: 1px solid color-mix(in srgb, var(--product-image-neon), transparent 72%);
    border-radius: inherit;
    box-shadow: inset 0 0 9px color-mix(in srgb, var(--product-image-neon), transparent 91%);
    content: "";
    pointer-events: none;
}

body:not(.admin-shell) .product-card:hover .product-media,
body:not(.admin-shell) .product-card:focus-within .product-media {
    border-color: color-mix(in srgb, var(--product-image-neon), transparent 28%);
    box-shadow:
        inset 0 0 0 1px color-mix(in srgb, var(--product-image-neon), transparent 72%),
        inset 0 0 12px color-mix(in srgb, var(--product-image-neon), transparent 90%),
        0 0 7px color-mix(in srgb, var(--product-image-neon), transparent 90%),
        0 8px 18px rgba(0, 0, 0, .14);
    transform: none;
}

html[data-theme="light"] body:not(.admin-shell) .product-card .product-media {
    border-color: color-mix(in srgb, var(--product-image-neon), #657064 48%);
    box-shadow:
        inset 0 0 0 1px color-mix(in srgb, var(--product-image-neon), transparent 91%),
        0 0 9px color-mix(in srgb, var(--product-image-neon), transparent 92%),
        0 7px 16px rgba(35, 50, 31, .09);
}

html[data-theme="light"] body:not(.admin-shell) .product-card:hover .product-media,
html[data-theme="light"] body:not(.admin-shell) .product-card:focus-within .product-media {
    border-color: color-mix(in srgb, var(--product-image-neon), #394537 34%);
    box-shadow:
        inset 0 0 0 1px color-mix(in srgb, var(--product-image-neon), transparent 82%),
        inset 0 0 10px color-mix(in srgb, var(--product-image-neon), transparent 93%),
        0 0 6px color-mix(in srgb, var(--product-image-neon), transparent 91%),
        0 8px 17px rgba(35, 50, 31, .1);
}

/* Carry the image palette through the specification dividers without lighting the copy. */
body:not(.admin-shell) .product-card .product-card-profile {
    border-color: color-mix(in srgb, var(--product-image-neon), transparent 76%);
    box-shadow:
        inset 0 1px color-mix(in srgb, var(--product-image-neon), transparent 91%),
        inset 0 -1px color-mix(in srgb, var(--product-image-neon), transparent 94%);
    transition: border-color .22s ease, box-shadow .22s ease;
}

body:not(.admin-shell) .product-card .profile-column-right {
    border-left-color: color-mix(in srgb, var(--product-image-neon), transparent 72%);
    box-shadow: -7px 0 12px -12px color-mix(in srgb, var(--product-image-neon), transparent 55%);
    transition: border-color .22s ease, box-shadow .22s ease;
}

body:not(.admin-shell) .product-card:hover .product-card-profile,
body:not(.admin-shell) .product-card:focus-within .product-card-profile {
    border-color: color-mix(in srgb, var(--product-image-neon), transparent 62%);
}

body:not(.admin-shell) .product-card:hover .profile-column-right,
body:not(.admin-shell) .product-card:focus-within .profile-column-right {
    border-left-color: color-mix(in srgb, var(--product-image-neon), transparent 58%);
    box-shadow: -8px 0 14px -12px color-mix(in srgb, var(--product-image-neon), transparent 42%);
}

html[data-theme="light"] body:not(.admin-shell) .product-card .product-card-profile {
    border-color: color-mix(in srgb, var(--product-image-neon), #aeb7aa 72%);
    box-shadow: none;
}

html[data-theme="light"] body:not(.admin-shell) .product-card .profile-column-right {
    border-left-color: color-mix(in srgb, var(--product-image-neon), #aeb7aa 68%);
    box-shadow: none;
}

@media (max-width: 700px) {
    body:not(.admin-shell) .product-card .product-media,
    html[data-theme="light"] body:not(.admin-shell) .product-card .product-media {
        box-shadow:
            inset 0 0 0 1px color-mix(in srgb, var(--product-image-neon), transparent 88%),
            0 0 7px color-mix(in srgb, var(--product-image-neon), transparent 93%),
            0 5px 12px rgba(0, 0, 0, .1);
    }

    body:not(.admin-shell) .product-card:hover .product-media,
    body:not(.admin-shell) .product-card:focus-within .product-media {
        transform: none;
    }

    body:not(.admin-shell) .product-card .profile-column-right {
        box-shadow: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    body:not(.admin-shell) .product-card .product-media {
        transition: none;
    }

    body:not(.admin-shell) .product-card .product-card-profile,
    body:not(.admin-shell) .product-card .profile-column-right {
        transition: none;
    }

    body:not(.admin-shell) .product-card:hover .product-media,
    body:not(.admin-shell) .product-card:focus-within .product-media {
        transform: none;
    }
}
