/* rmg-style.css
   Modern & Responsive styles for RMG plugin
   Version: 2.9.4
*/

/* Reset and base styles */
* {
  box-sizing: border-box;
}

/* --------------------
 Root vars (overridden inline from PHP)
 -------------------- */
:root {
  --rmg-primary: #27ae60;
  --rmg-header: #27ae60;
  --rmg-bg: #f8f9fa;
  --rmg-text: #222;
  --rmg-card-bg: #fff;
  --rmg-card-shadow: rgba(0, 0, 0, 0.08);
  --rmg-radius: 12px;
  --rmg-gap: 20px;
  --rmg-input-bg: #f3f3f3;
  --rmg-primary-rgb: 39, 174, 96;
  --rmg-label-color: #27ae60;
  --rmg-label-bg-color: #27ae60;
  --rmg-label-text-color: #ffffff;
  --rmg-label-color-rgb: 39, 174, 96;
  --rmg-label-bg-color-rgb: 39, 174, 96;
  --rmg-logo-size: 200px;
  --rmg-header-height: 120px;
  --rmg-category-image-size: 60px;
  --rmg-category-font: 'Roboto', sans-serif;
  --rmg-price-font: 'Roboto', sans-serif;
  --rmg-product-name-font: 'Roboto', sans-serif;
  --rmg-product-description-font: 'Roboto', sans-serif;
  --rmg-header-font: 'Roboto', sans-serif;
  --logo-align: center;
}

/* Wrapper theme classes */
.rmg-menu-wrapper.rmg-light {
  --rmg-bg: #f8f9fa;
  --rmg-text: #222;
  --rmg-card-bg: #fff;
  --rmg-card-shadow: rgba(0, 0, 0, 0.08);
  --rmg-input-bg: #f3f3f3;
}

.rmg-menu-wrapper.rmg-dark {
  --rmg-bg: #121314;
  --rmg-text: #e8e8e8;
  --rmg-card-bg: #1e2124;
  --rmg-card-shadow: rgba(0, 0, 0, 0.6);
  --rmg-input-bg: #2d3035;
}

/* Kategori görsel boyutu sınıfları */
.rmg-category-image-small .rmg-cat-image {
  width: 40px !important;
  height: 40px !important;
}

.rmg-category-image-medium .rmg-cat-image {
  width: 60px !important;
  height: 60px !important;
}

.rmg-category-image-large .rmg-cat-image {
  width: 80px !important;
  height: 80px !important;
}

.rmg-category-image-xlarge .rmg-cat-image {
  width: 100px !important;
  height: 100px !important;
}

.rmg-category-image-xxlarge .rmg-cat-image {
  width: 120px !important;
  height: 120px !important;
}

.rmg-category-image-xxxlarge .rmg-cat-image {
  width: 150px !important;
  height: 150px !important;
}

/* KESİN ÇÖZÜM: Sadece bir kategori butonu aktif olabilir */
.rmg-cat-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 100px;
  padding: 12px 10px;
  background: var(--rmg-input-bg);
  border-radius: var(--rmg-radius);
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  cursor: pointer;
  color: var(--rmg-text);
  text-align: center;
  flex-shrink: 0;
  max-width: 110px;
  font-family: var(--rmg-category-font);
  /* KESİN ÇÖZÜM: Kullanıcı etkileşimi kontrolü */
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  /* KESİN ÇÖZÜM: Pozisyon göreceli */
  position: relative;
  z-index: 1;
}

/* KESİN ÇÖZÜM: Aktif buton stili - sadece bir tane olacak */
.rmg-cat-btn.active {
  background: var(--rmg-primary);
  color: #fff !important;
  border-color: var(--rmg-primary);
  box-shadow: 0 6px 12px rgba(var(--rmg-primary-rgb), 0.4);
  z-index: 2;
}

.rmg-cat-btn.active i {
  color: #fff !important;
}

.rmg-cat-btn.active .rmg-cat-image {
  border-color: #fff !important;
  transform: scale(1.05);
}

/* KESİN ÇÖZÜM: Pasif butonlar için kesin stil */
.rmg-cat-btn:not(.active) {
  background: var(--rmg-input-bg) !important;
  color: var(--rmg-text) !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

.rmg-menu-wrapper.rmg-dark .rmg-cat-btn:not(.active) {
  background: rgba(255, 255, 255, 0.08) !important;
  color: var(--rmg-text) !important;
}

/* KESİN ÇÖZÜM: CSS ile garanti - aktiften sonra gelen aktif butonları pasif yap */
.rmg-cat-btn.active~.rmg-cat-btn.active {
  background: var(--rmg-input-bg) !important;
  color: var(--rmg-text) !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

.rmg-menu-wrapper.rmg-dark .rmg-cat-btn.active~.rmg-cat-btn.active {
  background: rgba(255, 255, 255, 0.08) !important;
  color: var(--rmg-text) !important;
}

/* KESİN ÇÖZÜM: Hover durumu sadece pasif butonlar için */
.rmg-cat-btn:not(.active):hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.rmg-cat-btn.active:hover {
  transform: none;
  box-shadow: 0 6px 12px rgba(var(--rmg-primary-rgb), 0.4);
}

/* GERİ BUTONU - SADECE OK İŞARETİ */
.rmg-back-button {
  position: relative;
  top: auto;
  left: auto;
  margin: 10px 0 10px 0;
  z-index: 1001;
  width: 44px;
  height: 44px;
  background-color: var(--rmg-primary);
  color: white;
  border: none;
  border-radius: 50%;
  display: none;
  /* Varsayılan olarak gizli */
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease, background-color 0.2s ease;
}



.rmg-back-button:active {
  transform: translateY(0);
}

/* Body & container */
.rmg-menu-wrapper {
  display: block;
  background: var(--rmg-bg);
  color: var(--rmg-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  width: 100%;
  font-family: var(--rmg-product-description-font);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

.rmg-menu-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 15px;
  box-sizing: border-box;
  position: relative;
  width: 100%;
  overflow-x: hidden;
  flex: 1;
}

/* Language Switcher - FIXED for mobile */
.rmg-language-switcher {
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 1002;
  width: auto;
}

.rmg-current-language {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.15);
  padding: 8px 12px;
  border-radius: var(--rmg-radius);
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  color: #fff;
  transition: all 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
  min-width: 70px;
  justify-content: center;
  font-family: var(--rmg-header-font);
}

.rmg-current-language:hover {
  background: rgba(255, 255, 255, 0.25);
}

.rmg-current-language i.fa-chevron-down {
  font-size: 12px;
  transition: transform 0.2s ease;
  margin-left: 5px;
}

.rmg-language-switcher.open .rmg-current-language i.fa-chevron-down {
  transform: rotate(180deg);
}

.rmg-language-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 5px;
  background: var(--rmg-card-bg);
  border-radius: var(--rmg-radius);
  box-shadow: 0 6px 18px var(--rmg-card-shadow);
  min-width: 70px;
  display: none;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.1);
  z-index: 1003;
}

.rmg-menu-wrapper.rmg-dark .rmg-language-dropdown {
  border-color: rgba(255, 255, 255, 0.1);
}

.rmg-language-switcher.open .rmg-language-dropdown {
  display: block;
}

.rmg-language-dropdown a {
  display: block;
  padding: 12px 15px;
  text-decoration: none;
  color: var(--rmg-text);
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s ease;
  text-align: center;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  width: 100%;
  font-family: var(--rmg-header-font);
}

.rmg-menu-wrapper.rmg-dark .rmg-language-dropdown a {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.rmg-language-dropdown a:last-child {
  border-bottom: none;
}

.rmg-language-dropdown a:hover {
  background: rgba(var(--rmg-primary-rgb), 0.1);
}

.rmg-language-dropdown a.active {
  background: var(--rmg-primary);
  color: white;
}

/* Business header - FIXED for logo positioning */
.rmg-business-header {
  text-align: center;
  background: var(--rmg-header);
  color: #fff;
  padding: 20px 15px;
  border-radius: var(--rmg-radius);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  margin-bottom: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
  min-height: var(--rmg-header-height);
  width: 100%;
  overflow: hidden;
  position: relative;
  font-family: var(--rmg-header-font);
  margin-top: 10px;
}

/* Logo left positioning */
.rmg-logo-left .rmg-business-header {
  align-items: flex-start;
  text-align: left;
}

.rmg-logo-left .rmg-business-header h1 {
  margin-left: 0;
  text-align: left;
  width: 100%;
}

/* Logo center positioning */
.rmg-logo-center .rmg-business-header {
  align-items: center;
  text-align: center;
}

.rmg-logo-center .rmg-business-header h1 {
  margin-left: 0;
  text-align: center;
  width: 100%;
}

/* Logo right positioning */
.rmg-logo-right .rmg-business-header {
  align-items: flex-end;
  text-align: right;
}

.rmg-logo-right .rmg-business-header h1 {
  margin-left: 0;
  text-align: right;
  width: 100%;
}

/* Logo container adjustments for different positions */
.rmg-logo-left .rmg-logo-container {
  align-self: flex-start;
  margin-right: auto;
}

.rmg-logo-center .rmg-logo-container {
  align-self: center;
  margin: 0 auto;
}

.rmg-logo-right .rmg-logo-container {
  align-self: flex-end;
  margin-left: auto;
}

/* Logo only mode - make logo fill available space */
.rmg-logo-only .rmg-business-header {
  justify-content: center;
}

.rmg-logo-only .rmg-business-header .rmg-logo-container {
  width: 100%;
  display: flex;
  justify-content: var(--logo-align, center);
}

/* Both logo and text mode */
.rmg-logo-both .rmg-business-header {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

/* Logo left with text */
.rmg-logo-left.rmg-logo-both .rmg-business-header {
  flex-direction: row;
  justify-content: flex-start;
  text-align: left;
}

.rmg-logo-left.rmg-logo-both .rmg-logo-container {
  margin-right: 20px;
  flex-shrink: 0;
}

.rmg-logo-left.rmg-logo-both .rmg-business-header h1 {
  flex: 1;
  text-align: left;
  margin: 0;
}

/* Logo center with text */
.rmg-logo-center.rmg-logo-both .rmg-business-header {
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.rmg-logo-center.rmg-logo-both .rmg-business-header h1 {
  margin-top: 15px;
  text-align: center;
}

/* Logo right with text */
.rmg-logo-right.rmg-logo-both .rmg-business-header {
  flex-direction: row-reverse;
  justify-content: flex-end;
  text-align: right;
}

.rmg-logo-right.rmg-logo-both .rmg-logo-container {
  margin-left: 20px;
  flex-shrink: 0;
}

.rmg-logo-right.rmg-logo-both .rmg-business-header h1 {
  flex: 1;
  text-align: right;
  margin: 0;
}

.rmg-business-header h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: white;
  line-height: 1.2;
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  font-family: var(--rmg-header-font);
}

.rmg-logo {
  max-width: var(--rmg-logo-size);
  max-height: var(--rmg-logo-size);
  object-fit: contain;
  width: auto;
  height: auto;
}

.rmg-logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Sticky Categories Container - FIXED for mobile */
.rmg-sticky-categories-container {
  position: sticky;
  top: 0;
  z-index: 1001;
  background: var(--rmg-bg);
  padding: 10px 0;
  margin: 0 -15px 15px -15px;
  padding-left: 15px;
  padding-right: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  width: calc(100% + 30px);
  transition: all 0.3s ease;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

/* When scrolled, add more shadow */
.rmg-sticky-categories-container.sticky-active {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.rmg-sticky-categories {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 5px 0;
  -webkit-overflow-scrolling: touch;
  position: relative;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.rmg-sticky-categories::-webkit-scrollbar {
  display: none;
}

/* Category Image */
.rmg-cat-image {
  width: var(--rmg-category-image-size);
  height: var(--rmg-category-image-size);
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 8px;
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.rmg-cat-btn i {
  font-size: 24px;
  margin-bottom: 8px;
  color: var(--rmg-text);
}

/* Search bar */
.rmg-search-bar {
  display: flex;
  align-items: center;
  background: var(--rmg-input-bg);
  border-radius: var(--rmg-radius);
  padding: 12px 15px;
  margin-bottom: 15px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  width: 100%;
  font-family: var(--rmg-product-description-font);
}

.rmg-menu-wrapper.rmg-dark .rmg-search-bar {
  border-color: rgba(255, 255, 255, 0.1);
}

.rmg-search-bar input {
  flex-grow: 1;
  border: none;
  background: transparent;
  padding: 0 0 0 10px;
  font-size: 16px;
  color: var(--rmg-text);
  width: 100%;
  min-width: 0;
  font-family: var(--rmg-product-description-font);
}

.rmg-search-bar input:focus {
  outline: none;
}

.rmg-search-bar .fas {
  color: rgba(0, 0, 0, 0.5);
}

/* Kategori Odaklı Menü Stilleri */
.rmg-category-focused-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  justify-content: center;
}

@media (max-width: 1024px) {
  .rmg-category-focused-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
  }
}

@media (max-width: 600px) {
  .rmg-category-focused-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
  }
}

.rmg-category-card {
  background: var(--rmg-card-bg);
  border-radius: var(--rmg-radius);
  overflow: hidden;
  box-shadow: 0 6px 18px var(--rmg-card-shadow);
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
  display: flex;
  flex-direction: column;
  width: 100%;
  cursor: pointer;
  border: 2px solid transparent;
  position: relative;
}

.rmg-category-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 24px var(--rmg-card-shadow);
  border-color: var(--rmg-primary);
}

.rmg-category-card.active {
  border-color: var(--rmg-primary);
  box-shadow: 0 8px 20px rgba(var(--rmg-primary-rgb), 0.3);
}

.rmg-category-card-image {
  width: 100%;
  height: 180px;
  overflow: hidden;
  position: relative;
}

.rmg-category-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .36s ease;
}

.rmg-category-card:hover .rmg-category-card-image img {
  transform: scale(1.05);
}

.rmg-category-card-content {
  padding: 20px;
  text-align: center;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.rmg-category-card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--rmg-text);
  margin: 0 0 10px 0;
  font-family: var(--rmg-category-font);
}

.rmg-category-card-count {
  font-size: 14px;
  color: var(--rmg-primary);
  font-weight: 600;
  background: rgba(var(--rmg-primary-rgb), 0.1);
  padding: 4px 12px;
  border-radius: 20px;
  display: inline-block;
  font-family: var(--rmg-price-font);
}

/* Kategori içi ürün grid */
.rmg-category-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--rmg-gap);
  margin-top: 20px;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Kategori odaklı arama çubuğu */
.rmg-search-bar.rmg-category-focused-search {
  margin: 20px auto;
  max-width: 600px;
}

/* Kategori odaklı modda buton görünür olmalı */
/* Kategori odaklı modda buton JS ile kontrol ediliyor - forced display kaldırıldı */

/* Products grid */
.rmg-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--rmg-gap);
  margin-top: 15px;
  padding: 0;
  box-sizing: border-box;
  width: 100%;
  overflow-x: hidden;
  margin-bottom: 30px;
}

.rmg-category-title {
  grid-column: 1 / -1;
  margin: 25px 0 10px 0;
  padding-bottom: 5px;
  border-bottom: 2px solid var(--rmg-primary);
  font-size: 1.4em;
  font-weight: 700;
  color: var(--rmg-text);
  width: 100%;
  word-wrap: break-word;
  font-family: var(--rmg-category-font);
}

/* Product card */
.rmg-product-card {
  background: var(--rmg-card-bg);
  border-radius: var(--rmg-radius);
  overflow: hidden;
  box-shadow: 0 6px 18px var(--rmg-card-shadow);
  transition: transform .28s ease, box-shadow .28s ease, opacity .42s ease, max-height .42s ease;
  display: flex;
  flex-direction: column;
  opacity: 1;
  width: 100%;
  max-width: 100%;
}

.rmg-product-card.hidden-filter {
  display: none !important;
  opacity: 0;
  max-height: 0;
  margin: 0 !important;
  padding: 0 !important;
  transition: opacity .3s ease, margin .3s ease, padding .3s ease;
}

.rmg-product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 24px var(--rmg-card-shadow);
}

/* Mobile Layout */
.rmg-product-mobile-layout {
  display: flex;
  flex-direction: column;
  width: 100%;
}

/* Product image area */
.rmg-product-img-wrapper {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.01));
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

/* Default image wrapper size */
.rmg-product-img-wrapper {
  height: 200px;
}

/* The image element */
.rmg-product-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
  transition: transform .36s ease;
  will-change: transform;
}

/* Hover zoom */
.rmg-product-card:hover .rmg-product-img {
  transform: scale(1.05);
}

/* Content */
.rmg-product-content {
  padding: 15px;
  box-sizing: border-box;
  flex-grow: 1;
  width: 100%;
  overflow: hidden;
}

.rmg-product-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  width: 100%;
}

.rmg-product-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--rmg-text);
  flex: 1;
  min-width: 0;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
  line-height: 1.3;
  font-family: var(--rmg-product-name-font);
}

.rmg-new-label {
  background: var(--rmg-label-bg-color);
  color: var(--rmg-label-text-color);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-block;
  line-height: 1.2;
  white-space: nowrap;
  flex-shrink: 0;
  border: 1px solid var(--rmg-label-color);
  box-shadow: 0 2px 4px rgba(var(--rmg-label-bg-color-rgb), 0.3);
  font-family: var(--rmg-product-name-font);
}

.rmg-price {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--rmg-primary);
  white-space: nowrap;
  text-align: right;
  flex-shrink: 0;
  font-family: var(--rmg-price-font);
}

.rmg-ingredients {
  margin: 0 0 10px 0;
  font-size: 14px;
  color: rgba(0, 0, 0, 0.6);
  line-height: 1.4;
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
  font-family: var(--rmg-product-description-font);
}

/* Extras Styles */
.rmg-extras-container {
  margin-top: 10px;
  width: 100%;
}

.rmg-extras-toggle {
  background: rgba(var(--rmg-primary-rgb), 0.1);
  border: 1px solid var(--rmg-primary);
  color: var(--rmg-primary);
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  transition: all 0.2s ease;
  min-height: 44px;
  font-family: var(--rmg-product-description-font);
}

.rmg-extras-toggle:hover {
  background: rgba(var(--rmg-primary-rgb), 0.2);
}

.rmg-extras-toggle.active {
  background: var(--rmg-primary);
  color: white;
}

.rmg-extras-toggle.active i {
  transform: rotate(180deg);
}

.rmg-extras-toggle i {
  transition: transform 0.3s ease;
  flex-shrink: 0;
  margin-left: 5px;
}

.rmg-extras-list {
  margin-top: 10px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  display: none;
  max-height: 300px;
  overflow-y: auto;
  width: 100%;
  font-family: var(--rmg-product-description-font);
}

.rmg-menu-wrapper.rmg-dark .rmg-extras-list {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.rmg-extra-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  width: 100%;
  min-height: 36px;
}

.rmg-menu-wrapper.rmg-dark .rmg-extra-item {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.rmg-extra-item:last-child {
  border-bottom: none;
}

.rmg-extra-name {
  font-size: 14px;
  color: var(--rmg-text);
  flex: 1;
  min-width: 0;
  word-wrap: break-word;
  padding-right: 10px;
  font-family: var(--rmg-product-description-font);
}

.rmg-extra-price {
  font-size: 14px;
  font-weight: 600;
  color: var(--rmg-primary);
  white-space: nowrap;
  flex-shrink: 0;
  font-family: var(--rmg-price-font);
}

/* Dark mode overrides */
.rmg-menu-wrapper.rmg-dark .rmg-ingredients {
  color: rgba(255, 255, 255, 0.80);
}

.rmg-menu-wrapper.rmg-dark .rmg-product-title {
  color: var(--rmg-text);
}

/* Footer Styles */
.rmg-footer {
  background: var(--rmg-card-bg);
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  padding: 20px 15px;
  margin-top: 30px;
  text-align: center;
  color: var(--rmg-text);
  font-family: var(--rmg-product-description-font);
  width: 100%;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.rmg-menu-wrapper.rmg-dark .rmg-footer {
  border-top-color: rgba(255, 255, 255, 0.1);
  background: var(--rmg-card-bg);
}

.rmg-footer p {
  margin: 0;
  font-size: 14px;
  color: var(--rmg-text);
}

.rmg-footer a {
  color: var(--rmg-primary);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
}

.rmg-footer a:hover {
  color: var(--rmg-primary);
  text-decoration: underline;
}

/* SOSYAL MEDYA İKONLARI - BASİT STİL (ÖRNEK SİTE GİBİ) */
.rmg-social-icons {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
  justify-content: center !important;
  margin: 20px 0 !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.rmg-social-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 40px !important;
  height: 40px !important;
  border-radius: 50% !important;
  color: white !important;
  font-size: 18px !important;
  text-decoration: none !important;
  transition: all 0.3s ease !important;
  opacity: 1 !important;
  visibility: visible !important;
  border: none !important;
}

.rmg-social-icon i {
  opacity: 1 !important;
  visibility: visible !important;
}

/* Platforma özel renkler */
.rmg-social-icon[data-platform="instagram"] {
  background: #E4405F !important;
}

.rmg-social-icon[data-platform="whatsapp"] {
  background: #25D366 !important;
}

.rmg-social-icon[data-platform="facebook"] {
  background: #1877F2 !important;
}

.rmg-social-icon[data-platform="twitter"] {
  background: #1DA1F2 !important;
}

.rmg-social-icon[data-platform="tiktok"] {
  background: #000000 !important;
}

.rmg-social-icon[data-platform="youtube"] {
  background: #FF0000 !important;
}

.rmg-social-icon[data-platform="linkedin"] {
  background: #0A66C2 !important;
}

/* İLETİŞİM BİLGİLERİ - HER ZAMAN GÖRÜNSÜN */
.rmg-contact-section {
  margin: 20px 0 !important;
  padding: 20px !important;
  background: var(--rmg-card-bg) !important;
  border-radius: var(--rmg-radius) !important;
  box-shadow: 0 4px 12px var(--rmg-card-shadow) !important;
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
  animation: none !important;
  position: relative !important;
  z-index: 10 !important;
  max-height: none !important;
  overflow: visible !important;
}

/* Contact footer section */
.rmg-contact-footer {
  margin: 30px 0 !important;
  width: 100% !important;
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
  position: relative !important;
  z-index: 10 !important;
}

/* Kategori odaklı modda da görünsün */
.rmg-category-focused-mode .rmg-contact-section,
.rmg-category-focused-mode .rmg-contact-footer {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* JavaScript tarafında gizleme/kaydırma efektlerini önlemek için */
.rmg-contact-section,
.rmg-contact-footer {
  animation-duration: 0s !important;
  transition: none !important;
  transform: none !important;
}

/* Tema değişikliklerinde de görünür kalmalı */
.rmg-menu-wrapper.rmg-light .rmg-contact-section,
.rmg-menu-wrapper.rmg-light .rmg-contact-footer,
.rmg-menu-wrapper.rmg-dark .rmg-contact-section,
.rmg-menu-wrapper.rmg-dark .rmg-contact-footer {
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
}

/* Kategori değişikliklerinde de görünür kalmalı */
.rmg-category-cards-container~.rmg-contact-footer,
.rmg-category-products-container~.rmg-contact-footer {
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
}

/* Admin/basic styles */
.rmg-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.rmg-field.full {
  grid-column: 1 / -1;
}

.rmg-image-preview {
  border-radius: 8px;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: rgba(0, 0, 0, 0.02);
}

.rmg-modern-btn {
  border-radius: 8px;
  padding: 8px 12px;
}

/* Tables (admin) */
.rmg-modern-table {
  width: 100%;
  border-collapse: collapse;
  overflow-x: auto;
  display: block;
}

.rmg-modern-table th,
.rmg-modern-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #eee;
  text-align: left;
  white-space: nowrap;
}

/* Admin form field styles */
.rmg-field label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
}

.rmg-field .required {
  color: #d63638;
}

.rmg-field input[type="text"],
.rmg-field input[type="number"],
.rmg-field textarea,
.rmg-field select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-sizing: border-box;
}

/* License warning */
.rmg-license-warning {
  background: #f8d7da;
  color: #721c24;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  text-align: center;
  border: 1px solid #f5c6cb;
}

.rmg-license-warning i {
  margin-right: 8px;
}

/* Small-screen adjustments */
@media (max-width: 768px) {
  .rmg-menu-container {
    padding: 10px;
    width: 100%;
    overflow-x: hidden;
  }

  /* FIX: Language switcher for mobile - moved to fixed position */
  .rmg-language-switcher {
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 1004;
  }

  /* GERİ BUTONU MOBİL */
  .rmg-back-button {
    top: 15px;
    left: 15px;
    width: 36px;
    height: 36px;
    font-size: 16px;
  }

  .rmg-sticky-categories-container {
    margin: 0 -10px 10px -10px;
    padding-left: 10px;
    padding-right: 10px;
    width: calc(100% + 20px);
    position: sticky;
    top: 0;
    z-index: 1001;
    background: var(--rmg-bg);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
  }

  .rmg-business-header {
    flex-direction: column;
    text-align: center;
    gap: 12px;
    padding: 15px 10px;
    min-height: calc(var(--rmg-header-height) * 0.8);
    margin-top: 10px;
    margin-bottom: 10px;
  }

  .rmg-business-header h1 {
    font-size: 20px;
    line-height: 1.2;
    margin-top: 5px;
  }

  .rmg-logo {
    max-width: calc(var(--rmg-logo-size) * 0.7);
    max-height: calc(var(--rmg-logo-size) * 0.7);
  }

  .rmg-logo-container {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  /* MOBİL LOGO HİZALAMA DÜZELTMESİ - FIXED */
  /* Logo left positioning for mobile */
  .rmg-logo-left .rmg-business-header .rmg-logo-container {
    justify-content: flex-start !important;
  }

  .rmg-logo-left.rmg-logo-both .rmg-business-header .rmg-logo-container {
    justify-content: flex-start !important;
  }

  .rmg-logo-left.rmg-logo-both .rmg-business-header h1 {
    text-align: left !important;
  }

  /* Logo center positioning for mobile */
  .rmg-logo-center .rmg-business-header .rmg-logo-container {
    justify-content: center !important;
  }

  .rmg-logo-center.rmg-logo-both .rmg-business-header .rmg-logo-container {
    justify-content: center !important;
  }

  .rmg-logo-center.rmg-logo-both .rmg-business-header h1 {
    text-align: center !important;
  }

  /* Logo right positioning for mobile */
  .rmg-logo-right .rmg-business-header .rmg-logo-container {
    justify-content: flex-end !important;
  }

  .rmg-logo-right.rmg-logo-both .rmg-business-header .rmg-logo-container {
    justify-content: flex-end !important;
  }

  .rmg-logo-right.rmg-logo-both .rmg-business-header h1 {
    text-align: right !important;
  }

  /* Logo only mode mobile - use CSS variable */
  .rmg-logo-only .rmg-business-header .rmg-logo-container {
    justify-content: var(--logo-align, center) !important;
  }

  .rmg-products-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    width: 100%;
  }

  /* Kategori Odaklı Menü Mobil */
  .rmg-category-card {
    width: calc(50% - 10px);
  }

  .rmg-category-card-image {
    height: 140px;
  }

  .rmg-category-card-content {
    padding: 15px;
  }

  .rmg-category-card-title {
    font-size: 16px;
  }

  .rmg-category-focused-header h2 {
    font-size: 20px;
  }

  /* Mobile Layout */
  .rmg-product-mobile-layout {
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
  }

  .rmg-product-img-wrapper {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
  }

  .rmg-product-img {
    max-height: 100px;
    object-fit: contain;
  }

  .rmg-product-content {
    padding: 8px 8px 8px 0;
    flex: 1;
    min-width: 0;
    overflow: hidden;
  }

  .rmg-product-title {
    font-size: 15px;
    line-height: 1.2;
  }

  .rmg-price {
    font-size: 16px;
  }

  .rmg-new-label {
    font-size: 10px;
    padding: 3px 8px;
  }

  .rmg-cat-btn {
    min-width: 85px;
    padding: 8px 6px;
    font-size: 12px;
    max-width: 90px;
  }

  .rmg-cat-image {
    width: calc(var(--rmg-category-image-size) * 0.8);
    height: calc(var(--rmg-category-image-size) * 0.8);
  }

  .rmg-cat-btn i {
    font-size: 20px;
  }

  .rmg-ingredients {
    font-size: 13px;
    line-height: 1.3;
  }

  .rmg-extras-toggle {
    padding: 8px 10px;
    font-size: 13px;
    min-height: 40px;
  }

  .rmg-extras-list {
    max-height: 250px;
  }

  .rmg-extra-item {
    padding: 6px 0;
    min-height: 32px;
  }

  .rmg-extra-name {
    font-size: 13px;
  }

  .rmg-extra-price {
    font-size: 13px;
  }

  .rmg-category-title {
    font-size: 1.2em;
    margin: 20px 0 8px 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .rmg-current-language {
    padding: 6px 10px;
    font-size: 13px;
    min-width: 60px;
  }

  .rmg-language-dropdown {
    position: fixed;
    top: 60px;
    right: 15px;
    z-index: 1005;
    min-width: 70px;
  }

  .rmg-footer {
    padding: 15px 10px;
    font-size: 13px;
  }

  /* SOSYAL MEDYA ve İLETİŞİM - MOBİL */
  .rmg-social-icons {
    gap: 10px !important;
    margin: 15px 0 !important;
  }

  .rmg-social-icon {
    width: 36px !important;
    height: 36px !important;
    font-size: 16px !important;
  }

  .rmg-contact-section {
    margin: 15px 0 !important;
    padding: 15px !important;
  }

  /* Kategori görsel boyutu responsive */
  .rmg-category-image-small .rmg-cat-image {
    width: 35px !important;
    height: 35px !important;
  }

  .rmg-category-image-medium .rmg-cat-image {
    width: 50px !important;
    height: 50px !important;
  }

  .rmg-category-image-large .rmg-cat-image {
    width: 65px !important;
    height: 65px !important;
  }

  .rmg-category-image-xlarge .rmg-cat-image {
    width: 80px !important;
    height: 80px !important;
  }

  .rmg-category-image-xxlarge .rmg-cat-image {
    width: 95px !important;
    height: 95px !important;
  }

  .rmg-category-image-xxxlarge .rmg-cat-image {
    width: 120px !important;
    height: 120px !important;
  }
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
  .rmg-products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .rmg-cat-btn {
    min-width: 95px;
  }

  .rmg-cat-image {
    width: calc(var(--rmg-category-image-size) * 0.9);
    height: calc(var(--rmg-category-image-size) * 0.9);
  }

  .rmg-menu-container {
    padding: 15px;
    max-width: 95%;
  }

  /* Kategori Odaklı Menü Tablet */
  .rmg-category-card {
    width: calc(33.333% - 15px);
  }

  /* Kategori görsel boyutu tablet */
  .rmg-category-image-small .rmg-cat-image {
    width: 35px !important;
    height: 35px !important;
  }

  .rmg-category-image-medium .rmg-cat-image {
    width: 55px !important;
    height: 55px !important;
  }

  .rmg-category-image-large .rmg-cat-image {
    width: 70px !important;
    height: 70px !important;
  }

  .rmg-category-image-xlarge .rmg-cat-image {
    width: 85px !important;
    height: 85px !important;
  }

  .rmg-category-image-xxlarge .rmg-cat-image {
    width: 100px !important;
    height: 100px !important;
  }

  .rmg-category-image-xxxlarge .rmg-cat-image {
    width: 130px !important;
    height: 130px !important;
  }
}

/* Very small screens */
@media (max-width: 480px) {
  .rmg-product-img-wrapper {
    width: 90px;
    height: 90px;
  }

  .rmg-product-img {
    max-height: 90px;
  }

  .rmg-cat-btn {
    min-width: 80px;
    padding: 6px 5px;
    font-size: 11px;
    max-width: 85px;
  }

  .rmg-cat-image {
    width: calc(var(--rmg-category-image-size) * 0.7);
    height: calc(var(--rmg-category-image-size) * 0.7);
  }

  .rmg-cat-btn i {
    font-size: 18px;
  }

  .rmg-business-header h1 {
    font-size: 18px;
  }

  .rmg-language-switcher {
    top: 10px;
    right: 10px;
  }

  .rmg-current-language {
    padding: 6px 8px;
    font-size: 12px;
    min-width: 55px;
  }

  .rmg-language-dropdown {
    min-width: 55px;
    top: 50px;
    right: 10px;
  }

  .rmg-language-dropdown a {
    padding: 8px;
    font-size: 12px;
  }

  .rmg-footer {
    padding: 12px 10px;
    font-size: 12px;
  }

  /* Kategori Odaklı Menü Çok Küçük Ekran */
  .rmg-category-card {
    width: 100%;
  }

  .rmg-category-card-image {
    height: 160px;
  }

  /* SOSYAL MEDYA ve İLETİŞİM - ÇOK KÜÇÜK EKRAN */
  .rmg-social-icons {
    gap: 8px !important;
    margin: 12px 0 !important;
  }

  .rmg-social-icon {
    width: 32px !important;
    height: 32px !important;
    font-size: 14px !important;
  }

  .rmg-contact-section {
    margin: 12px 0 !important;
    padding: 12px !important;
  }

  /* Kategori görsel boyutu very small */
  .rmg-category-image-small .rmg-cat-image {
    width: 30px !important;
    height: 30px !important;
  }

  .rmg-category-image-medium .rmg-cat-image {
    width: 45px !important;
    height: 45px !important;
  }

  .rmg-category-image-large .rmg-cat-image {
    width: 55px !important;
    height: 55px !important;
  }

  .rmg-category-image-xlarge .rmg-cat-image {
    width: 65px !important;
    height: 65px !important;
  }

  .rmg-category-image-xxlarge .rmg-cat-image {
    width: 80px !important;
    height: 80px !important;
  }

  .rmg-category-image-xxxlarge .rmg-cat-image {
    width: 100px !important;
    height: 100px !important;
  }
}

/* Fix for overflow issues */
.rmg-menu-wrapper * {
  max-width: 100%;
}

/* Ensure price stays visible & primary in dark mode */
.rmg-menu-wrapper.rmg-dark .rmg-price {
  color: var(--rmg-primary);
}

/* Accessibility: focus states */
.rmg-cat-btn:focus,
.rmg-cat-btn:active {
  outline: 2px solid rgba(0, 0, 0, 0.08);
  outline-offset: 2px;
}

.rmg-back-button:focus {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}

/* Edge cases: no image fallback styling */
.rmg-product-img-wrapper:empty {
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(0, 0, 0, 0.2);
  background: rgba(0, 0, 0, 0.01);
}

.rmg-menu-wrapper.rmg-dark .rmg-product-img-wrapper:empty {
  color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.02);
}

/* Minor helpers */
.rmg-hidden {
  display: none !important;
}

/* Admin specific styles */
.rmg-modern-admin .notice {
  margin: 20px 0;
}

/* Responsive admin tables */
@media (max-width: 782px) {
  .rmg-modern-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

/* Font select preview in admin */
.rmg-font-select {
  font-family: inherit !important;
}

/* License form styles */
.rmg-license-form {
  max-width: 800px;
  margin: 0 auto;
}

.rmg-license-status {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 5px;
  padding: 20px;
  margin-bottom: 30px;
}

.rmg-license-restrictions {
  background: #e9ecef;
  border-radius: 5px;
  padding: 20px;
  margin-top: 30px;
}

.rmg-license-restrictions ul {
  list-style-type: none;
  padding-left: 0;
}

.rmg-license-restrictions li {
  padding: 8px 0;
  border-bottom: 1px solid #dee2e6;
}

.rmg-license-restrictions li:last-child {
  border-bottom: none;
}

.rmg-buttons {
  margin-top: 20px;
}

/* KESİN ÇÖZÜM: Initial state - tüm butonlar başlangıçta pasif */
.rmg-cat-btn {
  background: var(--rmg-input-bg) !important;
  color: var(--rmg-text) !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

/* KESİN ÇÖZÜM: Sadece .active sınıfı olanlar aktif olsun */
.rmg-cat-btn.active {
  background: var(--rmg-primary) !important;
  color: #fff !important;
  border-color: var(--rmg-primary) !important;
  box-shadow: 0 6px 12px rgba(var(--rmg-primary-rgb), 0.4) !important;
}

/* Excel tab styles */
.rmg-excel-tab {
  max-width: 1200px;
  margin: 0 auto;
}

.rmg-excel-section {
  transition: all 0.3s ease;
}

.rmg-excel-section:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.rmg-excel-info {
  border-left: 4px solid #27ae60;
}

/* end of file */
/* Kategori Odaklı Mod için Düzeltmeler */
.rmg-category-focused-mode .rmg-products-grid.rmg-category-focused-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  margin-top: 20px;
}

/* Kategori kartları için mobil uyumluluk */
@media (max-width: 768px) {
  .rmg-category-focused-mode .rmg-products-grid.rmg-category-focused-grid {
    gap: 15px;
  }

  .rmg-category-card {
    width: calc(50% - 10px);
  }
}

@media (max-width: 480px) {
  .rmg-category-card {
    width: calc(50% - 8px) !important;
  }

  .rmg-category-focused-mode .rmg-products-grid.rmg-category-focused-grid {
    gap: 15px 10px;
    justify-content: center;
  }

  .rmg-category-card-content {
    padding: 10px;
  }

  .rmg-category-card-title {
    font-size: 15px;
  }
}

/* SOSYAL MEDYA ve İLETİŞİM BÖLÜMLERİ İÇİN EK GARANTİLER */
.rmg-contact-section *,
.rmg-contact-footer * {
  animation: none !important;
  transition: none !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.rmg-contact-section.show,
.rmg-contact-footer.show {
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
}

/* Tema değişikliklerinde de görünür kalmalı */
.rmg-menu-wrapper.rmg-light .rmg-contact-section,
.rmg-menu-wrapper.rmg-light .rmg-contact-footer,
.rmg-menu-wrapper.rmg-dark .rmg-contact-section,
.rmg-menu-wrapper.rmg-dark .rmg-contact-footer {
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
}

/* end of file */

/* Mobile Category Columns */
@media (max-width: 600px) {
  .rmg-mobile-cols-1 .rmg-category-focused-grid {
    grid-template-columns: 1fr !important;
  }

  .rmg-mobile-cols-2 .rmg-category-focused-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  /* Kategori Görsel Boyutlarını Ayarla */
  .rmg-category-card-image {
    height: 120px !important;
  }

  .rmg-mobile-cols-2 .rmg-category-card-image {
    height: 100px !important;
  }

  /* Kategori İçerik Boyutlarını Ayarla */
  .rmg-mobile-cols-2 .rmg-category-card-title {
    font-size: 14px;
    margin-bottom: 5px;
  }

  .rmg-mobile-cols-2 .rmg-category-card-count {
    font-size: 11px;
  }

  .rmg-mobile-cols-2 .rmg-category-card-content {
    padding: 10px;
  }
}

/* Tablet ve Masaüstü için otomatik sütun desteği */
@media (min-width: 601px) {
  .rmg-category-focused-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
  }
}