﻿/* =========================
   GENEL / KAYDIRMA DAVRANIŞI
   ========================= */
html {
    scrollbar-gutter: stable both-edges; /* içerik genişliği kaymasın */
}

body {
    overflow-y: scroll;
    font-family: 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
}

/* =========================
   GALERİ ÜST BAŞLIK
   ========================= */
.gallery-header {
    background-color: #000;
    height: 46px;
    width: 100%;
    display: flex;
    align-items: center;
    padding-left: 40px;
    box-sizing: border-box;
}

@media (max-width: 480px) {
    .gallery-header {
        padding-left: 16px;
        padding-right: 16px;
    }
}

.gallery-title {
    color: #fff;
    font-size: 20px;
    font-weight: 600;
}

/* =========================
   PROFİL BÖLÜMÜ
   ========================= */
.profile-section {
    margin-bottom: 0 !important;
    padding-bottom: 4px !important;
}

/* =========================
   ARAMA ÇUBUĞU
   ========================= */
.custom-search-bar {
    width: min(92vw, 420px); /* sabit 420 yerine taşmayan esnek genişlik */
    height: 36px;
    background: #fff;
    border-radius: 5px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    gap: 8px;
    margin: 16px auto;
    box-shadow: inset 0 4px 4px rgba(0,0,0,.25), 0 4px 4px rgba(0,0,0,.25);
}

    .custom-search-bar img {
        width: 20px;
        height: 20px;
        opacity: .4;
    }

.search-input {
    flex: 1 1 auto; /* arama kutusu içeride esnesin */
    min-width: 0;
    height: 22px;
    border: none;
    outline: none;
    font-size: 15px;
    color: #333;
    background: transparent;
}

/* =========================
   ÜRÜN LİSTESİ (INDEX)
   ========================= */
.product-list-container {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    padding-bottom: 100px; /* alttaki sabit butonlara çarpmayın */
}

/* satırlar sarsın, yükseklik içerik kadar olsun */
.product-item {
    display: flex;
    align-items: flex-start; /* çok satırlı metin için üste hizala */
    gap: 12px;
    padding: 12px 20px;
    min-height: 56px; /* eskiden height:72px idi (taşma yapıyordu) */
    border-bottom: 2px solid #e0e0e0;
    font-size: 20px;
    font-weight: 500;
    color: #000;
    background: #fff;
}

/* başlık alanı tamamen sarsın */
.product-name {
    flex: 1 1 auto;
    min-width: 0;
    white-space: normal; /* tek satır zorlaması yok */
    word-break: break-word;
    overflow-wrap: anywhere; /* TESTTEST... gibi boşluksuz metinleri kır */
    hyphens: auto;
    line-height: 1.35;
}

/* link de sarsın, rengi siyah kalsın */
.product-item-link {
    color: #000;
    text-decoration: none;
    display: block;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.35;
}

    .product-item-link:hover {
        color: #000;
    }

/* silme butonu (varsa) */
.delete-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

    .delete-btn img {
        width: 23px;
        height: 23px;
    }

/* =========================
   ALT SABİT BUTONLAR
   ========================= */
.action-buttons-container {
    position: fixed;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 20px;
    z-index: 1000;
    padding: 0 20px;
}

.btn-add,
.btn-save {
    width: 180px;
    min-height: 52px;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #fff;
    text-decoration: none;
}

.btn-add {
    background: #5f8eff;
}
.btn-save {
    background: #e53935;
    color: #fff; 
}

    .btn-save img {
        filter: brightness(0) invert(1); 
    }




.detail-wrap {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 16px;
    box-sizing: border-box;
}

.product-title-bar {
    background-color: #000;
    width: 100%;
    min-height: 46px;
    padding: 6px 16px; 
    display: flex;
    align-items: center; 
    justify-content: flex-start;
    box-sizing: border-box;
}

.product-title {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    text-align: left; 
    line-height: 1.3;
    max-width: 100%;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere; 
    margin: 0;
}

@media (min-width: 768px) {
    .product-title-bar {
        padding-left: 24px;
    }
}



/* PDF listesi */
.pdf-section {
    padding: 10px;
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    padding-bottom: 100px; /* sabit butonlara yine boşluk */
}

.pdf-item {
    display: flex;
    align-items: flex-start; /* pdf adı çok satırsa üstten hizala */
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 8px;
    gap: 10px;
}

.pdf-icon {
    width: 28px;
}

.pdf-name {
    flex: 1 1 auto;
    font-size: 14px;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.35;
}

/* Görsel galeri */
.gallery-section {
    max-width: 440px;
    margin: 10px auto;
    position: relative;
}

.image-container img {
    width: 100%;
    border-radius: 8px;
    display: block;
}

.swiper-slide {
    position: relative;
}

/* =========================
   MOBİL
   ========================= */
@media (max-width: 480px) {
    .detail-wrap {
        max-width: 440px;
    }
}
