/* =========================================================
   SIDEBAR KATEGORİ GRUPLARI — TEK KAYNAK
   Alerjen, beslenme tercihi, porsiyon ve benzeri gruplar.
   ========================================================= */

#rsProductDrawer #rsDrawerCategoryGroups {
  display: grid;
  gap: 18px;
}

#rsProductDrawer #rsDrawerCategoryGroups .rs-drawer-category-group {
  position: relative;
  min-width: 0;
  margin: 0;
  padding: 30px 18px 18px;
  border: 1px solid var(--rs-line, #dfe4ea);
  border-radius: 18px;
  background: var(--rs-surface, #fff);
  box-shadow: none;
  margin-top: 10px;
}

/* Form-group / fieldset başlığı */
#rsProductDrawer #rsDrawerCategoryGroups .rs-drawer-category-title {
  position: absolute;
  top: 0;
  left: 18px;
  z-index: 1;
  width: auto;
  max-width: calc(100% - 36px);
  margin: 0;
/*	
  padding: 0 10px;
  background: transparent;
*/
	padding: 10px;
    border-radius: 10px;
    border: 1px solid var(--rs-line, #dfe4ea);
    background: #fffefe;
	
  color: var(--rs-text, #202020);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: .025em;
  text-transform: uppercase;
  transform: translateY(-50%);
}

/* Öğeler soldan başlar; son satır hiçbir zaman ortalanmaz. */
#rsProductDrawer #rsDrawerCategoryGroups .rs-drawer-category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 92px));
  justify-content: start;
  align-items: start;
  gap: 16px 14px;
  width: 100%;
}

#rsProductDrawer #rsDrawerCategoryGroups .rs-drawer-category-item {
  min-width: 0;
  min-height: 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 58px auto;
  justify-items: center;
  align-items: start;
  align-content: start;
  row-gap: 7px;
  border: 0;
  background: transparent;
  color: var(--rs-muted, #747a82);
  text-align: center;
  filter: none;
  opacity: 1;
}

#rsProductDrawer #rsDrawerCategoryGroups .rs-drawer-category-icon {
  grid-row: 1;
  grid-column: 1;
  width: 58px;
  height: 58px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--rs-line, #dfe4ea);
  border-radius: 15px;
  background: var(--rs-surface-soft, #f7f8fa);
  color: var(--rs-muted, #747a82);
  font-size: 27px;
  line-height: 1;
  filter: grayscale(1);
  opacity: .48;
  transition: border-color .18s ease, background .18s ease,
              color .18s ease, opacity .18s ease,
              transform .18s ease, box-shadow .18s ease;
}

#rsProductDrawer #rsDrawerCategoryGroups .rs-drawer-category-icon.is-empty::before {
  content: "";
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

#rsProductDrawer #rsDrawerCategoryGroups .rs-drawer-category-label {
  grid-row: 2;
  grid-column: 1;
  display: block;
  width: 100%;
  min-height: 0;
  margin: 0;
  color: var(--rs-muted, #747a82);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  opacity: .62;
}

/* Seçili değer: ürün liste fiyatıyla aynı turuncu ton */
#rsProductDrawer #rsDrawerCategoryGroups .rs-drawer-category-item.is-active .rs-drawer-category-icon {
  border-color: #e37f00;
  background: rgba(227, 127, 0, .09);
  color: #e37f00;
  filter: none;
  opacity: 1;
  transform: translateY(-1px);
  box-shadow: 0 7px 18px rgba(227, 127, 0, .12);
}

#rsProductDrawer #rsDrawerCategoryGroups .rs-drawer-category-item.is-active .rs-drawer-category-label {
  color: #e37f00;
  font-weight: 850;
  opacity: 1;
}

#rsProductDrawer #rsDrawerCategoryGroups .rs-drawer-category-item.is-passive {
  pointer-events: none;
}

/* Açıklama kutusu kategori listesinin hemen altında yer alır. */
#rsProductDrawer #rsDrawerCategoryGroups .rs-drawer-category-description {
  width: 100%;
  min-height: 0;
  margin: 14px 0 0;
  padding: 13px 15px;
  display: block;
  border: 1px solid rgba(227, 127, 0, .38);
  border-radius: 14px;
  background: rgba(227, 127, 0, .035);
  color: var(--rs-text-muted, #666b70);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

html[data-theme="dark"] #rsProductDrawer #rsDrawerCategoryGroups .rs-drawer-category-group {
  background: var(--rs-surface, #17191d);
}

html[data-theme="dark"] #rsProductDrawer #rsDrawerCategoryGroups .rs-drawer-category-title {
  /*background: transparent;*/
  background: #000000;
}

html[data-theme="dark"] #rsProductDrawer #rsDrawerCategoryGroups .rs-drawer-category-item.is-active .rs-drawer-category-icon {
  border-color: #e37f00;
  background: rgba(227, 127, 0, .15);
  color: #ffad3b;
}

html[data-theme="dark"] #rsProductDrawer #rsDrawerCategoryGroups .rs-drawer-category-item.is-active .rs-drawer-category-label {
  color: #ffad3b;
}

html[data-theme="dark"] #rsProductDrawer #rsDrawerCategoryGroups .rs-drawer-category-description {
  background: rgba(227, 127, 0, .055);
  color: rgba(255,255,255,.72);
}

@media (max-width: 600px) {
  #rsProductDrawer #rsDrawerCategoryGroups {
    gap: 15px;
	margin-top: 10px;
  }

  #rsProductDrawer #rsDrawerCategoryGroups .rs-drawer-category-group {
    padding: 27px 14px 15px;
    border-radius: 16px;
  }

  #rsProductDrawer #rsDrawerCategoryGroups .rs-drawer-category-title {
    left: 13px;
    max-width: calc(100% - 26px);
    padding-inline: 8px;
    font-size: 12px;
  }

  #rsProductDrawer #rsDrawerCategoryGroups .rs-drawer-category-grid {
    grid-template-columns: repeat(auto-fill, minmax(70px, 84px));
    gap: 14px 10px;
  }

  #rsProductDrawer #rsDrawerCategoryGroups .rs-drawer-category-item {
    grid-template-rows: 54px auto;
    row-gap: 6px;
  }

  #rsProductDrawer #rsDrawerCategoryGroups .rs-drawer-category-icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    font-size: 25px;
  }

  #rsProductDrawer #rsDrawerCategoryGroups .rs-drawer-category-label {
    font-size: 10.5px;
  }

  #rsProductDrawer #rsDrawerCategoryGroups .rs-drawer-category-description {
    margin-top: 12px;
    padding: 12px 13px;
    font-size: 10.5px;
  }
}

/* Ürün kartlarında yalnız seçili kategori değerleri */
.rs-product-category-group {
  margin-top: 10px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
}

.rs-category-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.rs-category-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  padding: 4px 8px;
  border: 1px solid #ead7a6;
  border-radius: 999px;
  background: #fffaf0;
  color: #4c4330;
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1.2;
}

html[data-theme="dark"] .rs-category-chip {
  border-color: var(--rs-border, #303531);
  background: var(--rs-surface-soft, #202421);
  color: var(--rs-text-soft, #c6c9c6);
}

/* =========================================================
   NORMAL ÜRÜN KARTI: İLK KATEGORİ + KALORİ + HAZIRLANMA SÜRESİ
   ========================================================= */

.rs-product-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin-top: 10px;
}

.rs-product-meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  max-width: 100%;
  min-height: 29px;
  padding: 5px 10px;
  border: 1px solid #d8dadd;
  border-radius: 999px;
  background: #fff;
  color: #5a5f67;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .02);
}

.rs-product-meta-badge > span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rs-product-meta-icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  font-size: 15px;
  line-height: 1;
}

.rs-product-meta-icon--dot::before {
  content: '';
  width: 7px;
  height: 7px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}

.rs-product-meta-badge--calorie,
.rs-product-meta-badge--preparation {
  background: #fafafa;
}

html[data-theme="dark"] .rs-product-meta-badge {
  border-color: var(--rs-border, #303531);
  background: var(--rs-surface-soft, #202421);
  color: var(--rs-text-soft, #c6c9c6);
  box-shadow: none;
}

@media (max-width: 580px) {
  .rs-product-card-meta {
    gap: 5px;
    margin-top: 8px;
  }

  .rs-product-meta-badge {
    min-height: 27px;
    padding: 4px 8px;
    gap: 4px;
    font-size: 10px;
  }

  .rs-product-meta-icon {
    min-width: 14px;
    font-size: 13px;
  }
}

/* =========================================================
   ÜRÜN KARTI — İLK ANA KATEGORİ + PREMIUM METRİKLER
   ========================================================= */

.rs-product-card-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  margin-top: 12px;
}

.rs-product-card-primary-category {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start !important;
  flex-wrap: wrap !important;
  column-gap: 10px !important;
  row-gap: 7px !important;
  width: 100%;
  min-width: 0;
}

.rs-product-card-primary-title {
  display: block;
  flex: 0 0 auto;
  width: auto;
  margin: 6px 0 0;
  color: #595e66;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: .025em;
  text-transform: uppercase;
  white-space: nowrap;
}

.rs-product-card-primary-values {
  display: flex !important;
  flex: 1 1 240px;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  width: auto !important;
  min-width: 0;
}

.rs-product-card-primary-values .rs-product-meta-badge {
  min-height: 29px;
  padding: 5px 10px;
  border-color: #d7dadd;
  background: rgba(255,255,255,.88);
  box-shadow: 0 2px 8px rgba(25,31,38,.035);
}

.rs-product-card-premium-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  max-width: 380px;
}

.rs-product-premium-metric {
  position: relative;
  isolation: isolate;
  min-width: 0;
  min-height: 55px;
  padding: 9px 12px 9px 10px;
  display: flex;
  align-items: center;
  gap: 9px;
  overflow: hidden;
  border: 1px solid rgba(197,160,82,.28);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(250,247,239,.94));
  box-shadow:
    0 8px 24px rgba(58,45,20,.06),
    inset 0 1px 0 rgba(255,255,255,.92);
}

.rs-product-premium-metric::after {
  content: '';
  position: absolute;
  z-index: -1;
  right: -18px;
  bottom: -25px;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: rgba(198,163,87,.07);
}

.rs-product-premium-metric-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  flex: 0 0 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(196,156,71,.22);
  border-radius: 11px;
  background: rgba(255,255,255,.82);
  font-size: 17px;
  line-height: 1;
  box-shadow: 0 4px 12px rgba(80,58,16,.07);
}

.rs-product-premium-metric-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.12;
}

.rs-product-premium-metric-content small {
  margin-bottom: 4px;
  color: #8a806d;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: .055em;
  line-height: 1.15;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rs-product-premium-metric-content strong {
  color: #292923;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.15;
  white-space: nowrap;
}

.rs-product-premium-metric--calorie {
  border-color: rgba(196,132,63,.26);
  background: linear-gradient(135deg, #fffdf9, #fbf4e9);
}

.rs-product-premium-metric--preparation {
  border-color: rgba(95,132,119,.22);
  background: linear-gradient(135deg, #fcfefd, #eef6f2);
}

.rs-product-premium-metric--preparation::after {
  background: rgba(77,132,111,.065);
}

html[data-theme="dark"] .rs-product-card-primary-title {
  color: var(--rs-text-soft, #c6c9c6);
}

html[data-theme="dark"] .rs-product-card-primary-values .rs-product-meta-badge {
  border-color: var(--rs-border, #303531);
  background: var(--rs-surface-soft, #202421);
}

html[data-theme="dark"] .rs-product-premium-metric {
  border-color: rgba(217,186,115,.19);
  background: linear-gradient(135deg, #242721, #1d201d);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
}

html[data-theme="dark"] .rs-product-premium-metric-icon {
  border-color: rgba(217,186,115,.16);
  background: rgba(255,255,255,.045);
}

html[data-theme="dark"] .rs-product-premium-metric-content small {
  color: #aca38e;
}

html[data-theme="dark"] .rs-product-premium-metric-content strong {
  color: #f1eee5;
}

@media (max-width: 580px) {
  .rs-product-card-meta {
    gap: 10px;
    margin-top: 10px;
  }

  .rs-product-card-primary-category {
    column-gap: 8px !important;
    row-gap: 6px !important;
  }

  .rs-product-card-primary-title {
    margin-top: 5px;
    font-size: 10px;
  }

  .rs-product-card-primary-values {
    flex-basis: 180px;
    gap: 5px;
  }

  .rs-product-card-premium-metrics {
    gap: 6px;
    max-width: 330px;
  }

  .rs-product-premium-metric {
    min-height: 49px;
    padding: 7px 9px 7px 8px;
    gap: 7px;
    border-radius: 12px;
  }

  .rs-product-premium-metric-icon {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
    border-radius: 9px;
    font-size: 15px;
  }

  .rs-product-premium-metric-content small {
    margin-bottom: 3px;
    font-size: 7.5px;
  }

  .rs-product-premium-metric-content strong {
    font-size: 11px;
  }
}

/* =========================================================
   SON DÜZELTME: MOBİL SIDEBAR 3 SÜTUN + ÜRÜN KARTINDA YATAY GRUP
   Bu blok dosyanın sonunda bulunmalıdır.
   ========================================================= */

/* Ürün kartında ana kategori başlığı ve seçili değerler aynı satırda */
#restaurantModernMenu .rs-product-category-group.rs-product-allergens {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start !important;
  flex-wrap: nowrap !important;
  gap: 10px !important;
  width: 100% !important;
  margin-top: 12px !important;
}

#restaurantModernMenu .rs-product-category-group .rs-category-group-label,
#restaurantModernMenu .rs-product-category-group .rs-allergen-label {
  display: block !important;
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: max-content !important;
  max-width: none !important;
  margin: 5px 0 0 !important;
  line-height: 1.35 !important;
  white-space: nowrap !important;
}

#restaurantModernMenu .rs-product-category-group .rs-category-chip-list,
#restaurantModernMenu .rs-product-category-group .rs-allergen-list {
  display: flex !important;
  flex: 1 1 auto !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 6px !important;
  width: auto !important;
  min-width: 0 !important;
}



/* =========================================================
   BESİN DEĞERLERİ — KATEGORİ GRUPLARIYLA AYNI FORM-GROUP BAŞLIK
   ========================================================= */
#rsProductDrawer .rs-nutrition-card {
  position: relative;
  min-width: 0;
  /*margin-top: 10px;*/
  margin-top: 25px;
  margin-bottom: 25px;
  padding: 30px 18px 18px;
  border: 1px solid var(--rs-line, #dfe4ea);
  border-radius: 18px;
  background: var(--rs-surface, #fff);
  box-shadow: none;
}

#rsProductDrawer .rs-nutrition-card > h3 {
  position: absolute;
  top: 0;
  left: 18px;
  z-index: 1;
  width: auto;
  max-width: calc(100% - 36px);
  margin: 0;
  padding: 10px;
  border: 1px solid var(--rs-line, #dfe4ea);
  border-radius: 10px;
  background: #fffefe;
  color: var(--rs-text, #202020);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: .025em;
  text-transform: uppercase;
  transform: translateY(-50%);
}

html[data-theme="dark"] #rsProductDrawer .rs-nutrition-card {
  background: var(--rs-surface, #17191d);
}

html[data-theme="dark"] #rsProductDrawer .rs-nutrition-card > h3 {
  background: #000;
  color: #f4f4f2;
}

@media (max-width: 600px) {
  #rsProductDrawer .rs-nutrition-card {
    padding: 27px 14px 15px;
    border-radius: 16px;
  }

  #rsProductDrawer .rs-nutrition-card > h3 {
    left: 13px;
    max-width: calc(100% - 26px);
    padding-inline: 8px;
    font-size: 12px;
  }
}
