/* ========================================
   BEK KİMYA — additions on top of globals.css
   (Ekim 2026 güncellemeleri: rozet, marka logoları, karusel,
   kataloglar, sosyal medya, yukarı çık, mobil düzeltmeler)
   ======================================== */

/* ---------- Hero üst yazısı ("Türkiye Distribütörü") ----------
   Kırmızı noktalı hap yerine sade bir üst başlık: ince kırmızı çizgi + yazı. */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 0;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.28em;
    color: var(--bk-gray-200);
}

.hero-badge::before {
    width: 36px;
    height: 2px;
    border-radius: 2px;
    background: var(--bk-red);
    animation: none;
}

/* ---------- Marka kartları: gerçek logolar ---------- */
.brand-card .brand-icon:has(.brand-logo) {
    width: 100%;
    height: 72px;
    background: none;
    border-radius: 0;
}

.brand-logo {
    max-width: 180px;
    max-height: 64px;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* 5 marka: geniş ekranda tek sıra */
@media (min-width: 1100px) {
    .brands-grid:has(> :nth-child(5):last-child) {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* ---------- Öne çıkanlar: kaydırma çubuğu yok, oklarla gezilir ---------- */
.featured-track {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.featured-track::-webkit-scrollbar {
    display: none;
}

@media (max-width: 768px) {
    .featured-carousel {
        position: relative;
    }

    .featured-nav {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 38%;
        z-index: 2;
        width: 38px;
        height: 38px;
        background: rgba(10, 10, 10, 0.75);
        backdrop-filter: blur(6px);
    }

    .featured-nav:disabled {
        opacity: 0;
        pointer-events: none;
    }

    .featured-nav-prev { left: -6px; }
    .featured-nav-next { right: -6px; }
}

/* ---------- Giriş videosu telefonda da oynar ---------- */
@media (max-width: 768px) {
    .hero-video {
        display: block;
    }
}

/* ---------- Kataloglar ---------- */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--space-xl);
}

.catalog-card {
    display: flex;
    flex-direction: column;
    background: linear-gradient(160deg, var(--bk-anthracite), var(--bk-black-light));
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: transform var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
}

.catalog-card:hover {
    transform: translateY(-4px);
    border-color: rgba(196, 30, 42, 0.2);
    box-shadow: var(--shadow-lg);
}

.catalog-cover {
    display: block;
    aspect-ratio: 3 / 4;
    background: var(--bk-black-light);
    overflow: hidden;
}

.catalog-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.catalog-card:hover .catalog-cover img {
    transform: scale(1.04);
}

.catalog-cover-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    height: 100%;
    color: var(--bk-red);
    font-family: var(--font-primary);
    font-weight: 700;
    letter-spacing: 0.15em;
}

.catalog-body {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    padding: var(--space-lg);
    flex: 1;
}

.catalog-brand {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--bk-red);
}

.catalog-title {
    font-size: 1.05rem;
    line-height: 1.35;
}

.catalog-desc {
    font-size: 0.85rem;
    color: var(--bk-gray-400);
}

.catalog-actions {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: var(--space-md);
}

.catalog-actions .btn {
    flex: 1 1 auto;
    justify-content: center;
}

a.filter-tab {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

/* ---------- Sosyal medya ---------- */
.header-social {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: var(--space-lg);
}

.header-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: var(--bk-gray-300);
    transition: color var(--transition-fast), background var(--transition-fast);
}

.header-social a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.header-social a.is-whatsapp:hover,
.footer-social a[aria-label="WhatsApp"]:hover {
    color: #fff;
    background: #25d366;
}

.nav-mobile-social {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-mobile .nav-mobile-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: var(--bk-gray-200);
    font-size: 1rem;
}

.nav-mobile .nav-mobile-social a:hover {
    transform: none;
}

.nav-mobile .nav-mobile-social a.is-whatsapp {
    background: #25d366;
    color: #fff;
}

/* Sabit WhatsApp düğmesi */
.floating-whatsapp {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #25d366;
    color: #fff;
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.35), 0 2px 8px rgba(0, 0, 0, 0.4);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.floating-whatsapp:hover {
    transform: scale(1.06);
    box-shadow: 0 8px 28px rgba(37, 211, 102, 0.5), 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Yukarı çık */
.scroll-top {
    position: fixed;
    right: 26px;
    bottom: 24px;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(20, 20, 20, 0.85);
    backdrop-filter: blur(8px);
    color: var(--bk-white);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity var(--transition-base), visibility var(--transition-base), transform var(--transition-base), background var(--transition-fast);
}

.scroll-top.has-whatsapp {
    bottom: 88px;
}

.scroll-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.scroll-top:hover {
    background: var(--bk-red);
    border-color: var(--bk-red);
}

/* ---------- Mobil düzeltmeler ---------- */
@media (max-width: 1024px) {
    .header-social {
        display: none;
    }
}

@media (max-width: 768px) {
    /* Menü artık header'ın dışında: header'ın altından başlayıp ekranı kaplar. */
    .nav-mobile-inner {
        padding: calc(var(--header-height) + var(--space-lg)) var(--space-lg) var(--space-2xl);
        overflow-y: auto;
    }

    .nav-mobile a {
        font-size: 1.35rem;
    }

    .floating-whatsapp {
        right: 14px;
        bottom: 14px;
        width: 50px;
        height: 50px;
    }

    .floating-whatsapp svg {
        width: 24px;
        height: 24px;
    }

    .scroll-top {
        right: 17px;
        bottom: 16px;
        width: 42px;
        height: 42px;
    }

    .scroll-top.has-whatsapp {
        bottom: 74px;
    }

    /* Footer: sade, ortalanmış */
    .footer-bottom {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }

    .footer-social {
        justify-content: center;
    }
}

/* Henüz görünmemiş "yandan kayarak gelen" bölümler (reveal-left/right) sayfayı
   yana genişletiyor, telefonda sayfa sağa-sola oynuyordu. Yatay taşmayı kes:
   clip kaydırma kabı oluşturmaz, sabit header ve menüyü etkilemez. */
html,
body {
    overflow-x: hidden;
}

@supports (overflow: clip) {
    html,
    body {
        overflow-x: clip;
    }
}

/* ---------- Telefonda daha derli toplu düzen ---------- */
@media (max-width: 768px) {
    /* Marka kartları iki sütun; tek kalan son kart tam genişlik */
    .brands-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-md);
    }

    .brands-grid > :last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .brand-card {
        padding: var(--space-lg) var(--space-md);
    }

    .brand-card .brand-icon:has(.brand-logo) {
        height: 48px;
        margin-bottom: var(--space-md);
    }

    .brand-logo {
        max-width: 120px;
        max-height: 44px;
    }

    .brand-card h3 {
        font-size: 1rem;
    }

    .brand-card p {
        font-size: 0.78rem;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* Rakamlar yan yana */
    .about-stats,
    .stats-grid-4 {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-sm);
    }

    .stats-grid-4:has(> :nth-child(4)) {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-item {
        padding: var(--space-md) var(--space-sm);
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: 0.72rem;
    }

    /* Footer: marka bloğu tam genişlik, bağlantı sütunları ikişerli */
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-xl) var(--space-lg);
    }

    .footer-grid > .footer-brand {
        grid-column: 1 / -1;
    }

    .footer-links a {
        font-size: 0.85rem;
        overflow-wrap: anywhere;
    }
}

@media (max-width: 480px) {
    .about-stats {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .contact-info-card,
    .contact-form {
        padding: var(--space-xl) var(--space-lg);
    }
}

/* Arama satırı dar ekranda sütuna dönünce "flex: 1 1 260px" yüksekliğe uygulanıyor,
   kutu 260px'lik bir ovale dönüşüyordu (eski sitede de vardı). */
@media (max-width: 640px) {
    .product-search-input {
        flex: 0 0 auto;
        width: 100%;
    }
}

/* Telefonda başlık ve metin tüm genişliği kaplıyor; çapraz geçişli karartma
   arkadaki videoyu/görseli yeterince bastırmıyordu. Üstten alta koyu katman. */
@media (max-width: 768px) {
    .hero .hero-bg::before {
        background: linear-gradient(180deg,
            rgba(10, 10, 10, 0.55) 0%,
            rgba(10, 10, 10, 0.8) 35%,
            rgba(10, 10, 10, 0.82) 70%,
            rgba(10, 10, 10, 0.94) 100%);
    }
}

/* Header "Mağaza" button (Site Ayarları > Online Mağaza). */
.nav-desktop a.nav-shop {
    margin-left: var(--space-sm);
    padding: 0.45rem 1rem;
    border-radius: 999px;
    background: var(--bk-red);
    color: var(--bk-white);
    font-weight: 600;
}

.nav-desktop a.nav-shop::after {
    display: none;
}

.nav-desktop a.nav-shop:hover {
    background: var(--bk-red-light);
}

/* In the phone menu the shop link is an outlined pill, so it never reads as the active page. */
.nav-mobile-inner a.nav-shop {
    padding: 0.35rem 1.5rem;
    border: 1px solid var(--bk-red);
    border-radius: 999px;
    color: var(--bk-white);
}

/* "İçeriğe geç": first stop for keyboard users, invisible until focused. */
.skip-link {
    position: fixed;
    top: -100px;
    left: var(--space-md);
    z-index: 2000;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    background: var(--bk-red);
    color: var(--bk-white);
    font-weight: 600;
}

.skip-link:focus {
    top: var(--space-md);
}

main:focus {
    outline: none;
}

/* Product gallery: the main picture opens full screen. */
img.product-gallery-main {
    cursor: zoom-in;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.92);
}

.lightbox-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 3.5rem 1rem;
}

.lightbox-media {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.lightbox-close,
.lightbox-nav {
    position: absolute;
    z-index: 1;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: var(--bk-white);
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
}

.lightbox-close {
    top: 1rem;
    right: 1rem;
}

.lightbox-prev,
.lightbox-next {
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-prev {
    left: 1rem;
}

.lightbox-next {
    right: 1rem;
}

.lightbox-close:hover,
.lightbox-nav:hover,
.lightbox-close:focus-visible,
.lightbox-nav:focus-visible {
    background: var(--bk-red);
}

.lightbox-count {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--bk-gray-300);
    font-size: 0.85rem;
}

/* ===== Product detail layout =====
   Left column: picture stage + thumbnails, technical details under them.
   Right column: product info, buttons and videos. Phones: pictures, info, details. */
.product-detail-layout {
    grid-template-areas:
        "media info"
        "specs info";
    row-gap: var(--space-xl);
}

.product-detail-media { grid-area: media; min-width: 0; }
.product-detail-layout .product-detail-info { grid-area: info; min-width: 0; }
.product-detail-specs { grid-area: specs; min-width: 0; }

@media (max-width: 1024px) {
    .product-detail-layout {
        grid-template-areas: "media" "info" "specs";
    }
}

/* The stage keeps its square size whatever picture it shows, on phones too, so
   switching pictures never moves the page. */
.product-detail-image.product-gallery-stage {
    aspect-ratio: 1 / 1;
    min-height: 0;
}

.product-gallery-stage .product-gallery-main {
    width: auto;
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
}

.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: var(--bk-white);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.gallery-arrow:hover,
.gallery-arrow:focus-visible {
    background: var(--bk-red);
}

.gallery-arrow-prev { left: 0.75rem; }
.gallery-arrow-next { right: 0.75rem; }

.product-detail-media .product-gallery-thumbs {
    margin-top: var(--space-md);
}

.product-block-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
    color: var(--bk-white);
}

.product-detail-specs {
    padding: var(--space-xl);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-xl, 16px);
    background: rgba(255, 255, 255, 0.02);
}

.product-detail-specs .product-specs {
    margin-bottom: 0;
}

.product-videos {
    margin-top: var(--space-2xl);
}

.product-video {
    display: block;
    width: 100%;
    max-height: 420px;
    border-radius: var(--radius-md, 10px);
    background: #000;
}

.product-video + .product-video {
    margin-top: var(--space-md);
}

/* ---------- Telefon düzeltmeleri ---------- */
/* Uzun ürün adında "Ana Sayfa" iki satıra bölünüyordu: bağlantılar bölünmez,
   gerekirse son öğe alt satıra iner. */
.breadcrumb {
    flex-wrap: wrap;
    row-gap: 4px;
}

.breadcrumb a,
.breadcrumb .separator {
    white-space: nowrap;
}

/* Tek sütunda her kart ekran boyu kadar uzuyordu; telefonda iki sütun, sıkı kart. */
@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: var(--space-md);
    }

    .products-grid .product-card {
        border-radius: var(--radius-lg);
    }

    .products-grid .product-card-image {
        padding: var(--space-sm);
    }

    .products-grid .product-card-image img {
        width: 90%;
        height: 90%;
    }

    .products-grid .product-card-body {
        padding: var(--space-sm) var(--space-md) var(--space-md);
    }

    .products-grid .product-card-brand {
        font-size: 0.62rem;
    }

    .products-grid .product-card-title {
        font-size: 0.85rem;
        margin-bottom: var(--space-xs);
    }

    .products-grid .product-card-desc {
        font-size: 0.75rem;
        margin-bottom: var(--space-sm);
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .products-grid .product-card-footer {
        padding-top: var(--space-sm);
    }

    .products-grid .product-card-link {
        font-size: 0.75rem;
    }
}

.footer-links a.footer-email {
    overflow-wrap: normal;
}
