/* /public/css/public-styles.css */

.adt-product-container { 
    display: grid; 
    gap: 20px; 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}
.adt-product-item a { text-decoration: none; }

/* --- Layout 1: Klasik Grid --- */
.adt-layout-1 { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.adt-layout-1 .adt-product-item { display: flex; flex-direction: column; border: 1px solid #e0e0e0; border-radius: 8px; overflow: hidden; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.adt-layout-1 .adt-product-image { position: relative; }
.adt-layout-1 .adt-product-image img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: contain; padding: 10px; }
.adt-layout-1 .adt-discount-badge { position: absolute; top: 10px; left: 10px; background: #e74c3c; color: #fff; padding: 5px 8px; border-radius: 4px; font-size: 14px; font-weight: bold; }
.adt-layout-1 .adt-product-content { padding: 15px; flex-grow: 1; display: flex; flex-direction: column; }
.adt-layout-1 .adt-product-title { font-size: 16px; margin: 0 0 10px; line-height: 1.4; height: 3.6em; overflow: hidden; flex-grow: 1; }
.adt-layout-1 .adt-product-title a { color: #333; }
.adt-layout-1 .adt-sales-rank { font-size: 13px; color: #777; margin-bottom: 10px; }
.adt-layout-1 .adt-product-price { display: flex; flex-direction: column; align-items: flex-start; margin-bottom: 15px; }
.adt-layout-1 .adt-new-price { font-size: 20px; font-weight: bold; color: #27ae60; }
.adt-layout-1 .adt-old-price { font-size: 14px; color: #95a5a6; text-decoration: line-through; }
.adt-layout-1 .adt-product-actions { padding: 0 15px 15px; }
.adt-layout-1 .adt-buy-button { display: block; width: 100%; text-align: center; padding: 10px; border-radius: 5px; text-decoration: none; font-weight: bold; background: #ff0000; color: #fff; transition: background-color 0.2s; }
.adt-layout-1 .adt-buy-button:hover { background: #e67e22; }


/* --- Layout 2: Mini Liste (YENİ GÖRÜNÜM) --- */
.adt-layout-2 { 
    grid-template-columns: 1fr; /* Her öğe tam genişlik kaplar */
    gap: 12px; 
}
.adt-layout-2 .adt-product-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #f9f9f9;
}
.adt-layout-2 .adt-product-image {
    flex: 0 0 60px; /* Sabit 60px genişlik */
    position: relative;
}
.adt-layout-2 .adt-product-image img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    background: #fff;
    border: 1px solid #eee;
}
.adt-layout-2 .adt-discount-badge {
    position: absolute;
    top: -5px;
    left: -5px;
    font-size: 11px;
    padding: 2px 5px;
    border-radius: 4px;
    background: #e74c3c;
    color: #fff;
    font-weight: bold;
}
.adt-layout-2 .adt-product-content {
    flex-grow: 1; /* Kalan tüm alanı kapla */
    padding: 0;
    overflow: hidden; /* Taşmaları önle */
}
.adt-layout-2 .adt-product-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 5px 0;
    white-space: nowrap;      /* Tek satırda kalmasını sağla */
    overflow: hidden;         /* Taşan kısmı gizle */
    text-overflow: ellipsis;  /* Taşan kısmın sonuna ... ekle */
    height: auto;
}
.adt-layout-2 .adt-product-title a { color: #333; }
.adt-layout-2 .adt-product-price {
    display: flex;
    gap: 8px;
    align-items: baseline;
    flex-wrap: wrap;
    margin: 0;
}
.adt-layout-2 .adt-new-price { font-size: 16px; font-weight: bold; color: #27ae60; }
.adt-layout-2 .adt-old-price { font-size: 12px; color: #95a5a6; text-decoration: line-through; }
.adt-layout-2 .adt-sales-rank { display: none; } /* Mini liste için sales rank gizlendi */
.adt-layout-2 .adt-product-actions {
    padding: 0;
    margin-left: auto; /* Butonu en sağa yasla */
}
.adt-layout-2 .adt-buy-button {
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 5px;
    background: #3498db;
    color: #fff;
    font-weight: bold;
    white-space: nowrap;
    transition: background-color 0.2s;
}
.adt-layout-2 .adt-buy-button:hover { background: #2980b9; }

/* Diğer layoutlar için stilleri buraya ekleyebilirsiniz (3, 4, 5) */

/* ... layout-1 ve layout-2 stilleri aynı kalacak ... */

/* ... layout-1 ve layout-2 stilleri aynı kalacak ... */

/* --- Layout 3: 4'lü Galeri Görünümü (GÜNCELLENDİ) --- */
.adt-layout-3 {
    grid-template-columns: repeat(8, 1fr); /* Geniş ekranlarda 4 sütun */
}
.adt-layout-3 .adt-product-item {
    display: flex;
    flex-direction: column;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.adt-layout-3 .adt-product-image {
    position: relative;
    padding: 10px;
}
.adt-layout-3 .adt-product-image img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1; /* Görseli kare yapar */
    object-fit: contain; /* Oranları bozmadan sığdırır */
}
.adt-layout-3 .adt-discount-badge {
    position: absolute; top: 15px; left: 15px; background: #e74c3c; color: #fff; padding: 5px 8px; border-radius: 4px; font-size: 14px; font-weight: bold;
}
.adt-layout-3 .adt-product-content {
    padding: 0 10px; /* Boşlukları azalttık */
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Kartların eşit yükseklikte kalmasını sağlar */
}
.adt-layout-3 .adt-product-title {
    font-size: 15px;
    margin: 0 0 5px; /* Alt boşluğu azalttık */
    line-height: 1.4;
    height: 4.2em; /* 3 satır */
    overflow: hidden;
}
.adt-layout-3 .adt-product-title a { color: #333; }

/* Fiyat stilleri güncellendi */
.adt-layout-3 .adt-product-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: auto;
    padding-top: 5px; /* Boşluğu azalttık */
    margin-bottom: 5px; /* Butonla arasındaki boşluğu azalttık */
}
.adt-layout-3 .adt-new-price { font-size: 18px; font-weight: bold; color: #27ae60; }
.adt-layout-3 .adt-old-price { font-size: 13px; color: #95a5a6; text-decoration: line-through; }

/* Buton stilleri güncellendi */
.adt-layout-3 .adt-product-actions {
    padding: 0 0px 0px; /* Tüm boşlukları azalttık */
}
.adt-layout-3 .adt-buy-button {
    display: block;
    width: 100%;
    text-align: center;
    padding: 10px 5px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    background: #ff0000;  
    color: #fff;  
    transition: background-color 0.2s;
}
.adt-layout-3 .adt-buy-button:hover { background: #e67e22; }

/* YENİ: Tekil "Tümünü Gör" butonu için container */
.adt-show-all-container {
    grid-column: 1 / -1; /* Grid'in tüm genişliğini kapla */
    text-align: center;
    margin-top: 2px;
}
.adt-show-all-button {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    background: #009FA7;
    border: 1px solid #ccc;
    color: #333;
    transition: background-color 0.2s, color 0.2s;
}
.adt-show-all-button:hover {
    background: #e5e5e5;
    border-color: #aaa;
}

/* Diğer layoutlarda bu buton görünmesin */
.adt-show-all-button { display: none; }
.adt-show-all-container .adt-show-all-button { display: inline-block; }


/* Mobil ve Tablet için Duyarlılık (Responsive) */
@media (max-width: 960px) {
    .adt-layout-3 {
        grid-template-columns: repeat(2, 1fr); /* Tabletlerde 2 sütun */
    }
}
@media (max-width: 500px) {
    .adt-layout-3 {
        grid-template-columns: 1fr; /* Mobilde tek sütun */
    }
}