/* Renk Paleti ve Reset */
:root {
    --bg-color: #fafaf9; /* stone-50 */
    --text-color: #292524; /* stone-800 */
    --accent: #d97757; /* Soft kiremit */
    --accent-hover: #c26243;
    --sage: #8ba888; /* Adaçayı yeşili */
    --card-bg: #ffffff;
    --border-color: #e7e5e4;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 16px 80px 16px;
}

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(250, 250, 249, 0.9);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border-color);
}

.header-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

@media (min-width: 600px) {
    .header-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
    letter-spacing: 1px;
}
/* Görsel Logo Ayarları */
.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 40px; /* Logonun boyutu küçük gelirse burayı 50px veya 60px yapabilirsin */
    width: auto;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 4px;
}

.nav-links::-webkit-scrollbar {
    display: none; /* Mobilde scroll bar gizleme */
}

.nav-links a {
    text-decoration: none;
    color: rgba(41, 37, 36, 0.7);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--accent);
}

/* Slider */

.slider-container {
    background-color: var(--sage); /* Resim yüklenene kadar görünecek yedek renk */
    background-size: cover;
    background-position: center;
    transition: background-image 0.5s ease-in-out; /* Resim değişirken yumuşak geçiş */
    color: white;
    border-radius: 16px;
    padding: 32px;
    margin-top: 24px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.slider-content h2 {
    font-size: 24px;
    margin-bottom: 8px;
    position: relative;
    z-index: 2;
}

.slider-content p {
    font-size: 15px;
    opacity: 0.9;
    position: relative;
    z-index: 2;
}

.slider-decor {
    position: absolute;
    right: -40px;
    bottom: -40px;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    filter: blur(20px);
}

/* Kategoriler ve Grid */
.category-section {
    margin-top: 48px;
    scroll-margin-top: 100px; /* Linkle inildiğinde header altında kalmasın */
}

.category-title {
    font-size: 20px;
    font-weight: 700;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
    margin-bottom: 24px;
}

.grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 500px) {
    .grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
    .grid { grid-template-columns: repeat(3, 1fr); }
}

/* Ürün Kartı */
.card {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-4px);
}

.card-img {
    height: 180px;
    background: #f5f5f4;
    width: 100%;
    object-fit: cover;
}

.card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-tag {
    font-size: 12px;
    color: var(--sage);
    font-weight: 600;
    margin-bottom: 4px;
}

.card-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.2;
}

.card-desc {
    font-size: 13px;
    color: rgba(41, 37, 36, 0.6);
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.btn-secondary, .btn-primary {
    display: block;
    width: 100%;
    text-align: center;
    padding: 10px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: 0.2s;
    margin-top: 8px;
}

.btn-secondary {
    background: #f5f5f4;
    color: var(--text-color);
}
.btn-secondary:hover { background: #e7e5e4; }

.btn-primary {
    background: var(--accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-primary:hover { background: var(--accent-hover); }

/* Modal (Ürün Detay Ekranı) */
.modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 100;
    display: none; /* JS ile flex yapılacak */
    align-items: flex-end;
    justify-content: center;
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s;
}

.modal.show {
    opacity: 1;
}

.modal-content {
    background: var(--bg-color);
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    border-radius: 24px 24px 0 0;
    overflow-y: auto;
    position: relative;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.show .modal-content {
    transform: translateY(0);
}

@media (min-width: 768px) {
    .modal { align-items: center; padding: 24px; }
    .modal-content { border-radius: 24px; transform: scale(0.95); }
    .modal.show .modal-content { transform: scale(1); }
}

.close-modal {
    position: absolute;
    top: 16px;
    right: 16px;
    background: white;
    border: none;
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 10;
}

/* Modal İçi Tasarım */
@media (min-width: 768px) {
    .modal-grid { flex-direction: row; }
    .modal-img-wrapper { width: 50%; }
    .modal-info { width: 50%; }
}

.modal-img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    background: #e7e5e4;
}

.modal-info {
    padding: 24px;
}

.modal-price {
    font-size: 24px;
    font-weight: 700;
    margin: 12px 0;
}

.wholesale-box {
    background: rgba(139, 168, 136, 0.1); /* sage %10 */
    border: 1px solid rgba(139, 168, 136, 0.3);
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 20px;
}
.wholesale-box strong { color: var(--sage); display: block; margin-bottom: 4px;}
/* Pop-up İçi Model Galerisi */

.modal-gallery::-webkit-scrollbar {
    height: 6px;
}
.modal-gallery::-webkit-scrollbar-thumb {
    background: #d6d3d1;
    border-radius: 4px;
}

.modal-thumb {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.6;
    transition: all 0.2s;
    flex-shrink: 0; /* Yan yana sıkışmalarını önler */
}

.modal-thumb:hover {
    opacity: 1;
}

.modal-thumb.active {
    border-color: var(--accent);
    opacity: 1;
}
/* Modal İç Yapısı: Sabit Alt Bar ve Kayan İçerik */
.modal-content {
    /* Modalin kendisinin taşmasını engelleyip, içindeki div'i kaydıracağız */
    display: flex;
    flex-direction: column;
    overflow: hidden; 
    max-width: 500px; /* Telefonda tam oturması için genişliği biraz daralttık */
}

.modal-body {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: calc(90vh - 40px);
}

/* 1. Kaydırılabilir İçerik Alanı */
.modal-scroll-area {
    flex: 1;
    overflow-y: auto;
    padding: 32px 24px 24px 24px;
    /* Mobilde kaydırma barını gizle ama kaydırma çalışsın */
    -ms-overflow-style: none;  
    scrollbar-width: none;  
}
.modal-scroll-area::-webkit-scrollbar {
    display: none;
}

/* 2. Modellerin Alt Alta Dizilmesi */
.stacked-image-wrapper {
    background: #f5f5f4;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 16px;
    border: 1px solid var(--border-color);
}
.stacked-image {
    width: 100%;
    display: block;
    object-fit: cover;
}
.model-title {
    text-align: center;
    padding: 12px;
    font-size: 15px;
    font-weight: 600;
    color: var(--sage);
    background: white;
}

/* 3. En Alttaki Sabit Sipariş Alanı */
.modal-footer-fixed {
    padding: 16px 24px 24px 24px;
    background: var(--bg-color);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 10px rgba(0,0,0,0.03);
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 12px;
}