/* Cards selecionáveis (Admin › Experiência › Cards) — variantes adaptadas do diretório widget. */

.dc {
    --dc-ratio: 0.62;
    --dc-accent: #74caff;
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    width: 100%;
    aspect-ratio: var(--dc-ratio);
    overflow: hidden;
    container-type: inline-size;
    color: #fff;
    font-family: Inter, system-ui, sans-serif;
    text-align: left;
    -webkit-font-smoothing: antialiased;
}

.dc *,
.dc *::before,
.dc *::after {
    box-sizing: border-box;
}

.dc h3,
.dc p {
    margin: 0;
}

.dc:focus-visible {
    outline: 2px solid var(--dc-accent);
    outline-offset: 4px;
}

.dc-media {
    overflow: hidden;
}

.dc-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    user-select: none;
    transition: transform 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}

.dc-title,
.dc-text {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
}

.dc-title {
    -webkit-line-clamp: 3;
    line-clamp: 3;
}

.dc-text {
    -webkit-line-clamp: 4;
    line-clamp: 4;
}

.dc-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
}

.dc-similar {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 16px;
    border-radius: 999px;
    background: var(--dc-accent);
    color: #08111a;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.dc-similar span {
    transition: transform 0.25s ease;
}

.dc-similar:hover {
    transform: translateY(-1px);
}

.dc-similar:hover span {
    transform: translateX(3px);
}

.dc-open {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding-bottom: 2px;
    border-bottom: 1px solid currentColor;
    color: inherit;
    font-size: 11.5px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    opacity: 0.82;
    transition: opacity 0.25s ease, color 0.25s ease;
}

.dc-open:hover {
    color: var(--dc-accent);
    opacity: 1;
}

.dc-similar:focus-visible,
.dc-open:focus-visible {
    outline: 2px solid var(--dc-accent);
    outline-offset: 3px;
}

/* Editorial — foto em duotone com o texto por cima */
.dc--editorial {
    --dc-ratio: 0.56;
    --dc-accent: #74caff;
    border-radius: 10px;
    background: #0b2435;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.27);
}

.dc--editorial::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.42) 0%, transparent 22%, transparent 40%, rgba(2, 10, 20, 0.86) 100%);
}

.dc--editorial .dc-media {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.dc--editorial .dc-img {
    filter: grayscale(1);
}

.dc--editorial .dc-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(8, 30, 53, 0.88) 0%, rgba(9, 28, 52, 0.25) 75%);
}

.dc--editorial:hover .dc-img {
    transform: scale(1.07);
}

.dc-glow {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: radial-gradient(ellipse at 10% 80%, rgba(73, 185, 255, 0.6), transparent 65%);
    mix-blend-mode: screen;
}

.dc--editorial .dc-top {
    position: absolute;
    top: 7%;
    right: 8%;
    left: 8%;
    z-index: 5;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.dc-brand {
    font-weight: 600;
}

.dc--editorial .dc-area {
    overflow: hidden;
    opacity: 0.72;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dc--editorial .dc-body {
    position: absolute;
    right: 8%;
    bottom: 7%;
    left: 8%;
    z-index: 5;
}

.dc--editorial .dc-kicker {
    display: block;
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 0.82;
}

.dc--editorial .dc-title {
    margin: 12px 0 10px;
    font-size: clamp(18px, 9cqi, 28px);
    font-weight: 500;
    line-height: 1.18;
    letter-spacing: -0.035em;
}

.dc--editorial .dc-text {
    font-size: clamp(12px, 4.6cqi, 14px);
    font-weight: 300;
    line-height: 1.6;
    opacity: 0.86;
}

.dc--editorial .dc-actions {
    margin-top: 18px;
}

.dc--editorial .dc-similar {
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    backdrop-filter: blur(6px);
}

.dc--editorial .dc-similar:hover {
    border-color: var(--dc-accent);
    background: var(--dc-accent);
    color: #04121f;
}

/* Pôster — foto com onda violeta e resumo na base */
.dc--poster {
    --dc-ratio: 0.8;
    --dc-accent: #bd8bff;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 24px;
    background: linear-gradient(180deg, #d6d6dc 0%, #a5a7b2 100%);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.dc--poster .dc-media {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.dc--poster .dc-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.42) 0%, rgba(0, 0, 0, 0.08) 34%, rgba(0, 0, 0, 0) 55%);
}

.dc--poster .dc-img {
    transform: scale(1.02);
}

.dc--poster:hover .dc-img {
    transform: scale(1.09);
}

.dc-wave {
    position: absolute;
    right: -14%;
    bottom: -9%;
    left: -8%;
    z-index: 1;
    height: 60%;
    border-top-left-radius: 46% 70%;
    border-top-right-radius: 22% 30%;
    background:
        radial-gradient(circle at 35% 0%, rgba(156, 87, 255, 0.22), rgba(156, 87, 255, 0) 50%),
        linear-gradient(180deg, #1c093f 0%, #2b0660 50%, #3d0c88 100%);
    box-shadow: 0 -25px 60px rgba(107, 44, 255, 0.18);
    transform: rotate(-4deg);
    transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.dc--poster:hover .dc-wave {
    transform: rotate(-1deg) translateY(-10px);
}

.dc--poster .dc-inner {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    padding: 7% 8% 7%;
}

.dc--poster .dc-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.dc-star {
    display: block;
    width: 20px;
    height: 20px;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.dc-star svg {
    display: block;
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
}

.dc--poster .dc-star {
    color: #d7c6ff;
}

.dc--poster:hover .dc-star {
    transform: rotate(16deg) scale(1.12);
}

.dc--poster .dc-title {
    max-width: 82%;
    font-size: clamp(20px, 8.4cqi, 34px);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.04em;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}

.dc-cursor {
    color: #bd8bff;
}

.dc--poster .dc-zone {
    margin-top: auto;
}

.dc-pill {
    display: inline-flex;
    max-width: 100%;
    margin-bottom: 12px;
    padding: 6px 11px;
    overflow: hidden;
    border: 1px solid rgba(140, 106, 255, 0.45);
    border-radius: 999px;
    background: rgba(93, 37, 255, 0.14);
    color: #cdbcff;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dc--poster .dc-text {
    max-width: 92%;
    color: rgba(255, 255, 255, 0.8);
    font-size: clamp(11.5px, 3.6cqi, 13.5px);
    line-height: 1.55;
    -webkit-line-clamp: 3;
    line-clamp: 3;
}

.dc--poster .dc-actions {
    margin-top: 14px;
}

.dc--poster .dc-similar {
    color: #1a0838;
}

.dc--poster .dc-similar:hover {
    background: #d7c6ff;
}

/* Destaque — título no topo, imagem emoldurada, resumo arejado */
.dc--feature {
    --dc-ratio: 0.62;
    --dc-accent: #b6e4ff;
    border: 1px solid rgba(190, 217, 239, 0.62);
    border-radius: 21px;
    background:
        linear-gradient(150deg, rgba(157, 196, 227, 0.13), rgba(16, 47, 79, 0.08) 60%, rgba(13, 55, 91, 0.2)),
        #244568;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.13),
        0 18px 40px rgba(4, 22, 40, 0.35);
    transition: border-color 0.45s ease, box-shadow 0.45s ease;
}

.dc--feature:hover {
    border-color: #d5eaff;
}

.dc--feature .dc-head {
    flex: none;
    padding: 11% 11% 0;
}

.dc--feature .dc-kicker {
    display: block;
    margin-bottom: 10px;
    overflow: hidden;
    color: #b5cada;
    font-size: clamp(10px, 3.8cqi, 13px);
    font-weight: 500;
    letter-spacing: 0.08em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.dc--feature .dc-title {
    font-size: clamp(19px, 8cqi, 28px);
    font-weight: 600;
    line-height: 1.14;
    letter-spacing: -0.045em;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.dc--feature .dc-stage {
    display: grid;
    grid-template: minmax(0, 1fr) / minmax(0, 1fr);
    flex: 1 1 auto;
    min-height: 0;
    padding: 7% 11%;
    perspective: 700px;
}

.dc--feature .dc-frame {
    min-height: 0;
    overflow: hidden;
    border: 1px solid rgba(190, 217, 239, 0.28);
    border-radius: 14px;
    background: #183552;
    box-shadow: 0 13px 22px rgba(7, 26, 48, 0.42);
    transition: transform 0.65s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.dc--feature:hover .dc-frame {
    transform: translateY(-6px) rotate(-1.5deg) scale(1.02);
}

.dc-divider {
    flex: none;
    height: 34px;
    border-top: 1px solid rgba(160, 199, 224, 0.11);
    border-bottom: 1px solid rgba(182, 215, 237, 0.13);
    background-image: repeating-radial-gradient(ellipse at 50% -125%, transparent 0 5px, rgba(129, 183, 220, 0.15) 6px 7px, transparent 8px 11px);
}

.dc--feature .dc-body {
    flex: none;
    padding: 7% 11% 9%;
}

.dc--feature .dc-text {
    color: #e2ebf5;
    font-size: clamp(12px, 4.4cqi, 14.5px);
    line-height: 1.7;
    -webkit-line-clamp: 3;
    line-clamp: 3;
}

.dc--feature .dc-actions {
    margin-top: 14px;
}

.dc--feature .dc-similar {
    background: #d5eaff;
    color: #0d2a47;
}

.dc--feature .dc-similar:hover {
    background: #fff;
}

/* Vitrine — cartão claro com a foto e o resumo sobre ela */
.dc--vitrine {
    --dc-ratio: 0.68;
    --dc-accent: #1f9d45;
    padding: 12px 12px 8px;
    border-radius: 26px;
    background: #f6f6f4;
    color: #1c1c1c;
    font-family: Outfit, Inter, system-ui, sans-serif;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.45) inset,
        0 18px 36px rgba(0, 0, 0, 0.28),
        0 42px 80px rgba(0, 0, 0, 0.38);
}

.dc--vitrine .dc-brandbar {
    display: flex;
    flex: none;
    align-items: center;
    gap: 8px;
    min-width: 0;
    margin: 2px 6px 10px;
    color: #202020;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.dc--vitrine .dc-brandbar span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dc-logo {
    display: grid;
    flex: none;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: #1f9d45;
}

.dc-logo svg {
    width: 14px;
    height: 14px;
    fill: #f4fff7;
}

.dc--vitrine .dc-stage {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    border-radius: 16px;
    background: #070b09;
}

.dc--vitrine .dc-media {
    position: absolute;
    inset: 0;
}

.dc--vitrine .dc-img {
    object-position: center 22%;
}

.dc--vitrine:hover .dc-img {
    transform: scale(1.05);
}

.dc-quote {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
    padding: 64px 16px 16px;
    background: linear-gradient(180deg, transparent 0%, rgba(5, 8, 7, 0.2) 28%, rgba(5, 8, 7, 0.92) 68%, #070b09 100%);
}

.dc--vitrine .dc-title {
    color: #fff;
    font-size: clamp(18px, 7.4cqi, 24px);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.04em;
    text-transform: uppercase;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.dc--vitrine .dc-text {
    margin-top: 9px;
    color: rgba(255, 255, 255, 0.8);
    font-size: clamp(12px, 4.2cqi, 13.5px);
    line-height: 1.4;
    -webkit-line-clamp: 3;
    line-clamp: 3;
}

.dc--vitrine .dc-actions {
    flex: none;
    justify-content: space-between;
    min-height: 54px;
    padding: 8px 4px 2px;
}

.dc--vitrine .dc-similar {
    color: #f4fff7;
}

.dc--vitrine .dc-similar:hover {
    background: #17803a;
}

.dc--vitrine .dc-open {
    color: #3a3a3a;
}

/* No capítulo Portfólio (carrossel empilhado) */
.pf-overlay[data-card="editorial"] { --dc-r: 0.56; }
.pf-overlay[data-card="poster"] { --dc-r: 0.8; }
.pf-overlay[data-card="feature"] { --dc-r: 0.62; }
.pf-overlay[data-card="vitrine"] { --dc-r: 0.68; }

.pf-overlay[data-card]:not([data-card="classic"]) {
    --pf-card-w: calc(var(--pf-card-h) * var(--dc-r));
}

.pf-card > .dc {
    height: 100%;
    aspect-ratio: auto;
}

.pf-similar {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    color: var(--lime, #c6f04a);
    font-size: 0.74rem;
    font-weight: 600;
    text-decoration: none;
}

.pf-similar:hover span {
    transform: translateX(3px);
}

.pf-similar span {
    transition: transform 0.25s ease;
}

/* No capítulo Produtos (trilho horizontal) */
.products-overlay[data-card="editorial"] { --dc-r: 0.56; }
.products-overlay[data-card="poster"] { --dc-r: 0.8; }
.products-overlay[data-card="feature"] { --dc-r: 0.62; }
.products-overlay[data-card="vitrine"] { --dc-r: 0.68; }

.products-overlay[data-card]:not([data-card="plates"]) {
    --pl-w: calc(var(--pl-h) * var(--dc-r));
}

.plate-slot > .dc {
    height: var(--pl-h);
    aspect-ratio: auto;
    cursor: pointer;
    transform: scale(0.94) translateY(8px);
    filter: brightness(0.72) saturate(0.85);
    transition:
        transform 420ms cubic-bezier(0.22, 1, 0.36, 1),
        filter 420ms ease;
}

.plate-slot.is-near > .dc {
    filter: brightness(0.84) saturate(0.92);
}

.plate-slot:not(.is-active) > .dc:hover {
    filter: brightness(0.94) saturate(1);
}

.plate-slot.is-active > .dc {
    cursor: default;
    transform: translateY(-10px);
    filter: none;
}

.products-overlay.is-reduced .plate-slot > .dc {
    transform: none;
    filter: none;
    transition: none;
}

.plate-links {
    position: relative;
    z-index: 4;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
    margin: 10px 0 0 20px;
}

.plate-links .plate-link {
    margin: 0;
}

.plate-similar {
    color: var(--plate-ink, #1a1a1a);
    font-size: 11px;
    font-weight: 500;
    text-decoration: none;
    opacity: 0.78;
}

.plate-similar:hover {
    opacity: 1;
}

@media (max-width: 859px) {
    .pf-overlay[data-card]:not([data-card="classic"]) {
        --pf-card-w: min(76vw, 296px);
    }

    .products-overlay[data-card]:not([data-card="plates"]) {
        --pl-h: clamp(290px, calc(100svh - 380px), 440px);
        --pl-w: min(76vw, 296px);
    }

    :is(.pf-card, .plate-slot) > .dc--feature .dc-divider {
        display: none;
    }

    :is(.pf-card, .plate-slot) > .dc--feature .dc-head {
        padding: 9% 9% 0;
    }

    :is(.pf-card, .plate-slot) > .dc--feature .dc-kicker {
        margin-bottom: 6px;
    }

    :is(.pf-card, .plate-slot) > .dc--feature .dc-stage {
        padding: 5% 9%;
    }

    :is(.pf-card, .plate-slot) > .dc--feature .dc-body {
        padding: 0 9% 8%;
    }

    :is(.pf-card, .plate-slot) > .dc--feature .dc-text {
        line-height: 1.5;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    :is(.pf-card, .plate-slot) > .dc--feature .dc-actions {
        margin-top: 10px;
    }
}

/* Grades (página de áreas e prévia do admin) */
.dc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
    gap: 26px;
    align-items: start;
}

.dc-grid[data-card="poster"] {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
}

.dc-grid[data-card="editorial"] {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr));
}

.dc-grid > .dc {
    justify-self: center;
    max-width: 380px;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.dc-grid > .dc--poster {
    max-width: 460px;
}

.dc-grid > .dc:hover {
    transform: translateY(-8px);
}

@media (prefers-reduced-motion: reduce) {
    .dc,
    .dc *,
    .dc-grid > .dc {
        transition: none !important;
    }

    .dc--editorial:hover .dc-img,
    .dc--vitrine:hover .dc-img,
    .dc--feature:hover .dc-frame,
    .dc-grid > .dc:hover {
        transform: none;
    }
}
