/* ==========================================================================
   wp-bridge.css: maps WordPress block markup onto the locked v0.2.2 styles.
   The three v0.2.2 files are unchanged; everything WordPress-specific is here.
   Uses the prototype's CSS variables (defined in css/style.css :root).
   ========================================================================== */

.wp-site-blocks { padding: 0; }
.wp-site-blocks > * + *, .site-main > * + * { margin-block-start: 0; }
.wp-block-group.container { width: 100%; }
:where(.wp-block-group) { box-sizing: border-box; }

/* Buttons: core/button styled as the prototype .btn variants. */
.wp-block-buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.wp-block-button > .wp-block-button__link {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 12px 22px; min-height: 46px; border: 2px solid transparent; border-radius: var(--radius);
	font: 700 0.98rem/1.2 var(--font); text-decoration: none; cursor: pointer; text-align: center;
	background: var(--primary); color: #fff;
	transition: background 0.2s var(--ease), color 0.2s, border-color 0.2s, transform 0.2s var(--ease);
}
.wp-block-button > .wp-block-button__link:hover { transform: translateY(-1px); }
.wp-block-button.is-style-parash-primary > .wp-block-button__link:hover { background: var(--primary-dark); color: #fff; }
.wp-block-button.is-style-parash-outline > .wp-block-button__link { background: transparent; color: var(--primary-dark); border-color: var(--primary-dark); }
.wp-block-button.is-style-parash-outline > .wp-block-button__link:hover { background: var(--primary-dark); color: #fff; }
.wp-block-button.is-style-parash-whatsapp > .wp-block-button__link { background: var(--whatsapp); color: #fff; }
.wp-block-button.is-style-parash-light > .wp-block-button__link { background: #fff; color: var(--primary-dark); }
.wp-block-button.is-style-parash-outline-light > .wp-block-button__link { background: transparent; color: #fff; border-color: rgb(255 255 255 / 70%); }
.wp-block-button.is-style-parash-link > .wp-block-button__link { background: none; color: inherit; padding: 0; min-height: 0; border: 0; font-weight: 600; text-decoration: none; }
.wp-block-button.is-style-parash-link > .wp-block-button__link:hover { text-decoration: underline; transform: none; }
.wp-block-button.btn--lg > .wp-block-button__link { padding: 14px 26px; min-height: 52px; font-size: 1.02rem; }

/* Header: rendered by the parash-theme/site-header block with the v0.2.2 markup, so the locked CSS styles it directly. */

/* Section heads, links, hero, lists drawn with list blocks. */
.section-head .wp-block-group > * { margin: 0; }
p.link-more { border: 0; padding: 0; margin: 0; }
p.link-more a { font-weight: 700; text-decoration: none; border-bottom: 2px solid var(--accent); padding-bottom: 2px; }
.hero__image img { width: 100%; height: auto; }
.trust__list, .why__list, .footer__list { list-style: none; margin-block: 0; padding-block: 0; }
.why__list, .footer__list { padding-inline: 0; }
.trust__item strong, .why__list strong { display: block; }
/* Trust and "why" items are list items (icon via class "pi pi-{name}", bold title, then text).
   A 2-column grid stacks title and text beside the icon like the v0.2.2 <svg> + <div> structure. */
.trust__item.pi, .why__list li.pi { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 14px; align-items: start; }
.trust__item.pi::before, .why__list li.pi::before { grid-row: 1 / span 2; margin: 2px 0 0; }
.trust__item.pi::before { color: var(--accent); width: 26px; height: 26px; }
.trust__item { color: #b9cde0; font-size: 0.86rem; line-height: 1.45; }
.trust__item strong { color: #fff; font-size: 0.98rem; line-height: 1.3; margin-bottom: 2px; }
.why__list li { color: var(--text-muted); font-size: 0.95rem; line-height: 1.65; }
.why__list li strong { color: var(--primary-dark); font-size: 1.04rem; line-height: 1.2; margin-bottom: 2px; font-weight: 700; }
.why__list li.pi::before { width: 22px; height: 22px; padding: 11px; box-sizing: content-box; border-radius: 12px; background-color: var(--secondary); margin: 0; }
@media (min-width: 1100px) {
	.trust__item.pi { grid-template-columns: minmax(0, 1fr); row-gap: 10px; }
	.trust__item.pi::before { grid-row: auto; }
}
.why__visual img { width: 100%; height: auto; }

/* Page hero, query loops and product templates. */
.wp-block-post-template.grid { list-style: none; padding: 0; margin: 0; }
.wp-block-post-template.grid > li { margin: 0; display: grid; }
.wp-block-query-pagination { margin-top: 32px; gap: 12px; justify-content: center; }
.product__summary .wp-block-post-excerpt__excerpt { margin: 0; }
.p-card__placeholder { display: block; aspect-ratio: 4 / 3; background: var(--surface); }
.gallery__img { width: 100%; height: auto; }
.gallery__main--empty { aspect-ratio: 4 / 3; background: var(--surface); border-radius: var(--radius-lg); }

/* Footer. */
.site-footer .wp-block-site-title { margin: 0 0 14px; font-size: 1.2rem; font-weight: 800; }
.site-footer .wp-block-site-title a, .site-footer a { color: #e6f0f8; text-decoration: none; }
.site-footer .wp-block-categories { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer .footer__list { display: grid; gap: 8px; }
.site-footer .footer__links { flex-direction: column; align-items: flex-start; gap: 8px; }
.site-footer .footer__links .wp-block-button__link { color: #e6f0f8; font-weight: 500; }
.site-footer .footer__bottom p { margin: 0; }

/* Icons drawn by CSS masks (class "pi pi-{key}", set in the editor under Advanced). */
.pi { display: flex; align-items: flex-start; }
.pi::before { flex: none; }

/* The locked CSS pads .header__quote/.header__wa (they were links in v0.2.2). In WordPress these classes sit on the
   button wrapper, whose link already has padding, so the wrapper padding is removed here. */
.wp-block-button.header__quote, .wp-block-button.header__wa { padding-inline: 0; }

/* Search forms and page-header content may shrink on narrow screens. */
.wp-block-search__inside-wrapper { max-width: 100%; }
.wp-block-search__input { min-width: 0; }
.page-hero .wp-block-search { max-width: 100%; min-width: 0; }
.page-hero__title { overflow-wrap: anywhere; }


/* Class collision with ".search-results" is avoided in inc/setup.php (body_class filter). */


/* ---- Phase 2 parity adjustments (measured against v0.2.2; see VISUAL-PARITY-REPORT.md) ---- */
/* Core button wrappers are inline-block; make them flex items so they add no baseline gap. */
.wp-block-buttons > .wp-block-button { margin: 0; display: flex; }
/* Hero image block fills the visual panel like the prototype's inline goniometer. */
.hero__visual .wp-block-image, .hero__image { width: 100%; max-width: 520px; margin: 0; }
.hero__image img { width: 100%; height: auto; }
/* Catalogue chips are links here (buttons in the prototype). */
.post-type-archive-parash_product .chipbar > a.chip { line-height: normal; } /* prototype uses <button> chips on the Products page only */
.trust__item { line-height: 1.45; }

/* Prototype .btn--* classes sit on the core button wrapper: keep only the link styled. */
.wp-block-button[class*="btn--"] { padding: 0; min-height: 0; border: 0; background: none; box-shadow: none; }
.wp-block-button.btn--block, .wp-block-button.btn--block > .wp-block-button__link { width: 100%; }
/* Inside .cta--light the locked CSS recolours light/outline-light buttons; mirror it for core buttons. */
.cta--light .wp-block-button.is-style-parash-light > .wp-block-button__link { background: var(--primary); color: #fff; }
.cta--light .wp-block-button.is-style-parash-outline-light > .wp-block-button__link { color: var(--primary-dark); border-color: var(--primary-dark); }

/* Mirrors responsive.css line 71 (.hero__actions .btn, .cta__actions .btn { width: 100% }) for core buttons. */
@media (max-width: 380px) {
	.hero__actions > .wp-block-button, .cta__actions > .wp-block-button { width: 100%; }
	.hero__actions .wp-block-button__link, .cta__actions .wp-block-button__link { width: 100%; }
}
/* Empty error slots take no space (the prototype hides them until a message is set). */
.field__error:empty { display: none; }
