/*
Theme Name: Koyomi Tableware
Description: A Japanese-language, three-product demo storefront.
Version: 2.0.0
Requires at least: 5.3
Requires PHP: 7.2
License: GNU General Public License v2 or later
Text Domain: koyomi-tableware
*/
:root {
  color-scheme: light;
  --paper: #f8f4ed;
  --ink: #28261f;
  --muted: #645e54;
  --line: #d8cfc0;
  --accent: #963d26;
  --serif: "Yu Mincho", "Hiragino Mincho ProN", "Noto Serif CJK JP", serif;
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
  color: var(--ink);
  background: var(--paper);
  scroll-behavior: smooth;
}
* { box-sizing: border-box; }
body, h1, h2, h3, p { margin: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: .25em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
img { display: block; max-width: 100%; object-fit: cover; }
.wrap { width: min(90%, 1320px); margin-inline: auto; }
.notice { background: var(--accent); color: #fff8ec; text-align: center; padding: 9px 12px; font-size: .74rem; letter-spacing: .12em; }
.notice span { margin-inline: .5em; }
.bar { height: 81px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; gap: .42em; align-items: center; font: 700 clamp(1rem, 2vw, 1.5rem) var(--serif); letter-spacing: .07em; white-space: nowrap; }
.mark { color: var(--accent); font: 1.15em Georgia, serif; }
nav { display: flex; gap: clamp(18px, 4vw, 64px); font-size: .82rem; }
.cart-toggle { background: transparent; border: 1px solid var(--line); border-radius: 2px; padding: 8px 12px; white-space: nowrap; font-size: .82rem; }
.cart-toggle span { margin-left: .5em; color: var(--accent); font-weight: bold; }
.hero { display: grid; grid-template-columns: .83fr 1.17fr; min-height: 450px; margin-top: 24px; background: #efe5d6; }
.hero-copy { padding: clamp(34px, 6vw, 94px) clamp(24px, 5vw, 80px); align-self: center; }
.eyebrow { color: var(--accent); font-weight: bold; font-size: .76rem; letter-spacing: .15em; }
.eyebrow span { display: inline-block; width: 22px; height: 1px; background: currentColor; vertical-align: middle; margin-right: .35em; }
h1, h2, h3 { font-family: var(--serif); }
h1 { font-size: clamp(2.25rem, 4.65vw, 5rem); font-weight: 600; letter-spacing: .02em; line-height: 1.24; margin: 24px 0; }
.hero-description { color: var(--muted); line-height: 1.95; font-size: clamp(.82rem, 1.1vw, 1rem); }
.hero-img { width: 100%; height: 100%; min-height: 0; }
.button { display: inline-flex; align-items: center; justify-content: space-between; gap: 22px; font-weight: bold; font-size: .82rem; padding: 13px 17px; border: 1px solid var(--line); border-radius: 2px; background: transparent; color: var(--ink); min-height: 44px; }
.button:hover { background: #e8ded1; text-decoration: none; }
.primary { background: var(--accent); color: #fffaf3; border-color: var(--accent); }
.primary:hover { background: #76301e; }
.hero .button { margin-top: 26px; }
.collection { padding-block: clamp(53px, 7vw, 100px); }
.section-head { display: flex; justify-content: space-between; align-items: end; margin-bottom: 24px; gap: 12px; }
h2 { font-size: clamp(1.8rem, 3vw, 3rem); font-weight: 600; line-height: 1.3; }
.section-head h2 { margin-top: 9px; }
.muted { color: var(--muted); font-size: .84rem; }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 2vw, 28px); }
.product-image { display: block; width: 100%; padding: 0; border: 0; background: #e9dbc8; overflow: hidden; }
.product-image img { width: 100%; height: auto; aspect-ratio: 1.19; transition: transform .25s ease; }
.product-image:hover img { transform: scale(1.04); }
.product-meta { margin-top: 14px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; justify-content: space-between; }
.product-name { font-size: clamp(1rem, 1.55vw, 1.42rem); }
.product-name button { text-align: left; border: 0; padding: 0; color: inherit; background: transparent; }
.product-name button:hover { text-decoration: underline; text-underline-offset: .2em; }
.price { font-weight: bold; font-size: .92rem; white-space: nowrap; }
.product-card .muted { margin-block: 7px 12px; line-height: 1.7; }
.product-card .button { width: 100%; }
.story { background: #332c25; color: #faf0df; }
.story-inner, .guide { display: grid; grid-template-columns: 1fr 1.12fr; gap: clamp(24px, 6vw, 90px); padding-block: clamp(42px, 7vw, 90px); }
.story p { line-height: 2.1; max-width: 38em; }
.story p + p { margin-top: 1em; }
details { border-top: 1px solid var(--line); }
details:last-child { border-bottom: 1px solid var(--line); }
summary { padding: 15px 0; cursor: pointer; font-weight: bold; }
details p { color: var(--muted); line-height: 1.8; padding-bottom: 15px; font-size: .9rem; }
.footer { background: #ede3d5; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 18px; padding-block: 24px; font-size: .82rem; }
dialog { width: min(92vw, 900px); max-height: 92dvh; border: 1px solid var(--line); background: var(--paper); color: var(--ink); padding: clamp(18px, 3vw, 40px); }
dialog::backdrop { background: #2820198c; }
.close { position: absolute; top: 8px; right: 8px; background: var(--paper); color: var(--ink); border: 1px solid var(--line); width: 42px; height: 42px; border-radius: 50%; font-size: 25px; }
.product-detail { display: grid; grid-template-columns: .95fr 1fr; align-items: center; gap: 24px; padding-top: 18px; }
.product-detail img { width: 100%; }
.product-detail p { margin-block: 10px; line-height: 1.75; }
.product-detail dl { font-size: .86rem; margin-block: 15px; }
.product-detail dt { font-weight: bold; }
.product-detail dd { margin: 3px 0 10px; }
.drawer { width: min(100vw, 460px); max-width: none; height: 100dvh; max-height: none; margin: 0 0 0 auto; padding: 28px; }
.drawer h2 { margin-bottom: 22px; }
.cart-list { padding: 0; list-style: none; }
.cart-item { display: grid; grid-template-columns: 64px 1fr auto; gap: 10px; padding-block: 15px; border-top: 1px solid var(--line); align-items: start; }
.cart-item img { width: 64px; height: 64px; }
.cart-item h3 { font-size: 1rem; }
.quantity { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.quantity button { min-width: 34px; min-height: 34px; border: 1px solid var(--line); background: transparent; color: inherit; }
.quantity button:disabled { opacity: .45; cursor: default; }
.cart-total { border-top: 1px solid var(--line); padding-block: 14px; display: flex; justify-content: space-between; gap: 10px; }
.cart-actions { display: grid; gap: 12px; }
.cart-message { color: var(--muted); line-height: 1.8; margin-bottom: 16px; }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 2; background: var(--ink); color: white; padding: 10px 16px; font-size: .84rem; pointer-events: none; }
#toast:empty { display: none; }
@media (max-width: 720px) {
  .bar { height: auto; min-height: 70px; flex-wrap: wrap; padding-block: 12px; gap: 12px; }
  nav { order: 3; justify-content: space-between; width: 100%; gap: 8px; font-size: .75rem; }
  .hero { grid-template-columns: 1fr; min-height: 0; margin-top: 14px; }
  .hero-img { aspect-ratio: 1.45; }
  .hero-copy { padding: 30px 24px; }
  h1 { margin-block: 14px; }
  .story-inner, .guide { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .product-grid { grid-template-columns: 1fr; gap: 28px; }
  .product-detail { grid-template-columns: 1fr; }
  .product-detail img { max-height: 32dvh; }
}
@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

[hidden] { display: none !important; }
.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 16px; top: 16px; z-index: 20; background: white; padding: 10px; }
.content-page { padding-block: clamp(40px, 6vw, 84px); }
.content-page h1 { margin: 0 0 24px; font-size: clamp(1.9rem, 4vw, 3.7rem); }
.page-intro { color: var(--muted); line-height: 1.9; max-width: 68ch; margin-bottom: 24px; }
.breadcrumb { color: var(--muted); font-size: .88rem; margin-bottom: 18px; }
.product-page .product-detail { padding-top: 0; gap: clamp(18px, 5vw, 72px); }
.product-page .product-detail img { max-height: none; }
.product-page h1 { margin: 8px 0 12px; }
.prose { max-width: 74ch; }
.prose h2 { font-size: clamp(1.2rem, 2.5vw, 1.65rem); margin-top: 2em; margin-bottom: .45em; }
.prose p { line-height: 1.9; margin-bottom: 1em; }
.prose p a, .checkout-panel p a, #checkout-empty a { text-decoration: underline; text-underline-offset: .2em; }
.seller-details { display: grid; grid-template-columns: minmax(105px, .6fr) 1.4fr; gap: 10px 18px; }
.seller-details dt, .checkout-panel dt { font-weight: 700; }
.seller-details dd, .checkout-panel dd { margin: 0; overflow-wrap: anywhere; }
.footer-main { display: grid; grid-template-columns: .8fr 1.4fr 1fr; gap: 24px; padding-block: 36px; }
.footer-main .muted { margin-top: 8px; }
.footer-nav { display: grid; grid-template-columns: 1fr 1fr; align-content: start; gap: 12px 20px; }
.payment-footer p { font-size: .82rem; }
.payment-brands { display: flex; flex-wrap: wrap; gap: 6px; margin-block: 9px; }
.payment-brands span { background: #fffaf3; color: #37332c; border: 1px solid var(--line); border-radius: 3px; padding: 5px 8px; font: 700 .76rem/1.1 sans-serif; }
.cart-notice { position: fixed; bottom: 18px; right: 18px; z-index: 5; width: min(380px, calc(100% - 36px)); box-shadow: 0 12px 36px #3020103b; background: var(--paper); border: 1px solid var(--line); padding: 18px 44px 18px 18px; }
.cart-notice p { margin-bottom: 12px; }
.notice-close { position: absolute; top: 6px; right: 6px; border: 0; background: transparent; color: var(--ink); font-size: 1.5rem; width: 36px; height: 36px; }
.cart-content { max-width: 780px; }
.cart-item h2 { font-size: 1.2rem; }
.cart-content > p, .checkout-panel > p { margin: 12px 0; }
.shop-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; }
.checkout-layout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(245px, .8fr); gap: 24px; align-items: start; }
.checkout-panel, .shop-form fieldset { padding: clamp(16px, 2.5vw, 30px); border: 1px solid var(--line); background: #fffaf3; line-height: 1.65; }
.checkout-panel h2 { font-size: 1.44rem; }
.checkout-panel dt { margin-top: 8px; }
.order-lines { list-style: none; padding: 0; }
.order-lines li, .order-line { display: flex; justify-content: space-between; gap: 10px; padding-block: 7px; }
.shop-form { display: grid; gap: 16px; justify-items: stretch; }
.shop-form fieldset { display: grid; gap: 12px; min-width: 0; margin: 0; }
.shop-form legend { font-weight: 700; padding-inline: 5px; }
.shop-form label { display: grid; gap: 5px; font-weight: 700; }
.shop-form input:not([type="checkbox"]), .shop-form select, .shop-form textarea { width: 100%; border: 1px solid #a69a88; border-radius: 2px; padding: 10px; background: #fffdfa; color: var(--ink); font: inherit; font-weight: normal; }
.shop-form button { justify-self: start; }
.shop-form .check { display: flex; align-items: flex-start; gap: 9px; font-weight: normal; }
.shop-form .check a { text-decoration: underline; }
.payment-note, .form-status { padding: 10px; background: #efe5d6; }
@media (max-width: 820px) {
  .footer-main { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .checkout-layout, .footer-main { grid-template-columns: 1fr; }
  .checkout-layout aside { grid-row: 1; }
}
