/* =========================================================
   PRODUTOS / PROJETOS PRÓPRIOS
   Wupwui Softwares
========================================================= */

/* SEÇÃO */

.products-section {
    position: relative;
    padding: 52px 0 72px;
    overflow: hidden;
    background:
        radial-gradient(circle at 18% 12%, rgba(242, 183, 40, .10), transparent 26%),
        radial-gradient(circle at 82% 0%, rgba(255,255,255,.045), transparent 24%),
        linear-gradient(135deg, #090d12 0%, #151c25 52%, #0b0f14 100%);
}

.products-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(145deg, rgba(255,255,255,.018) 0 1px, transparent 1px 16px);
    pointer-events: none;
}

.products-section .container {
    position: relative;
    z-index: 1;
}

.products-section .section-title h2 {
    color: #fff;
}

.products-section .section-title h2 span {
    color: var(--gold-2);
}

/* GRID - 3 CARDS POR LINHA */

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    align-items: stretch;
}

/* CARD BASE */

.product-card {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    min-height: 300px;
    padding: 34px 30px 32px;
    border-radius: 22px;
    background:
        linear-gradient(145deg, rgba(255,255,255,.078), rgba(255,255,255,.034));
    border: 1px solid rgba(255,255,255,.14);
    box-shadow:
        0 18px 42px rgba(0,0,0,.22),
        inset 0 1px 0 rgba(255,255,255,.06);
    transition:
        transform .30s ease,
        border-color .30s ease,
        background .30s ease,
        box-shadow .30s ease;
}

.product-card > * {
    position: relative;
    z-index: 2;
}

/* CONTEÚDO CENTRALIZADO */

.product-card-content {
    min-height: 230px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-align: center;
}

/* LINHAS DOURADAS FLUINDO */

.product-card::before {
    content: "";
    position: absolute;
    inset: -12%;
    z-index: 1;
    pointer-events: none;
    opacity: 0;

    background:
        radial-gradient(circle at 18% 0%, rgba(242, 183, 40, .20), transparent 34%),

        linear-gradient(118deg,
            transparent 18%,
            rgba(255, 207, 72, 0) 24%,
            rgba(255, 207, 72, .16) 25%,
            rgba(255, 207, 72, .04) 26%,
            transparent 30%),

        linear-gradient(126deg,
            transparent 32%,
            rgba(242, 183, 40, 0) 38%,
            rgba(242, 183, 40, .15) 39%,
            rgba(242, 183, 40, .04) 40%,
            transparent 44%),

        linear-gradient(136deg,
            transparent 50%,
            rgba(255, 207, 72, 0) 56%,
            rgba(255, 207, 72, .13) 57%,
            rgba(255, 207, 72, .03) 58%,
            transparent 62%),

        linear-gradient(148deg,
            transparent 64%,
            rgba(242, 183, 40, 0) 70%,
            rgba(242, 183, 40, .10) 71%,
            rgba(242, 183, 40, .03) 72%,
            transparent 76%);

    background-repeat: no-repeat;
    background-size:
        100% 100%,
        180% 180%,
        170% 170%,
        190% 190%,
        165% 165%;

    background-position:
        0 0,
        -220px 10px,
        -380px -40px,
        -120px 60px,
        -280px 20px;

    filter: blur(.25px);
    transform: translateX(-2%) scale(1.02);
    transition: opacity .35s ease;
}

.product-card::after {
    content: "";
    position: absolute;
    left: 28px;
    right: 28px;
    bottom: 0;
    height: 3px;
    z-index: 1;
    border-radius: 999px 999px 0 0;
    background: linear-gradient(90deg, transparent, rgba(242, 183, 40, .85), transparent);
    opacity: 0;
    transition: opacity .30s ease;
}

.product-card:hover {
    transform: translateY(-8px);
    border-color: rgba(242, 183, 40, .48);
    background:
        linear-gradient(145deg, rgba(255,255,255,.10), rgba(255,255,255,.045));
    box-shadow:
        0 30px 68px rgba(0,0,0,.30),
        0 0 0 1px rgba(242, 183, 40, .10),
        inset 0 1px 0 rgba(255,255,255,.08);
}

.product-card:hover::before {
    opacity: 1;
    animation:
        productGoldLinesFlow 5.5s linear infinite,
        productGoldLinesPulse 2.8s ease-in-out infinite;
}

.product-card:hover::after {
    opacity: 1;
}

/* CARD DESTAQUE */

.product-card.featured {
    background:
        radial-gradient(circle at 15% 12%, rgba(242, 183, 40, .18), transparent 30%),
        linear-gradient(145deg, rgba(242, 183, 40, .13), rgba(255,255,255,.035)),
        repeating-linear-gradient(135deg, rgba(255,255,255,.026) 0 1px, transparent 1px 9px);
    border: 1px solid rgba(242, 183, 40, .64);
    box-shadow:
        0 24px 58px rgba(0,0,0,.28),
        0 0 0 1px rgba(242, 183, 40, .10),
        inset 0 1px 0 rgba(255,255,255,.06);
}

.product-card.featured::before {
    opacity: .28;
}

.product-card.featured:hover {
    transform: translateY(-9px);
    border-color: rgba(255, 207, 72, .92);
    box-shadow:
        0 34px 76px rgba(0,0,0,.34),
        0 0 34px rgba(242, 183, 40, .16),
        inset 0 1px 0 rgba(255,255,255,.08);
}

.product-card.featured:hover::before {
    opacity: 1;
}

/* TEXTOS */

.product-card h3 {
    max-width: 92%;
    margin: 0 0 16px;
    color: #fff;
    font-size: 26px;
    line-height: 1.15;
    font-weight: 900;
    letter-spacing: -.45px;
}

.product-card.featured h3 {
    color: var(--gold-2);
}

.product-card p {
    max-width: 92%;
    min-height: 70px;
    margin: 0;
    color: rgba(255, 255, 255, .72);
    font-size: 15px;
    line-height: 1.62;
}

/* BOTÃO */

.product-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    margin-top: 24px;
    min-height: 42px;
    padding: 0 24px;

    border: none;
    border-radius: 10px;
    cursor: pointer;

    background: linear-gradient(135deg, var(--gold-3), var(--gold-2) 44%, var(--gold));
    color: #16120a;

    font-size: 13px;
    font-weight: 900;
    text-decoration: none;

    box-shadow: 0 14px 28px rgba(242, 183, 40, .20);
    transition:
        transform .24s ease,
        box-shadow .24s ease,
        filter .24s ease;
}

.product-button:hover {
    transform: translateY(-2px);
    filter: brightness(1.04);
    box-shadow: 0 18px 34px rgba(242, 183, 40, .30);
}

/* VARIAÇÃO PRATA PREMIUM */

.silver-products .product-card {
    border-color: rgba(215, 220, 227, .16);
}

.silver-products .product-card:hover {
    border-color: rgba(215, 220, 227, .42);
    box-shadow:
        0 30px 68px rgba(0,0,0,.30),
        0 0 0 1px rgba(215, 220, 227, .10),
        inset 0 1px 0 rgba(255,255,255,.08);
}

/* MODAL */

body.modal-open {
    overflow: hidden;
}

.product-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 24px;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
        opacity .25s ease,
        visibility .25s ease;
}

.product-modal.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.product-modal-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 0%, rgba(242, 183, 40, .14), transparent 34%),
        rgba(3, 5, 8, .82);
    backdrop-filter: blur(8px);
}

.product-modal-box {
    position: relative;
    z-index: 2;

    width: min(760px, 100%);
    max-height: calc(100vh - 48px);
    overflow-y: auto;

    border-radius: 24px;
    background:
        radial-gradient(circle at 18% 0%, rgba(242, 183, 40, .14), transparent 28%),
        linear-gradient(145deg, #141b24, #070a0f);
    border: 1px solid rgba(255,255,255,.16);
    box-shadow:
        0 34px 90px rgba(0,0,0,.55),
        0 0 0 1px rgba(242, 183, 40, .08),
        inset 0 1px 0 rgba(255,255,255,.06);

    transform: translateY(12px) scale(.98);
    transition: transform .25s ease;
}

.product-modal.open .product-modal-box {
    transform: translateY(0) scale(1);
}

.product-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 5;

    width: 38px;
    height: 38px;

    display: grid;
    place-items: center;

    border: 1px solid rgba(255,255,255,.18);
    border-radius: 50%;
    background: rgba(0,0,0,.36);
    color: #fff;

    font-size: 26px;
    line-height: 1;
    cursor: pointer;

    transition:
        background .22s ease,
        transform .22s ease,
        border-color .22s ease;
}

.product-modal-close:hover {
    transform: rotate(90deg);
    background: rgba(242, 183, 40, .18);
    border-color: rgba(242, 183, 40, .48);
}

.product-modal-header {
    display: block;
    padding: 34px 34px 22px;
}

.product-modal-header h3 {
    margin: 0;
    padding-right: 38px;

    color: #fff;
    font-size: 30px;
    line-height: 1.12;
    font-weight: 900;
    letter-spacing: -.65px;
}

.product-modal-image-wrap {
    width: calc(100% - 68px);
    min-height: 280px;
    max-height: 420px;
    margin: 0 34px 24px;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.045);
    box-shadow: 0 18px 40px rgba(0,0,0,.26);
}

.product-modal-image-wrap img {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 420px;
    object-fit: contain;
}

.product-modal-content {
    padding: 0 34px 34px;
}

.product-modal-content p {
    margin: 0;
    color: rgba(255,255,255,.78);
    font-size: 15.5px;
    line-height: 1.75;
    white-space: pre-line;
}

.product-modal-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    margin-top: 26px;
    min-height: 44px;
    padding: 0 24px;

    border-radius: 10px;

    background: linear-gradient(135deg, var(--gold-3), var(--gold-2) 44%, var(--gold));
    color: #16120a;

    font-size: 13px;
    font-weight: 900;
    text-decoration: none;

    box-shadow: 0 14px 28px rgba(242, 183, 40, .20);
    transition:
        transform .24s ease,
        box-shadow .24s ease,
        filter .24s ease;
}

.product-modal-link:hover {
    transform: translateY(-2px);
    filter: brightness(1.04);
    box-shadow: 0 18px 34px rgba(242, 183, 40, .30);
}

/* ANIMAÇÕES DAS LINHAS DOURADAS */

@keyframes productGoldLinesFlow {
    0% {
        background-position:
            0 0,
            -220px 10px,
            -380px -40px,
            -120px 60px,
            -280px 20px;
    }

    50% {
        background-position:
            0 0,
            -30px -8px,
            -120px 18px,
            40px 28px,
            -70px -18px;
    }

    100% {
        background-position:
            0 0,
            180px -24px,
            120px 60px,
            220px -8px,
            150px 35px;
    }
}

@keyframes productGoldLinesPulse {
    0%, 100% {
        filter: blur(.25px) brightness(1);
    }

    50% {
        filter: blur(.5px) brightness(1.14);
    }
}

/* RESPONSIVO */

@media (max-width: 1120px) {
    .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .product-card {
        min-height: 300px;
    }
}

@media (max-width: 760px) {
    .products-section {
        padding: 42px 0 54px;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .product-card,
    .product-card.featured {
        min-height: auto;
        padding: 30px 24px 28px;
    }

    .product-card-content {
        min-height: 220px;
    }

    .product-card:hover,
    .product-card.featured:hover {
        transform: translateY(-6px);
    }

    .product-card h3 {
        font-size: 24px;
    }

    .product-card p {
        min-height: auto;
    }

    .product-modal {
        padding: 14px;
        align-items: flex-end;
    }

    .product-modal-box {
        width: 100%;
        max-height: calc(100vh - 28px);
        border-radius: 22px 22px 0 0;
    }

    .product-modal-header {
        padding: 28px 22px 18px;
    }

    .product-modal-header h3 {
        font-size: 24px;
    }

    .product-modal-image-wrap {
        width: calc(100% - 44px);
        min-height: 210px;
        max-height: 300px;
        margin: 0 22px 22px;
    }

    .product-modal-image-wrap img {
        max-height: 300px;
        object-fit: contain;
    }

    .product-modal-content {
        padding: 0 22px 30px;
    }
}

@media (max-width: 430px) {
    .product-card {
        border-radius: 16px;
    }

    .product-card h3 {
        font-size: 22px;
    }
}