:root {
  --brand-color: #ff3b3b;
  --tg-bg: var(--tg-theme-bg-color, #ffffff);
  --tg-text: var(--tg-theme-text-color, #222222);
  --tg-hint: var(--tg-theme-hint-color, #888888);
  --tg-sec-bg: var(--tg-theme-secondary-bg-color, #f4f4f5);
}

body {
  background-color: #f4f4f5 !important;
  color: #222222 !important;
  padding-bottom: 100px;
  overflow-x: hidden;
  font-family: -apple-system, system-ui, sans-serif;
}
.bg-tg {
  background-color: #ffffff !important;
}
.btn-tg {
  background-color: var(--brand-color) !important;
  color: #ffffff !important;
  border: none;
  font-size: 0.8rem !important;
  width: auto !important;
  min-width: 80px;
}
.text-primary {
  color: var(--brand-color) !important;
}

/* 상단 캐러셀 */
#storeCarousel {
  width: 100%;
  height: 210px;
  background-color: #eee;
  overflow: hidden;
}
.carousel-item img {
  width: 100%;
  height: 210px;
  object-fit: cover;
}

/* 바텀 시트 메인 컨테이너 */
.main-content-sheet {
  position: relative;
  background-color: #ffffff !important;
  border-radius: 28px 28px 0 0;
  margin-top: -30px;
  z-index: 10;
  min-height: 60vh;
  box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.05);
}
.sheet-handle {
  width: 40px;
  height: 4px;
  background-color: rgba(0, 0, 0, 0.1);
  border-radius: 2px;
  margin: 12px auto 0 auto;
}

.table-badge {
  background-color: var(--brand-color);
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 0.85rem;
  box-shadow: 0 4px 10px rgba(255, 59, 59, 0.3);
}

.btn-history {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #444;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s;
}

.btn-history:active {
  background: #f8f8f8;
  transform: scale(0.95);
}

.lang-select-wrapper {
  position: relative;
  display: inline-block;
}

.lang-select {
  appearance: none; /* 브라우저 기본 화살표 제거 */
  -webkit-appearance: none;
  background-color: #fff;
  border: 1px solid #eee;
  border-radius: 20px;
  padding: 5px 30px 5px 15px; /* 오른쪽에 화살표 공간 확보 */
  font-size: 0.85rem;
  font-weight: 600;
  color: #333;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* 커스텀 화살표 아이콘 (SVG 사용) */
.lang-select-wrapper::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23999' stroke-width='3'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5' /%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none; /* 클릭 방해 금지 */
}

/* 포커스 시 테두리 색상 변경 */
.lang-select:focus {
  outline: none;
  border-color: #ff3b3b;
}

#desc-text {
  font-size: 0.85rem;
  color: #666;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
#desc-text.expanded {
  display: block;
  -webkit-line-clamp: unset;
}
.view-more-btn {
  background: none;
  border: none;
  color: var(--brand-color);
  font-size: 0.75rem;
  font-weight: 700;
  margin-top: 5px;
}

.section-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: #999;
  font-size: 0.75rem;
  font-weight: 600;
  margin: 30px 0 15px 0;
  text-transform: uppercase;
}
.section-divider::before,
.section-divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.section-divider:not(:empty)::before {
  margin-right: 1.5rem;
}
.section-divider:not(:empty)::after {
  margin-left: 1.5rem;
}

/* 🔥 가로 스크롤 메뉴판 스타일 */
.image-menu-container {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0 15px 10px 15px;
  gap: 12px;
}
.image-menu-container::-webkit-scrollbar {
  display: none;
}
.image-menu-item {
  flex: 0 0 85%;
  width: 100%;
  scroll-snap-align: start;
  border-radius: 16px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.menu-card {
  border: none;
  border-radius: 20px;
  background-color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  padding: 1.25rem !important;
}

.bf-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f6f8f9 0%, #e5ebee 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(0, 0, 0, 0.1);
  font-weight: 900;
  font-size: 1.2rem;
}
.menu-thumb {
  width: 80px;
  height: 80px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1050;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.03);
}

.btn-tg {
  background-color: #ff3b3b !important; /* 브랜드 컬러 */
  color: white !important;
  border: none;
  transition:
    transform 0.1s ease-in-out,
    box-shadow 0.1s;
}

.btn-tg:active {
  transform: scale(0.97); /* 클릭 시 살짝 눌리는 효과 */
  box-shadow: 0 2px 5px rgba(255, 59, 59, 0.3);
}

/* 가격 정보 폰트 크기 강조 */
#cart-total-main {
  font-size: 1.25rem !important; /* 가격을 더 크게 강조 */
}

#cartModal .modal-dialog {
  margin: 0;
  position: fixed;
  bottom: 0;
  width: 100%;
  max-width: 100%;
}
#cartModal .modal-content {
  border-radius: 28px 28px 0 0;
  border: none;
  padding-bottom: env(safe-area-inset-bottom);
}
.cart-total-label {
  font-size: 0.8rem;
  color: #999;
  font-weight: 700;
  text-transform: uppercase;
}
.cart-total-value {
  font-size: 1.3rem;
  font-weight: 800;
}
.qty-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: white;
  color: var(--brand-color);
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
}

#pagination-loader {
  padding: 20px;
  text-align: center;
  display: none;
}

/* 이미지 모달의 배경을 더 어둡게 */
#imageModal {
  backdrop-filter: blur(5px); /* 배경 흐리게 (선택사항) */
}

/* 크게 보기 모달 안의 이미지 스타일 */
#full-screen-image {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  /* 모바일에서 핀치 줌(확대/축소)이 가능하도록 설정 */
  touch-action: pinch-zoom;
}

/* 클릭 가능한 이미지라는 표시 */
.image-menu-item,
.menu-thumb {
  transition: opacity 0.2s;
}
.image-menu-item:active,
.menu-thumb:active {
  opacity: 0.7; /* 클릭 시 살짝 투명해지는 피드백 */
}
