/*
Theme Name: Hanksla
Theme URI: https://hanksla.fi/
Description: Hanksla.fi – Marseille -pyykinpesuaine. Child theme of Twenty Twenty-Five: natural palette, Manrope + DM Serif Display, shop-first front page.
Author: Hanksla
Template: twentytwentyfive
Version: 1.3.2
Requires at least: 6.7
Text Domain: hanksla
License: GNU General Public License v2 or later
*/

/* ---- base ---------------------------------------------------------------------------------------- */
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
:where(.wp-site-blocks) > * { margin-block-start: 0; }
img { border-radius: 12px; }
.wp-block-site-logo img, .hk-no-radius img { border-radius: 0; }
.wp-element-button, .wp-block-button__link, .single_add_to_cart_button, .wc-block-components-button:not(.is-link) {
  transition: background-color .15s ease, box-shadow .15s ease; }
.wp-element-button:hover, .wp-block-button__link:hover, .single_add_to_cart_button:hover { box-shadow: 0 6px 16px rgba(32, 38, 29, .16); }
.single_add_to_cart_button { border-radius: 999px !important; background: var(--wp--preset--color--accent-1) !important;
  color: #fff !important; padding: .7em 1.6em !important; font-weight: 650; }
.is-style-outline > .wp-block-button__link { background: transparent; color: var(--wp--preset--color--accent-1); border: 1.5px solid currentColor; }

/* ---- header ---------------------------------------------------------------------------------------- */
.hk-header { position: sticky; top: 0; z-index: 50; background: rgba(251, 251, 248, .9) !important;
  backdrop-filter: saturate(140%) blur(10px); border-bottom: 1px solid #ECEAE2; }
.hk-header .wp-block-site-logo img { max-height: 38px; width: auto; }
.hk-nav { font-size: .94rem; font-weight: 550; }
.hk-nav a:hover { color: var(--wp--preset--color--accent-1); }
.hk-buy-btn .wp-block-button__link { padding: .5em 1.15em; font-size: .9rem; }
@media (max-width: 781px) { .hk-header .wp-block-site-logo img { max-height: 32px; } .hk-buy-btn .wp-block-button__link { padding: .45em 1em; } }

/* ---- front page: one screen ---------------------------------------------------------------------------- */
.hk-front { padding-block: clamp(20px, 4vw, 48px) clamp(24px, 4vw, 48px); }
.hk-hero { min-height: min(68vh, 620px); }
.hk-hero h1 { margin: .15em 0 .3em; font-size: clamp(2rem, 1.3rem + 2.6vw, 3.1rem); }
.hk-eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .74rem; font-weight: 700;
  color: var(--wp--preset--color--accent-1); margin: 0; }
.hk-lead { font-size: clamp(1.02rem, .98rem + .3vw, 1.15rem); color: var(--wp--preset--color--accent-4); max-width: 33em; margin: 0; }
.hk-buyrow { margin-top: 1.4em; }
.hk-cta .wp-block-button__link { padding: .8em 1.8em; font-size: 1.02rem; }
.hk-price { margin: 0; color: var(--wp--preset--color--accent-4); }
.hk-price strong { color: var(--wp--preset--color--contrast); }
.hk-facts { list-style: none; padding: 0; margin: 1.4em 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.hk-facts li { background: var(--wp--preset--color--accent-2); border-radius: 999px; padding: .32em .85em; font-size: .86rem; font-weight: 550; }
.hk-facts li::before { content: "✓"; color: var(--wp--preset--color--accent-1); font-weight: 800; margin-right: .4em; }
.hk-note { font-size: .86rem; color: var(--wp--preset--color--accent-4); margin-top: 1em; }
.hk-hero-img img { width: 100%; aspect-ratio: 1 / 1; max-height: 62vh; object-fit: cover; box-shadow: 0 18px 44px rgba(27, 31, 26, .14); }
@media (max-width: 781px) {
  .hk-hero { min-height: 0; flex-direction: column-reverse; }
  .hk-hero-img img { aspect-ratio: 16 / 10; max-height: 34vh; }
}
.hk-links { margin-top: clamp(20px, 3vw, 36px); }
.hk-links p { margin: 0; }
.hk-links a { display: block; padding: 12px 16px; border: 1px solid #ECEAE2; border-radius: 12px; background: #fff;
  color: inherit; text-decoration: none; transition: border-color .15s ease, transform .15s ease; }
.hk-links a:hover { border-color: var(--wp--preset--color--accent-1); transform: translateY(-1px); }
.hk-links strong { display: block; font-size: .98rem; }
.hk-links strong::after { content: " →"; color: var(--wp--preset--color--accent-1); }
.hk-links span { display: block; font-size: .85rem; color: var(--wp--preset--color--accent-4); }

/* ---- pages, FAQ ---------------------------------------------------------------------------------------- */
.hk-lead-p { font-size: 1.1rem; color: var(--wp--preset--color--accent-4); }
.wp-block-details { border-bottom: 1px solid #E4E1D8; padding: .8em 0; }
.wp-block-details summary { font-weight: 650; cursor: pointer; }
.wp-block-details p { margin-top: .5em; color: var(--wp--preset--color--accent-4); }

/* ---- shop ---------------------------------------------------------------------------------------- */
.woocommerce-Price-amount, .wc-block-components-product-price { font-weight: 650; }
.wc-block-components-product-image img, .woocommerce-product-gallery__image img { border-radius: 14px; }
.single-product .wp-block-post-terms.taxonomy-product_cat, .single-product .product_meta { display: none; }
.single-product .wp-block-post-excerpt__excerpt p { margin-bottom: .7em; }

/* ---- footer ---------------------------------------------------------------------------------------- */
.hk-footer { border-top: 1px solid #ECEAE2; font-size: .86rem; color: var(--wp--preset--color--accent-4); }
.hk-footer p { margin: 0; }
.hk-footer a { color: inherit; }
.hk-footer-links a { margin-right: 1.1em; }

/* guest checkout only: no customer-account icon next to the cart */
.wp-block-woocommerce-customer-account { display: none; }

/* ---- inner pages: compact, left-aligned, no dead space --------------------------------------------- */
.hk-main h1, .hk-main h1.wp-block-post-title, .hk-main .wp-block-query-title {
  font-size: clamp(1.7rem, 1.2rem + 1.9vw, 2.4rem); margin: 0 0 .35em; }
.hk-main h2 { font-size: clamp(1.3rem, 1.1rem + .9vw, 1.6rem); margin-top: 1.6em; }
.hk-main h3 { font-size: 1.12rem; }
.hk-main p, .hk-main li { max-width: 68ch; }
.hk-meta { font-size: .86rem; color: var(--wp--preset--color--accent-4); margin: 0; }
.hk-article .wp-block-post-featured-image img { border-radius: 14px; }
.hk-aside { position: sticky; top: 76px; align-self: flex-start; }
@media (max-width: 781px) { .hk-aside { position: static; } }
.hk-card { background: #fff; border: 1px solid #ECEAE2; border-radius: 14px; padding: 16px !important; box-shadow: none; height: auto; }
.hk-buycard img { border-radius: 10px; }
.hk-buycard h3 { margin: .6em 0 .2em; }
.hk-more { margin-top: 28px; }
.hk-more-list .wp-block-post-template { list-style: none; padding: 0; margin: 0; }
.hk-more-list .wp-block-post-title { font-size: 1rem; font-weight: 650; margin: 0; padding: 10px 0; border-bottom: 1px solid #ECEAE2; }
.hk-more-list .wp-block-post-title a { text-decoration: none; color: var(--wp--preset--color--contrast); }
.hk-more-list .wp-block-post-title a:hover { color: var(--wp--preset--color--accent-1); }
.hk-grid .wp-block-post-title { font-size: 1.05rem; margin: .5em 0 .1em; }
.hk-grid .wp-block-post-title a { text-decoration: none; color: var(--wp--preset--color--contrast); }
.hk-grid img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.wp-block-query-pagination { margin-top: 24px; }

/* ---- shop: visible buttons, simple grid ---------------------------------------------------------------- */
.wp-block-woocommerce-product-collection .wp-block-button__link, .wc-block-components-product-button__button,
.wp-block-woocommerce-product-button .wp-element-button, .wc-block-components-product-button .wp-element-button {
  background: var(--wp--preset--color--accent-1) !important; color: #fff !important; border: 0 !important;
  border-radius: 999px !important; padding: .55em 1.3em !important; font-size: .92rem !important; font-weight: 650; }
.wp-block-woocommerce-product-collection .wp-block-button__link:hover { background: var(--wp--preset--color--olive-dark) !important; }
.wc-block-product-template { gap: 20px; }
.wc-block-product-template .wp-block-post-title { font-size: 1.05rem !important; margin: .6em 0 .2em; }
.wc-block-product-template .wp-block-post-title a { text-decoration: none; color: var(--wp--preset--color--contrast); }
.wc-block-components-product-price, .wp-block-woocommerce-product-price { margin-bottom: .6em; }

/* ---- single product ---------------------------------------------------------------------------------- */
.hk-product .woocommerce-product-gallery { margin: 0; }
.hk-product .woocommerce-product-gallery__image img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.hk-product .flex-control-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 8px 0 0; padding: 0; list-style: none; }
.hk-product .flex-control-thumbs img { aspect-ratio: 1 / 1; object-fit: cover; opacity: .7; cursor: pointer; }
.hk-product .flex-control-thumbs img.flex-active, .hk-product .flex-control-thumbs img:hover { opacity: 1; }
.hk-product h1 { margin-bottom: .15em; }
.hk-product .wp-block-woocommerce-product-price { font-size: 1.3rem; margin-bottom: .6em; }
.hk-product .variations { margin-bottom: .8em; }
.hk-product .variations select { border: 1px solid #D9D6CB; border-radius: 10px; padding: .55em .8em; background: #fff; font: inherit; }
.hk-product .quantity input { border: 1px solid #D9D6CB; border-radius: 10px; padding: .55em; width: 4.2em; text-align: center; background: #fff; }
.hk-product .wp-block-woocommerce-product-details { margin-top: 28px; }
.hk-product .wc-tabs { display: flex; gap: 18px; list-style: none; padding: 0; margin: 0 0 14px; border-bottom: 1px solid #E4E1D8; }
.hk-product .wc-tabs a { display: block; padding: 8px 0; text-decoration: none; color: var(--wp--preset--color--accent-4); font-weight: 650; }
.hk-product .wc-tabs .active a { color: var(--wp--preset--color--contrast); box-shadow: inset 0 -2px var(--wp--preset--color--accent-1); }
.hk-product .woocommerce-Tabs-panel > h2:first-child { display: none; }

/* ---- cart / checkout ---------------------------------------------------------------------------------- */
.wp-block-woocommerce-cart, .wp-block-woocommerce-checkout { margin-top: .5em; }
.wc-block-components-button:not(.is-link) { border-radius: 999px; }
.wc-block-cart__submit-button, .wc-block-components-checkout-place-order-button { background: var(--wp--preset--color--accent-1) !important; color: #fff !important; }
.wc-block-components-text-input input, .wc-block-components-select select, .wc-block-components-address-form select { border-radius: 10px !important; }

/* product gallery thumbnails: fill their grid cell */
.hk-product .flex-control-thumbs li { width: auto !important; float: none !important; }
.hk-product .flex-control-thumbs img { width: 100%; height: auto; display: block; }

/* ---- language switcher ------------------------------------------------------------------------------------ */
.hk-lang { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid #E4E1D8; border-radius: 999px; background: #fff; font-size: .72rem; font-weight: 700; letter-spacing: .04em; }
.hk-lang a { padding: .3em .62em; border-radius: 999px; text-decoration: none; color: var(--wp--preset--color--accent-4); line-height: 1.2; }
.hk-lang a:hover { color: var(--wp--preset--color--contrast); }
.hk-lang a.is-active { background: var(--wp--preset--color--accent-1); color: #fff; }
.wp-block-shortcode:has(.hk-lang) { margin: 0; }
@media (max-width: 520px) { .hk-lang a { padding: .28em .5em; } }

/* 1.3.1: old posts have centered paragraphs; selects must not clip their text */
.wp-block-post-content p.has-text-align-center { text-align: left; }
.hk-product .variations select { height: auto; min-height: 2.6em; line-height: 1.4; padding-right: 2.2em; }

/* 1.3.2: narrow header — the Buy button must never wrap */
.hk-buy, .hk-buy .wp-block-button, .hk-buy-btn { flex-shrink: 0; margin: 0; }
.hk-buy-btn .wp-block-button__link { white-space: nowrap; line-height: 1.2; }
@media (max-width: 520px) {
  .hk-header .wp-block-site-logo img { max-height: 26px; }
  .hk-header .wp-block-group { gap: 8px !important; }
  .hk-buy-btn .wp-block-button__link { padding: .4em .85em; font-size: .85rem; }
  .hk-lang { font-size: .68rem; }
  .hk-lang a { padding: .26em .42em; }
}
@media (max-width: 360px) { .hk-header .wp-block-site-logo img { max-height: 22px; } .hk-lang a { padding: .24em .34em; } }
