﻿/* Genel yapı */
body {
    margin: 0;
    padding: 0;
    font-family: sans-serif;
}

.row {
    display: flex;
    flex-wrap: wrap;
    
}

.span3 {
    width: 230px;
   
    box-sizing: border-box;
    flex: 0 0 auto;
}

.span9 {
    flex: 1;
    padding: 10px;
    box-sizing: border-box;
}

/* Kategori başlık */
.caption {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    display: block;
}

/* Ürün listesi yapısı */
.thumbnails {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding-left: 0;
    list-style: none;
    margin: 0;
}

    .thumbnails > li {
        margin-bottom: 20px;
        flex: 0 0 auto;
    }

/* Ürün kartı */
.product-card {
    background: #faf7f7dc;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

    .product-card:hover {
        transform: translateY(-10px);
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
    }

.product-image {
    width: 100% !important;
    height: 200px !important;
    object-fit: contain;
    background-color: white;
    display: block;
    margin: 0 auto;
    border-radius: 8px;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 12px;
    color: #333;
    text-align: center;
}

.product-description {
    font-size: large;
    font-weight: bold;
    color: #f3a51d;
    margin: 8px 0;
    height: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
}

.product-price {
    font-size: 1.2rem;
    color: #000;
    font-weight: bold;
    margin: 10px 0;
    text-align: center;
}

.product-action {
    margin-top: auto;
}

.product-button {
    width: 100%;
    padding: 10px;
    font-size: 1rem;
    background-color: #fea306b4;
    border: none;
    border-radius: 6px;
    color: #000;
    cursor: pointer;
    transition: background-color 0.4s ease-in;
}

    .product-button:hover {
        background-color: #e0a800;
    }

.product-disabled {
    color: #888;
    font-weight: bold;
    text-align: center;
    padding: 12px 0;
}

/* Modal yapı */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 100vh !important;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(8px);
    overflow: hidden;
}

    .modal.active {
        display: flex !important;
    }

.modal-content {
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0,0,0,0.8);
    margin: 0 auto;
    display: block;
}

/* Popup */
#popupMessage,
#userPopup {
    position: fixed;
    top: 20px;
    right: 20px;
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    font-size: 16px;
    z-index: 1050;
    display: none;
}

#popupMessage {
    background-color: #28a745;
}

#userPopup {
    background-color: #ff6a00a3;
}

/* Responsive tasarım */
@media (max-width: 1024px) {
    .span3 {
        width: 100%;
        margin: 10px 0;
        flex: 0 0 100%;
    }

    .span9 {
        width: 100%;
        padding: 10px 0;
    }

    .product-image {
        height: 180px;
    }

    .thumbnails {
        justify-content: center;
        flex-wrap: wrap;
    }

        .thumbnails > li {
            flex-basis: calc(50% - 20px);
            margin: 10px;
        }
}

@media (max-width: 768px) { /* 768px ve altı ekran genişlikleri için geçerli (mobil) */

    .product-description {
        font-size: 0.95rem; /* Açıklama metni boyutu küçültülüyor */
        height: 105px; /* Sabit yükseklik veriliyor, hizalama düzgün olsun diye */
    }

    .product-image {

        object-fit: fill; /* Resmi kutuya taşırmadan orantılı biçimde doldur */
        display: block; /* Boşluk bırakmasın (inline-block boşluğu engellemek için) */
    }

    .thumbnails {
        display: flex; /* Ürün kartlarını yatay hizalama için flex container yap */
        flex-wrap: wrap; /* Taşan elemanlar bir alt satıra geçsin */
        justify-content: center; /* Tüm kutular ortalanarak yerleştirilsin */
        padding: 0; /* Varsayılan iç boşlukları sıfırla */
        margin: 0; /* Varsayılan dış boşlukları sıfırla */
    }

        .thumbnails > li {
            flex: 0 0 70%; /* Kartın sabit genişliği %48 (büyüklüğü belirler) */
            max-width: 65%; /* Maksimum genişlik sınırı %48 (daha fazla olmasın) */
           
            margin: 1%; /* Kenar boşluğu ver, aralarında nefes alanı olsun */
            box-sizing: border-box; /* Padding ve border’ı genişliğe dahil et (taşma olmasın) */
        }
}

.boxx {
    border-radius: 5px;
    transition: all .5s;
}

    .boxx:hover {
        transform: scale(1.1)
    }