/* Shared photo cards used by the rental and product grids. */
.ct-photo-card {
    position: relative;
    display: block;
    min-width: 0;
    overflow: hidden;
    border-radius: 22px;
    background: #e8edf1;
    color: #202428;
    isolation: isolate;
}

.ct-photo-card::before,
.ct-photo-card::after {
    position: absolute;
    z-index: 1;
    inset: 0;
    content: '';
    pointer-events: none;
}

.ct-photo-card::before {
    background: linear-gradient(0deg, rgba(255, 255, 255, .98), rgba(255, 255, 255, .72) 22%, transparent 68%);
}

.ct-photo-card::after {
    background: linear-gradient(0deg, #fff, rgba(255, 255, 255, .94) 34%, rgba(255, 255, 255, .07) 100%);
    opacity: 0;
    transition: opacity .38s ease;
}

.ct-photo-card .ct-photo-card__image {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity .38s ease, transform .5s ease;
}

.ct-photo-card .ct-photo-card__image--hover { opacity: 0; }

.ct-photo-card .ct-photo-card__content {
    position: absolute;
    z-index: 2;
    right: 0;
    bottom: 0;
    left: 0;
    display: block;
    min-height: 0;
    padding: 20px 22px;
    background: none;
}

.ct-photo-card .ct-photo-card__content h3 {
    position: static;
    margin: 0;
    padding: 0;
    background: none;
    color: #222;
    font-weight: 700;
    line-height: 1.08;
}

.ct-photo-card__details {
    display: block;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height .38s ease, opacity .28s ease, margin-top .38s ease;
}

.ct-photo-card__details p {
    max-width: 38ch;
    margin: 0;
    color: #343a40;
    font-size: .95rem;
    line-height: 1.3;
}

.ct-photo-card:hover::after,
.ct-photo-card:focus-visible::after,
.ct-photo-card:hover .ct-photo-card__image--hover,
.ct-photo-card:focus-visible .ct-photo-card__image--hover { opacity: 1; }

.ct-photo-card:hover .ct-photo-card__image--base,
.ct-photo-card:focus-visible .ct-photo-card__image--base { opacity: 0; }

.ct-photo-card:hover .ct-photo-card__details,
.ct-photo-card:focus-visible .ct-photo-card__details {
    max-height: 130px;
    margin-top: 9px;
    opacity: 1;
}

.ct-photo-card:focus-visible,
.ct-products .fabric-card:focus-visible {
    outline: 3px solid #1b77c9;
    outline-offset: 3px;
}

.ct-rental .rental-sectors__grid .ct-photo-card {
    min-height: clamp(205px, 16.2vw, 233px);
}

.ct-rental .rental-sectors__grid .ct-photo-card .ct-photo-card__image { height: 100%; }
.ct-rental .rental-sectors__grid .ct-photo-card h3 { font-size: clamp(1.4rem, 2vw, 1.7rem); }

.ct-products .category-card.ct-photo-card {
    min-height: 237px;
    transform: none;
}

.ct-products .category-card.ct-photo-card .ct-photo-card__image { height: 100%; }
.ct-products .category-card.ct-photo-card .ct-photo-card__content { padding: 18px 20px; background: none; }
.ct-products .category-card.ct-photo-card h3 { font-size: 1.25rem; }

.ct-products .category-card.ct-photo-card:hover,
.ct-products .category-card.ct-photo-card:focus-visible { transform: none; }

/* Product-line cards reveal their detailed copy while retaining a clear link. */
.ct-products .fabric-card {
    display: block;
    color: #222;
    isolation: isolate;
}

.ct-products .fabric-card > .fabric-card__summary {
    position: absolute;
    z-index: 1;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 85px 28px 25px;
    background: linear-gradient(transparent, rgba(255, 255, 255, .95) 65%, #fff);
    transition: opacity .3s ease;
}

.ct-products .fabric-card > .fabric-card__details {
    position: absolute;
    z-index: 2;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 27px 28px 23px;
    background: #fff;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity .32s ease, transform .32s ease;
}

.ct-products .fabric-card__details h3 { margin-bottom: 12px; }
.ct-products .fabric-card__details .fabric-card__headline { font-size: 1.12rem; font-weight: 700; }
.ct-products .fabric-card__details .fabric-card__description { margin-top: 15px; font-size: .94rem; font-weight: 400; line-height: 1.3; }
.ct-products .fabric-card__details .fabric-card__ideal { margin-top: 16px; font-size: .77rem; font-weight: 700; line-height: 1.32; text-transform: uppercase; }
.ct-products .fabric-card__details .fabric-card__ideal strong { display: block; margin-bottom: 4px; color: #252b2f; }

.ct-products .fabric-card .fabric-card__plus {
    display: grid;
    width: 38px;
    height: 38px;
    flex: none;
    place-items: center;
    align-self: flex-end;
    margin-top: auto;
    border-radius: 50%;
    background: #52a4ff;
    color: #fff;
    font-size: 29px;
    font-weight: 300;
    line-height: 1;
}

.ct-products .fabric-card:hover > .fabric-card__details,
.ct-products .fabric-card:focus-visible > .fabric-card__details { opacity: 1; transform: none; }

.ct-products .fabric-card:hover > .fabric-card__summary,
.ct-products .fabric-card:focus-visible > .fabric-card__summary { opacity: 0; }

@media (hover: none) {
    .ct-photo-card::after { opacity: .7; }
    .ct-photo-card .ct-photo-card__image--hover { opacity: .65; }
    .ct-photo-card .ct-photo-card__image--base { opacity: .35; }
    .ct-photo-card .ct-photo-card__details { max-height: 130px; margin-top: 9px; opacity: 1; }
    .ct-products .fabric-card > .fabric-card__details { opacity: 1; transform: none; }
    .ct-products .fabric-card > .fabric-card__summary { opacity: 0; }
}

@media (max-width: 720px) {
    .ct-rental .rental-sectors__grid .ct-photo-card,
    .ct-products .category-card.ct-photo-card { min-height: 245px; }
    .ct-products .fabric-card { min-height: 344px; }
}

@media (prefers-reduced-motion: reduce) {
    .ct-photo-card::after,
    .ct-photo-card .ct-photo-card__image,
    .ct-photo-card__details,
    .ct-products .fabric-card > .fabric-card__summary,
    .ct-products .fabric-card > .fabric-card__details { transition: none; }
}
