/* Oraymakina Products — frontend */

/* -------------------------------------------------------------------------- */
/* Single product — sticky gallery left + content right                        */
/* -------------------------------------------------------------------------- */

.omp-single__split {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    width: 100%;
    max-width: none;
    margin: 0;
    /* Match CTA Quote horizontal inset */
    padding: 0 clamp(1.25rem, 4vw, 3.5rem) 1.25rem;
    box-sizing: border-box;
    align-items: start;
}

@media (min-width: 768px) {
    .omp-single__split {
        gap: 1.75rem;
    }
}

@media (min-width: 1024px) {
    .omp-single__split {
        /*
         * Same columns as .oml-cta-quote__grid so product content
         * lines up with the CTA description on the right.
         */
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 4rem;
        padding-bottom: 2rem;
    }

    /* Gallery stays put while the right column (and page) scrolls */
    .omp-single__media {
        position: sticky;
        top: 5.5rem; /* fixed header (~4rem) + breathing room */
        align-self: start;
        z-index: 1;
        width: 100%;
        max-width: 100%;
    }

    body.admin-bar .omp-single__media {
        top: 7.5rem; /* +32px WP admin bar */
    }
}

.omp-single__media:empty {
    display: none;
}

@media (min-width: 1024px) {
    .omp-single__split:has(.omp-single__media:empty) {
        grid-template-columns: 1fr;
    }
}

.omp-single__media {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.omp-single__article {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.omp-single__panel {
    text-align: left;
    background: transparent;
    padding: 0;
    margin: 0;
}

.omp-single__title {
    margin: 0 0 1rem;
    font-size: 1.875rem;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
    text-align: left;
}

@media (min-width: 1024px) {
    .omp-single__title {
        font-size: 2.25rem;
    }
}

.omp-single__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.omp-single__cat {
    font-size: 0.75rem;
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.2s ease;
}

.omp-single__cat:hover,
.omp-single__cat:focus-visible {
    color: #fff;
    outline: none;
}

.omp-single__content,
.omp-single__content.prose,
.omp-single__content p,
.omp-single__content .wp-block-paragraph {
    text-align: left !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: 100% !important;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* -------------------------------------------------------------------------- */
/* Product CTA — full-bleed page width (Özel CTA - Teklif Al)                   */
/* -------------------------------------------------------------------------- */

body.omp-product-single,
body.omp-product-single #page,
body.omp-product-single #content,
body.omp-product-single .site-main,
body.omp-product-single #primary,
body.omp-product-archive,
body.omp-product-archive #page,
body.omp-product-archive #content,
body.omp-product-archive .site-main,
body.omp-product-archive #primary {
    overflow-x: visible !important;
}

/* CTA sits outside <main> — don't force viewport height (creates a black gap above CTA) */
body.omp-product-single .site-main,
body.omp-product-single #primary,
body.omp-product-archive .site-main,
body.omp-product-archive #primary {
    min-height: 0 !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

/* Tighten CTA Quote top spacing on product templates */
body.omp-product-single .oml-cta-quote,
body.omp-product-archive .oml-cta-quote {
    margin-top: 0 !important;
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
}

@media (min-width: 1024px) {
    body.omp-product-single .oml-cta-quote,
    body.omp-product-archive .oml-cta-quote {
        padding-top: clamp(2rem, 4vh, 3rem) !important;
        padding-bottom: clamp(2rem, 4vh, 3rem) !important;
    }
}

.omp-cta {
    position: relative;
    left: 50%;
    right: auto;
    width: 100vw;
    max-width: 100vw;
    margin-left: -50vw;
    margin-right: 0;
    box-sizing: border-box;
    padding: 1.5rem 0;
    background: #000000 !important;
    color: #fff;
    overflow: hidden;
}

@media (min-width: 1024px) {
    .omp-cta {
        padding: clamp(3rem, 8vh, 5rem) 0;
    }
}

.omp-cta__pattern {
    position: absolute;
    inset: 0;
    opacity: 0.05;
    background-image: radial-gradient(circle at 2px 2px, #fff 1px, transparent 0);
    background-size: 40px 40px;
    pointer-events: none;
}

.omp-cta__inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 clamp(1.25rem, 4vw, 3.5rem);
    box-sizing: border-box;
}

.omp-cta__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    align-items: center;
}

@media (min-width: 1024px) {
    .omp-cta__grid {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
    }
}

.omp-cta__title {
    margin: 0;
    font-size: 1.875rem;
    font-weight: 800;
    line-height: 1.2;
    color: #ffffff !important;
}

@media (min-width: 640px) {
    .omp-cta__title {
        font-size: 2.25rem;
    }
}

@media (min-width: 768px) {
    .omp-cta__title {
        font-size: 3rem;
    }
}

@media (min-width: 1024px) {
    .omp-cta__title {
        font-size: 3.75rem;
    }
}

.omp-cta__right {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 1024px) {
    .omp-cta__right {
        gap: 3rem;
    }
}

.omp-cta__description,
.omp-cta__description p {
    margin: 0;
    font-size: 1.125rem;
    line-height: 1.65;
    color: #d1d5db !important;
}

@media (min-width: 640px) {
    .omp-cta__description,
    .omp-cta__description p {
        font-size: 1.25rem;
    }
}

.omp-cta__description p + p {
    margin-top: 0.75rem;
}

.omp-cta__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    width: 100%;
}

/* Button look comes from theme .header-quote-btn */

/* Gallery — wide main fills left column; horizontal thumbs + arrow rail */
.omp-gallery {
    --omp-thumb-size: 4.25rem;
    --omp-thumb-gap: 0.5rem;
    margin: 0;
    width: 100%;
    max-width: 100%;
}

.omp-gallery__layout {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.omp-gallery__stage {
    position: relative;
    width: 100%;
    flex: 0 0 auto;
    overflow: hidden;
    border-radius: 0.75rem;
    background: #111;
    /* Slightly wider than square to fill the left column */
    aspect-ratio: 5 / 4;
    box-sizing: border-box;
}

.omp-gallery__main,
.omp-gallery__video {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.28s ease, transform 0.45s ease;
    will-change: opacity, transform;
    background: #111;
}

.omp-gallery__video {
    object-fit: cover;
    object-position: center;
    z-index: 1;
    background: #111;
}

.omp-gallery__main.is-hidden,
.omp-gallery__video.is-hidden,
.omp-gallery__main[hidden],
.omp-gallery__video[hidden] {
    display: none !important;
}

.omp-gallery__main.is-fading {
    opacity: 0;
    transform: scale(1.04);
}

.omp-gallery__main.is-showing {
    opacity: 1;
    transform: scale(1);
}

@media (prefers-reduced-motion: reduce) {
    .omp-gallery__main,
    .omp-gallery__video {
        transition: none;
    }
}

.omp-gallery__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 2.5rem;
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    cursor: pointer;
    padding: 0;
}

.omp-gallery__nav:hover,
.omp-gallery__nav:focus-visible {
    background: rgba(220, 38, 38, 0.9);
    border-color: #dc2626;
    outline: none;
}

.omp-gallery__nav--prev {
    left: 0.75rem;
}

.omp-gallery__nav--next {
    right: 0.75rem;
}

.omp-gallery__thumbs-rail {
    position: relative;
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
}

.omp-gallery__thumbs-nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    transform: translateY(-50%);
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    cursor: pointer;
}

.omp-gallery__thumbs-nav--prev {
    left: 0.35rem;
}

.omp-gallery__thumbs-nav--next {
    right: 0.35rem;
}

.omp-gallery__thumbs-nav:hover,
.omp-gallery__thumbs-nav:focus-visible {
    background: rgba(220, 38, 38, 0.9);
    border-color: #dc2626;
    outline: none;
}

.omp-gallery__thumbs-nav.is-hidden,
.omp-gallery__thumbs-nav[hidden] {
    visibility: hidden;
    pointer-events: none;
}

.omp-gallery__thumbs {
    display: flex;
    flex-wrap: nowrap;
    gap: var(--omp-thumb-gap);
    margin: 0;
    width: 100%;
    min-width: 0;
    padding: 0;
    box-sizing: border-box;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    border: none;
    background: transparent;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.omp-gallery__thumbs::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.omp-gallery__thumb {
    flex: 0 0 auto;
    width: var(--omp-thumb-size);
    height: var(--omp-thumb-size);
    padding: 0;
    border: 2px solid transparent;
    border-radius: 0.5rem;
    overflow: hidden;
    background: #151515;
    cursor: pointer;
    opacity: 0.65;
    transition: opacity 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.omp-gallery__thumb img,
.omp-gallery__thumb-img,
.omp-gallery__thumb-media {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.omp-gallery__thumb--video {
    position: relative;
}

.omp-gallery__thumb-media {
    pointer-events: none;
    background: #111;
}

.omp-gallery__thumb-play {
    position: absolute;
    inset: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(0, 0, 0, 0.35);
    pointer-events: none;
}

.omp-gallery__thumb-play svg {
    display: block;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45));
}

.omp-gallery__thumb:hover,
.omp-gallery__thumb:focus-visible {
    opacity: 1;
    outline: none;
    transform: translateY(-1px);
}

.omp-gallery__thumb.is-active {
    opacity: 1;
    border-color: #dc2626;
}

@media (min-width: 1024px) {
    .omp-gallery {
        --omp-thumb-size: 5rem;
        /* Leave room for thumb rail under the stage */
        --omp-stage-max: calc(100svh - 12rem);
    }

    body.admin-bar .omp-gallery {
        --omp-stage-max: calc(100svh - 14rem);
    }

    .omp-gallery__layout,
    .omp-gallery__stage {
        width: 100%;
        max-width: 100%;
    }

    .omp-gallery__stage {
        aspect-ratio: 5 / 4;
        max-height: var(--omp-stage-max);
    }
}

@media (max-width: 767px) {
    .omp-gallery {
        --omp-thumb-size: 3.75rem;
    }

    .omp-gallery__stage {
        aspect-ratio: 4 / 3;
    }
}

/* Content images fill column (same idea as blog) */
.omp-single__content .wp-block-image,
.omp-single__content figure.wp-block-image,
.omp-single__content .wp-block-image figure {
    width: 100% !important;
    max-width: 100% !important;
}

.omp-single__content img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    border-radius: 0.5rem;
}

/* Related products — full-bleed carousel */
.omp-related {
    position: relative;
    left: 50%;
    right: auto;
    width: 100vw;
    max-width: 100vw;
    margin-left: -50vw;
    margin-right: 0;
    margin-top: 0;
    margin-bottom: 0;
    padding: 1.25rem 0 1.75rem;
    background: #000;
    box-sizing: border-box;
}

.omp-related__inner {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 clamp(1rem, 3vw, 2.5rem);
    box-sizing: border-box;
}

.omp-related__heading {
    margin: 0 0 0.85rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.25;
}

.omp-related__viewport {
    position: relative;
    width: 100%;
}

.omp-related__arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    transform: translateY(-50%);
    width: 2.5rem;
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.omp-related__arrow--prev {
    left: 0.35rem;
}

.omp-related__arrow--next {
    right: 0.35rem;
}

.omp-related__arrow:hover,
.omp-related__arrow:focus-visible {
    background: rgba(220, 38, 38, 0.9);
    border-color: #dc2626;
    outline: none;
}

.omp-related__arrow.is-hidden,
.omp-related__arrow[hidden] {
    display: none !important;
}

.omp-related__track {
    display: flex;
    gap: 0.85rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox — arrows handle navigation */
    -ms-overflow-style: none; /* IE/Edge legacy */
}

.omp-related__track::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
    width: 0;
    height: 0;
}

.omp-related__slide {
    flex: 0 0 calc((100% - 1.7rem) / 3); /* mobile: 3 visible */
    min-width: 0;
    scroll-snap-align: start;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.omp-related__slide .omp-card {
    height: 100%;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.omp-related__slide .omp-card:hover {
    transform: translateY(-3px);
}

.omp-related__slide .omp-card__media {
    aspect-ratio: 1 / 1;
    height: auto;
}

@media (min-width: 1024px) {
    .omp-related {
        padding: 3rem 0 3.5rem;
    }

    .omp-related__heading {
        margin-bottom: 1.25rem;
        font-size: 1.75rem;
    }

    .omp-related__track {
        gap: 1rem;
    }

    .omp-related__slide {
        flex: 0 0 calc((100% - 4rem) / 5); /* desktop: 5 visible */
    }

    .omp-related__slide .omp-card__media {
        aspect-ratio: 1 / 1;
        height: auto;
    }

    .omp-related__arrow--prev {
        left: 0.5rem;
    }

    .omp-related__arrow--next {
        right: 0.5rem;
    }
}

/* Mobile: prevent horizontal page overflow (100vw breakouts + wide content) */
@media (max-width: 1023px) {
    html:has(body.omp-product-single),
    html:has(body.omp-product-archive),
    body.omp-product-single,
    body.omp-product-single #page,
    body.omp-product-single #content,
    body.omp-product-single .site-main,
    body.omp-product-single #primary,
    body.omp-product-archive,
    body.omp-product-archive #page,
    body.omp-product-archive #content,
    body.omp-product-archive .site-main,
    body.omp-product-archive #primary {
        overflow-x: clip !important;
        max-width: 100%;
    }

    body.omp-product-single .omp-single {
        padding-bottom: 1rem;
        width: 100%;
        max-width: 100%;
        overflow-x: clip;
        box-sizing: border-box;
    }

    .omp-single__split {
        padding-left: 1rem;
        padding-right: 1rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Drop 100vw full-bleed on small screens — it causes sideways scroll */
    body.omp-product-single .oml-cta-quote,
    body.omp-product-archive .oml-cta-quote,
    body.omp-product-single .omp-cta,
    body.omp-product-archive .omp-cta,
    body.omp-product-single .omp-related,
    body.omp-product-archive .omp-related {
        left: auto !important;
        right: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .omp-gallery,
    .omp-gallery__layout,
    .omp-gallery__stage,
    .omp-gallery__thumbs-rail {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .omp-cta__inner {
        padding: 0 1rem;
    }

    .omp-cta__title {
        font-size: 1.5rem;
    }

    .omp-cta__description,
    .omp-cta__description p {
        font-size: 0.95rem;
        line-height: 1.5;
    }

    .omp-related__inner {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .omp-related__slide .omp-card__body {
        padding: 0.75rem 0.85rem 0.9rem;
    }
}

/* Cards */
.omp-card {
    display: flex;
    flex-direction: column;
    background: #000;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.35);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.omp-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.45);
}

.omp-card__media {
    display: block;
    /* Match blog featured: 16:9 / h-48 */
    aspect-ratio: 16 / 9;
    height: 12rem; /* h-48 */
    background: #151515;
    overflow: hidden;
}

.omp-card__img,
.omp-card__placeholder {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.omp-card__placeholder {
    background: linear-gradient(145deg, rgba(220, 38, 38, 0.25), transparent 55%), #1a1a1a;
}

.omp-card__body {
    padding: 1rem 1.1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    flex: 1;
}

.omp-card__cats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.omp-card__cat {
    font-size: 0.75rem;
    color: #9ca3af;
    text-decoration: none;
}

.omp-card__cat:hover {
    color: #fff;
}

.omp-card__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.35;
}

.omp-card__title a {
    color: #fff;
    text-decoration: none;
}

.omp-card__title a:hover {
    color: #f87171;
}

.omp-card__excerpt {
    margin: 0;
    flex-grow: 1;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #d1d5db;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

.omp-archive__pagination .nav-links {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.omp-archive__pagination a,
.omp-archive__pagination span {
    display: inline-flex;
    min-width: 2.25rem;
    height: 2.25rem;
    align-items: center;
    justify-content: center;
    padding: 0 0.55rem;
    border-radius: 0.4rem;
    color: #d1d5db;
    background: #111;
    text-decoration: none;
}

.omp-archive__pagination .current {
    background: #dc2626;
    color: #fff;
}

/* Mobile quote bar styles live in theme style.css (full-bleed, no radius). */
