/* TASFUL市場 — 共通モールヘッダー（Amazon型EC・390px基準） */
:root {
  --tasful-market-navy: #232f3e;
  --tasful-market-navy-deep: #1a2533;
  --tasful-market-gold: #c4a24a;
  --tasful-market-gold-search: #f0c14b;
  --tasful-market-gold-search-dark: #d4a72c;
  --tasful-back-link-min-h: 36px;
  --tasful-market-mall-top-h: 48px;
  --tasful-market-mall-search-h: 54px;
  --tasful-market-mall-nav-h: 42px;
  --tasful-market-header-total-h: calc(
    var(--tasful-market-mall-top-h) + var(--tasful-market-mall-search-h) + var(--tasful-market-mall-nav-h)
  );
}

.tasful-market-mall-header,
header.tasful-market-mall-header[data-tasful-market-header] {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 120;
  box-sizing: border-box;
  width: 100%;
  max-width: 100vw;
  height: auto !important;
  min-height: var(--tasful-market-header-total-h, 146px);
  padding-top: env(safe-area-inset-top, 0px);
  overflow: visible !important;
  overflow-x: clip;
  background: var(--tasful-market-navy);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.28);
}

.tasful-market-mall-header__stack {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  background: var(--tasful-market-navy);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.tasful-market-mall-header__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  box-sizing: border-box;
  width: 100%;
  min-height: var(--tasful-market-mall-top-h);
  padding: 6px 10px 2px;
}

.tasful-market-mall-header__top .tasful-market-mall-header__search-row {
  flex: 0 0 100%;
  width: 100%;
  box-sizing: border-box;
  padding: 4px 0 10px;
}

.tasful-market-mall-header__logo {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  min-height: var(--tasful-back-link-min-h, 36px);
  padding: 3px 0;
  box-sizing: border-box;
  flex: 1 1 auto;
  overflow: hidden;
  text-decoration: none;
  color: #fff;
}

.tasful-market-mall-header__logo-img {
  display: block;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.tasful-market-mall-header__logo-mark {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: linear-gradient(135deg, #e8c96a 0%, var(--tasful-market-gold) 55%, #9a7b2e 100%);
  color: #1a2533;
  font-size: 0.875rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.22);
}

.tasful-market-mall-header__logo-text {
  overflow: hidden;
  font-size: 0.9375rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: min(100%, 9.5rem);
}

.tasful-market-mall-header__logo-text em {
  font-style: normal;
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.78);
  margin-left: 2px;
}

.tasful-market-mall-header__actions {
  display: inline-flex;
  flex-shrink: 0;
  align-items: flex-start;
  gap: 2px;
  margin: 0;
}

.tasful-market-mall-header__account,
.tasful-market-mall-header__cart,
.tasful-market-mall-header__sell,
.tasful-market-mall-header__orders {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  box-sizing: border-box;
  min-width: 42px;
  max-width: 48px;
  padding: 2px 3px 0;
  gap: 3px;
  border-radius: 8px;
  text-decoration: none;
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1.15;
}

.tasful-market-mall-header__account:hover,
.tasful-market-mall-header__cart:hover,
.tasful-market-mall-header__sell:hover,
.tasful-market-mall-header__orders:hover {
  background: rgba(255, 255, 255, 0.1);
}

.tasful-market-mall-header__account-icon,
.tasful-market-mall-header__cart-icon {
  display: block;
  flex-shrink: 0;
  font-size: 1.1875rem;
  line-height: 1;
}

.tasful-market-mall-header__account-label,
.tasful-market-mall-header__cart-label {
  display: block;
  width: 100%;
  max-width: 44px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  line-height: 1.1;
}

.tasful-market-mall-header__cart-badge {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 1;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border: 1.5px solid #fff;
  border-radius: 999px;
  background: #f59e0b;
  color: #111827;
  font-size: 0.6875rem;
  font-weight: 900;
  line-height: 14px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.28);
}

.tasful-market-mall-header__cart-badge[hidden] {
  display: none;
}

.tasful-market-mall-header__action-lines {
  display: none;
}

.tasful-header-pc__actions {
  display: none;
}

.tasful-header-pc__brand {
  display: none;
}

.tasful-market-mall-header__search-row {
  box-sizing: border-box;
  width: 100%;
  padding: 4px 10px 10px;
}

.tasful-market-mall-header__stack > .tasful-market-mall-header__search-row {
  padding: 4px 10px 10px;
}

.tasful-market-mall-header__search {
  display: flex;
  align-items: stretch;
  box-sizing: border-box;
  width: 100%;
  min-height: 46px;
  border: 2px solid var(--tasful-market-gold);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

.tasful-market-mall-header__search-input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0 12px;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #111827;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.tasful-market-mall-header__search-input::-webkit-search-decoration,
.tasful-market-mall-header__search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}

.tasful-market-mall-header__search-input::placeholder {
  color: #6b7280;
}

.tasful-market-mall-header__search-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  margin: 0;
  padding: 0;
  border: 0;
  background: linear-gradient(180deg, #f7d875 0%, var(--tasful-market-gold-search) 45%, var(--tasful-market-gold-search-dark) 100%);
  color: #1a2533;
  font-size: 1.125rem;
  line-height: 1;
  cursor: pointer;
}

.tasful-market-mall-header__search-btn:hover {
  filter: brightness(1.03);
}

.tasful-market-mall-header__search-btn-icon {
  display: block;
  flex-shrink: 0;
}

/* カテゴリ帯 — 濃紺ナビ */
.tasful-market-mall-header__nav {
  box-sizing: border-box;
  width: 100%;
  min-height: var(--tasful-market-mall-nav-h);
  background: var(--tasful-market-navy);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.tasful-market-mall-header__nav-scroll {
  display: flex;
  gap: 8px;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  padding: 8px 10px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.tasful-market-mall-header__nav-scroll::-webkit-scrollbar {
  display: none;
}

.tasful-market-mall-header__nav-item {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #f9fafb;
  font: inherit;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
}

.tasful-market-mall-header__nav-item:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
}

.tasful-market-mall-header__nav-item.is-active {
  background: var(--tasful-market-gold);
  border-color: var(--tasful-market-gold);
  color: #111827;
}

@media (min-width: 1025px) {
  :root {
    --tasful-market-mall-top-h: 96px;
    --tasful-market-mall-search-h: 0px;
    --tasful-market-mall-nav-h: 56px;
    --tasful-market-pc-header-max: 1600px;
  }

  .tasful-market-mall-header,
  header.tasful-market-mall-header[data-tasful-market-header] {
    z-index: 10001;
    background: linear-gradient(180deg, #09162b 0%, #132743 100%);
    box-shadow: 0 4px 20px rgba(9, 22, 43, 0.42);
    min-height: calc(var(--tasful-market-mall-top-h) + var(--tasful-market-mall-nav-h));
  }

  .tasful-market-mall-header__stack {
    box-sizing: border-box;
    width: 100%;
    max-width: var(--tasful-market-pc-header-max);
    margin: 0 auto;
    padding: 0 32px;
    background: transparent;
    border-bottom: none;
  }

  .tasful-market-mall-header__top {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) 520px;
    align-items: center;
    column-gap: 48px;
    min-height: 96px;
    height: 96px;
    padding: 0;
  }

  .tasful-market-mall-header__top .tasful-market-mall-header__search-row {
    box-sizing: border-box;
    flex: none;
    width: min(720px, 100%);
    max-width: 720px;
    min-width: 0;
    padding: 0;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    align-self: center;
    justify-self: center;
  }

  .tasful-market-mall-header__logo {
    display: block;
    flex: none;
    justify-self: start;
    align-self: center;
    width: auto;
    min-width: 0;
    max-width: none;
    height: auto;
    line-height: 1;
    text-decoration: none;
  }

  .tasful-header-pc__brand {
    display: flex;
    align-items: center;
    gap: 16px;
    line-height: 1;
  }

  .tasful-header-pc__logo {
    display: block;
    width: auto;
    height: 58px;
    max-height: 58px;
    object-fit: contain;
    object-position: left center;
    flex-shrink: 0;
  }

  .tasful-header-pc__brand-text {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1.2;
    color: #ffffff;
    white-space: nowrap;
  }

  .tasful-market-mall-header__logo-mark {
    display: none !important;
  }

  .tasful-market-mall-header__logo-text {
    display: none !important;
  }

  .tasful-market-mall-header__logo-img {
    display: none !important;
  }

  .tasful-market-mall-header__search {
    box-sizing: border-box;
    width: 720px;
    max-width: 100%;
    min-width: 0;
    min-height: 56px;
    max-height: 56px;
    height: 56px;
    border: 0;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
    overflow: hidden;
  }

  .tasful-market-mall-header__search-input {
    font-size: 1rem;
    padding: 0 18px;
  }

  .tasful-market-mall-header__search-btn {
    width: 68px;
    min-width: 68px;
    background: #f5c542;
    color: #111827;
  }

  .tasful-market-mall-header__search-btn-icon {
    width: 24px;
    height: 24px;
  }

  .tasful-market-mall-header__search-btn:hover {
    filter: brightness(1.04);
  }

  .tasful-market-mall-header__actions {
    display: none !important;
  }

  .tasful-header-pc__actions {
    display: grid;
    grid-template-columns: repeat(4, 130px);
    gap: 0;
    width: 520px;
    max-width: 520px;
    height: 72px;
    align-self: center;
    justify-self: end;
    flex-shrink: 0;
  }

  .tasful-header-pc__action {
    position: relative;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 130px;
    min-width: 130px;
    max-width: 130px;
    height: 72px;
    margin: 0;
    padding: 0 8px;
    gap: 4px;
    border: 0;
    border-radius: 0;
    text-decoration: none;
    color: #ffffff;
  }

  .tasful-header-pc__action:hover {
    background: rgba(255, 255, 255, 0.06);
  }

  .tasful-header-pc__action:not(:first-child)::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 72px;
    background: rgba(255, 255, 255, 0.2);
    pointer-events: none;
  }

  .tasful-header-pc__action:first-child {
    display: grid;
    grid-template-columns: 36px auto;
    grid-template-rows: auto auto;
    column-gap: 6px;
    row-gap: 2px;
    align-content: center;
    justify-content: center;
    justify-items: center;
  }

  .tasful-header-pc__action:first-child .tasful-header-pc__icon {
    grid-column: 1;
    grid-row: 1;
  }

  .tasful-header-pc__action:first-child .tasful-header-pc__main {
    grid-column: 2;
    grid-row: 1;
    justify-self: start;
  }

  .tasful-header-pc__action:first-child .tasful-header-pc__sub {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .tasful-header-pc__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    color: #ffffff;
    line-height: 0;
  }

  .tasful-header-pc__icon svg {
    display: block;
    width: 36px;
    height: 36px;
  }

  .tasful-header-pc__icon-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
  }

  .tasful-header-pc__main {
    display: block;
    max-width: 118px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
    color: #ffffff;
    text-align: center;
  }

  .tasful-header-pc__sub {
    display: block;
    max-width: 118px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.15;
    color: rgba(255, 255, 255, 0.85);
    text-align: center;
  }

  .tasful-header-pc__badge {
    position: absolute;
    top: -2px;
    right: -10px;
    z-index: 1;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    border: 0;
    border-radius: 999px;
    background: #f5c542;
    color: #000000;
    font-size: 0.75rem;
    font-weight: 800;
    line-height: 24px;
    text-align: center;
    box-shadow: none;
  }

  .tasful-header-pc__badge[hidden] {
    display: none;
  }

  .tasful-market-mall-header__nav {
    display: flex;
    justify-content: center;
    min-height: 56px;
    height: 56px;
    padding: 0;
    background: rgba(255, 255, 255, 0.03);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }

  .tasful-market-mall-header__nav-scroll {
    box-sizing: border-box;
    width: 100%;
    max-width: var(--tasful-market-pc-header-max);
    margin: 0 auto;
    padding: 0 32px;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 10px;
    align-items: center;
    min-height: 56px;
    height: 56px;
    scrollbar-width: none;
  }

  .tasful-market-mall-header__nav-scroll::-webkit-scrollbar {
    display: none;
  }

  .tasful-market-mall-header__nav-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    height: 40px;
    padding: 0 16px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #ffffff;
    font-size: 0.9375rem;
    font-weight: 700;
    line-height: 1.2;
  }

  .tasful-market-mall-header__nav-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: transparent;
  }

  .tasful-market-mall-header__nav-item.is-active {
    height: 40px;
    padding: 0 24px;
    background: #f5c542;
    border-color: #f5c542;
    color: #111111;
  }
}

@media (max-width: 1024px) {
.tasful-header-pc__actions {
  display: none !important;
}

.tasful-header-pc__brand {
  display: none !important;
}

.tasful-market-mall-header__logo-img {
  display: none !important;
}

.tasful-market-mall-header__sell {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  box-sizing: border-box;
  min-width: 42px;
  max-width: 48px;
  padding: 2px 3px 0;
  gap: 3px;
  border-radius: 8px;
  text-decoration: none;
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1.15;
}

.tasful-market-mall-header__sell:hover {
  background: rgba(255, 255, 255, 0.1);
}

.tasful-market-mall-header__sell-icon {
  display: block;
  flex-shrink: 0;
  font-size: 1.1875rem;
  line-height: 1;
}

.tasful-market-mall-header__sell-label {
  display: block;
  width: 100%;
  max-width: 44px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  line-height: 1.1;
}

.tasful-market-mall-header__orders {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  box-sizing: border-box;
  min-width: 42px;
  max-width: 48px;
  padding: 2px 3px 0;
  gap: 3px;
  border-radius: 8px;
  text-decoration: none;
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1.15;
}

.tasful-market-mall-header__orders:hover {
  background: rgba(255, 255, 255, 0.1);
}

.tasful-market-mall-header__orders-icon {
  display: block;
  flex-shrink: 0;
  font-size: 1.1875rem;
  line-height: 1;
}

.tasful-market-mall-header__orders-label {
  display: block;
  width: 100%;
  max-width: 44px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  line-height: 1.1;
}
}
