/* Donkas Lab - Mobile First, No-Scroll Single Page */
@font-face {
  font-family: 'Pornsak';
  src: url('fonts/PORNSA__.woff') format('woff');
  font-weight: normal;
  font-style: normal;
}

:root {
  --theme: #18b067;
  --theme-dark: #149a59;
  --text-dark: #333;
  --text-muted: #666;
  --card-bg: #fff;
  --border-radius: 12px;
  --section-padding: 5px;
  --section-background: rgba(255, 255, 255, 0.1);
  --section-upper-margin: 5px;
  --global-border: 2px solid var(--theme);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  min-height: 100%;
  min-height: 100dvh;
  overflow-y: auto;
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  color: var(--text-dark);
  -webkit-text-size-adjust: 100%;
  background: #f0f0f0;
}

.page-container {
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 428px;
  margin: 0 auto;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 0 10px 10px 10px;
  gap: 4px;
  background: transparent;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

/* 1. Header Section */
.header-section {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 6px;
  flex-shrink: 0;
}

.logo-block {
  grid-row: 1 / -1;
  grid-column: 1;
  background: var(--theme);
  border-radius: 0 0 var(--border-radius) var(--border-radius);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.logo-img {
  height: 100%;
  max-height: 64px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: center;
}

.header-right {
  grid-row: 1 / -1;
  grid-column: 2 / -1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding-top: 10px;
}

.header-cards-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  flex: 1;
  min-width: 0;
  height: 100%;
}

.header-cards-row .card {
  min-width: 0;
}

.card {
  background: var(--card-bg);
  border: var(--global-border);
  border-radius: var(--border-radius);
  padding: 3px 5px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

.card-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--theme);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.icon {
  width: 24px;
  height: 24px;
  color: var(--theme);
}

.icon-calendar {
  color: #5dade2;
}

.contact-card {
  gap: 4px;
  background: var(--section-background);
}

.contact-card .contact-icons {
  margin-top: 6px;
}

.contact-icons {
  display: grid;
  grid-template-columns: auto auto auto;
  grid-template-rows: auto;
  /* gap: 4px 12px; */
  width: fit-content;
  margin: 0 auto;
}

/* Contact Us만 */
.contact-card .contact-icons { gap: 4px 6px; }

/* Delivery만 */
.delivery-card .contact-icons { gap: 4px 10px; }

.contact-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 0.7rem;
  color: var(--text-muted);
  width: fit-content;
  cursor: pointer;
}

.contact-item .icon {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  object-fit: contain;
}

.contact-item .icon-phone {
  transform: translateY(5px);
}

.icon-whatsapp { color: #25d366; }
.icon-email { color: #3498db; }
.icon-instagram { color: #e4405f; }
.icon-waze { color: #33ccff; }

.open-hours-block {
  background: var(--theme);
  border-radius: var(--border-radius);
  padding: 8px 10px;
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.65rem;
  margin-top: var(--section-upper-margin);
  flex-shrink: 0;
}

.open-large {
  font-size: 0.85rem;
  font-weight: 700;
}

.delivery-card {
  flex: 0.8;
  gap: 4px;
  background: var(--section-background);
}

.delivery-card .contact-icons {
  margin-top: 6px;
  grid-template-columns: auto auto;
  justify-content: center;
}

/* 3. Menu Section */
.menu-section {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: var(--section-padding);
  background: var(--section-background);
  margin-top: var(--section-upper-margin);
  border-radius: var(--border-radius);
}

.section-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 4px 2px;
  /* background: rgba(24, 176, 103, 0.15); */
  border-radius: var(--border-radius);
}

.section-header h2 {
  font-size: 1.3rem;
  color: var(--theme);
  font-weight: 700;
}

.section-header .en {
  font-family: 'Pornsak', sans-serif;
  font-size: 1.6rem;
  font-weight: 400;
}

.section-header .kr {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: white;
  background: var(--theme);
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 4px;
  transform: translateY(-4px);
}

.section-header .icon,
.section-header .section-icon {
  margin-left: auto;
  font-size: 1.2rem;
  line-height: 1;
}

.section-header .fork-knife-crossed,
.section-header .location-pin,
.section-header .gallery-icon {
  width: 1.6rem;
  height: 1.6rem;
  color: var(--theme);
}

.btn-more {
  color: var(--theme);
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  padding: 4px;
}

.btn-header-more {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-left: auto;
  cursor: pointer;
  color: var(--theme);
  font-size: 1.1rem;
  font-weight: 700;
  user-select: none;
}

.btn-header-more .expand-down {
  width: 2.2rem;
  height: 2.2rem;
  color: var(--theme);
  transition: transform 0.25s ease;
}

.btn-header-more.expanded .expand-down {
  transform: rotate(180deg);
}

.menu-items {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.menu-card {
  background: var(--card-bg);
  border: var(--global-border);
  border-radius: var(--border-radius);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.menu-card-hidden {
  display: none;
}

.menu-image {
  aspect-ratio: 1;
  max-height: var(--menu-tile-min-height, 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
  font-size: 0.7rem;
  color: var(--text-muted);
  overflow: hidden;
}

.menu-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.menu-price {
  position: absolute;
  top: 4px;
  right: 4px;
  background: var(--theme);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
}

.menu-name {
  background: var(--theme);
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 6px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
}

.menu-name.marquee-active {
  text-align: left;
}

.menu-name.marquee-active .marquee-inner {
  display: inline-block;
  animation: marquee-bounce 3s 1s ease-in-out infinite alternate;
}

@keyframes marquee-bounce {
  0%   { transform: translateX(0); }
  100% { transform: translateX(var(--marquee-offset, 0px)); }
}


/* 4. Location Section */
.location-section {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: var(--section-padding);
  background: var(--section-background);
  margin-top: var(--section-upper-margin);
  border-radius: var(--border-radius);
}

.map-container {
  flex: 1;
  min-height: 0;
  background: #e8f5ee;
  border-radius: var(--border-radius);
  border: var(--global-border);
  position: relative;
  overflow: hidden;
}

.map-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: var(--border-radius);
}

.header-nav-links {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-left: auto;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--theme);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  padding: 4px;
}

.nav-link .icon {
  width: 1.2rem;
  height: 1.2rem;
  object-fit: contain;
}

/* 5. Gallery Section */
.gallery-section {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: var(--section-padding);
  background: var(--section-background);
  margin-top: var(--section-upper-margin);
  border-radius: var(--border-radius);
}

.gallery-images {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 0px 10px 3px 10px;
  overflow: hidden;
}

.gallery-full-view {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 10;
  background: var(--card-bg, #fff);
  align-items: center;
  justify-content: center;
  padding: 0;
}

.gallery-full-view.is-open {
  display: flex;
}

.gallery-full-view img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 11;
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.gallery-nav-btn:hover {
  background: rgba(0, 0, 0, 0.7);
}

.gallery-prev-btn {
  left: 8px;
}

.gallery-next-btn {
  right: 8px;
}

.gallery-close-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 11;
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
}

.gallery-close-btn:hover {
  background: rgba(0, 0, 0, 0.7);
}

.gallery-extra {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.4s ease;
}

.gallery-item {
  aspect-ratio: 1;
  width: 100%;
  border-radius: 50%;
  background: #f0f0f0;
  border: var(--global-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  color: var(--text-muted);
  overflow: hidden;
  min-width: 0;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-item-hidden {
  display: none;
}

/* Image placeholders */
.image-placeholder {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Menu Full Image - Type 2 */
.menu-full-image-wrap {
  width: 100%;
  position: relative;
  overflow-y: hidden;
  scrollbar-gutter: stable;
  height: var(--menu-full-height, 120px);
  border-radius: var(--border-radius);
  transition: height 0.4s ease;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.22) transparent;
}

.menu-full-image-wrap::-webkit-scrollbar {
  width: 4px;
}

.menu-full-image-wrap::-webkit-scrollbar-track {
  background: transparent;
}

.menu-full-image-wrap::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.22);
  border-radius: 2px;
}

.menu-full-image-wrap img {
  width: 100%;
  display: block;
  object-fit: cover;
  object-position: top;
}
