/* --- TEMEL AYARLAR (RESET) --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* --- HEADER --- */
header {
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f1f1f1;
    position: relative;
    z-index: 1002;
    background: #fff;
}

.logo a {
    font-size: 24px;
    font-weight: 800;
    color: #2c3e50;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-box form {
    display: flex;
    border: 1px solid #e1e1e1;
    border-radius: 50px;
    overflow: hidden;
    background: #fff;
    width: 250px;
}

.search-box input {
    border: none;
    padding: 8px 15px;
    flex: 1;
    outline: none;
    font-size: 13px;
}

.search-box button {
    background: #fff;
    border: none;
    padding: 0 15px;
    color: #777;
    cursor: pointer;
    transition: color 0.3s;
}

.search-box button:hover {
    color: #e67e22;
}

.header-bottom {
    background-color: #fff;
    height: 50px;
    position: relative;
    z-index: 1001;
}

.nav-links {
    display: flex;
    gap: 0;
    height: 100%;
    align-items: center;
}

.nav-links > a, 
.nav-links .dropdown > a {
    padding: 0 20px;
    height: 50px;
    display: flex;
    align-items: center;
    font-weight: 500;
    color: #555;
    font-size: 14px;
    border-bottom: 3px solid transparent;
}

.nav-links > a:hover,
.nav-links .dropdown:hover > a {
    color: #e67e22;
    background-color: #f9f9f9;
    border-bottom-color: #e67e22;
}

.dropdown {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 50px;
    left: 0;
    background-color: #ffffff;
    min-width: 220px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border-top: 2px solid #e67e22;
    border-radius: 0 0 4px 4px;
    z-index: 1001;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    padding: 12px 20px;
    display: block;
    color: #444;
    font-size: 14px;
    border-bottom: 1px solid #f1f1f1;
    height: auto;
}

.dropdown-content a:hover {
    background-color: #f9f9f9;
    color: #e67e22;
    padding-left: 25px;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: #333;
    cursor: pointer;
    padding: 10px;
}

/* --- MAIN --- */
main {
    padding: 30px 0;
    min-height: calc(100vh - 200px);
}

h1, h2, h3 {
    color: #2c3e50;
    margin-bottom: 15px;
}

h2 {
    font-size: 24px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 30px;
}

/* --- GRIDS --- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 30px;
}

.product-item {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

.product-item a {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.p-image {
    position: relative;
    padding-top: 100%;
    overflow: hidden;
    border-bottom: 1px solid #f9f9f9;
}

.p-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 15px;
    transition: transform 0.5s;
}

.product-item:hover .p-image img {
    transform: scale(1.05);
}

.p-name {
    padding: 15px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    flex-grow: 1;
    text-align: center;
}

.sub-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.sub-category-item {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 6px;
    text-align: center;
    padding: 20px 10px;
    transition: all 0.3s;
}

.sub-category-item:hover {
    border-color: #e67e22;
    transform: translateY(-3px);
}

.sub-category-item img {
    max-height: 60px;
    margin: 0 auto 10px;
}

/* --- PRODUCT DETAIL --- */
.product-detail-container {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.product-title-row {
    width: 100%;
    margin-bottom: 25px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.product-title-row h1 {
    font-size: 28px;
    margin: 0;
    color: #2c3e50;
    line-height: 1.3;
}

.product-content-wrapper {
    display: grid;
    grid-template-columns: 55% 40%;
    gap: 5%;
}

.product-gallery-wrapper {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 15px;
}

.main-image-frame {
    flex: 1;
    border: 1px solid #eee;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    background: #fff;
    aspect-ratio: 1 / 1; 
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-in;
}

.main-image-frame img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
}

.thumbnails-track {
    width: 80px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 5px;
}

.thumbnail {
    width: 100%;
    height: 80px;
    border: 1px solid #eee;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.2s;
    padding: 5px;
    flex-shrink: 0;
    background: #fff;
}

.thumbnail.active, .thumbnail:hover {
    border-color: #e67e22;
    opacity: 1;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-info {
    padding-top: 10px;
}

.product-meta {
    font-size: 14px;
    color: #888;
    margin-bottom: 20px;
}

.product-meta span {
    display: block;
    margin-bottom: 5px;
}

.btn-buy-now {
    display: block;
    width: 100%;
    background-color: #27ae60;
    color: #fff;
    text-align: center;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    text-transform: uppercase;
    margin-top: 15px;
    box-shadow: 0 4px 10px rgba(39, 174, 96, 0.3);
}

.btn-buy-now:hover {
    background-color: #219150;
    transform: translateY(-2px);
}

.desc-content {
    color: #555;
    line-height: 1.8;
    margin-top: 20px;
    font-size: 15px;
}

/* --- WHATSAPP --- */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px #999;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    background-color: #128C7E;
    transform: scale(1.1);
}

.whatsapp-float i {
    margin-top: 2px;
}

/* --- GELİŞMİŞ LIGHTBOX (MODAL) --- */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
}

.lightbox-modal.active {
    display: flex;
    animation: fadeIn 0.3s;
}

.close-lightbox {
    position: absolute;
    top: 15px;
    right: 25px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10002;
    transition: color 0.3s;
}

.close-lightbox:hover {
    color: #e67e22;
}

/* Lightbox Orta Kısım: Resim ve Oklar */
.lightbox-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    position: relative;
    max-height: 80vh; /* Alt şerit için yer bırak */
}

.lightbox-content {
    max-width: 85%;
    max-height: 100%;
    object-fit: contain;
    user-select: none;
}

/* Lightbox Oklar */
.lightbox-prev, .lightbox-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 30px;
    transition: 0.3s ease;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    user-select: none;
    z-index: 10001;
}

.lightbox-prev { left: 10px; }
.lightbox-next { right: 10px; }

.lightbox-prev:hover, .lightbox-next:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* Lightbox Alt Şerit (Thumbnails) */
.lightbox-thumbnails-container {
    height: 100px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 0;
}

.lightbox-thumbnails {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    max-width: 90%;
    padding: 5px;
    justify-content: center; /* Resim azsa ortala */
}

/* Eğer çok resim varsa sola dayalı başlasın, scroll olsun */
.lightbox-thumbnails::-webkit-scrollbar {
    height: 5px;
}
.lightbox-thumbnails::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 5px;
}

.lb-thumb {
    height: 60px;
    width: 60px;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.5;
    transition: 0.3s;
    border: 2px solid transparent;
    object-fit: cover;
    flex-shrink: 0;
}

.lb-thumb.active, .lb-thumb:hover {
    opacity: 1;
    border-color: #e67e22;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* --- FOOTER --- */
footer {
    background-color: #34495e;
    color: #bdc3c7;
    text-align: center;
    padding: 30px 0;
    margin-top: 50px;
    font-size: 14px;
}

/* --- MOBİL --- */
@media (max-width: 992px) {
    .header-bottom {
        display: block;
        height: 0;
        padding: 0;
        border: none;
        overflow: visible;
    }

    .mobile-menu-btn {
        display: block;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        background: #fff;
        flex-direction: column;
        height: auto;
        border-top: 1px solid #eee;
        box-shadow: 0 10px 10px rgba(0,0,0,0.05);
        z-index: 9999;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links > a, 
    .nav-links .dropdown {
        width: 100%;
        height: auto;
        padding: 0;
    }

    .nav-links > a, .dropdown > a {
        padding: 15px 20px;
        border-bottom: 1px solid #f9f9f9;
        height: auto;
    }

    .dropdown-content {
        position: static;
        box-shadow: none;
        border: none;
        background-color: #f8f9fa;
        display: none;
        width: 100%;
    }

    .dropdown.active .dropdown-content {
        display: block;
    }

    .search-box {
        display: none;
    }

    .product-content-wrapper {
        grid-template-columns: 1fr;
    }

    .product-gallery-wrapper {
        flex-direction: column;
    }

    .thumbnails-track {
        flex-direction: row;
        width: 100%;
        height: auto;
        overflow-x: auto;
        padding-bottom: 10px;
    }

    .thumbnail {
        width: 70px;
        height: 70px;
    }

    .product-title-row h1 {
        font-size: 22px;
    }
    
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    /* Mobilde Lightbox Ayarları */
    .lightbox-content {
        max-width: 100%;
    }
    .lightbox-prev, .lightbox-next {
        width: 40px;
        height: 40px;
        font-size: 20px;
        background-color: rgba(0, 0, 0, 0.3); /* Mobilde daha belirgin olsun */
    }
    .lightbox-thumbnails-container {
        height: 80px;
    }
    .lb-thumb {
        height: 50px;
        width: 50px;
    }
}