/* ===== SP (max-width: 768px) ===== */
@media screen and (max-width: 768px) {
  html, body {
    overflow-y: auto;
    overflow-x: clip;
  }

  body.home-sp-menu-open {
    overflow: hidden;
  }

  #loading-logo {
    width: 16.5vw;
    max-width: 100px;
  }

  /* --- SP: 左上ロゴ（トップ以外）+ 右上ハンバーガー・カート --- */
  .home-sp-chrome {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: fixed;
    top: 2.8vh;
    left: 5vw;
    right: 5vw;
    z-index: 1200;
    pointer-events: none;
  }

  body.home .home-sp-chrome {
    justify-content: flex-end;
  }

  .home-sp-chrome__logo,
  .home-sp-chrome__actions {
    pointer-events: auto;
  }

  .home-sp-chrome__logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    line-height: 0;
    text-decoration: none;
    transition: opacity 0.3s ease;
  }

  .home-sp-chrome__logo:hover {
    opacity: 0.65;
  }

  .home-sp-chrome__logo img {
    width: 15vw;
    max-width: 52px;
    height: auto;
    display: block;
  }

  /* インラインの旧メニュー・SNSは非表示（ドロワーへ） */
  .menu-nav:not(.menu-nav--home-drawer),
  .shop-header,
  #bottom-info {
    display: none !important;
  }

  .home-sp-chrome__actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.6vh;
    position: relative;
    z-index: 1201;
  }

  .home-sp-chrome__menu-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 7px;
    width: auto;
    height: auto;
    padding: 2px 0;
    border: none;
    border-radius: 0;
    background: none;
    cursor: pointer;
    transition: opacity 0.3s ease;
  }

  .home-sp-chrome__menu-btn:hover {
    opacity: 0.65;
  }

  .home-sp-chrome__menu-bar {
    display: block;
    width: 24px;
    height: 1px;
    background: #000;
    transition: transform 0.28s ease;
  }

  .home-sp-chrome__menu-btn.is-open .home-sp-chrome__menu-bar:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
  }

  .home-sp-chrome__menu-btn.is-open .home-sp-chrome__menu-bar:nth-child(2) {
    transform: translateY(-4px) rotate(-45deg);
  }

  .home-sp-chrome__cart.products-cart {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: calc(0.85em * var(--scale));
    max-width: 18px;
    margin-top: 0;
    border: none;
    border-radius: 0;
    background: none;
    text-decoration: none;
    position: relative;
    transition: opacity 0.3s ease;
  }

  .home-sp-chrome__cart.products-cart svg {
    width: 100%;
    height: auto;
    display: block;
  }

  .home-sp-chrome__cart .cart-count {
    top: -6px;
    right: -8px;
  }

  .home-sp-chrome__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.28);
    z-index: 1190;
  }

  .home-sp-chrome__panel {
    position: fixed;
    top: 0;
    right: 0;
    width: min(78vw, 17rem);
    height: 100%;
    padding: 12vh 7vw 4vh;
    box-sizing: border-box;
    background: #C48265;
    z-index: 1195;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 4vh;
    box-shadow: -8px 0 24px rgba(0, 0, 0, 0.08);
  }

  .home-sp-chrome__panel[hidden],
  .home-sp-chrome__backdrop[hidden] {
    display: none !important;
  }

  .menu-nav--home-drawer {
    position: static;
    flex-direction: column;
    align-items: flex-start;
    gap: 2.2vh;
    opacity: 1;
    transform: none;
    width: 100%;
  }

  .menu-nav--home-drawer a:not(.menu-nav__sub-link) {
    font-size: 0.82rem;
    letter-spacing: 0.14em;
  }

  .menu-nav--home-drawer .menu-nav__dropdown-trigger {
    font-size: 0.82rem;
    letter-spacing: 0.14em;
  }

  .menu-nav--home-drawer .menu-nav__item--dropdown {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    gap: 0;
  }

  .menu-nav--home-drawer .menu-nav__sub {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: none;
    box-shadow: none;
    padding: 1.2vh 0 0 1em;
    margin: 0 0 0 0.35em;
    border-left: 1px solid rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
    gap: 1.4vh;
    max-width: none;
    min-width: 0;
    white-space: normal;
  }

  .menu-nav--home-drawer .menu-nav__sub a.menu-nav__sub-link {
    font-family: 'Roboto', 'Noto Sans JP', sans-serif;
    font-size: 0.82rem;
    font-weight: 400;
    letter-spacing: 0.14em;
    color: #000;
    opacity: 1;
    text-transform: lowercase;
  }

  .menu-nav--home-drawer .menu-nav__sub a.menu-nav__sub-link::first-letter {
    text-transform: uppercase;
  }

  .menu-nav--home-drawer .menu-nav__sub a.menu-nav__sub-link::after {
    background: #000;
  }

  .menu-nav--home-drawer .menu-nav__sub a.menu-nav__sub-link:hover {
    color: #000;
    opacity: 0.6;
  }

  .menu-nav--home-drawer .menu-nav__sub a.menu-nav__sub-link.is-current {
    font-weight: 400;
    color: rgba(0, 0, 0, 0.45);
    opacity: 1;
  }

  .home-sp-chrome__bottom {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 1.2em;
    width: 100%;
    padding-top: 2vh;
    border-top: 1px solid rgba(0, 0, 0, 0.12);
  }

  .home-sp-chrome__bottom .icon {
    width: 16px;
    flex: 0 0 auto;
  }

  .home-sp-chrome__bottom .copyright {
    margin-left: auto;
    flex: 0 0 auto;
  }

  .home-sp-chrome__bottom .icon svg {
    width: 100%;
    height: auto;
    display: block;
  }

  .home-sp-page-copyright {
    display: none;
  }

  .home .home-sp-page-copyright {
    display: block;
    text-align: center;
    padding: 0 5vw 6vh;
  }

  #main-content {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100%;
    height: auto;
    padding: 10vh 5vw 4vh;
  }

  .left-section,
  .right-section {
    display: contents;
  }

  /* トップ SP: ヒーロー内のメニューは上記で非表示済み */

  /* --- ロゴ --- */
  .logo-container {
    order: 1;
    justify-content: center;
    flex: none;
    margin-top: 2vh;
  }

  .logo-container img {
    width: 15vw;
    max-width: 80px;
  }

  /* --- トップ絵 --- */
  .photo-container {
    order: 2;
    width: 70vw;
    margin-top: 3vh;
    margin-bottom: 2vh;
  }

  /* --- SP: スライダー --- */
  .slider-slide {
    flex: 0 0 40%;
  }

  .slider-slide img {
    max-height: 50vh;
  }

  .slider-arrow {
    display: none;
  }

  /* --- SP: プロダクト --- */
  .products-section {
    flex-direction: column;
    align-items: center;
    padding: 12vh 5vw 3vh;
    gap: 5vh;
    box-sizing: border-box;
    min-height: 0;
  }

  /* トップ以外: ECメニューが最上部 → 右上カートと重ならないよう上余白を多めに */
  body:not(.home) .products-section {
    padding-top: 14vh;
  }

  body.tenponess-wc-shop .products-section {
    padding-top: 14vh;
  }

  .products-side--right,
  .pd-layout .products-side--right,
  .wc-page-layout .products-side--right {
    display: none;
  }

  .products-side--left .products-cart {
    display: none;
  }

  .products-side--left {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 2.5vh;
  }

  .products-side--left .products-menu-inline {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    align-content: center;
    gap: 1.5vh 0;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    /* 右上カート列と左右対称にし、見た目の中央揃えを維持 */
    padding-left: calc(2.5rem + 2vw);
    padding-right: calc(2.5rem + 2vw);
    text-align: center;
  }

  .products-side--left .products-menu-inline .products-menu-divider {
    display: none;
  }

  .products-side--left .products-menu-inline a,
  .products-side--left .products-menu-inline a.products-menu-inline__account {
    align-self: center;
    text-align: center;
    padding: 0 0.55em;
    margin: 0;
    white-space: nowrap;
    line-height: 1.4;
  }

  .products-side--left .products-menu-inline a:not(:first-child) {
    border-left: 1px solid rgba(0, 0, 0, 0.22);
  }

  .products-grid {
    flex: none;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    grid-template-columns: repeat(2, 1fr);
    gap: 4vw 2.5vw;
  }

  .products-grid > ul.products {
    display: contents;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .pd-layout,
  .wc-page-layout {
    padding-top: 14vh;
  }

  .pd-layout .products-side--left {
    margin-bottom: 2vh;
  }

  .wc-page-layout .products-side--left {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-bottom: 2vh;
  }

  .products-side {
    position: static;
    transform: none;
    width: auto;
    opacity: 0;
  }

  .products-side.animate-in {
    opacity: 1;
    transform: none;
  }

  .products-item {
    overflow: visible;
  }

  .products-spec {
    position: static;
    background: none;
    opacity: 1;
    padding: 0.6em 0 0;
    align-items: flex-start;
  }

  .products-spec-name {
    text-align: left;
    font-size: 0.7rem;
  }

  .products-spec-price {
    text-align: left;
    font-size: 0.55rem;
  }

  .products-item:hover img {
    transform: none;
  }

  .products-item:hover .products-spec {
    opacity: 1;
  }

  .products-logo {
    width: 15vw;
    max-width: 60px;
  }

  /* --- SP: 左メニュー（全ページ共通の行間） --- */
  .products-menu-inline {
    gap: 1.5vh;
  }

  .products-menu-inline a,
  .products-menu-inline a.products-menu-inline__account {
    font-size: 0.78rem;
    line-height: 1.4;
  }

  /* --- SP: カートポップアップ --- */
  .cart-popup {
    padding: 3vh 6vw 3vh;
    max-width: 100%;
    width: 92%;
  }

  .cart-popup-close {
    right: 3vw;
    cursor: auto;
  }

  .cart-popup-btn {
    cursor: auto;
    font-size: 0.68rem;
  }

  /* スマホではカスタムカーソルを無効化 */
  html, body, a, button {
    cursor: auto;
  }

  #custom-cursor,
  .cursor-ripple {
    display: none !important;
  }
}
