/*
Theme Name: Printshop
Description: Блокова тема для магазину товарів із принтами. Працює разом із плагіном Printshop Core.
Version: 1.1.3
Requires at least: 6.5
Requires PHP: 8.0
Text Domain: printshop
License: GPL-2.0-or-later
*/

html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; height: auto; }
:where(a, button, input, select, textarea, summary):focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 100000; background: #111; color: #fff; padding: 10px 16px; }

/* Header */
.ps-header { position: sticky; top: 0; z-index: 100; background: var(--wp--preset--color--base); border-bottom: 1px solid var(--wp--preset--color--line); }
.admin-bar .ps-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .ps-header { top: 0; } }
.ps-header__bar { display: grid; grid-template-columns: minmax(0, max-content) minmax(0, 1fr) auto; grid-template-areas: "logo nav icons"; align-items: center; gap: 24px; min-height: 64px; max-width: var(--wp--style--global--wide-size); margin: 0 auto !important; }
/* Logo / site title: one line, long titles (e.g. a domain) are truncated. */
.ps-header__logo { grid-area: logo; margin: 0 !important; max-width: min(260px, 40vw); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: clamp(1.1rem, 1.6vw, 1.5rem) !important; }
.ps-header__logo a { white-space: nowrap; }
.ps-header__nav { grid-area: nav; justify-content: center; margin: 0 !important; min-width: 0; }
/* Desktop menu: a single line, never wraps into several rows. */
.ps-header__nav .wp-block-navigation__container { flex-wrap: nowrap; gap: clamp(14px, 1.8vw, 28px) !important; white-space: nowrap; }
.ps-header__nav .wp-block-navigation-item__content { white-space: nowrap; }
.ps-header__icons { grid-area: icons; gap: 0 !important; justify-content: flex-end; margin: 0 !important; flex-wrap: nowrap !important; }
.ps-header .wp-block-navigation__responsive-container-open { width: 44px; height: 44px; justify-content: center; }
/* Below 1100px the menu moves into the hamburger (WordPress switches only at 600px). */
@media (max-width: 1100px) {
	.ps-header__bar { grid-template-columns: 1fr auto 1fr; grid-template-areas: "nav logo icons"; gap: 8px; }
	.ps-header__nav { justify-content: flex-start; }
	.ps-header__logo { max-width: 52vw; text-align: center; }
	.ps-header__nav .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex !important; }
	.ps-header__nav .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none !important; }
}
@media (max-width: 781px) {
	.ps-header__bar { min-height: 56px; }
}
.wp-block-navigation__responsive-container.is-menu-open { padding: 24px 16px; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item { font-size: 1.125rem; }

/* Footer */
.ps-footer { border-top: 1px solid var(--wp--preset--color--line); font-size: .8125rem; }
.ps-footer .wp-block-site-title, .ps-footer .wp-block-site-title a { font-size: 1.25rem !important; line-height: 1.3; }
.ps-footer .wp-block-site-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ps-shop-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ps-shop-links a { color: inherit; text-decoration: none; }
.ps-shop-links a:hover { text-decoration: underline; }
.ps-footer h2 { font-size: .75rem !important; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 14px; }
.ps-footer .wp-block-navigation { font-size: .8125rem; font-weight: 400; text-transform: none; letter-spacing: 0; gap: 8px; }
.ps-footer .wp-block-navigation a:hover { text-decoration: underline; }
.ps-footer__bottom { border-top: 1px solid var(--wp--preset--color--line); color: var(--wp--preset--color--muted); font-size: .75rem; }

/* Product page */
.ps-product__cols { gap: clamp(20px, 4vw, 56px) !important; }
.ps-product__summary { position: sticky; top: 88px; }
@media (max-width: 781px) { .ps-product__summary { position: static; } }
.ps-product__title { font-size: clamp(1.4rem, 2.4vw, 2rem) !important; text-transform: uppercase; margin-bottom: .25rem !important; }
.ps-product__excerpt { color: var(--wp--preset--color--muted); }

/* Content pages */
.wp-block-details summary { font-weight: 700; cursor: pointer; }
.wp-block-details > *:not(summary) { margin-top: .75rem; color: #333; }

/* 404 */
.ps-404__code { font-family: var(--wp--preset--font-family--heading); font-size: clamp(5rem, 16vw, 11rem); line-height: 1; margin: 0; }
