/* Shared responsive layout for all Sakaaki pages. */
html { overflow-x: hidden; }
body { min-width: 0; overflow-wrap: anywhere; }
img { max-width: 100%; }

.footer {
  position: relative;
  left: 50%;
  width: 100vw;
  margin-left: -50vw;
}

.site-nav { width: 100%; }
.site-nav .nav-links { min-width: 0; }
.site-nav .nav-external { white-space: nowrap; }
.site-nav .nav-links > a,
.site-nav .nav-dropdown > a {
  display: flex;
  align-items: center;
  line-height: 1.4;
}
.site-nav .nav-dropdown {
  display: flex;
  align-items: center;
}

/* Keep supporting text legible on both desktop and mobile. */
.nav-logo-sub,
.sec-en,
.kodawari-num,
.news-badge,
.location-type,
.location-label,
.footer-logo-sub,
.footer-copy,
.footer-tel,
.img-placeholder .ph-desc,
.product-placeholder span,
.product-description,
.product-price {
  font-size: 12px !important;
}
.mobile-menu { display: none; position: relative; margin-left: auto; }
.mobile-menu summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  width: 44px;
  height: 40px;
  padding: 0;
  border: 1px solid #8c3a3a;
  background: rgba(247, 243, 236, 0.96);
  color: #8c3a3a;
}
.mobile-menu summary::-webkit-details-marker { display: none; }
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.hamburger-icon,
.hamburger-icon::before,
.hamburger-icon::after {
  display: block;
  width: 20px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.22s ease, opacity 0.22s ease;
}
.hamburger-icon { position: relative; }
.hamburger-icon::before,
.hamburger-icon::after {
  content: '';
  position: absolute;
  left: 0;
}
.hamburger-icon::before { top: -6px; }
.hamburger-icon::after { top: 6px; }
.mobile-menu[open] .hamburger-icon { background: transparent; }
.mobile-menu[open] .hamburger-icon::before { top: 0; transform: rotate(45deg); }
.mobile-menu[open] .hamburger-icon::after { top: 0; transform: rotate(-45deg); }
.nav.site-nav .mobile-menu summary {
  color: #f7f3ec;
  border-color: rgba(247, 243, 236, 0.7);
  background: transparent;
}
.mobile-menu-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: min(300px, calc(100vw - 32px));
  max-height: calc(100svh - 88px);
  overflow-y: auto;
  padding: 8px;
  background: rgba(247, 243, 236, 0.99);
  border: 1px solid rgba(140, 58, 58, 0.18);
  box-shadow: 0 16px 36px rgba(28, 24, 16, 0.18);
}
.mobile-menu-backdrop { display: none; }
body.mobile-menu-open { overflow: hidden; }
.mobile-menu-panel a {
  display: block;
  padding: 11px 12px;
  border-bottom: 1px solid rgba(140, 58, 58, 0.08);
  color: #3a2e22 !important;
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: 0.1em;
}
.mobile-menu-panel a:last-child { border-bottom: 0; }
.mobile-instagram { color: #8c3a3a !important; }

.home-product-grid > *,
.product-grid > *,
.location-grid > *,
.contact-layout > * { min-width: 0; }

.home-product-link {
  display: block;
  outline-offset: 4px;
}
.home-product-link img {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.home-product-link:hover img,
.home-product-link:focus-visible img {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(28, 24, 16, 0.12);
}

@media (max-width: 1024px) {
  .site-nav { padding: 10px 18px !important; }
  .site-nav .nav-links { gap: 12px !important; }
  .site-nav .nav-links > a,
  .site-nav .nav-dropdown > a {
    font-size: 10.5px !important;
    letter-spacing: 0.06em !important;
  }
  .site-nav .nav-links > a:last-child { padding-left: 12px !important; padding-right: 12px !important; }

  .kodawari-block { margin: 0 32px 48px !important; }
  .kodawari-content { padding: 40px !important; }
  .location { padding-left: 32px !important; padding-right: 32px !important; }
  .location-grid { gap: 24px !important; }

  .home-shop { padding-left: 32px !important; padding-right: 32px !important; }
  .home-product-section { padding-left: 32px !important; padding-right: 32px !important; }
  .home-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }

  .contact-layout {
    grid-template-columns: 1fr !important;
    gap: 40px !important;
    max-width: 760px !important;
  }
}

@media (max-width: 760px) {
  .site-nav { padding: 9px 18px !important; min-height: 68px; }
  .site-nav .nav-links { display: none !important; }
  .site-nav > a > img,
  .site-nav .nav-logo img { height: 42px !important; width: auto !important; }
  .mobile-menu { display: block; }
  .mobile-menu summary { position: relative; z-index: 102; }
  .mobile-menu-panel {
    position: fixed;
    top: 68px;
    right: 0;
    bottom: 0;
    z-index: 101;
    width: min(340px, 88vw);
    height: calc(100svh - 68px);
    max-height: none;
    padding: 20px 18px 32px;
    border-right: 0;
    border-bottom: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .mobile-menu-panel a { padding: 16px 14px; font-size: 13px; }
  .mobile-menu-backdrop.is-visible {
    display: block;
    position: fixed;
    inset: 68px 0 0;
    z-index: 99;
    width: 100%;
    height: calc(100svh - 68px);
    padding: 0;
    border: 0;
    background: rgba(28, 24, 16, 0.36);
    cursor: default;
  }

  .page-hero {
    padding: 118px 20px 42px !important;
  }
  .page-hero > div:nth-child(2) {
    font-size: clamp(24px, 7vw, 30px) !important;
    letter-spacing: 0.1em !important;
  }
  .page-hero p { font-size: 12px !important; line-height: 1.9 !important; }
  .page-content {
    padding-left: 20px !important;
    padding-right: 20px !important;
    padding-bottom: 72px !important;
  }

  .hero { height: 88svh !important; min-height: 520px !important; }
  .hero-logo { width: clamp(150px, 45vw, 220px) !important; }
  .divider { margin-left: 20px !important; margin-right: 20px !important; }
  .sec-header { padding: 56px 20px 36px !important; }
  .sec-ja { font-size: 24px !important; letter-spacing: 0.1em !important; }

  .kodawari { padding-bottom: 64px !important; }
  .kodawari-block,
  .kodawari-block.reverse {
    grid-template-columns: 1fr !important;
    min-height: 0 !important;
    margin: 0 20px 32px !important;
    direction: ltr !important;
  }
  .kodawari-img { min-height: 0 !important; }
  .kodawari-img img { height: 280px !important; min-height: 0 !important; object-fit: cover !important; }
  .kodawari-img img + img { display: none !important; }
  .kodawari-content { padding: 32px 24px !important; }
  .kodawari-title { font-size: 21px !important; margin-bottom: 18px !important; }
  .kodawari-body { font-size: 13px !important; line-height: 2 !important; }

  .home-shop { padding: 44px 20px 0 !important; }
  .home-shop > div { padding-bottom: 30px !important; }
  .home-shop > div > div:nth-child(2) {
    font-size: 23px !important;
    letter-spacing: 0.1em !important;
    line-height: 1.6 !important;
  }
  .home-product-section { padding: 0 20px 60px !important; }
  .home-product-grid { gap: 28px 16px !important; }
  .home-product-grid img { height: auto !important; aspect-ratio: 4 / 3; }

  .news { padding: 56px 20px 72px !important; }
  .news-item { grid-template-columns: 1fr !important; gap: 6px !important; padding: 18px 0 !important; }
  .news-date { font-size: 12px !important; }
  .news-text { font-size: 13px !important; }

  .location { padding: 0 20px 72px !important; }
  .location-grid { grid-template-columns: 1fr !important; gap: 24px !important; }
  .location-content { padding: 28px 20px 32px !important; }
  .location-name { font-size: 20px !important; }
  .location-row { gap: 10px !important; }
  .location-val { font-size: 12px !important; letter-spacing: 0.06em !important; }

  .product-grid { gap: 32px 16px !important; }
  .product-title { min-height: 0 !important; }
  .single-product { width: 100%; }

  .contact-layout { padding-left: 20px !important; padding-right: 20px !important; }
  .contact-form { padding: 28px 20px !important; }
  input, textarea, select, button { max-width: 100%; }

  .footer { padding: 42px 20px 28px !important; }
  .footer-top {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 32px !important;
    margin-bottom: 36px !important;
  }
  .footer-top img { height: 104px !important; margin-left: 0 !important; margin-right: 0 !important; }
  .footer-nav { width: 100%; align-items: flex-start !important; text-align: left !important; gap: 12px !important; }
  .footer-nav a { font-size: 12px !important; }
  .footer-bottom { justify-content: flex-start !important; }
  .footer-copy { width: 100%; text-align: left !important; line-height: 1.7; letter-spacing: 0.1em !important; }
}

@media (max-width: 520px) {
  .product-grid,
  .home-product-grid { grid-template-columns: 1fr !important; }
  .home-product-grid { gap: 34px !important; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  .hero-bg-slide { animation: none !important; opacity: 0; }
  .hero-bg-slide:first-child { opacity: 1; }
  .home-product-link img { transition: none !important; }
  .hamburger-icon,
  .hamburger-icon::before,
  .hamburger-icon::after { transition: none !important; }
}
