/*
 * ヘッダー・フッター・検索パネル・ページ上部へ戻るボタン（R2）
 *
 * 値は公開サイトの表示を測った仕様書（docs/specs/header-footer/）から。
 * 画面の幅の区切り：スマホ 〜767px ／ タブレット 768〜1067px（メニューは三本線のボタン）／ PC 1068px〜
 */

/* ------------------------------------------------------------------ アイコン */

.gb-icon {
	display: block;
	flex-shrink: 0;
	overflow: visible;
}

/* 線の太さを画面上の px で保つ（viewBox を絵の範囲に切り詰めて拡大・縮小しているため） */
.gb-icon[stroke] * {
	vector-effect: non-scaling-stroke;
}

/* ------------------------------------------------------------------ 下線が伸びるリンク */

/* マウスを乗せると色が変わり、文字の下に 1px の線が左から伸びる（0.25 秒） */
.gb-uline {
	position: relative;
	display: block;
	transition: color var(--gb-duration) var(--gb-ease);
}

.gb-uline::after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1px;
	height: 1px;
	background: var(--gb-header-link-hover);
	transform: scaleX(0);
	transform-origin: 0 50%;
	transition: transform var(--gb-duration) var(--gb-ease);
}

.gb-uline:hover,
.gb-uline:focus-visible {
	color: var(--gb-header-link-hover);
}

.gb-uline:hover::after,
.gb-uline:focus-visible::after {
	transform: scaleX(1);
}

/* ------------------------------------------------------------------ 画面の外に出す（読み上げ用） */

.gb-skip-link {
	position: fixed;
	top: 8px;
	left: 8px;
	z-index: 200;
	padding: 10px 16px;
	border-radius: var(--gb-radius-input);
	background: var(--gb-btn-bg);
	color: var(--gb-btn-text);
	font-size: 14px;
	transform: translateY(-200%);
}

.gb-skip-link:focus {
	transform: none;
}

/* ------------------------------------------------------------------ 告知バー */

.gb-announcement {
	position: relative;
	z-index: 52;
	padding-block: 12px;
	background: var(--gb-announce-bg);
	color: var(--gb-announce-text);
	font-size: 13px;
	line-height: 13px;
	text-align: center;
}

.gb-announcement__inner {
	display: flex;
	align-items: center;
	overflow: hidden;
	padding-inline: var(--gb-gutter-sm);
}

.gb-announcement__slider {
	position: relative;
	width: 100%;
	max-width: 500px;
	margin-inline: auto;
}

.gb-announcement .swiper {
	overflow: hidden;
}

/* 切り替えは 0.75 秒。はじめ速く、だんだん遅く（公開サイトの動きを測って合わせた） */
.gb-announcement .swiper-wrapper {
	--swiper-wrapper-transition-timing-function: cubic-bezier(0.25, 1, 0.5, 1);
	align-items: stretch;
}

/* 1件の中身（アイコン＋文）は文字の行として並べる。高さの違う件は上下の中央に置く */
.gb-announcement .gb-announcement__item {
	display: flex;
	align-items: center;
	justify-content: center;
	height: auto;
	line-height: 1.1;
}

.gb-announcement__text {
	display: block;
	width: 100%;
	padding-inline: 20px;
	text-align: center;
}

.gb-announcement__item a {
	color: inherit;
}

.gb-announcement__item .gb-icon {
	display: inline-block;
	margin-right: 12px;
	vertical-align: baseline;
}

@media (min-width: 768px) {
	.gb-announcement__inner {
		padding-inline: var(--gb-gutter-lg);
	}
}

/* 左右の矢印：直径 42px の丸（バーと同じ色）を枠の両端に半分重ねる */
.gb-announcement__nav {
	position: absolute;
	top: 50%;
	z-index: 30;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	margin-top: -21px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--gb-announce-bg);
	color: inherit;
	cursor: pointer;
	transition: all var(--gb-duration) var(--gb-ease);
}

.gb-announcement__nav--prev {
	left: -21px;
}

.gb-announcement__nav--next {
	right: -21px;
}

/* ------------------------------------------------------------------ ヘッダー上段（サブメニュー・SNS） */

.gb-subheader {
	position: relative;
	z-index: 51;
	display: none;
	align-items: center;
	min-height: 38px;
	padding-block: 5px;
	border-bottom: 1px solid var(--gb-color-border);
	background: var(--gb-submenu-bg);
	color: var(--gb-submenu-text);
	font-size: 12px;
	line-height: 1.4;
}

@media (min-width: 768px) {
	.gb-subheader {
		display: flex;
	}
}

.gb-subheader__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 15px;
}

.gb-subheader__menu {
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 15px;
	line-height: 24px;
	text-align: left;
}

.gb-subheader__menu li {
	display: inline-flex;
	align-items: center;
	padding-inline: 10px;
}

.gb-subheader__menu li:first-child {
	padding-left: 0;
}

.gb-subheader__menu a {
	font-size: 12px;
	line-height: 1.6;
}

.gb-social {
	display: flex;
	margin: 0;
	padding: 0;
	list-style: none;
}

.gb-social a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: color var(--gb-duration) var(--gb-ease);
}

.gb-social--subheader {
	margin-inline: 15px;
	line-height: 1.6;
}

.gb-social--subheader a {
	width: 26px;
	height: 26px;
}

/* ------------------------------------------------------------------ ヘッダー */

/* ヘッダーのアイコン・SNS のロゴは、マウスを乗せても色を変えない（公開サイトの見た目と同じ） */

.gb-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: var(--gb-header-bg);
	color: var(--gb-header-text);
}

.gb-header--static {
	position: relative;
}

/* スマホ・タブレット：三本線 ｜ ロゴ（中央） ｜ アイコン */
.gb-header__inner {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	max-width: calc(var(--gb-content-width) + 2 * var(--gb-gutter-lg));
	margin-inline: auto;
	padding-inline: var(--gb-gutter-sm);
}

@media (min-width: 768px) {
	.gb-header__inner {
		padding-inline: var(--gb-gutter-lg);
	}
}

.gb-header__start {
	display: flex;
}

/* 三本線のボタン：幅 18px・太さ 1.5px の線を 5px 間隔で3本。開くと × になる */
.gb-header__toggle {
	position: relative;
	display: flex;
	width: 48px;
	height: 48px;
	margin-left: calc(-1 * var(--gb-gutter-sm));
	padding: 0;
	border: 0;
	background: none;
	color: var(--gb-header-icon);
	cursor: pointer;
}

.gb-header__toggle span {
	position: absolute;
	left: 15px;
	right: 15px;
	height: 1.5px;
	border-radius: 1px;
	background: currentColor;
	transition: all var(--gb-duration) var(--gb-ease);
}

.gb-header__toggle span:nth-child(1) { top: 18px; }
.gb-header__toggle span:nth-child(2) { top: 23px; }
.gb-header__toggle span:nth-child(3) { top: 28px; }

/* × は上下の線を左端を基準に ±45° 回す */
.gb-header__toggle span:nth-child(1),
.gb-header__toggle span:nth-child(3) {
	transform-origin: 0 0;
}

.gb-header__toggle[aria-expanded='true'] span:nth-child(1) {
	transform: translate(2.12px, -2.12px) rotate(45deg);
}

.gb-header__toggle[aria-expanded='true'] span:nth-child(2) {
	opacity: 0;
}

.gb-header__toggle[aria-expanded='true'] span:nth-child(3) {
	transform: translate(0.71px, 0.71px) rotate(-45deg);
}

.gb-header__logo {
	display: flex;
	justify-content: center;
	margin-block: 20px;
	text-align: center;
}

.gb-header__logo img {
	width: auto;
	height: var(--gb-logo-h-sm);
	object-fit: contain;
}

.gb-header__logo-text {
	font-family: var(--gb-font-heading);
	font-size: 22px;
	font-weight: 500;
	line-height: var(--gb-logo-h-sm);
}

@media (min-width: 768px) {
	.gb-header__logo img {
		height: var(--gb-logo-h);
	}

	.gb-header__logo-text {
		line-height: var(--gb-logo-h);
	}
}

.gb-header__nav {
	display: none;
}

.gb-header__icons {
	display: flex;
	justify-content: flex-end;
	align-self: stretch;
	line-height: 17px;
	white-space: nowrap;
}

.gb-header__icon {
	display: flex;
	align-items: center;
	padding-inline: 7px;
	color: var(--gb-header-icon);
	transition: color var(--gb-duration) var(--gb-ease);
}

.gb-header__icon:last-child {
	padding-right: 0;
}

.gb-header__icon--account {
	display: none;
}

.gb-header__cart {
	position: relative;
	display: block;
	width: 24px;
	height: 23px;
	transform: translateY(2px);
}

/* カートの件数：直径 19px の丸 */
.gb-header__count {
	position: absolute;
	top: -8px;
	right: -12px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 19px;
	height: 19px;
	border-radius: 50%;
	background: var(--gb-color-accent);
	color: var(--gb-btn-text);
	font-size: 10px;
	font-weight: 600;
	line-height: 1;
	text-align: center;
}

/* PC：ロゴ ｜ メニュー（中央の列は全体の 70%） ｜ アイコン */
@media (min-width: 1068px) {
	.gb-header__inner {
		grid-template-columns: auto 70% auto;
		min-height: 80px;
	}

	.gb-header__start {
		display: none;
	}

	.gb-header__logo {
		justify-content: flex-start;
		text-align: left;
	}

	.gb-header__nav {
		display: flex;
		justify-content: center;
	}

	.gb-header__icon {
		padding-inline: 10px;
	}

	.gb-header__icon--account {
		display: flex;
	}

	.gb-header__icons {
		min-width: 135px;
	}
}

/* ------------------------------------------------------------------ メインメニュー（PC） */

.gb-nav__list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 15px;
	line-height: 24px;
	text-align: center;
}

.gb-nav__item {
	position: relative;
	display: inline-flex;
	align-items: center;
	padding-inline: 15px;
}

.gb-nav__item--parent {
	z-index: 1;
}

.gb-nav__link {
	margin-block: 10px;
	font-weight: 500;
}

.gb-nav__item--parent > .gb-nav__link {
	padding-right: 15px;
}

.gb-nav__item--parent > .gb-nav__link::after {
	right: 15px;
}

.gb-nav__arrow {
	position: absolute;
	top: 50%;
	right: 0;
	margin-top: -3px;
}

/* 子メニュー：白い角丸の箱。マウスを乗せる・キーボードで中に入ると 0.25 秒で現れる */
.gb-nav__dropdown {
	position: absolute;
	top: 100%;
	left: -11px;
	z-index: 2;
	min-width: 190px;
	margin: 0;
	padding: 17px 26px;
	border-radius: var(--gb-radius-block);
	background: #fff;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08);
	list-style: none;
	text-align: left;
	opacity: 0;
	visibility: hidden;
	transition: all var(--gb-duration) var(--gb-ease);
}

.gb-nav__item--parent:hover,
.gb-nav__item--parent:focus-within {
	z-index: 2;
}

.gb-nav__item--parent:hover > .gb-nav__dropdown,
.gb-nav__item--parent:focus-within > .gb-nav__dropdown {
	opacity: 1;
	visibility: visible;
}

.gb-nav__sublink {
	display: inline-block;
	padding-block: 7px;
	font-size: 15px;
	line-height: 1.1;
	white-space: nowrap;
}

.gb-nav__sublink::after {
	bottom: 2px;
}

/* ------------------------------------------------------------------ スマホ・タブレットのメニュー（パネル） */

.gb-mobile-menu {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	height: calc(100dvh - var(--gb-header-bottom, 77px));
	overflow-x: hidden;
	overflow-y: auto;
	border-top: 1px solid var(--gb-header-border);
	background: var(--gb-header-bg);
	text-align: left;
	opacity: 0;
	visibility: hidden;
	transform: translateY(50px);
	transition:
		opacity 0.3s var(--gb-ease),
		transform 0.3s var(--gb-ease),
		visibility 0.3s;
}

.gb-mobile-menu.is-open {
	opacity: 1;
	visibility: visible;
	transform: none;
}

.gb-mobile-menu__inner {
	position: relative;
	display: flex;
	flex-direction: column;
	min-height: 100%;
}

.gb-mobile-menu__list,
.gb-mobile-menu__sub ul {
	margin: 0 0 20px;
	padding: 0 var(--gb-gutter-sm);
	list-style: none;
}

.gb-mobile-menu__link {
	display: flex;
	align-items: center;
	width: 100%;
	min-height: 54px;
	padding: 4px 0;
	border: 0;
	border-bottom: 1px solid var(--gb-header-border);
	background: none;
	color: inherit;
	font-family: inherit;
	font-size: 20px;
	font-weight: 500;
	line-height: 32px;
	text-align: left;
	cursor: pointer;
	transition: color var(--gb-duration) var(--gb-ease);
}

.gb-mobile-menu__forward {
	margin-left: auto;
}

/* 子の一覧：右から 0.25 秒で重なる */
.gb-mobile-menu__sub {
	position: absolute;
	inset: 0;
	z-index: 10;
	background: var(--gb-header-bg);
	visibility: hidden;
	transform: translateX(100%);
	transition:
		transform var(--gb-duration) var(--gb-ease),
		visibility var(--gb-duration);
}

.gb-mobile-menu__sub.is-open {
	visibility: visible;
	transform: none;
	/* 開くときはすぐに表示にする（中の「戻る」ボタンにすぐフォーカスを移せるように） */
	transition:
		transform var(--gb-duration) var(--gb-ease),
		visibility 0s;
}

.gb-mobile-menu__sub ul {
	margin: 0;
}

.gb-mobile-menu__back {
	display: flex;
	align-items: center;
	width: 100%;
	height: 50px;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font-family: inherit;
	font-size: 14px;
	line-height: 1;
	cursor: pointer;
}

.gb-mobile-menu__back .gb-icon {
	margin-right: 10px;
}

.gb-social--mobile {
	gap: 3px;
	padding-inline: var(--gb-gutter-sm);
}

.gb-social--mobile a {
	width: 44px;
	height: 44px;
	margin-bottom: 5px;
}

.gb-mobile-menu__footer {
	position: sticky;
	bottom: 0;
	margin-top: auto;
	border-top: 1px solid var(--gb-header-border);
	background: var(--gb-header-bg);
	text-align: center;
}

.gb-mobile-menu__account {
	display: flex;
	align-items: center;
	justify-content: center;
	padding-block: 10px;
	font-size: 13px;
	line-height: 1.6;
}

.gb-mobile-menu__account .gb-icon {
	margin-right: 12px;
}

@media (min-width: 1068px) {
	.gb-mobile-menu {
		display: none !important;
	}
}

/* ------------------------------------------------------------------ 横から出るパネル（検索） */

.gb-drawer {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	z-index: 90;
	display: flex;
	flex-direction: column;
	width: min(540px, 100vw - 15px);
	overflow: hidden;
	border-radius: var(--gb-radius-block) 0 0 var(--gb-radius-block);
	background: var(--gb-color-drawer-bg);
	box-shadow: none;
	visibility: hidden;
	transform: translateX(100%);
	transition:
		transform var(--gb-duration) var(--gb-ease),
		box-shadow var(--gb-duration) var(--gb-ease),
		visibility var(--gb-duration);
}

/* 左から出るパネル（絞り込み） */
.gb-drawer--left {
	right: auto;
	left: 0;
	border-radius: 0 var(--gb-radius-block) var(--gb-radius-block) 0;
	transform: translateX(-100%);
}

.gb-drawer.is-open {
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08);
	visibility: visible;
	transform: translateX(0);
}

.gb-drawer__header {
	position: sticky;
	top: 0;
	z-index: 35;
	padding-inline: 30px;
	background: var(--gb-color-drawer-bg);
}

.gb-drawer__header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 70px;
	padding-block: 10px;
	border-bottom: 1px solid var(--gb-color-border);
	line-height: 17px;
}

.gb-drawer__close {
	display: flex;
	align-items: flex-start;
	height: 17px;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	cursor: pointer;
}

.gb-drawer__body {
	flex: 1;
	overflow-x: hidden;
	overflow-y: auto;
	padding: 25px 30px;
	font-size: 15px;
	line-height: 24px;
}

.gb-search-drawer__form {
	flex: 1;
	margin: 0;
	padding-right: 20px;
}

.gb-search-drawer__input {
	width: 100%;
	height: 50px;
	padding: 0;
	border: 0;
	border-radius: var(--gb-radius-input);
	background: transparent;
	font-size: 16px;
	line-height: 1.15;
	outline: none;
}

.gb-search-drawer__title {
	display: block;
	margin: 0 0 20px;
	font-size: 15px;
	font-weight: 500;
	line-height: 15px;
}

/* おすすめの商品：192px の正方形の画像を横に並べ、はみ出た分は横にスクロール（商品カードの見た目は R4 で仕上げる） */
.gb-search-drawer__products {
	display: grid;
	grid-auto-columns: 192px;
	grid-auto-flow: column;
	gap: 10px;
	margin: 0 -30px;
	padding: 0 30px;
	overflow-x: auto;
	list-style: none;
	scroll-snap-type: x mandatory;
	scroll-padding-inline: 30px;
	scrollbar-width: none;
	text-align: center;
}

.gb-search-drawer__products li {
	scroll-snap-align: start;
}

.gb-mini-card__image {
	display: block;
	aspect-ratio: 1;
	margin-bottom: 20px;
	overflow: hidden;
}

.gb-mini-card__image img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.gb-mini-card__vendor {
	display: block;
	margin-bottom: 8px;
	font-size: 11px;
	line-height: 11px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	opacity: 0.8;
}

.gb-mini-card__title {
	display: block;
	margin-bottom: 6px;
	font-size: 16px;
	font-weight: 500;
	line-height: 1.4;
}

/* ------------------------------------------------------------------ 画面を暗くする幕（パネルの後ろ） */

.gb-overlay {
	position: fixed;
	inset: 0;
	z-index: 53;
	background: rgba(var(--gb-color-overlay-rgb), 0.4);
	-webkit-backdrop-filter: blur(7px);
	backdrop-filter: blur(7px);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: all var(--gb-duration) var(--gb-ease);
}

.gb-overlay.is-open {
	opacity: 1;
	visibility: visible;
	pointer-events: all;
}

/* パネルを開いている間は、後ろのページをスクロールさせない */
.gb-scroll-lock {
	overflow: hidden;
}

/* ------------------------------------------------------------------ フッター */

.gb-footer {
	padding-block: 45px;
	background: var(--gb-footer-bg);
	color: var(--gb-footer-text);
	font-size: 15px;
	line-height: 24px;
}

.gb-footer__col {
	border-top: 1px solid var(--gb-footer-border);
}

.gb-footer__heading {
	margin: 0;
	font: inherit;
	letter-spacing: normal;
}

.gb-footer__heading button {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 25px 0;
	border: 0;
	background: none;
	color: var(--gb-footer-heading);
	font-family: var(--gb-font-body);
	font-size: 17px;
	font-weight: 500;
	line-height: 17px;
	cursor: pointer;
}

.gb-footer__arrow {
	position: relative;
	top: 1.5px;
	transform: rotateX(180deg);
}

.gb-footer__heading button[aria-expanded='true'] .gb-footer__arrow {
	transform: rotateX(0deg);
}

.gb-footer__links {
	display: none;
	margin: 0;
	padding: 0 0 30px;
	list-style: none;
}

.gb-footer__heading button[aria-expanded='true'] + .gb-footer__links,
.gb-footer__heading:has(button[aria-expanded='true']) + .gb-footer__links {
	display: block;
}

.gb-footer__links li {
	margin-bottom: 5px;
}

.gb-footer__links li:last-child {
	margin-bottom: 0;
}

.gb-footer__links a {
	color: var(--gb-footer-link);
	transition: color var(--gb-duration) var(--gb-ease);
}

.gb-footer__links a:hover {
	color: var(--gb-footer-link-hover);
}

.gb-footer__bottom {
	display: flow-root;
	margin-top: 40px;
}

.gb-footer__rule {
	margin: 20px 0;
	border: 0;
	border-bottom: 1px solid var(--gb-footer-border);
	opacity: 0.5;
}

.gb-footer__copyright {
	margin: 0 0 20px;
	font-size: 14px;
	line-height: 1.6;
	opacity: 0.8;
}

/* タブレット以上：4 列に並べ、見出しは開閉しない */
@media (min-width: 768px) {
	.gb-footer {
		padding-block: 65px;
	}

	.gb-footer__cols {
		display: grid;
		grid-template-columns: repeat(4, 1fr);
		column-gap: 30px;
	}

	.gb-footer__col {
		margin-bottom: 40px;
		border-top: 0;
	}

	.gb-footer__heading button {
		margin-bottom: 20px;
		padding: 0;
		cursor: default;
	}

	.gb-footer__arrow {
		display: none;
	}

	.gb-footer__links,
	.gb-footer__heading:has(button[aria-expanded='false']) + .gb-footer__links {
		display: block;
		padding-bottom: 0;
	}
}

/* ------------------------------------------------------------------ ページ上部へ戻るボタン */

/* 画面の高さより下までスクロールすると、下から 0.25 秒で上がってくる */
.gb-back-to-top {
	position: fixed;
	right: 30px;
	bottom: 30px;
	z-index: 40;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
	color: var(--gb-color-text);
	cursor: pointer;
	transform: translateY(70px);
	transition: all var(--gb-duration) var(--gb-ease);
}

.gb-back-to-top.is-shown {
	transform: translateY(0);
	transition-delay: 0.26s;
}

.gb-back-to-top .gb-icon {
	color: var(--gb-color-accent);
}

.gb-back-to-top .gb-icon path {
	transform-box: fill-box;
}

.gb-back-to-top:hover .gb-icon path:first-child {
	transform-origin: 50% 100%;
	animation: gb-btt-stem var(--gb-duration) var(--gb-ease) both;
}

.gb-back-to-top:hover .gb-icon path:not(:first-child) {
	animation: gb-btt-head var(--gb-duration) var(--gb-ease) both;
}

@keyframes gb-btt-stem {
	from {
		opacity: 0;
		transform: scaleY(0);
	}
}

@keyframes gb-btt-head {
	from {
		transform: translateY(4px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.gb-mobile-menu,
	.gb-mobile-menu__sub,
	.gb-drawer,
	.gb-overlay,
	.gb-back-to-top,
	.gb-header__toggle span,
	.gb-nav__dropdown {
		transition-duration: 0.01s;
	}
}

/* ------------------------------------------------------------------ 予測検索（検索パネルの候補） */

.gb-drawer__body[hidden] {
	display: none;
}

.gb-search-drawer__empty {
	margin: 0;
	font-size: 15px;
	line-height: 1.6;
}

.gb-search-drawer__all {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	margin-top: 25px;
	color: var(--gb-color-accent);
	font-size: 15px;
	font-weight: 500;
	line-height: 1.4;
}

[data-gb-search-results][aria-busy='true'] {
	opacity: 0.5;
}

