/* ================== GENEL ================== */
* {
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    margin: 0;
    background: #f7f7f7;
}

/* ================== HEADER ================== */
header {
    background: #e63946;
    color: #fff;
    padding: 15px;
    text-align: center;
}

header h1 {
    margin: 0;
    font-size: 22px;
}

header h2 {
    margin: 5px 0 0;
    font-size: 13px;
    font-weight: normal;
}

/* ================== MENU ================== */
.menu {
    padding: 10px;
}

.menu h2 {
    margin: 18px 0 8px;
    font-size: 18px;
}

/* ================== ÜRÜN KARTI ================== */
.product {
    display: flex;
    background: #fff;
    border-radius: 10px;
    margin-bottom: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.product:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.product img {
    width: 90px;
    height: 90px;
    object-fit: cover;
}

/* ================== ÜRÜN BİLGİ ================== */
.product .info {
    display: flex;
    flex-direction: column;
    padding: 8px 10px;
    flex: 1;
}

.product .name {
    font-size: 15px;
    font-weight: 600;
    color: #111;
    margin-bottom: 2px;
}

.product .price {
    font-size: 14px;
    font-weight: 700;
    color: #e63946;
    margin-bottom: 4px;
}

.product .desc {
    font-size: 12.5px;
    color: #666;
    line-height: 1.4;
    word-break: break-word;
}

/* ================== SEPET BUTONU ================== */
.cart-button {
    position: fixed;
    bottom: 15px;
    right: 15px;
    background: #e63946;
    color: #fff;
    padding: 12px 16px;
    border-radius: 30px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1000;
    transition: transform 0.2s, background 0.2s;
}

.cart-button:hover {
    transform: scale(1.05);
    background: #d62828;
}

/* ================== SEPET ================== */
.cart {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    padding: 15px;
    border-radius: 16px 16px 0 0;
    max-height: 85vh;
    overflow-y: auto;
    z-index: 2000;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.cart:not(.hidden) {
    transform: translateY(0);
}

.hidden {
    display: none !important;
}

/* ================== SEPET BAŞLIK ================== */
.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ================== SEPETİ KAPATAN X ================== */
/* Modern, ikonlu ve mobil uyumlu */
.close-cart {
    background: none;
    border: none;
    font-size: 20px;        /* İkon boyutu */
    padding: 8px;           /* Dokunma alanı yeterli */
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s, transform 0.2s;
    color: #e63946;         /* Normal renk */
}

.close-cart:hover {
    color: #d62828;         /* Hover rengi */
    transform: scale(1.2);  /* Hover efekti */
}

/* ================== SEPET LİSTE ================== */
.cart ul {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}

.cart li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

/* ================== ADET KONTROL ================== */
.qty-box {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* + / - BUTONLARI */
.qty-box button,
.qty-control button {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: #e63946;
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

.qty-box button:hover,
.qty-control button:hover {
    transform: scale(1.2);
    background: #d62828;
}

/* ADET SAYISI */
.qty-box span,
.qty-control span {
    min-width: 22px;
    text-align: center;
    font-weight: bold;
    font-size: 15px;
}

/* ================== FORM ================== */
.cart textarea,
.cart select {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
}

/* SEPET SİPARİŞ BUTONU */
.cart button {
    width: 100%;
    padding: 12px;
    background: #e63946;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.cart button:hover {
    background: #d62828;
    transform: scale(1.02);
}

/* ================== POPUP ================== */
.popup {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.popup-content {
    background: #fff;
    padding: 20px;
    border-radius: 14px;
    width: 90%;
    max-width: 320px;
    text-align: center;
    position: relative;
    z-index: 100000;
}

/* Popup adet kontrol */
.qty-control {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 16px 0;
}

/* Popup ana butonlar */
.popup .add-btn {
    margin-bottom: 8px;
    width: 100%;
    padding: 16px 0;
    font-size: 18px;
    font-weight: 700;
    border-radius: 14px;
    margin-top: 10px;
    transition: background 0.2s, transform 0.2s;
}

.popup .add-btn:hover {
    background: #d62828;
    transform: scale(1.02);
}

.popup .close-btn {
    width: 80%;
    padding: 8px;
    font-size: 14px;
    border-radius: 8px;
    background: #ccc;
    color: #111;
    margin-top: 8px;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.popup .close-btn:hover {
    background: #b3b3b3;
    transform: scale(1.05);
}

/* ================== SEPETE EKLENDİ YAZISI ================== */
#addedMessage {
    display: none;
    margin-top: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #00a86b;
    animation: fadeOut 2s forwards;
}

@keyframes fadeOut {
    0% {opacity: 1;}
    80% {opacity: 1;}
    100% {opacity: 0;}
}

.menu h2 {
    margin: 18px 0 8px;
    font-size: 18px;
    text-align: center; /* başlıkları ortaladık */
}

/* Sepet başlığı ve X butonunu düzelt */
.cart-header {
    display: flex;
    justify-content: center;  /* Başlığı ortalar */
    align-items: center;
    position: relative;       /* X için konumlandırma */
    padding: 10px 0;
}

.cart-header h3 {
    margin: 0;
    font-size: 16px;         /* Başlık boyutu */
    text-align: center;
}

.cart-header .close-cart {
    position: absolute;
    right: 10px;             
    top: 50%;                
    transform: translateY(-50%);
    width: 28px;             /* Kare boyutu */
    height: 28px;
    font-size: 16px;         
    line-height: 1;
    background: #e63946;     /* Kırmızı arka plan */
    color: #fff;             /* X rengi beyaz */
    border: none;
    border-radius: 50%;      /* Yuvarlak */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background 0.2s;
}

.cart-header .close-cart:hover {
    transform: scale(1.2);
    background: #d62828;     /* Hover kırmızı ton değişimi */
}

.cart {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    padding: 15px;
    border-radius: 16px 16px 0 0;
    max-height: 85vh;
    overflow-y: auto;
    z-index: 2000;
    transform: translateY(100%);
    transition: transform 0.3s ease;

    /* Yeni eklemeler */
    border: 2px solid #ccc;          /* Hafif gri sınır */
    box-shadow: 0 -4px 12px rgba(0,0,0,0.2);  /* Hafif gölge */
}