/**
 * Ürün listesi — şık kompakt kartlar + parlayan button2
 */

@keyframes product-btn-steam {
    0% {
        background-position: 0 0;
    }
    50% {
        background-position: 400% 0;
    }
    100% {
        background-position: 0 0;
    }
}

/* Sayfa başlıkları — ürün listesi üstü */
.page-content > .products-page-header,
.page-content > h1:first-of-type,
.page-content > h2:nth-of-type(1) {
    position: static !important;
    top: auto !important;
    left: auto !important;
    margin: 0;
    padding: 0;
    z-index: auto;
}

.page-content > h1:first-of-type {
    padding: calc(72px + env(safe-area-inset-top, 0px)) 28px 0.35rem calc(108px + 20px);
    font-size: clamp(1.35rem, 2.5vw, 1.85rem);
    font-weight: 700;
    line-height: 1.25;
    color: #f1f5f9;
}

.page-content > h1:first-of-type:has(+ .products-page) {
    padding-bottom: 1rem;
}

.page-content > h2:nth-of-type(1) {
    padding: 0 28px 1rem calc(108px + 20px);
    font-size: clamp(0.95rem, 1.8vw, 1.1rem);
    font-weight: 500;
    line-height: 1.4;
    color: rgba(226, 232, 240, 0.82);
}

body.light-mode .page-content > h1:first-of-type {
    color: #0f172a !important;
}

body.light-mode .page-content > h2:nth-of-type(1) {
    color: #475569 !important;
}

@media (max-width: 991px) {
    .page-content > h1:first-of-type,
    .page-content > h2:nth-of-type(1) {
        padding-left: max(16px, env(safe-area-inset-left, 0px));
        padding-right: max(16px, env(safe-area-inset-right, 0px));
    }

    .page-content > h1:first-of-type {
        padding-top: calc(64px + env(safe-area-inset-top, 0px));
    }
}

.products-page {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: calc(100vw - 120px);
    margin: 0 auto;
    padding: calc(72px + env(safe-area-inset-top, 0px)) 28px 48px;
    box-sizing: border-box;
    position: relative;
}

/* Başlık varsa üst boşluk h1'de — çift padding olmasın */
.page-content > h1:first-of-type + .products-page {
    padding-top: 0;
}

.products-page .service-wrapper3.products-grid {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    display: grid !important;
    order: 1;
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    box-sizing: border-box;
    background: transparent;
    gap: 24px !important;
    align-items: stretch;
    justify-items: stretch;
}

.products-page .pagination,
.products-page .products-pagination {
    order: 2;
    position: relative !important;
    margin-top: 2rem !important;
    width: 100%;
    display: flex !important;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

/* ---- Kart ---- */
.products-page .service-wrapper3.products-grid > .col-md-3 {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    min-height: 0;
    align-self: stretch;
}

.products-page .service-wrapper3.products-grid .card,
.products-page .service-wrapper3.products-grid .card[style] {
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    flex: 1 1 auto;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    overflow: hidden;
    position: relative;
    text-align: center;
    background: transparent;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    transition:
        transform 0.35s ease,
        border-color 0.35s ease,
        box-shadow 0.35s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

/* Scroll-reveal kaydırmasını kapat — satır içi hizayı bozuyordu */
.products-page .service-wrapper3.products-grid .card.lux-reveal,
.products-page .service-wrapper3.products-grid .card.lux-reveal.is-visible {
    transform: none !important;
}

.products-page .service-wrapper3.products-grid .card::after {
    content: "";
    position: absolute;
    top: 150%;
    left: -200px;
    width: 120%;
    height: 18px;
    transform: rotate(50deg);
    background-color: #fff;
    filter: blur(30px);
    opacity: 0.45;
    transition: 1s ease;
    pointer-events: none;
}

.products-page .service-wrapper3.products-grid .card:hover {
    transform: translateY(-6px);
    border-color: #01d1a4;
    background-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 14px 32px rgba(1, 177, 175, 0.2);
}

.products-page .service-wrapper3.products-grid .card:hover::after {
    width: 225%;
    top: -100%;
}

.products-page .service-wrapper3.products-grid .card-product-media {
    width: 100% !important;
    height: 200px !important;
    min-height: 200px !important;
    flex-shrink: 0 !important;
    overflow: hidden;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.products-page .service-wrapper3.products-grid .card-product-media img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center center;
    display: block;
    margin: 0 !important;
    padding: 8px;
    box-sizing: border-box;
}

.products-page .service-wrapper3.products-grid .card-product-media--empty {
    background: linear-gradient(145deg, #eef2f6 0%, #d8e0e8 100%);
}

.products-page .service-wrapper3.products-grid .card-product-media__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 200px;
    color: rgba(1, 138, 136, 0.45);
    font-size: 2.25rem;
}

body.light-mode .products-page .service-wrapper3.products-grid .card-product-media--empty {
    background: linear-gradient(145deg, #f8fafc 0%, #e8edf2 100%);
}

body.light-mode .products-page .service-wrapper3.products-grid .card-product-media__placeholder {
    color: rgba(1, 138, 136, 0.55);
}

.products-page .service-wrapper3.products-grid .card-body {
    flex: 1 1 auto;
    display: flex !important;
    flex-direction: column !important;
    padding: 12px 14px 16px !important;
    min-height: 0;
}

.products-page .service-wrapper3.products-grid .card-body h2 {
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.04em;
    line-height: 1.35;
    margin: 0 0 6px;
    min-height: calc(0.95rem * 1.35 * 2);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #f1f1f1;
    flex-shrink: 0;
}

.products-page .service-wrapper3.products-grid .card-body p,
.products-page .service-wrapper3.products-grid .card-body h3 {
    font-size: 0.8rem !important;
    line-height: 1.45;
    margin: 0 0 10px;
    min-height: calc(0.8rem * 1.45 * 2);
    flex: 1 1 auto;
    color: rgba(255, 255, 255, 0.65);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.products-page .service-wrapper3.products-grid .btn-container {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    width: 100%;
    padding-top: 4px;
    overflow: visible;
}

/* ---- Parlayan button2 (tüm ürün sayfaları) ---- */
.products-page .button2 {
    --ch-black: #141414;
    --eer-black: #1b1b1b;
    --night-rider: #2e2e2e;
    --ch-white: #e1e1e1;
    border-radius: 20px;
    width: 200px;
    max-width: 100%;
    min-height: 36px;
    height: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 15px;
    border: none;
    color: #fff !important;
    position: relative;
    cursor: pointer;
    margin: 0 auto 4px !important;
    transition-duration: 0.2s;
    background-color: var(--ch-black);
    text-decoration: none !important;
    font-size: 14px;
    z-index: 0;
    overflow: visible;
    box-sizing: border-box;
}

.products-page .button2::before,
.products-page .button2::after {
    content: "";
    position: absolute;
    left: -2px;
    top: -2px;
    border-radius: 22px;
    background: linear-gradient(
        45deg,
        var(--ch-black),
        var(--eer-black),
        var(--night-rider),
        var(--ch-white),
        var(--night-rider),
        var(--eer-black),
        var(--ch-black),
        var(--ch-black)
    );
    background-size: 400%;
    width: calc(100% + 4px);
    height: calc(100% + 4px);
    z-index: -1;
    animation: product-btn-steam 20s linear infinite;
}

.products-page .button2::after {
    filter: blur(50px);
}

.products-page .service-wrapper3.products-grid form {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 0;
}

.products-page .pagination .step-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.products-page .pagination .step-links a,
.products-page .pagination .step-links .current {
    margin: 0;
}

/* ---- Masaüstü grid ---- */
@media (min-width: 992px) {
    .products-page .service-wrapper3.products-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 24px !important;
        align-items: stretch;
        justify-items: stretch;
    }

    .products-page .service-wrapper3.products-grid > .col-md-3 {
        display: flex;
        flex-direction: column;
        max-width: none;
        height: 100%;
    }

    .products-page .service-wrapper3.products-grid .card,
    .products-page .service-wrapper3.products-grid .card[style] {
        max-width: 100% !important;
        height: 100% !important;
    }

    .products-page .service-wrapper3.products-grid .card:hover {
        transform: translateY(-4px);
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .products-page .service-wrapper3.products-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .products-page {
        max-width: 100%;
        padding: calc(72px + env(safe-area-inset-top, 0px)) 16px 32px;
    }

    .page-content > h1:first-of-type + .products-page {
        padding-top: 0;
    }

    .products-page .service-wrapper3.products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        max-width: 100% !important;
        align-items: stretch;
        justify-items: stretch;
    }

    .products-page .service-wrapper3.products-grid > .col-md-3 {
        max-width: none;
        display: flex;
        flex-direction: column;
    }
}

@media (max-width: 991px) {
    .products-page .service-wrapper3.products-grid {
        padding: 0 !important;
    }
}

@media (max-width: 767px) {
    .products-page {
        padding: calc(var(--mobile-nav-h, 76px) + 8px) 14px calc(24px + env(safe-area-inset-bottom, 0px));
        max-width: 100%;
    }

    .products-page .service-wrapper3.products-grid {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
        max-width: 100% !important;
    }

    .products-page .service-wrapper3.products-grid > .col-md-3 {
        max-width: none;
    }

    .products-page .service-wrapper3.products-grid .card,
    .products-page .service-wrapper3.products-grid .card[style] {
        flex-direction: row !important;
        align-items: stretch !important;
        max-width: 100% !important;
        min-height: 120px;
        border-radius: 16px;
        text-align: left;
    }

    .products-page .service-wrapper3.products-grid .card::after {
        display: none;
    }

    .products-page .service-wrapper3.products-grid .card-product-media {
        --product-cut: 26px;
        position: relative;
        width: 34% !important;
        min-width: 104px !important;
        max-width: 128px !important;
        height: auto !important;
        min-height: 120px !important;
        flex-shrink: 0 !important;
        clip-path: polygon(
            0 0,
            calc(100% - var(--product-cut)) 0,
            100% 100%,
            0 100%
        );
        -webkit-clip-path: polygon(
            0 0,
            calc(100% - var(--product-cut)) 0,
            100% 100%,
            0 100%
        );
        border-radius: 16px 0 0 16px;
        background: #0e141c;
    }

    .products-page .service-wrapper3.products-grid .card-product-media::after {
        content: "";
        position: absolute;
        top: 0;
        right: 0;
        z-index: 2;
        width: 36%;
        height: 100%;
        background: linear-gradient(
            118deg,
            transparent calc(100% - 2px),
            rgba(1, 177, 175, 0.55) 100%
        );
        pointer-events: none;
    }

    .products-page .service-wrapper3.products-grid .card-product-media img {
        padding: 6px !important;
        object-fit: contain !important;
    }

    .products-page .service-wrapper3.products-grid .card-product-media--empty {
        background: linear-gradient(145deg, #141c28 0%, #0a1018 100%);
    }

    .products-page .service-wrapper3.products-grid .card-product-media--empty::before {
        content: "\f03e";
        font-family: "Font Awesome 6 Free";
        font-weight: 900;
        position: absolute;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.4rem;
        color: rgba(1, 177, 175, 0.35);
        z-index: 1;
    }

    .products-page .service-wrapper3.products-grid .card-body {
        flex: 1 1 auto;
        padding: 10px 12px 12px !important;
        justify-content: center;
    }

    .products-page .service-wrapper3.products-grid .card-body h2 {
        font-size: 0.9rem !important;
        font-weight: 600 !important;
        color: #f1f5f9 !important;
        letter-spacing: 0.01em;
        line-height: 1.35 !important;
        margin-bottom: 4px;
        -webkit-line-clamp: 3;
    }

    .products-page .service-wrapper3.products-grid .card-body p {
        display: none;
    }

    .products-page .service-wrapper3.products-grid .btn-container {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 6px;
        padding-top: 8px;
    }

    .products-page .button2 {
        width: auto;
        min-width: 0;
        min-height: 36px;
        padding: 7px 12px;
        font-size: 12px;
        font-weight: 600;
        border-radius: 10px;
        margin: 0 !important;
    }

    .products-page .button2::after {
        filter: blur(28px);
    }

    .products-page .service-wrapper3.products-grid form {
        width: auto;
    }
}

@media (max-width: 380px) {
    .products-page .service-wrapper3.products-grid .card-product-media {
        min-width: 92px !important;
        max-width: 108px !important;
    }

    .products-page .button2 {
        padding: 7px 10px;
        font-size: 11px;
    }
}

.product-image--placeholder {
    width: 100%;
    min-height: 280px;
    background: linear-gradient(145deg, #141c28 0%, #0a1018 100%);
    border-radius: 12px;
}

.product-image--placeholder::before {
    content: "\f03e";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 2.5rem;
    color: rgba(1, 177, 175, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 280px;
}
