/* ==========================================================================
   Global Sıfırlama ve Taşma Engelleme (En Tepeye Eklendi)
   ========================================================================== */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden; /* Sayfanın sağa sola sallanmasını kökten engeller */
    box-sizing: border-box;
}

*, *:before, *:after {
    box-sizing: inherit; /* Tüm padding ve border değerlerini genişliğe dahil eder */
}

/* ==========================================================================
   Main Content Genel Ayarları 
   ========================================================================== */
#main-content {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
    min-height: 400px;
}

/* Bilgilendirme Bandı Tasarımı */
.info-banner {
    background-color: #fff8e1;
    border-left: 5px solid #ff9800;
    border-radius: 4px;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.info-icon {
    font-size: 32px;
}

.info-text h3 {
    margin: 0 0 5px 0;
    color: #e65100;
    font-size: 18px;
}

.info-text p {
    margin: 0;
    color: #555;
    line-height: 1.5;
    font-size: 15px;
}

@media (max-width: 480px) {
    .info-banner {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
}

/* Ürün Grid Yapısı */
.products-grid {
    display: grid;
    /* minmax değerini 280px'den 250px'e çektik, böylece dar ekranlarda kartlar dışarı taşmaz */
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); 
    gap: 25px;
    width: 100%;
}
/* Ürün Kartı Genel Tasarımı */
.product-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

.product-image {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #ff9800;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
}

.product-info {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-info h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    color: #333;
}

.product-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
    margin: 0 0 15px 0;
    flex-grow: 1;
}

.product-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.product-price {
    font-size: 20px;
    font-weight: 700;
    color: #e65100;
}

/* Adet Seçici Kapsayıcı (Ortak Modal İçi Yapı) */
.quantity-selector {
    display: flex;
    align-items: center;
    background-color: #f5f5f5;
    border-radius: 30px;
    padding: 3px;
    border: 1px solid #e0e0e0;
}

/* Modal İçi Seçici Butonları */
.modal-qty-btn {
    width: 32px;
    height: 32px;
    border: none;
    background-color: #fff;
    color: #333;
    font-size: 18px;
    font-weight: 600;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: background-color 0.2s, color 0.2s;
}

.modal-qty-btn:hover {
    background-color: #ff9800;
    color: #fff;
}

.modal-qty-input {
    width: 40px;
    border: none;
    background: transparent;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    font-family: 'Poppins', sans-serif;
    outline: none;
    -moz-appearance: textfield;
}

.modal-qty-input::-webkit-outer-spin-button,
.modal-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Arama Kutusu */
.search-container {
    max-width: 500px;
    margin: 0 auto 30px auto;
}

.search-box {
    display: flex;
    align-items: center;
    background-color: #f9f9f9;
    border: 2px solid #e0e0e0;
    border-radius: 30px;
    padding: 8px 20px;
    transition: border-color 0.3s, background-color 0.3s;
}

.search-box:focus-within {
    border-color: #ff9800;
    background-color: #fff;
}

.search-icon {
    font-size: 18px;
    margin-right: 10px;
    color: #888;
}

#menu-search-input {
    width: 100%;
    border: none;
    background: transparent;
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
    outline: none;
    color: #333;
}

/* Seçenekleri Gör Butonu */
.open-variants-btn {
    background-color: #ff9800;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;

}
.open-variants-btn:hover { background-color: #e65100; }

/* Modal Tasarımı */
#modal-variants-list{
    max-height: 60vh;
    overflow-x: auto;
}


.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fff;
    padding: 25px;
    border-radius: 15px;
    width: 90%;
    max-width: 450px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    animation: zoomIn 0.2s ease-in-out;
}


@keyframes zoomIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.close-modal {
    position: absolute;
    top: 15px; right: 20px;
    font-size: 28px; cursor: pointer; color: #aaa;
}
.close-modal:hover { color: #333; }

.variant-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}
.variant-info-text { flex-grow: 1; }
.variant-name { font-weight: 600; color: #333; }
.variant-price { font-size: 13px; color: #666; display: block; }

.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 2px solid #eee;
}
.total-price-area { font-size: 20px; font-weight: 700; color: #e65100; }
.confirm-btn {
    background-color: #4caf50; color: white; border: none;
    padding: 10px 25px; border-radius: 25px; font-weight: 600; cursor: pointer;
}
.confirm-btn:hover { background-color: #43a047; }


