/**
 * WooCommerce 上書き用（テーマ）
 * プラグインの CSS の後に読み込まれる（functions.php の依存ハンドル参照）
 */

/* ============================================================================================
	ヘッダーカート（全テンプレ）
	フロントは navigation-default のみ読み込みのため、非表示ルールは navigation-common に置かない
============================================================================================ */
.hightime-navigation-trailing {
	display: flex !important;
	flex-wrap: nowrap;
	align-items: center;
	gap: 4px 12px;
	margin-left: auto !important;
}
.hightime-navigation-trailing .mobile-toggle {
	margin-left: 0 !important;
}
.hightime-header-cart-wrap {
	display: none;
	align-items: center;
	line-height: 0;
}
body.woocommerce-page .hightime-header-cart-wrap--has-items {
	display: flex;
}
.hightime-header-cart {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 6px;
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
	transition: color .25s ease, opacity .25s ease;
}
.hightime-header-cart:hover,
.hightime-header-cart:focus-visible {
	color: var(--wp--preset--color--accent);
	opacity: .92;
}
.hightime-header-cart__icon {
	display: block;
	flex-shrink: 0;
}
.hightime-header-cart__badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.25em;
	padding: 0.1em 0.35em;
	border-radius: 999px;
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
	font-size: var(--wp--preset--font-size--xx-small, 0.65rem);
	font-weight: 700;
	line-height: 1.2;
}
/* navigation-default 単体（common 併用なし）：暗背景ヘッダー用の白アイコン */
.hightime-navigation-default:not(.hightime-navigation-common) .hightime-header-cart {
	color: var(--wp--preset--color--white);
}
.hightime-navigation-default:not(.hightime-navigation-common) .hightime-header-cart__badge {
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--contrast);
}
.is__active.hightime-navigation-default:not(.hightime-navigation-common) .hightime-header-cart {
	color: var(--wp--preset--color--contrast) !important;
}
.is__active.hightime-navigation-default:not(.hightime-navigation-common) .hightime-header-cart__badge {
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
}

.orderby {
	padding: 1em
}
.woocommerce div.product div.images .flex-control-thumbs {
	display: flex;
	flex-flow: wrap;
	gap: 8px;
	margin-top: 8px
}

/* breadcrumb */
.hightime-woocommerce .woocommerce .woocommerce-breadcrumb {
	margin: 0
}
.hightime-woocommerce .woocommerce-breadcrumb {
	display: flex;
	flex-flow: wrap;
	align-items: center;
	gap: 8px 4px
}
.hightime-woocommerce .woocommerce-breadcrumb a {
	padding: 5px 12px;
	border-radius: 100px;
	background:rgba(255,255,255,.5);
	text-decoration: none;
	transition: background .3s ease-in-out
}
.hightime-woocommerce .woocommerce-breadcrumb a:hover {
	background: var(--wp--preset--color--accent);
}
.hightime-woocommerce .woocommerce-breadcrumb a:first-of-type::before {
	content: "";
	display: inline-block;
	width: 1em;
	height: 1em;
	background: url("../images/icons/home.svg") center center /1em auto no-repeat;
	margin-right: .5em;
	vertical-align: -.125em
}
.hightime-woocommerce .wc-block-components-product-image {
    aspect-ratio: 1 / 1;
    background-color: var(--wp--preset--color--gray)
}
.hightime-woocommerce .wc-block-components-product-image img {
	width: 100%;
    height: 100% !important;
    object-fit: contain !important;
    transition: transform .6s
}
.hightime-woocommerce .wc-block-components-product-image > a:hover img {
    transform: scale(.95)
}
.hightime-woocommerce .wc-block-components-product-image > a {
	display: block;
    width: 100%;
    height: 100%
}
.hightime-woocommerce .wc-block-product a {
    color: var(--wp--preset--color--contrast) !important
}
.hightime-woocommerce a.added_to_cart {
	margin-top: 0
}

.hightime-woocommerce .wc-block-product-template__responsive>li,
.wc-block-product-template.is-flex-container>li {
	display: flex;
	flex-direction: column
}
.hightime-woocommerce .wp-block-button.wc-block-components-product-button {
	margin-top: auto
}
.hightime-woocommerce .taxonomy-product_brand.wp-block-post-terms {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	font-size: var(--wp--preset--font-size--x-small)
}
.hightime-woocommerce .taxonomy-product_brand.wp-block-post-terms a {
	display: inline-block;
	padding: .3em 1em;
	border-radius: 100px;
	background: var(--wp--preset--color--gray);
	color: var(--wp--preset--color--contrast);
	font-size: var(--wp--preset--font-size--x-small);
	text-decoration: none;
	transition: background .3s ease-in-out
}
.hightime-woocommerce .taxonomy-product_brand.wp-block-post-terms a:hover {
	background: var(--wp--preset--color--accent)
}

/* sold out */
.hightime-woocommerce .wc-block-product.outofstock {
    position: relative
}
.hightime-woocommerce .wc-block-product.outofstock::before {
    content: "SOLD OUT";
    display: inline-block;
    padding: .5em 1em;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    border-radius: 2px;
    background: rgba(0, 0, 0, .6);
    color: var(--wp--preset--color--white);
    font-size: var(--wp--preset--font-size--xx-small);
    font-family: var(--wp--preset--font-family--gothic);
    pointer-events: none
}
.hightime-woocommerce .wp-block-button.wc-block-components-product-button .wc-block-components-product-button__button:not(.add_to_cart_button) {
    background: rgb(100, 100, 100);
	color: var(--wp--preset--color--white) !important
}
.hightime-woocommerce .hightime-woocommerce-column .wp-block-post-title {
	display: flex;
	flex-flow: wrap;
	align-items: center;
	gap: .4em
}
.hightime-woocommerce .hightime-woocommerce-column:has(.out-of-stock) .wp-block-post-title::before {
	content: "SOLD OUT";
	flex-shrink: 0;
    display: inline-block;
    padding: .5em 1em;
    border-radius: 2px;
    background: rgba(0, 0, 0, .6);
    color: var(--wp--preset--color--white);
    font-size: var(--wp--preset--font-size--xx-small);
    pointer-events: none
}
.hightime-woocommerce .hightime-woocommerce-column .out-of-stock {
	color: red
}

/* pagination */
.hightime-woocommerce-pagination {
	margin: var(--wp--preset--spacing--large) 0 !important;
	gap: 10px 12px
}
.hightime-woocommerce-pagination span {
	color: var(--wp--preset--color--white)
}
.hightime-woocommerce-pagination-prev,
.hightime-woocommerce-pagination-next {
	display: flex;
	justify-content: center;
	align-items: center;
	height: 40px;
	padding: 0 1.5em;
	border-radius: 2px;
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--white);
	text-decoration: none;
	transition: background .3s, color .3s ease-in-out
}
.hightime-woocommerce-pagination-prev:hover,
.hightime-woocommerce-pagination-next:hover {
	background: var(--wp--preset--color--accent) !important;
	color: var(--wp--preset--color--contrast)
}
.hightime-woocommerce-pagination-number {
	display: flex;
	flex-flow: wrap;
	gap: 10px
}
.hightime-woocommerce-pagination-number .page-numbers {
	display: flex;
	justify-content: center;
	align-items: center;
	min-width: 40px;
	height: 40px;
	border-radius: 2px;
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--white);
	text-decoration: none;
	transition: background .3s, color .3s ease-in-out
}
.hightime-woocommerce-pagination-number .page-numbers.current {
	background: transparent;
	color: var(--wp--preset--color--contrast)
}
.hightime-woocommerce-pagination-number a:hover {
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--contrast)
}

.hightime-woocommerce .entry-content {
	max-width: initial !important
}

/* ナビ内カート：Woo 関連ページのみ（navigation-common と同条件。未スコープだと全ページで display:flex されてしまう） */
@media screen and (min-width: 980px) {
	body.woocommerce-page .hightime-header-cart-wrap--has-items {
		position: fixed;
		top: 70px;
		right: 13em;
		display: flex;
		justify-content: center;
		align-items: center;
		aspect-ratio: 1;
		box-shadow: 0 0 10px rgba(0,0,0,.1);
		border-radius: 50%;
		background: rgba(255,255,255,.6)
	}
}
html body .wp-block-woocommerce-product-details.is-style-minimal ul.tabs.wc-tabs {
	display: none
}

/* sale badge */
.editor-styles-wrapper .wc-block-grid__products .wc-block-grid__product .wc-block-components-product-image .wc-block-components-product-sale-badge--align-right,
.wc-block-components-product-image .wc-block-components-product-sale-badge--align-right {
	top: -5px;
	right: -5px
}
.wc-block-components-product-sale-badge {
	display: inline-block;
	padding: 0;
	border-radius: 0;
	border: 0;
	background: none;
	color: var(--wp--preset--color--contrast);
	font-size: 0;
	pointer-events: none
}
.wc-block-components-product-sale-badge::before {
	content: "";
	display: inline-block;
	width: 50px;
	height: 50px;
	background: url("../images/icons/icon-sale.webp") center center /100% auto no-repeat;
}
.woocommerce span.onsale {
	background: none !important;
	font-size: 0
}
.woocommerce span.onsale::before {
	content: "";
	display: inline-block;
	width: 52px;
	height: 52px;
	background: url("../images/icons/icon-sale.webp") center center /100% auto no-repeat;
}

.wp-block-post-excerpt {
	margin: 1em 0
}

.wp-block-button.wc-block-components-product-button .wc-block-components-product-button__button span {
	color: white
}

/* リセットバリエーションボタン */
.woocommerce div.product form.cart table.variations td select {
	min-width: 60%
}
.reset_variations {
	display: inline-block;
	padding: .3em 1em;
	border: 1px solid var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--contrast);
	text-decoration: none
}