/**
 * Structural styling for the carousel zone (views/zones/carousel.php).
 * Brand-neutral by design (see CLAUDE.md — no client branding in this
 * repo): colors read from CSS custom properties a client theme can
 * override, defaulting to `currentColor` / neutral greys rather than any
 * one client's palette.
 */

.wordpress-corpo-carousel-wrapper {
    --wordpress-corpo-carousel-radius: 12px;
    --wordpress-corpo-carousel-gap: 12px;
}

.wordpress-corpo-carousel-title {
    text-align: center;
    margin: 0 0 1.5rem;
}

.wordpress-corpo-carousel {
    /* --f-carousel-gap is the real custom property the vendored
       carousel.umd.js reads (see assets/fancybox/carousel.css) — not
       --f-carousel-spacing, which is a different, older Fancybox build's
       variable name and does nothing here. */
    --f-carousel-gap: var(--wordpress-corpo-carousel-gap);
    /* --wordpress-corpo-carousel-slides-per-page is set per-instance, per
       breakpoint, by the zone itself (views/zones/carousel.php's inline
       <style>) — the Carousel component's own slidesPerPage/breakpoints
       options don't actually size slides in the vendored build, only this
       custom property does (see that view's docblock for how this was
       confirmed). */
    --wordpress-corpo-carousel-slides-per-page: 1;
    --f-carousel-slide-width: calc(100% / var(--wordpress-corpo-carousel-slides-per-page) - var(--f-carousel-gap));
    position: relative;
}

.wordpress-corpo-carousel .f-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    background-color: rgba(0, 0, 0, 0.35);
    border: none;
    border-radius: 8px;
    color: #fff;
}

.wordpress-corpo-carousel .f-button.is-prev {
    left: 0;
}

.wordpress-corpo-carousel .f-button.is-next {
    right: 0;
}

.wordpress-corpo-carousel .f-button[aria-disabled] {
    opacity: 0.35;
    pointer-events: none;
}

/* Set by assets/carousel.js once every item fits in a single page at the
   current breakpoint (e.g. 2 items with a 3-per-page desktop layout) — the
   vendored bundle itself only ever disables prev/next in that case (see the
   [aria-disabled] rule above), it never hides them, and a single dot isn't
   useful UI either. */
.wordpress-corpo-carousel.is-single-page .f-button,
.wordpress-corpo-carousel.is-single-page .wordpress-corpo-carousel-dots {
    display: none;
}

.wordpress-corpo-carousel-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.wordpress-corpo-carousel-dot {
    width: 0.5rem;
    height: 0.5rem;
    padding: 0;
    border: none;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.15s ease;
}

.wordpress-corpo-carousel-dot.is-selected {
    background-color: rgba(0, 0, 0, 0.6);
    transform: scale(1.25);
}

.wordpress-corpo-carousel-more {
    text-align: center;
    margin-top: 1.5rem;
}

/* Card */

.wordpress-corpo-carousel-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--wordpress-corpo-carousel-card-bg, #fff);
    border-radius: var(--wordpress-corpo-carousel-radius);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.12);
    text-decoration: none;
    color: inherit;
    position: relative;
}

.wordpress-corpo-carousel-card > * {
    padding-left: 1rem;
    padding-right: 1rem;
}

/* A visual separator between whichever two zones end up adjacent, so the
   card looks consistent no matter which 'order' a caller picked. */
.wordpress-corpo-carousel-card > * + * {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
}

.wordpress-corpo-carousel-card-image {
    margin: 0;
    padding: 0 !important;
}

.wordpress-corpo-carousel-card-image img {
    display: block;
    width: 100%;
    height: 190px;
    object-fit: cover;
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
}

.wordpress-corpo-carousel-card-image img.contain {
    object-fit: contain;
}

/* Gallery style: an items-are-just-photos carousel — no card chrome, image
   fills its slide at a fixed ratio instead of a fixed pixel height. */

.wordpress-corpo-carousel-card--gallery {
    background: none;
    border-radius: 0;
    box-shadow: none;
}

.wordpress-corpo-carousel-card--gallery > * {
    padding-left: 0;
    padding-right: 0;
}

.wordpress-corpo-carousel-card--gallery > * + * {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.wordpress-corpo-carousel-card--gallery .wordpress-corpo-carousel-card-image img {
    height: auto;
    aspect-ratio: 16 / 9;
}

.wordpress-corpo-carousel-card-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wordpress-corpo-carousel-card-price {
    display: flex;
    flex-wrap: wrap;
    gap: 0 0.75rem;
    font-weight: 700;
}

.wordpress-corpo-carousel-card-options {
    display: flex;
    justify-content: space-around;
    text-align: center;
}

.wordpress-corpo-carousel-card-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    flex: 1 1 0;
    min-width: 0;
}

.wordpress-corpo-carousel-card-option-icon {
    width: 1.3rem;
    height: 1.3rem;
}

.wordpress-corpo-carousel-card-option-label {
    font-size: 0.8125rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.wordpress-corpo-carousel-card-link {
    display: inline-flex;
    align-items: center;
    padding-bottom: 1rem;
    gap: .5rem;
    font-size: 0.8125rem;
    font-weight: 700;
    text-decoration: none;
    color: inherit;
    border-top: 1px solid rgba(0, 0, 0, 0.12);
}

/* Stretched link: the card's only link covers the whole card, so a click
   anywhere on it opens the item — without wrapping the card itself in an
   <a> (which would nest this link inside another one). Positioned against
   .wordpress-corpo-carousel-card, the nearest positioned ancestor; the link
   itself must stay unpositioned for that to hold. */
.wordpress-corpo-carousel-card-link::after {
    content: "";
    position: absolute;
    inset: 0;
}

@media (min-width: 768px) {
    .wordpress-corpo-carousel-card-title {
        font-size: 1.0625rem;
    }
}
