/* Crispa Theme Market – theme list and theme detail. */

/* --------------------------------------------------------------- List */
.p-shop-hero { background: var(--c-bg); border-bottom: 1px solid var(--c-line); padding: 24px 0 36px; }
.p-shop-hero .p-search { margin-bottom: 0; max-width: 860px; }
.p-shop { display: grid; gap: 32px; align-items: start; }
@media (min-width: 1024px) { .p-shop { grid-template-columns: 260px minmax(0, 1fr); } }
.p-filter { background: #fff; }
@media (min-width: 1024px) { .p-filter { position: sticky; top: calc(var(--c-header-h) + 16px); max-height: calc(100vh - var(--c-header-h) - 32px); overflow-y: auto; border: 1px solid var(--c-line); border-radius: 16px; padding: 20px; } .p-filter__head, .p-filter__open, .p-filter__backdrop { display: none; } }
.p-filter__group { border: 0; margin: 0 0 20px; padding: 0; min-width: 0; }
.p-filter__group legend { font-weight: 800; font-size: .9375rem; margin-bottom: 8px; padding: 0; }
.p-filter__opt { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 4px 8px; border-radius: 8px; cursor: pointer; font-size: .9375rem; }
.p-filter__opt:hover { background: var(--c-bg); }
.p-filter__opt input { width: 18px; height: 18px; accent-color: var(--c-btn); flex: none; }
.p-filter__opt span:last-child { margin-left: auto; color: var(--c-muted); font-size: .8125rem; }
.p-filter__actions { display: grid; gap: 8px; position: sticky; bottom: 0; background: #fff; padding-top: 8px; }
@media (max-width: 1023px) {
	.p-filter { position: fixed; inset: auto 0 0; z-index: 80; max-height: 85vh; overflow-y: auto; border-radius: 20px 20px 0 0; padding: 0 20px 20px; box-shadow: 0 -20px 60px rgb(0 0 0 / 20%); transform: translateY(105%); visibility: hidden; transition: transform .3s var(--c-ease), visibility 0s .3s; }
	.p-filter.is-open { transform: none; visibility: visible; transition: transform .3s var(--c-ease); }
	.p-filter__head { position: sticky; top: 0; background: #fff; display: flex; justify-content: space-between; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--c-line); margin-bottom: 16px; z-index: 1; }
	.p-filter__head h2 { font-size: 1.0625rem; margin: 0; }
	.p-filter__backdrop { position: fixed; inset: 0; z-index: 79; background: rgb(0 0 0 / 40%); }
	.p-filter__backdrop[hidden] { display: none; }
	.no-js .p-filter { position: static; transform: none; visibility: visible; box-shadow: none; border: 1px solid var(--c-line); border-radius: 16px; padding-top: 16px; }
}
.p-shop__bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.p-shop__count { margin: 0; color: var(--c-muted); }
.p-shop__count strong { color: var(--c-text); font-size: 1.125rem; }
.p-shop__sort { display: flex; gap: 8px; align-items: center; }
.p-shop__sort .c-input { min-height: 44px; width: auto; }
@media (min-width: 1024px) { .p-shop__sort .p-filter__open { display: none; } }
.p-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; padding: 0; list-style: none; }
.p-chips a { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 4px 8px 4px 14px; border-radius: 999px; background: var(--c-tint); color: var(--c-btn-hover); font-weight: 700; font-size: .875rem; text-decoration: none; }
.p-chips a:hover { background: var(--c-tint-2); }
.p-chips .is-clear a { background: none; color: var(--c-muted); text-decoration: underline; }
.p-shop .c-theme-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }

/* ------------------------------------------------------------- Detail */
.p-product__top { background: var(--c-bg); border-bottom: 1px solid var(--c-line); padding: 20px 0 40px; }
.p-product__title { font-size: clamp(1.75rem, 1.3rem + 1.8vw, 2.625rem); margin: 8px 0 8px; }
.p-product__short { font-size: 1.0625rem; color: #444; max-width: 46em; }
.p-product__meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.p-product__grid { display: grid; gap: 32px; align-items: start; padding-block: 32px 64px; grid-template-columns: minmax(0, 1fr); grid-template-areas: "preview" "buy" "body"; }
.p-product__grid > .p-preview { grid-area: preview; min-width: 0; }
.p-product__grid > .p-buy { grid-area: buy; }
.p-product__grid > .p-product__main { grid-area: body; min-width: 0; }
@media (min-width: 1024px) { .p-product__grid { grid-template-columns: minmax(0, 1fr) 380px; grid-template-rows: auto 1fr; grid-template-areas: "preview buy" "body buy"; column-gap: 48px; row-gap: 0; } .p-buy { align-self: start; } }
.p-preview__devices { display: inline-flex; gap: 4px; padding: 4px; background: var(--c-bg); border: 1px solid var(--c-line); border-radius: 12px; margin-bottom: 16px; }
.p-preview__device { display: inline-flex; gap: 6px; align-items: center; min-height: 40px; padding: 6px 14px; border: 0; border-radius: 8px; background: none; color: var(--c-muted); font-weight: 700; font-size: .875rem; cursor: pointer; }
.p-preview__device[aria-selected="true"] { background: #fff; color: var(--c-text); box-shadow: var(--c-shadow-sm); }
.p-preview__stage { background: linear-gradient(180deg, var(--c-bg), #fff); border: 1px solid var(--c-line); border-radius: 20px; padding: clamp(16px, 3vw, 32px); }
.p-preview__stage img { display: block; width: 100%; border-radius: 12px; box-shadow: var(--c-shadow); }
.p-preview__stage .c-mock { --vh: 100%; }
@media (prefers-reduced-motion: no-preference) { .p-preview__stage:hover .c-mock__page { transform: translateY(calc(-100% + 60%)); } }
.p-preview__thumbs { list-style: none; margin: 12px 0 0; padding: 0; display: flex; gap: 10px; overflow-x: auto; }
.p-preview__thumbs button { padding: 0; border: 2px solid transparent; border-radius: 10px; background: none; cursor: pointer; width: 96px; flex: none; overflow: hidden; }
.p-preview__thumbs button[aria-pressed="true"] { border-color: var(--c-main); }
.p-preview__thumbs img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.p-buy { background: #fff; border: 1px solid var(--c-line); border-radius: 20px; padding: 24px; box-shadow: var(--c-shadow); }
@media (min-width: 1024px) { .p-buy { position: sticky; top: calc(var(--c-header-h) + 16px); } }
.p-buy__title { font-size: 1.0625rem; margin: 0 0 12px; }
.p-buy__plans { border: 0; margin: 0 0 16px; padding: 0; display: grid; gap: 10px; min-width: 0; }
.p-buy__plan { position: relative; display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center; padding: 14px; border: 1px solid var(--c-line); border-radius: 14px; cursor: pointer; transition: border-color .2s, background-color .2s; }
.p-buy__plan:hover { border-color: #f0b58f; }
.p-buy__plan:has(input:checked) { border: 2px solid var(--c-main); background: var(--c-tint); padding: 13px; }
.p-buy__plan input { width: 20px; height: 20px; accent-color: var(--c-btn); margin: 0; }
.p-buy__plan-name { font-weight: 700; display: block; }
.p-buy__plan-sub { font-size: .75rem; color: var(--c-muted); display: block; }
.p-buy__plan-price { font-weight: 800; font-variant-numeric: tabular-nums; }
.p-buy__rec { position: absolute; top: -10px; right: 12px; background: var(--c-btn); color: #fff; font-size: .6875rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.p-buy__total { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 14px; padding-top: 12px; border-top: 1px dashed var(--c-line); }
.p-buy__total strong { font-size: 1.75rem; font-variant-numeric: tabular-nums; }
.p-buy__actions { display: grid; gap: 10px; }
.p-buy__info { margin: 18px 0 0; display: grid; gap: 0; font-size: .875rem; }
.p-buy__info div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--c-line); }
.p-buy__info dt { color: var(--c-muted); display: flex; gap: 6px; align-items: center; }
.p-buy__info dd { margin: 0; font-weight: 700; text-align: right; }
.p-buy__secure { display: flex; gap: 8px; align-items: flex-start; margin: 14px 0 0; font-size: .8125rem; color: var(--c-muted); }
.p-product__lists { display: grid; gap: 16px; }
@media (min-width: 768px) { .p-product__lists { grid-template-columns: 1fr 1fr; } }
.p-product__lists .c-card { padding: 22px; }
.p-product__tabs { margin-top: 48px; }
.p-product__acc-only { display: none; }
@media (max-width: 767px) {
	.js .p-product__tabs .c-tabs__list { display: none; }
	.js .p-product__tabs .c-tabs__panel[hidden] { display: block !important; }
	.js .p-product__tabs .c-tabs__panel { border: 1px solid var(--c-line); border-radius: 14px; margin-bottom: 10px; }
}
.c-changelog { margin: 0; }
.c-changelog div { display: grid; grid-template-columns: 8em 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--c-line); }
.c-changelog dt { color: var(--c-muted); font-variant-numeric: tabular-nums; }
.c-changelog dd { margin: 0; }
.p-related { background: var(--c-bg); }
.p-product__sticky { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--c-line); box-shadow: 0 -6px 20px rgb(0 0 0 / 6%); transform: translateY(110%); transition: transform .3s var(--c-ease); }
.p-product__sticky.is-visible { transform: none; }
.p-product__sticky-name { font-weight: 700; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; min-width: 0; }
.p-product__sticky-price { display: block; font-size: .8125rem; color: var(--c-muted); font-weight: 400; }
@media (min-width: 1024px) { .p-product__sticky { display: none; } }
.p-product__panel-title { margin-top: 0; }
@media (min-width: 768px) { .js .p-product__panel-title { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); } }
@media (max-width: 767px) { .js .p-product__tabs .c-tabs__panel { padding: 18px; } .p-product__panel-title { font-size: 1.125rem; } }

/* ------------------------------------------------------------ Gallery */
.c-gallery { display: grid; gap: 20px; }
.c-gallery__stage { position: relative; margin: 0; border-radius: 14px; overflow: hidden; background: var(--c-bg); border: 1px solid var(--c-line); }
.c-gallery__stage img { display: block; width: 100%; height: auto; transition: opacity .25s ease; }
.c-gallery__stage.is-swapping img { opacity: .25; }
.c-gallery__strip { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.c-gallery__track { list-style: none; display: flex; gap: 10px; margin: 0; padding: 2px; overflow-x: auto; scroll-behavior: smooth; scrollbar-width: thin; overscroll-behavior-x: contain; }
.c-gallery__track::-webkit-scrollbar { height: 6px; }
.c-gallery__track::-webkit-scrollbar-thumb { background: var(--c-line); border-radius: 999px; }
.c-gallery__track.is-dragging { scroll-behavior: auto; cursor: grabbing; }
.c-gallery__track > li { flex: 0 0 auto; }
.c-gallery__thumb { display: block; width: 132px; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: #fff; line-height: 0; transition: border-color .2s, transform .2s; }
.c-gallery__thumb img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.c-gallery__thumb:hover { border-color: #f0b58f; }
.c-gallery__thumb.is-current { border-color: var(--c-main); }
@media (prefers-reduced-motion: no-preference) { .c-gallery__thumb:hover { transform: translateY(-2px); } }
.c-gallery__nav { display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none; border: 1px solid var(--c-line); border-radius: 50%; background: #fff; color: var(--c-text); cursor: pointer; box-shadow: var(--c-shadow-sm); }
.c-gallery__nav:hover { border-color: var(--c-btn); color: var(--c-btn); }
.c-gallery__nav.is-prev .c-icon { transform: rotate(90deg); }
.c-gallery__nav.is-next .c-icon { transform: rotate(-90deg); }
.no-js .c-gallery__nav { display: none; }
@media (max-width: 600px) { .c-gallery__thumb { width: 108px; } .c-gallery__nav { width: 36px; height: 36px; } }
/* 標準レイアウト（テーマ商品以外）の商品ページ */
.woocommerce div.product .c-gallery-wrap { margin-bottom: 28px; }
.woocommerce div.product .c-gallery-wrap img { max-width: 100%; }
