/* WE起桌遊吧｜商城與會員導覽優化 */

.storefront-nav-enabled .nav {
  position: relative;
  gap: 16px;
}

.storefront-nav-enabled .nav-links {
  flex: 1 1 auto;
  min-width: 0;
}

.nav-tools {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.nav-account-link {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 13px;
  border: 2px solid #15100a;
  border-radius: 12px;
  background: #15100a;
  color: #f6c421;
  box-shadow: 0 4px 0 rgba(21, 16, 10, .2);
  font-size: .9rem;
  font-weight: 950;
  white-space: nowrap;
}

.nav-account-link:hover,
.nav-account-link[aria-current="page"] {
  transform: translateY(-1px);
  background: #fff8dc;
  color: #15100a;
}

.nav-account-icon {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #f6c421;
  color: #15100a;
  font-size: .78rem;
  line-height: 1;
}

/* 首頁：會員縮成一條提示，商城改成兩張清楚的入口卡 */
.home-commerce-section {
  padding-top: 36px;
  padding-bottom: 46px;
}

.home-member-strip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
  border: 3px solid #15100a;
  border-radius: 20px;
  background: rgba(255, 253, 244, .96);
  box-shadow: 0 8px 0 rgba(21, 16, 10, .16);
}

.home-member-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 3px solid #15100a;
  border-radius: 18px;
  background: #f6c421;
  color: #15100a;
  font-size: 1rem;
  font-weight: 950;
}

.home-member-copy h2 {
  margin: 0 0 4px;
  font-size: 1.5rem;
}

.home-member-copy p {
  margin: 0;
  color: #4a2a08;
  font-weight: 780;
}

.home-commerce-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin: 38px 0 18px;
}

.home-commerce-heading h2 {
  margin: 0 0 6px;
  font-size: clamp(2rem, 5vw, 3rem);
}

.home-commerce-heading p {
  max-width: 680px;
  margin: 0;
  color: #4a2a08;
  font-weight: 800;
}

.home-store-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.home-store-card {
  position: relative;
  overflow: hidden;
  min-height: 270px;
  display: grid;
  align-content: space-between;
  gap: 28px;
  padding: 26px;
  border: 4px solid #15100a;
  border-radius: 24px;
  box-shadow: 0 10px 0 rgba(21, 16, 10, .18);
  transition: transform .16s ease, box-shadow .16s ease;
}

.home-store-card::after {
  content: "";
  position: absolute;
  width: 190px;
  height: 190px;
  right: -54px;
  bottom: -66px;
  border: 4px solid currentColor;
  border-radius: 48px;
  opacity: .12;
  transform: rotate(18deg);
}

.home-store-card:hover,
.home-store-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 14px 0 rgba(21, 16, 10, .2);
}

.home-store-card-board {
  background: linear-gradient(145deg, #24170d, #6a3512);
  color: #fff8dc;
}

.home-store-card-accessories {
  background: linear-gradient(145deg, #fff8dc, #f7c94c);
  color: #15100a;
}

.home-store-card .store-card-label {
  width: fit-content;
  margin: 0 0 14px;
  padding: 6px 11px;
  border: 2px solid currentColor;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 950;
}

.home-store-card h3 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1;
}

.home-store-card p {
  max-width: 520px;
  margin: 0;
  font-weight: 760;
}

.home-store-card .store-card-action {
  position: relative;
  z-index: 1;
  width: fit-content;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border: 3px solid currentColor;
  border-radius: 12px;
  font-weight: 950;
}

.home-store-card-board .store-card-action {
  background: #f6c421;
  color: #15100a;
  border-color: #15100a;
}

.home-store-card-accessories .store-card-action {
  background: #15100a;
  color: #f6c421;
}

/* 商城頁：桌遊與周邊改成真正的分頁切換 */
.storefront-page .shop-hero {
  padding: 0;
}

.storefront-page .shop-hero .section {
  padding-top: 46px;
  padding-bottom: 42px;
}

.storefront-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 28px;
  padding: 7px;
  border: 2px solid #dfcfaf;
  border-radius: 16px;
  background: #fff8e8;
  box-shadow: 0 8px 22px rgba(59, 39, 16, .08);
}

.storefront-tab {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 11px;
  color: #6a5844;
  font-weight: 950;
  text-align: center;
}

.storefront-tab:hover {
  background: #fff0c2;
  color: #1b1712;
}

.storefront-tab.is-active,
.storefront-tab[aria-current="page"] {
  background: #19130d;
  color: #f6c744;
  box-shadow: 0 4px 0 rgba(25, 19, 13, .18);
}

.storefront-heading-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  margin-bottom: 18px;
}

.storefront-heading-row h2 {
  margin-bottom: 6px;
}

.storefront-member-link {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 15px;
  border: 1px solid #d8c7a3;
  border-radius: 10px;
  background: #fffdf8;
  font-weight: 900;
  white-space: nowrap;
}

.storefront-search-card {
  margin-top: 0;
  border-color: rgba(246, 199, 68, .48);
  background: linear-gradient(180deg, #fffdf8, #fff7e8);
}

@media (min-width: 1120px) {
  .storefront-nav-enabled .nav-links {
    display: flex;
    justify-content: flex-end;
  }
}

@media (max-width: 1119px) {
  .storefront-nav-enabled .nav {
    min-height: 68px;
  }

  .storefront-nav-enabled .nav-tools {
    margin-left: auto;
  }

  .storefront-nav-enabled .nav-toggle {
    display: inline-grid;
  }

  .storefront-nav-enabled .nav-links {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    padding: 10px;
    border: 2px solid rgba(21, 16, 10, .24);
    border-radius: 14px;
    background: #fff1a2;
    box-shadow: 0 14px 30px rgba(21, 16, 10, .2);
  }

  .storefront-nav-enabled .nav-links.is-open {
    display: grid;
  }
}

@media (max-width: 760px) {
  .home-member-strip,
  .storefront-heading-row {
    grid-template-columns: 1fr;
  }

  .home-member-strip {
    text-align: left;
  }

  .home-member-mark {
    width: 50px;
    height: 50px;
  }

  .home-member-strip .we-btn {
    width: 100%;
  }

  .home-commerce-heading {
    align-items: start;
    flex-direction: column;
  }

  .home-store-grid {
    grid-template-columns: 1fr;
  }

  .home-store-card {
    min-height: 230px;
    padding: 22px;
  }

  .storefront-tabs {
    position: sticky;
    top: 68px;
    z-index: 20;
  }
}

@media (max-width: 560px) {
  .nav-account-link {
    min-width: 42px;
    width: 42px;
    padding: 7px;
  }

  .nav-account-link > span:last-child {
    display: none;
  }

  .storefront-nav-enabled .nav-links {
    grid-template-columns: 1fr;
  }

  .storefront-tabs {
    grid-template-columns: 1fr 1fr;
  }
}
