/* Product Detail Page Styles - aligned with FoodX.css design system */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --primary-color: #e21e21;
  --secondary-color: #e21e21;
  --primary-font: 'Inter', Arial, sans-serif;
  --fx-dvh: 1vh;
}

 html, body { padding: 0; margin: 0; }
 /* Override FoodX.css reserved scrollbar gutter */
 html { scrollbar-gutter: auto !important; overflow: hidden !important; }
 body { background: #fff; color: #222; font-family: var(--primary-font); overflow: hidden !important; }
 /* Override desktop right padding reserved for #basket in FoodX.css */
 @media (min-width: 1000px) {
   body { padding-right: 0 !important; }
 }

.container { width: 100%; height: calc(var(--fx-dvh, 1vh) * 100); min-height: 100vh; overflow: hidden; }

/* Header */
.header { position: fixed; top: 0; left: 0; right: 0; height: 60px; background: var(--primary-color); color: #fff; z-index: 1000; display: flex; align-items: center; justify-content: space-between; }
.header-title i { font-size: 20px; }
.header-close { width: 30px; height: 30px; padding: 15px; cursor: pointer; }
.header-close img { width: 30px; height: 30px; border: 0; cursor: pointer; }
.header-spacer { height: 70px; width: 100%; }

/* Content */
.content-wrapper { width: 100%; padding: 15px; margin: 0 auto; box-sizing: border-box; height: calc(var(--fx-dvh, 1vh) * 100 - 60px); min-height: calc(100vh - 60px); overflow-y: auto; -webkit-overflow-scrolling: touch; padding-bottom: calc(60px + 8px + env(safe-area-inset-bottom, 0px)); /* footer height + buffer */ scrollbar-width: thin; scrollbar-color: rgba(0,0,0,0.25) transparent; }
.content-wrapper::after { content: ""; display: block; height: 4px; }
@media (min-width: 1000px) {
  .content-wrapper { padding-bottom: 0px; }
}
.content-wrapper::-webkit-scrollbar { width: 8px; }
.content-wrapper::-webkit-scrollbar-track { background: transparent; }
.content-wrapper::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.25); border-radius: 8px; }

/* Menu Card */
.menu-card { border: 1px solid #eee; padding: 1rem; border-radius: 8px; width: 100%; display: flex; gap: 12px; align-items: flex-start; box-sizing: border-box; background: #fff; position: relative; cursor: default; z-index: 1; margin-bottom: 15px; }
.menu-card:hover { box-shadow: 0 2px 4px rgba(0,0,0,0.08); }
.menu-card-content { flex: 1; padding-right: 1rem; position: relative; z-index: 2; }
.menu-card.no-image .menu-card-content { padding-right: 0; }
.badge-new { display:inline-block; background: var(--secondary-color); color:#fff; font-size:12px; border-radius:8px; padding:4px 8px; margin-right:8px; line-height:1; font-family:'Inter', Arial, sans-serif; }
.menu-card-title { font-weight: 400; font-size: 16px; margin: 0 0 6px; display: inline-flex; gap: 6px; align-items: center; }
.menu-card-description { color: #666; font-size: 14px; margin: 6px 20px 0 0; }
.menu-card-image-wrapper { position: relative; width: 100px; height: 100px; flex-shrink: 0; background: #dbdbdb; border-radius: 10px; overflow: hidden; }
.menu-card-image { width: 100%; height: 100%; object-fit: cover; display: block; }


.card { display: grid; grid-template-columns: 1fr 120px; grid-template-areas: "info image"; gap: 12px; padding: 12px; border: 1px solid #eee; border-radius: 10px; background: #fff; align-items: start; position: relative; cursor: default; }
.card:hover { box-shadow: 0 6px 18px rgba(0,0,0,0.06); }
.card:not(:has(img)) { grid-template-columns: 1fr; grid-template-areas: "info"; padding-right: 68px; }
.card:not(:has(img)) .info { width: 100%; padding-right: 60px; }
.card img { grid-area: image; width: 120px; height: 90px; object-fit: cover; border-radius: 8px; justify-self: end; display: block; }
.card .info { grid-area: info; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
/* Menü kartı tipografisi — Just Eat referansına hizalandı (Inter): başlık 16/600,
   fiyat 15/700, açıklama 14/400. Yalnızca font-size küçültüldü; aile/ağırlık/renk aynı. */
.card .title { font-family: 'Inter', Arial, sans-serif; font-size: 16px; font-weight: 600; line-height: 1.3; }
.card .desc { font-family: 'Inter', Arial, sans-serif; font-size: 14px; font-weight: 400; color: #666; line-height: 1.5; }
.card .price { font-family: 'Inter', Arial, sans-serif; font-size: 15px; font-weight: 700; color: var(--primary-color); }

.product-badges { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.product-badges .attribute-icon { width: 20px; height: 20px; display: inline-block; margin-right: 6px; }
.product-badges .chip { display: inline-flex; align-items: center; justify-content: center; padding: 8px 12px; border-radius: 16px; font-family: 'Inter', Arial, sans-serif; font-size: 14px; border: none; color: #404040; background: transparent; }
.chip.food-attribute-spicy { background-color:#ffe8ec; color: var(--primary-color); }
.chip.food-attribute-garlic { background-color:#ebdfff; color:#404040; }
.chip.food-attribute-onion { background-color:#fff3e0; color:#404040; }
.chip.food-attribute-vegetarian { background-color:#e8f5e9; color:#4fba6f; }
.chip.food-attribute-vegan { background-color:#e8f5e9; color:#4fba6f; }
.chip.food-attribute-halal { background-color:#e3f2fd; color:#629bc4; }


.sizes-container { background: #f8f8f8; padding: 10px; border-radius: 8px; margin: 15px 0; border: 1px solid #eee; display: none; }
.size-header { font-size: 16px; margin-bottom: 10px; display: inline-block; }
.menu-size-item { border: 1px solid #eee; margin-bottom: 5px; padding: 10px 10px 10px 10px; border-radius: 8px; cursor: pointer; background: #fff; display:flex; align-items:center; }
.menu-size-item:hover { box-shadow: 0 2px 4px rgba(0,0,0,0.08); }
.menu-size-item:last-child { margin-bottom: 0; }
.menu-size-item label { display:flex; align-items:center; justify-content:space-between; width:100%; }
.menu-size-item input[type="radio"] { width:20px; height:20px; accent-color:#111; align-self:center; margin-right:10px; position:relative; top:-1px; vertical-align: middle; }
.size-info { display: inline-block; }
.menu-size-title { font-size: 15px; }
.menu-size-detail { color: #666; font-size: 13px; }
.menu-size-price { color: var(--primary-color); font-size: 15px; float: right; }


.product-options-container { width: 100%; padding: 0; min-height: 0; text-align: left; margin-bottom: 0; }
.product-options-container:empty { min-height: 0; padding: 0; margin: 0; border: 0; }
.product-options { background: #f8f8f8; padding: 15px; border-radius: 8px; margin: 15px 0; border: 1px solid #eee; }
/* Soru başlıkları belirgin olsun: bold + marka yeşili + sol şerit (kırmızıyı "(Required)"/uyarıya saklıyoruz). */
.product-options-header { margin-bottom: 10px; display:flex; align-items:center; gap:8px; border-left: 4px solid #166534; padding-left: 10px; }
/* NOT: text-transform:uppercase KULLANMA — CSS büyütme sayfa diline bağlı; Türkçe locale'de
   İngilizce "i" → "İ" oluyordu ("OPTİONS"/"DRİNK"). Owner'ın yazdığı hâl korunur. */
.option-header { font-size: 16px; display: inline-block; flex:1; font-weight: 700; color: #14532d; }
.product-options-header .option-limits { margin-left:auto; color:#e21e21; font-size:14px; font-weight:600; }
.option-notice { color: #666; font-size: 14px; margin-left: 5px; }
.product-option-item { border: 1px solid #eee; margin-bottom: 5px; padding: 15px 15px 15px 10px; border-radius: 8px; background: #fff; display: flex; align-items: center; }
.product-option-item input[type="radio"] { align-self:center; margin-right:10px; position:relative; top:-1px; vertical-align: middle; }
.product-option-item input[type="checkbox"] { align-self:center; margin-right:10px; position:relative; top:1px; vertical-align: middle; }
.product-option-item label { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.option-info { display: inline-block; flex: 1; }
.option-title { font-size: 15px; margin-left: 0; }
.counter-option-item > label { margin-left: 0; }
.option-detail { color: #666; font-size: 13px; }
.option-price { color: var(--primary-color); font-size: 15px; margin-left: auto; }

/* Secret choice */
.secret-choice { margin-top: 10px; padding: 10px; border-radius: 8px; background: #f8f8f8; }
.secret-choice-header { font-size: 14px; margin-bottom: 10px; color: #cc5200; display:flex; align-items:center; gap:8px; }
.secret-choice-header .option-limits { margin-left:auto; color:#e21e21; font-weight:600; }
.secret-option-item { padding: 10px; border: 1px solid #eee; border-radius: 8px; margin-bottom: 5px; background: #fff; cursor: pointer; }
.secret-option-item:hover { box-shadow: 0 2px 4px rgba(0,0,0,0.1); }

/* Dropdown */
.dropdown-menu { width: 100%; padding: 15px; border-radius: 8px; border: 1px solid #eee; font-size: 16px; background: #fff; cursor: pointer; outline: none; appearance: none; background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right 15px center; background-size: 16px; padding-right: 40px; }
.dropdown-menu { font-family: 'Inter', Arial, sans-serif; }
.dropdown-menu:hover { border-color: #ddd; }
.dropdown-menu:focus { border-color: #ccc; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.dropdown-menu option { padding: 8px; }

/* Counter controls */
.counter-option-item { display:flex; align-items:center; gap:10px; }
/* sabit genişlik: checkbox kontrolüne yakın bir kolon bırakır ve metin hizasını sabitler */
.counter-controls { display: flex; align-items: center; gap: 6px; flex: 0 0 28px; width: 28px; min-width:28px; justify-content: center; transition: all 0.2s ease; margin-right: 0; }
.counter-controls.is-empty { justify-content: center; flex-basis: 28px; width:28px; }
.counter-controls.has-count { justify-content: space-between; flex-basis: 92px; width:92px; min-width:92px; }
.counter-btn { width: 28px; height: 28px; min-width: 28px; min-height: 28px; aspect-ratio: 1 / 1; border: 1px solid #ddd; border-radius: 50%; background: #fff; color: var(--primary-color); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: border-color 0.2s, background 0.2s; }
.counter-btn:hover { border-color: #999; background:#fafafa; }
.counter-btn[disabled] { cursor: not-allowed; opacity: 0.5; }
.counter-display { width: 28px; height: 28px; min-width: 28px; min-height: 28px; aspect-ratio: 1 / 1; background: var(--primary-color); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 600; line-height: 1; font-size: 14px; }

/* Counter satırlarında başlık yan boşluğu sadece gap ile sağlansın */
.counter-option-item .option-title { margin-left: 0; }

/* Counter ikon boyutları (buton çapı aynı kalır) */
.counter-btn[data-action="increment"] { font-size: 14px; font-weight: 700; line-height: 1; }
.counter-btn[data-action="decrement"] { font-size: 14px; line-height: 1; }
/* FA ikonlarının daireyi germesini engelle */
.counter-btn i { display: block; line-height: 1; font-size: inherit; }

/* Inputs */
label, input { cursor: pointer; -webkit-tap-highlight-color: transparent; user-select: none; }
.product-option-item input:disabled + label { opacity: 0.5; cursor: not-allowed; }
.product-option-item.disabled, .secret-option-item.disabled { opacity: 0.5; pointer-events: none; }

/* Unified radio/checkbox styling (like ServiceType) */
.product-option-item input[type="radio"],
.product-option-item input[type="checkbox"],
#sizesList input[type="radio"] {
  width: 20px;
  height: 20px;
  accent-color: #111;
}
.product-option-item input[type="radio"][disabled],
.product-option-item input[type="checkbox"][disabled],
#sizesList input[type="radio"][disabled] {
  accent-color: #bbb;
  cursor: not-allowed;
}

/* Notes */
.notes-container { background: #f8f8f8; padding: 15px; border-radius: 8px; margin: 15px 0 10px; border: 1px solid #eee; }
.notes-container:last-child { margin-bottom: 0; }
#ProductNoteContainer .notes-container { margin-bottom: 0; }
.note-header { font-size: 16px; margin-bottom: 10px; display: inline-block; }
.textarea-container { position: relative; width: 100%; }
#productNote { width: 100%; max-width: 100%; height: 60px; padding: 10px; border: 1px solid #eee; border-radius: 8px; resize: none; font-size: 14px; background: #fff; box-sizing: border-box; display: block; }
.character-counter { position: absolute; top: -30px; right: 0; font-size: 12px; color: #666; background: rgba(255,255,255,0.9); padding: 2px 5px; border-radius: 4px; border: 1px solid #eee; }
.note-disclaimer { margin: 8px 0 0; font-family: 'Inter', Arial, sans-serif; font-size: 12px; line-height: 1.4; color: #888; }

/* Fixed Footer */
.fixed-footer { position: fixed; bottom: env(safe-area-inset-bottom, 0); left: 0; right: 0; height: calc(60px + env(safe-area-inset-bottom, 0)); background: var(--primary-color); z-index: 1000; display: flex; align-items: center; justify-content: space-between; padding: 0 20px env(safe-area-inset-bottom, 0); color: #fff; box-shadow: 0 -2px 4px rgba(0,0,0,0.1); }
.counter-box { display: flex; align-items: center; gap: 8px; }
.counter-btn-white { width: 28px; height: 28px; border: 1px solid rgba(255,255,255,0.3); border-radius: 50%; background: #fff; color: var(--secondary-color); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: border-color 0.2s; -webkit-tap-highlight-color: transparent; user-select: none; }
.counter-btn-white:hover { border-color: rgba(255,255,255,0.5); }
.counter-display-white { width: 28px; height: 28px; background: #fff; color: var(--secondary-color); border: 1px solid rgba(255,255,255,0.3); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 600; }
.add-basket-button { background: #fff; color: #111; height: 40px; padding: 0 18px; min-width: 280px; border-radius: 25px; border: none; cursor: pointer; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; font-size: 16px; box-shadow: 0 6px 20px rgba(0,0,0,0.18); font-family: 'Inter', Arial, sans-serif; }
.add-basket-button:hover { filter: brightness(0.98); }
.add-basket-button .basket-left { display: flex; align-items: center; justify-content: flex-start; }
.add-basket-button .basket-left i { font-size: 20px; color: var(--secondary-color); }
.add-basket-button .basket-center { text-align: center; font-weight: 400; font-size: clamp(13px, 3.6vw, 18px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.add-basket-button .basket-right { text-align: right; font-weight: 400; font-size: 16px; white-space: nowrap; }

 /* Mobile: make the Add to Basket button ~30px narrower to avoid touching the counter */
 @media (max-width: 480px) {
   .add-basket-button { min-width: 250px; }
 }

/* Spinner */
.fx-spinner { margin: 20px auto; width: 70px; text-align: center; }
.fx-spinner > div { width: 14px; height: 14px; background-color: #999; border-radius: 100%; display: inline-block; animation: fx-bouncedelay 1.4s infinite ease-in-out both; margin: 0 3px; }
.fx-spinner .fx-bounce1 { animation-delay: -0.32s; }
.fx-spinner .fx-bounce2 { animation-delay: -0.16s; }
@keyframes fx-bouncedelay { 0%, 80%, 100% { transform: scale(0); } 40% { transform: scale(1.0); } }

/* Helpers */
.hide { display: none !important; }
.show { display: block !important; }
