/*
Theme Name: DriveLife
Theme URI: https://drivelife.jp/
Author: 山口コーポレーション株式会社
Description: DriveLife（ドライブライフ）公式サイト専用テーマ（商品データは data.json、購入ボタン・構造化データは functions.php）
Version: 1.0.0
Requires PHP: 7.4
Text Domain: drivelife
*/

:root {
	--ink: #1c1715;
	--ink-2: #57504c;
	--rose: #f15a25;
	--rose-d: #d2461a;
	--rose-l: #fde9e0;
	--bg: #f7f6f4;
	--tint: #eeece9;
	--line: #e0dbd6;
	--white: #fff;
	--serif: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", system-ui, sans-serif;
	--sans: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", system-ui, sans-serif;
	--en: "Barlow", "Noto Sans JP", sans-serif;
	--r: 12px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.9; letter-spacing: .02em; overflow-x: hidden; }
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 900; line-height: 1.45; letter-spacing: .03em; margin: 0 0 .6em; }
h2 { font-size: clamp(24px, 3.2vw, 34px); }
h3 { font-size: 19px; }
p { margin: 0 0 1em; }
small { font-size: .78em; }

.dl-skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 99; }
.dl-skip:focus { left: 8px; }

/* header */
.dl-header { position: sticky; top: 0; z-index: 50; background: rgba(28, 23, 21, .96); backdrop-filter: blur(8px); border-bottom: 3px solid var(--rose); color: #fff; }
.dl-header__in { max-width: 1200px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.dl-logo img { width: 150px; }
.dl-nav { display: flex; align-items: center; gap: 22px; font-size: 14px; }
.dl-nav a { text-decoration: none; }
.dl-nav a:hover { color: var(--rose); }
.dl-nav__buy, .dl-nav__cart { background: var(--rose); color: #fff !important; padding: 8px 18px; border-radius: 999px; border: 0; font: inherit; cursor: pointer; }

/* buttons */
.dl-btn { display: inline-flex; align-items: center; justify-content: center; gap: .4em; min-height: 48px; padding: 10px 22px; border-radius: 999px; text-decoration: none; font-weight: 700; font-size: 15px; letter-spacing: .04em; border: 1.5px solid transparent; transition: transform .15s, background .15s, color .15s; cursor: pointer; font-family: var(--sans); }
.dl-btn:hover { transform: translateY(-1px); }
.dl-btn--primary { background: var(--rose); color: #fff; }
.dl-btn--primary:hover { background: var(--rose-d); }
.dl-btn--aupay { background: #eb5505; color: #fff; }
.dl-btn--ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.dl-btn--amazon { background: #232f3e; color: #fff; }
.dl-btn--rakuten { background: #bf0000; color: #fff; }
.dl-btn--yahoo { background: #fff; color: #ff0033; border-color: #ff0033; }
.dl-btn--cart { background: var(--ink); color: #fff; width: 100%; }
.dl-btn[disabled] { opacity: .45; cursor: not-allowed; }
.dl-ext { font-size: .85em; opacity: .8; }
.dl-buy { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 6px; }
.dl-buy .dl-btn { flex: 1 1 170px; }
.dl-buy--small .dl-btn { min-height: 40px; font-size: 13px; padding: 6px 14px; flex: 1 1 140px; }
.dl-buy-note { font-size: 13px; color: var(--ink-2); margin: 16px 0 0; }
.dl-cart { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin: 14px 0; display: grid; gap: 12px; }
.dl-cart__price { font-size: 22px; font-weight: 700; }

.dl-eyebrow { font-family: var(--en); font-weight: 700; color: var(--rose-d); letter-spacing: .18em; font-size: 13px; text-transform: uppercase; margin: 0 0 .4em; }

/* hero */
.dl-hero { max-width: 1200px; margin: 0 auto; padding: 40px 20px 20px; display: grid; grid-template-columns: 1.15fr 1fr; gap: 44px; align-items: center; }
.admin-bar .dl-header { top: 32px; }
.dl-hero__media { border-radius: 20px; overflow: hidden; background: var(--rose-l); aspect-ratio: 16 / 9; box-shadow: 0 20px 50px -24px rgba(47, 32, 31, .35); }
.dl-hero__video { width: 100%; height: 100%; object-fit: cover; }
.dl-hero__title { font-size: clamp(28px, 3.3vw, 42px); margin-bottom: .5em; word-break: keep-all; overflow-wrap: anywhere; }
.dl-hero__lead { color: var(--ink-2); }
.dl-hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

/* facts */
.dl-facts { max-width: 1200px; margin: 20px auto 0; padding: 0 20px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.dl-fact { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 16px; text-align: center; }
.dl-fact strong { display: block; font-family: var(--en); font-weight: 700; font-size: 32px; line-height: 1.2; color: var(--rose-d); }
.dl-fact strong small { font-size: 14px; margin-left: 2px; color: var(--ink); }
.dl-fact span { display: block; font-size: 12.5px; color: var(--ink-2); line-height: 1.6; margin-top: 6px; }

/* sections */
.dl-sec { max-width: 1200px; margin: 0 auto; padding: 80px 20px; }
.dl-sec--tint { max-width: none; background: var(--tint); }
.dl-sec--tint > * { max-width: 1160px; margin-left: auto; margin-right: auto; }
.dl-sec__head { text-align: center; max-width: 760px; margin: 0 auto 40px; }
.dl-sec__head h2::after { content: ""; display: block; width: 44px; height: 2px; background: var(--rose); margin: 16px auto 0; }
.dl-sec__head p { color: var(--ink-2); }
.dl-note { font-size: 12.5px; color: var(--ink-2); margin-top: 12px; }
.dl-center { text-align: center; margin-top: 28px; }

/* cards */
.dl-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.dl-card { background: var(--white); border-radius: 18px; overflow: hidden; border: 1px solid var(--line); display: flex; flex-direction: column; }
.dl-card__img img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .4s; }
.dl-card__img { overflow: hidden; display: block; }
.dl-card:hover .dl-card__img img { transform: scale(1.03); }
.dl-card__body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.dl-card h3 { margin-bottom: .3em; }
.dl-card h3 a { text-decoration: none; }
.dl-card__catch { color: var(--ink-2); font-size: 14.5px; }
.dl-tags { list-style: none; padding: 0; margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.dl-tags li { font-size: 12px; background: var(--rose-l); color: var(--ink); padding: 3px 10px; border-radius: 999px; }
.dl-tags li.is-cool { background: #e1eef3; color: #26505e; }
.dl-more { margin-top: auto; align-self: flex-start; font-weight: 700; text-decoration: none; border-bottom: 1px solid var(--rose); padding-bottom: 2px; font-size: 14px; }
.dl-more span { margin-left: 6px; }

.dl-rating { font-size: 14px; font-weight: 700; margin: 4px 0 12px; line-height: 1.6; }
.dl-rating small { display: block; font-weight: 400; color: var(--ink-2); font-size: 11.5px; }
.dl-stars { display: none; }

/* guide */
.dl-steps { list-style: none; counter-reset: s; padding: 0; margin: 0 auto 40px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.dl-steps li { counter-increment: s; background: var(--white); border-radius: var(--r); padding: 22px 20px; border: 1px solid var(--line); }
.dl-steps li::before { content: "STEP " counter(s); display: block; font-family: var(--serif); color: var(--rose-d); letter-spacing: .15em; font-size: 12px; }
.dl-steps strong { display: block; font-family: var(--serif); font-size: 19px; margin: 4px 0 6px; }
.dl-steps span { font-size: 14.5px; color: var(--ink-2); }

.dl-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--r); border: 1px solid var(--line); background: var(--white); }
.dl-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
.dl-table caption { caption-side: top; text-align: left; font-size: 12.5px; color: var(--ink-2); padding: 10px 14px; }
.dl-table th, .dl-table td { padding: 12px 14px; border-top: 1px solid var(--line); text-align: left; vertical-align: top; line-height: 1.6; }
.dl-table thead th { background: var(--ink); color: #fff; font-weight: 500; border-top: 0; white-space: nowrap; }
.dl-table tbody th { white-space: nowrap; }
.dl-table tbody th a { font-weight: 700; }
.dl-table--spec { min-width: 0; }
.dl-table--spec th { width: 32%; background: var(--rose-l); font-weight: 500; }

/* split */
.dl-split { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; }
.dl-split__img img { border-radius: 18px; width: 100%; }

/* cool */
.dl-cool { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.dl-cool__item { background: var(--white); border-radius: var(--r); padding: 20px; border: 1px solid var(--line); }
.dl-cool__item h3 { font-size: 17px; }
.dl-cool__item .dl-buy { flex-direction: column; }
.dl-cool__item .dl-btn { flex: none; width: 100%; }

/* story */
.dl-story { max-width: none; background: var(--ink); color: #f3eeea; border-top: 4px solid var(--rose); }
.dl-story__in { max-width: 760px; margin: 0 auto; text-align: center; }
.dl-story .dl-eyebrow { color: var(--rose); }
.dl-story p { color: #e4ddd8; }

/* buy list */
.dl-buylist { display: grid; gap: 14px; }
.dl-buylist__row { display: grid; grid-template-columns: 260px 1fr; gap: 20px; align-items: center; background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 18px; }
.dl-buylist__name { display: flex; align-items: center; gap: 14px; text-decoration: none; font-family: var(--serif); font-weight: 700; font-size: 17px; }
.dl-buylist__name img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; }
.dl-buylist .dl-buy { margin: 0; }

/* faq */
.dl-faq { max-width: 860px; margin: 0 auto; display: grid; gap: 12px; }
.dl-faq details { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 0 20px; }
.dl-faq summary { cursor: pointer; font-weight: 700; padding: 18px 28px 18px 0; list-style: none; position: relative; }
.dl-faq summary::-webkit-details-marker { display: none; }
.dl-faq summary::before { content: "Q"; font-family: var(--serif); color: var(--rose-d); margin-right: 10px; }
.dl-faq summary::after { content: "+"; position: absolute; right: 0; top: 16px; font-size: 20px; color: var(--rose-d); }
.dl-faq details[open] summary::after { content: "−"; }
.dl-faq details p { padding-bottom: 18px; color: var(--ink-2); margin: 0; }

/* product page */
.dl-crumb { max-width: 1200px; margin: 0 auto; padding: 16px 20px 0; font-size: 12.5px; color: var(--ink-2); display: flex; gap: 8px; flex-wrap: wrap; }
.dl-crumb a { text-decoration: none; }
.dl-pd { max-width: 1200px; margin: 0 auto; padding: 24px 20px 40px; display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.dl-pd__img img { border-radius: 20px; width: 100%; }
.dl-pd h1 { font-size: clamp(28px, 3.6vw, 40px); margin-bottom: .3em; }
.dl-pd .dl-buy { flex-direction: column; }
.dl-pd .dl-buy .dl-btn { flex: none; width: 100%; }
.dl-pd__catch { font-family: var(--serif); font-size: 19px; color: var(--rose-d); }
.dl-points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.dl-point { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 24px 22px; }
.dl-point__no { font-family: var(--en); font-weight: 700; color: var(--rose); font-size: 30px; display: block; line-height: 1; margin-bottom: 10px; }
.dl-point p { font-size: 14.5px; color: var(--ink-2); margin: 0; }
.dl-sub { margin-top: 32px; }
.dl-colors { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.dl-colors li { background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: 4px 14px; font-size: 13.5px; }
.dl-mini { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.dl-mini__item { text-decoration: none; background: var(--white); border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); }
.dl-mini__item img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.dl-mini__item span { display: block; padding: 10px 12px; font-weight: 700; font-size: 14px; }
.dl-sticky { display: none; }

.dl-page { max-width: 860px; }
.dl-page h1 { font-size: clamp(26px, 3.4vw, 36px); }
.dl-page__body table { width: 100%; border-collapse: collapse; background: var(--white); }
.dl-page__body th, .dl-page__body td { border: 1px solid var(--line); padding: 10px 14px; text-align: left; vertical-align: top; }
.dl-page__body th { background: var(--rose-l); width: 30%; font-weight: 500; }

/* footer */
.dl-footer { background: var(--rose); color: #fff; font-size: 14px; }
.dl-footer__in { max-width: 1200px; margin: 0 auto; padding: 56px 20px 32px; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.dl-footer__brand img { width: 200px; margin-bottom: 14px; }
.dl-footer__brand p { font-size: 13px; color: #fff; }
.dl-footer__h { font-family: var(--serif); color: #fff; margin-bottom: 10px; }
.dl-footer__col a { display: block; text-decoration: none; padding: 3px 0; color: #fff; }
.dl-footer__col a:hover { color: #fff; text-decoration: underline; }
.dl-footer__company { border-top: 1px solid rgba(255,255,255,.35); text-align: center; padding: 18px 20px 28px; font-size: 12px; color: #fff; }
.dl-footer__company p { margin: 0 0 4px; }

/* shopify cart look */
shopify-cart::part(dialog) { border-radius: 16px; }

/* tablet */
@media (max-width: 960px) {
	.dl-hero { grid-template-columns: 1fr; gap: 24px; padding-top: 20px; }
	.dl-facts { grid-template-columns: repeat(2, 1fr); }
	.dl-cards { grid-template-columns: repeat(2, 1fr); }
	.dl-split { grid-template-columns: 1fr; gap: 24px; }
	.dl-cool { grid-template-columns: 1fr; }
	.dl-pd { grid-template-columns: 1fr; gap: 24px; }
	.dl-footer__in { grid-template-columns: 1fr 1fr; }
	.dl-mini { grid-template-columns: repeat(2, 1fr); }
}

/* phone */
@media (max-width: 640px) {
	body { font-size: 15px; }
	.dl-header__in { padding: 8px 16px; flex-wrap: wrap; gap: 6px; }
	.dl-logo img { width: 128px; }
	.dl-nav { width: 100%; overflow-x: auto; gap: 16px; font-size: 13px; white-space: nowrap; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
	.dl-nav__buy, .dl-nav__cart { padding: 5px 14px; }
	.dl-nav a[href$="/about/"] { display: none; }
	.admin-bar .dl-header { top: 46px; }
	html { scroll-padding-top: 100px; }
	.dl-hero { padding: 16px 16px 8px; }
	.dl-hero__media { border-radius: 14px; }
	.dl-facts { padding: 0 16px; gap: 10px; }
	.dl-fact { padding: 14px 10px; }
	.dl-fact strong { font-size: 24px; }
	.dl-sec { padding: 56px 16px; }
	.dl-sec__head { margin-bottom: 28px; }
	.dl-cards { grid-template-columns: 1fr; gap: 18px; }
	.dl-steps { grid-template-columns: 1fr; }
	.dl-points { grid-template-columns: 1fr; }
	.dl-buylist__row { grid-template-columns: 1fr; gap: 10px; padding: 14px; }
	.dl-buy .dl-btn { flex: 1 1 100%; }
	.dl-buy--small .dl-btn { flex: 1 1 100%; }
	.dl-pd { padding: 12px 16px 28px; }
	.dl-footer__in { grid-template-columns: 1fr; gap: 24px; padding: 40px 16px 24px; }
	.dl-sticky { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: rgba(247, 246, 244, .97); border-top: 1px solid var(--line); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); align-items: center; justify-content: space-between; gap: 12px; font-weight: 700; font-size: 14px; }
	.dl-sticky .dl-btn { min-height: 42px; padding: 6px 22px; }
	body.dl-has-sticky .dl-footer { padding-bottom: 70px; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.dl-btn, .dl-card__img img { transition: none; }
}

/* DriveLife 追加 */
.dl-hero { grid-template-columns: 1fr 1.05fr; }
.dl-hero__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dl-hero__cell { border-radius: 14px; overflow: hidden; background: var(--white); aspect-ratio: 1; }
.dl-hero__cell img { width: 100%; height: 100%; object-fit: cover; }
.dl-hero__title { font-size: clamp(28px, 3.4vw, 44px); }
.dl-card__img img { background: var(--white); }
.dl-makers { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.dl-makers a { display: inline-block; text-decoration: none; background: var(--white); border: 1.5px solid var(--ink); border-radius: 999px; padding: 6px 16px; font-weight: 700; font-size: 14px; }
.dl-makers a:hover { background: var(--ink); color: #fff; }
.dl-jump { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; }
.dl-jump a { display: block; text-decoration: none; background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--rose); border-radius: 8px; padding: 10px 14px; font-weight: 700; font-size: 14.5px; }
.dl-jump a:hover { border-color: var(--rose); }
.dl-model__grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: start; margin-bottom: 32px; }
.dl-model__img img { border-radius: 16px; width: 100%; background: var(--white); }
.dl-model h2 { font-size: clamp(22px, 2.6vw, 30px); }
.dl-model .dl-points { margin-bottom: 24px; }
.dl-sub { font-weight: 700; margin: 20px 0 8px; font-size: 14px; }
.dl-sec__head--left { text-align: left; margin-left: 0; margin-bottom: 20px; }
.dl-sec__head--left h2::after { margin-left: 0; }
.dl-sec--line { border-top: 1px solid var(--line); }
.dl-shapes { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-bottom: 12px; }
.dl-shape { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; font-size: 14px; }
.dl-shape p { margin: 0; }
.dl-shape__h { font-weight: 700; color: var(--rose-d); margin-bottom: 4px !important; }
.dl-keyrows { display: grid; gap: 12px; margin-top: 16px; }
.dl-keyrow { display: grid; grid-template-columns: 140px 1fr; gap: 20px; align-items: center; background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.dl-keyrow__img img { border-radius: 10px; width: 140px; height: 140px; object-fit: cover; }
.dl-keyrow h3 { font-size: 18px; margin-bottom: 4px; }
.dl-keyrow h3 small { display: inline-block; margin-left: 10px; font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.dl-keyrow__colors { font-size: 13.5px; color: var(--ink-2); margin: 0 0 4px; }
.dl-keyrow .dl-rating { margin: 0 0 4px; }
.dl-keyrow .dl-buy { margin-top: 6px; }
.dl-maker + .dl-maker:not(.dl-sec--tint) { border-top: 1px solid var(--line); }
.dl-buylist__name img { background: var(--white); }
.dl-pd__img img { background: var(--white); }
@media (max-width: 960px) {
	.dl-model__grid { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 640px) {
	.dl-nav a[href$="/key-case/"] { display: none; }
	.dl-keyrow { grid-template-columns: 88px 1fr; gap: 12px; padding: 12px; }
	.dl-keyrow__img img { width: 88px; height: 88px; }
	.dl-keyrow h3 small { display: block; margin: 2px 0 0; }
	.dl-hero__grid { gap: 8px; }
}
@media (min-width: 1100px) {
	.dl-cards { grid-template-columns: repeat(4, 1fr); gap: 20px; }
	.dl-card h3 { font-size: 17px; }
}
.dl-buylist__row { grid-template-columns: 300px 1fr; }
@media (max-width: 640px) { .dl-buylist__row { grid-template-columns: 1fr; } }

@media (max-width: 960px) { .dl-hero { grid-template-columns: 1fr; } }
.dl-model__text .dl-buy { flex-direction: column; max-width: 420px; }
.dl-model__text .dl-buy .dl-btn { flex: none; width: 100%; }
.dl-btn--amazon { background: #232f3e; color: #fff; }

/* guide articles */
.dl-page__body h2 { font-size: clamp(20px, 2.4vw, 24px); margin: 2.2em 0 .7em; padding-left: 12px; border-left: 4px solid var(--rose); line-height: 1.5; }
.dl-page__body h3 { font-size: 18px; margin: 1.6em 0 .5em; }
.dl-page__body p, .dl-page__body li { line-height: 1.9; }
.dl-page__body ol, .dl-page__body ul { padding-left: 1.4em; }
.dl-page__body table { margin: 1em 0 1.4em; font-size: 15px; }
.dl-page__body thead th { width: auto; }
.dl-page__body thead + tbody td:first-child { min-width: 7em; font-weight: 500; }
.dl-page__body .dl-buy { margin: 1.2em 0; }
.dl-author { margin-top: 2.4em; padding: 16px 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); font-size: 14px; }
@media (max-width: 640px) { .dl-page__body table { display: block; overflow-x: auto; white-space: normal; } }
