/*
Theme Name: Hidamari Bakes
Description: A sunlit tea table for a Japanese baked-sweets shop.
Version: 1.0.0
Text Domain: hidamari-bakes
*/
:root {
    --paper: #fffdf7;
    --cream: #faf3e4;
    --butter: #f5e5b5;
    --ink: #493426;
    --muted: #694f3d;
    --line: #d8c7ab;
    --leaf: #445a3d;
    --leaf-light: #e8eddc;
    --new: #f3e9d8;
    --danger: #992e22;
    --table: #efe2cc;
    --shadow: rgb(82 54 23 / 20%);
    --sunshine: rgb(255 252 230 / 85%);
    --sans: "Hiragino Kaku Gothic ProN", "Yu Gothic", YuGothic, Meiryo, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light; scroll-behavior: smooth; accent-color: var(--leaf); caret-color: var(--leaf); scrollbar-color: var(--muted) var(--cream); }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.8 var(--sans); }
::selection { color: var(--paper); background: var(--leaf); }
[hidden] { display: none !important; }
img { max-width: 100%; height: auto; vertical-align: middle; }
a { color: inherit; text-underline-offset: .24em; }
a:hover { color: var(--leaf); }
:is(a, button, input, select, textarea, summary):focus-visible { outline: 2px solid var(--leaf); outline-offset: 4px; }
:is(a,button):active { opacity: .72; }
h1, h2, h3, p { margin: 0 0 .7em; }
h1,h2,h3 { font-weight: 500; line-height: 1.45; letter-spacing: .04em; overflow-wrap: anywhere; }
h2 { font-size: clamp(1.55rem, 3vw, 2.15rem); }
.shell { width: min(1200px, calc(100% - clamp(30px, 9vw, 150px))); margin-inline: auto; }
.skip, .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.skip:focus { z-index: 10; left: 15px; top: 15px; width: auto; height: auto; padding: 8px; background: var(--paper); clip-path: none; }
.masthead { background: var(--paper); }
.header-row { min-height: 86px; display: flex; align-items: center; gap: clamp(14px, 2.8vw, 40px); }
.wordmark { display: inline-flex; align-items: center; gap: 10px; flex: none; text-decoration: none; font: 500 clamp(19px, 2.1vw, 30px)/1.2 Georgia, serif; }
.desktop-nav { display: flex; justify-content: end; gap: clamp(18px, 3vw, 44px); margin-left: auto; }
.desktop-nav a, .basket { text-decoration: none; font-size: .9rem; padding-block: 10px; }
.basket { display: flex; align-items: center; gap: 6px; white-space: nowrap; color: var(--leaf); }
.menu-open, .drawer-head button { appearance: none; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font: inherit; font-size: .85rem; min-height: 44px; padding: 4px 9px; }
.menu-open { flex: none; white-space: nowrap; }
#shop-menu { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(320px, 90vw); max-width: none; height: 100%; max-height: none; padding: 24px; color: var(--ink); background: var(--paper); border: 0; }
#shop-menu[open] { animation: drawer-in 310ms cubic-bezier(.16,1,.3,1); }
#shop-menu::backdrop { background: var(--shadow); }
.drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.drawer-head h2 { margin: 0; font-size: 1.3rem; }
#shop-menu nav a { display: block; padding: 12px 0; border-top: 1px solid var(--line); text-decoration: none; }
@keyframes drawer-in { from { transform: translateX(100%); } }

.tea-table { position: relative; background: linear-gradient(131deg, transparent 25%, var(--sunshine) 46%, transparent 67%), var(--table); overflow: hidden; }
.hero { min-height: min(610px, 52vw); display: grid; grid-template-columns: .93fr 1.07fr; align-items: center; padding-block: 46px 64px; }
.hero-copy { position: relative; z-index: 1; }
.hero h1 { font-size: clamp(1.95rem, 3.65vw, 3.125rem); line-height: 1.55; font-weight: 400; max-width: 12em; text-wrap: pretty; }
.intro { color: var(--muted); margin: 18px 0 26px; line-height: 1.95; max-width: 26em; }
.action { display: inline-flex; align-items: center; min-height: 48px; gap: 22px; text-decoration: none; border-radius: 2px; background: var(--leaf); color: var(--paper); padding: 9px 19px; }
.action:hover { color: var(--paper); box-shadow: 0 2px 0 var(--shadow); }
.plates { position: relative; width: 100%; aspect-ratio: 1.23; }
.plate { position: absolute; display: block; border-radius: 50%; aspect-ratio: 1; overflow: hidden; box-shadow: 6px 12px 24px var(--shadow); }
.plate img { width: 100%; height: 100%; object-fit: cover; }
.plate-plate { width: 71%; top: 5%; left: 12%; }
.plate-cookie { width: 23%; top: 2%; right: 0; }
.plate-madeleine { width: 23%; bottom: 0; left: 1%; }
.plate-tea { width: 25%; bottom: 4%; right: 0; }
.table-wave { display: block; width: 100%; height: 20px; fill: var(--paper); }
.tea-table > .table-wave { position: absolute; bottom: -1px; }

.occasions { padding-block: 65px 76px; }
.occasions h2 { text-align: center; margin-bottom: 30px; }
.occasion-pair { display: grid; grid-template-columns: 1fr 1fr; max-width: 950px; margin: 0 auto; border-block: 1px solid var(--line); }
.occasion-pair > div { padding: 23px clamp(20px, 4vw, 53px) 28px; }
.occasion-pair > div + div { border-left: 1px solid var(--line); background: var(--leaf-light); }
.occasion-pair h3 { font-size: 1.29rem; }
.occasion-pair p { color: var(--muted); }
.occasion-pair a { display: inline-block; padding-block: 6px; margin-right: 14px; font-size: .89rem; color: var(--leaf); }
.catalogue { background: var(--cream); padding-bottom: 58px; }
.catalogue > .table-wave, .site-footer > .table-wave { transform: rotate(180deg); margin-top: -1px; }
.catalogue h2 { padding-top: 36px; margin-bottom: 26px; text-align: center; }
.tray { background: var(--butter); padding: clamp(17px, 3vw, 36px); margin-bottom: 22px; border: 1px solid var(--line); border-radius: 5px; scroll-margin-top: 15px; }
.tray:nth-of-type(2n) { background: var(--leaf-light); }
.tray:nth-of-type(3) { background: var(--new); }
.tray-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 22px; }
.tray-head h3 { margin: 0; font-size: clamp(1.21rem, 2.35vw, 1.72rem); }
.tray-head i { display: inline-block; margin-left: .4em; font: italic 400 clamp(.85rem, 1.6vw, 1.1rem)/1.2 Georgia, serif; color: var(--muted); }
.tray-head a { white-space: nowrap; font-size: .85rem; color: var(--leaf); }
.tray-items { padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(14px, 2.7vw, 32px); list-style: none; }
.sweet { display: block; text-decoration: none; position: relative; }
.sweet:hover .sweet-name { text-decoration: underline; }
.sweet-picture { display: block; aspect-ratio: 1; overflow: hidden; border-radius: 50%; background: var(--paper); }
.sweet-picture img { width: 100%; height: 100%; object-fit: cover; }
.price-flag { position: relative; display: table; min-height: 26px; margin: -18px 0 7px auto; padding: 2px 17px 2px 8px; background: var(--leaf); color: var(--paper); font-size: .8rem; font-variant-numeric: tabular-nums; clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 50%, 100% 100%, 0 100%); }
.sweet-name { line-height: 1.55; display: block; font-size: .9rem; overflow-wrap: anywhere; }
.news-strip { padding-block: 64px; max-width: 800px; }
.news-strip a { display: grid; grid-template-columns: auto 1fr; gap: 18px; padding: 15px 0; border-top: 1px solid var(--line); text-decoration: none; }
.news-strip a:hover span { text-decoration: underline; }
time { font-variant-numeric: tabular-nums; color: var(--muted); }
.site-footer { background: var(--cream); margin-top: auto; }
.footer-row { padding-block: 38px 42px; display: grid; grid-template-columns: auto 1fr; gap: 35px; }
.footer-row p { margin-top: 8px; }
.footer-row nav { display: flex; gap: 12px 24px; flex-wrap: wrap; justify-content: end; align-content: start; font-size: .875rem; }
.footer-row nav a { text-decoration: none; }
.footer-row nav a:hover { text-decoration: underline; }

.interior { padding-block: 42px 76px; min-height: 58vh; }
.interior h1 { font-size: clamp(1.65rem, 3.7vw, 2.5rem); margin-bottom: 1em; }
.interior .entry { max-width: 800px; margin-inline: auto; overflow-wrap: anywhere; }
.commerce-page .entry { max-width: 1050px; }
.entry > :is(h2,h3) { margin-top: 1.4em; }
.entry table, .hb-food-specs { border-collapse: collapse; width: 100%; }
.entry :is(th,td), .hb-food-specs :is(th,td) { border: 1px solid var(--line); padding: 9px 12px; text-align: start; overflow-wrap: anywhere; }
.entry th, .hb-food-specs th { background: var(--cream); font-weight: 500; }
.hb-food-specs th { min-width: 7em; width: 24%; }
.category-nav { display: flex; flex-wrap: wrap; gap: 8px 18px; padding-bottom: 12px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.category-nav a { display: inline-block; padding: 4px 0; }
.category-nav [aria-current] { color: var(--leaf); font-weight: 700; }
.woocommerce .wc-catalog ul.products[class*="columns-"] { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; padding: 23px; background: var(--cream); }
.woocommerce .wc-catalog ul.products[class*="columns-"]::before, .woocommerce .wc-catalog ul.products[class*="columns-"]::after { display: none; }
.woocommerce .wc-catalog ul.products[class*="columns-"] li.product { width: auto; float: none; clear: none; margin: 0; min-width: 0; overflow-wrap: anywhere; }
.woocommerce .wc-catalog ul.products[class*="columns-"] li.product a img { border-radius: 50%; aspect-ratio: 1; object-fit: cover; }
.woocommerce .wc-catalog ul.products li.product .price { color: var(--leaf); }
body :is(.woocommerce, .wc-catalog) :is(a.button,button.button,input.button), body :is(.woocommerce, .wc-catalog) :is(a.button,button.button,input.button):hover {
    background: var(--leaf); color: var(--paper); border-radius: 2px; line-height: 1.45;
}
body :is(.woocommerce, .wc-catalog) :is(a.button,button.button,input.button):hover { box-shadow: 0 2px 0 var(--shadow); }
body :is(.woocommerce, .wc-catalog) :is(a.button,button.button,input.button):active { opacity: .7; }
body .woocommerce select, body .woocommerce input:not([type=checkbox], [type=radio], [type=submit]), body .woocommerce textarea,
body .wc-catalog select, body .wc-catalog .qty {
    max-width: 100%; background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: 2px; padding: 8px;
    font: inherit;
}
body .woocommerce .woocommerce-invalid :is(input,select,textarea), body .wc-catalog input:user-invalid { border-color: var(--danger); }
.woocommerce .wc-catalog div.product p.price { color: var(--leaf); }
.woocommerce .wc-catalog div.product div.images img { border-radius: 4px; }
.wc-catalog .qty { font-variant-numeric: tabular-nums; }
.quantity.quantity-pop { animation: quantity-pop 180ms ease-out; }
.hb-invalid { animation: invalid-field 320ms ease-out; }
.hb-busy { opacity: .8; cursor: progress; }
.hb-busy::after { content: ''; display: inline-block; width: .8em; height: .8em; margin-left: .6em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .75s linear infinite; }
.hb-toast { position: fixed; right: 18px; bottom: 18px; z-index: 10; max-width: min(360px, calc(100% - 36px)); padding: 9px 14px; background: var(--leaf); color: var(--paper); border-radius: 2px; animation: toast-in 180ms ease-out; }
@keyframes toast-in { from { transform: translateY(10px); opacity: 0; } }
@keyframes quantity-pop { 50% { transform: scale(1.045); } }
@keyframes invalid-field { 25%, 65% { transform: translateX(4px); } 45%, 85% { transform: translateX(-4px); } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1000px) {
    .tray-items { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .header-row { min-height: 66px; gap: 11px; }
    .wordmark img { width: 30px; height: 30px; }
    .desktop-nav { display: none; }
    .basket { margin-left: auto; }
    .header-row:not(.has-menu) { flex-wrap: wrap; }
    .header-row:not(.has-menu) .desktop-nav { display: flex; order: 4; width: 100%; justify-content: start; }
    .woocommerce .wc-catalog ul.products[class*="columns-"] { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 14px; gap: 19px 13px; }
    .footer-row { grid-template-columns: 1fr; gap: 15px; }
    .footer-row nav { justify-content: start; }
}
@media (max-width: 680px) {
    .hero { display: flex; flex-direction: column; align-items: stretch; padding-block: 30px 31px; }
    .hero h1 { max-width: 12em; }
    .hero-copy .intro { margin-block: 12px 18px; }
    .plates { margin-top: 16px; }
    .occasions { padding-block: 45px 52px; }
    .occasion-pair { grid-template-columns: 1fr; }
    .occasion-pair > div + div { border-left: 0; border-top: 1px solid var(--line); }
    .tray-items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .news-strip { padding-block: 45px; }
    .tray-head { align-items: center; }
    .tray-head i { display: block; margin: 4px 0 0; }
    .hb-food-specs th { min-width: 5em; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    #shop-menu[open], .quantity.quantity-pop, .hb-invalid, .hb-busy::after, .hb-toast { animation: none; }
}
