/*
Theme Name:   Matrac Óbuda Block
Theme URI:    https://matracobuda.hu
Description:  Block child theme of Twenty Twenty-Four replacing the Oxygen Builder
              front-end 1:1 (colors, header/topbar, hero slider, product grids,
              footer). Built for the Oxygen → block theme migration, 2026-08.
Author:       Matrac Óbuda / Claude
Template:     twentytwentyfour
Version:      1.0.0
Requires at least: 6.5
Requires PHP: 8.1
Text Domain:  matracobuda-block
*/

/* =========================================================================
   Design tokens (mirrored from Oxygen global colors — see theme.json too)
   --mo-blue:   #244391  (Oxygen topbar/buttons blue)
   --mo-light:  #efedf3  (header + footer background "Light Tint")
   --mo-text:   #3b3c38  (body text)
   --mo-red:    #ba3739  (Oxygen "Primary" red, sale accents)
   Fonts: Open Sans (text), Vidaloka (display), PT Serif (subheadings)
   ========================================================================= */

/* -------------------------------------------------------------------------
   1. TOP BAR — dark blue strip with NAP data + mini cart.
   Markup lives in parts/header.html (.mo-topbar).
   ------------------------------------------------------------------------- */
.mo-topbar {
	background-color: var(--wp--preset--color--mo-blue);
	color: #fff;
	font-size: 13px;
}
.mo-topbar a { color: #fff; text-decoration: none; }
.mo-topbar a:hover { text-decoration: underline; }

/* Site name in the top bar — visually the old 22–33px "Matrac Óbuda" heading.
   Rendered as a <p> (site-title block, level 0) so pages keep a single H1. */
.mo-topbar .wp-block-site-title a {
	font-family: var(--wp--preset--font-family--open-sans);
	font-size: 26px;
	font-weight: 700;
	color: #fff;
	text-decoration: none;
}
.mo-topbar .mo-topbar-address { font-size: 12px; opacity: .95; }

/* WooCommerce mini cart button inherits white */
.mo-topbar .wc-block-mini-cart__button { color: #fff; }
.mo-topbar .wc-block-mini-cart__amount { color: #fff; font-weight: 700; }

/* -------------------------------------------------------------------------
   2. HEADER — light bar, sticky, logo left + centered uppercase menu.
   ------------------------------------------------------------------------- */
.mo-header {
	background-color: var(--wp--preset--color--mo-light);
	box-shadow: 0 1px 0 rgba(0, 0, 0, .06);
}
.mo-header .wp-block-site-logo img { max-height: 44px; width: auto; }

/* Menu: small caps look of the Oxygen nav */
.mo-header .wp-block-navigation a {
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: #3f4757;
}
.mo-header .wp-block-navigation a:hover,
.mo-header .wp-block-navigation .current-menu-item > a {
	color: var(--wp--preset--color--mo-blue);
	text-decoration: underline;
	text-underline-offset: 6px;
}
/* Dropdown panels */
.mo-header .wp-block-navigation__submenu-container {
	background-color: #fff !important;
	border: 1px solid rgba(0, 0, 0, .08);
}

/* -------------------------------------------------------------------------
   3. HERO SLIDER — 500px slides, cover backgrounds with dark/blue overlay,
   Vidaloka white headline. Slide markup: templates/front-page.html,
   behaviour: assets/slider.js (vanilla, no dependencies).
   ------------------------------------------------------------------------- */
.mo-hero { position: relative; overflow: hidden; }
.mo-hero__slide {
	display: none;                    /* slider.js toggles .is-active */
	min-height: 500px;
	background-size: cover;
	background-position: center;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 48px 24px;
}
.mo-hero__slide.is-active { display: flex; }
.mo-hero__inner { max-width: 900px; color: #fff; }

/* Overlays reproduce Oxygen's linear-gradient() layers exactly */
.mo-hero__slide--dark { box-shadow: inset 0 0 0 100vmax rgba(0, 0, 0, .58); }
.mo-hero__slide--blue { box-shadow: inset 0 0 0 100vmax rgba(36, 67, 145, .43); }

.mo-hero__slide h1,
.mo-hero__slide h2 {
	font-family: var(--wp--preset--font-family--vidaloka);
	font-size: 44px;
	line-height: 1.15;
	color: #fff;
	margin: 0 0 24px;
	text-transform: uppercase;
}
.mo-hero__slide p { font-size: 19px; line-height: 1.6; }
.mo-hero__slide .mo-hero__badge { max-width: 150px; height: auto; margin-top: 18px; }

/* Arrows + dots — same minimal chrome as the Oxygen slider */
.mo-hero__arrow {
	position: absolute; top: 50%; transform: translateY(-50%);
	background: none; border: 0; color: rgba(255, 255, 255, .85);
	font-size: 34px; line-height: 1; cursor: pointer; padding: 8px 14px; z-index: 2;
}
.mo-hero__arrow:hover { color: #fff; }
.mo-hero__arrow--prev { left: 6px; }
.mo-hero__arrow--next { right: 6px; }
.mo-hero__dots { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; z-index: 2; }
.mo-hero__dot {
	display: inline-block; width: 9px; height: 9px; margin: 0 4px;
	border-radius: 50%; border: 0; padding: 0; cursor: pointer;
	background: rgba(255, 255, 255, .45);
}
.mo-hero__dot.is-active { background: #fff; }

/* -------------------------------------------------------------------------
   4. BUTTONS — WooCommerce + generic. Oxygen used the same #244391 blue.
   ------------------------------------------------------------------------- */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.wc-block-components-button,
.wp-block-button__link {
	background-color: var(--wp--preset--color--mo-blue);
	color: #fff;
	border-radius: 3px;
	text-transform: uppercase;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .05em;
}
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.wp-block-button__link:hover { background-color: #1b3470; color: #fff; }

/* Black "Tovább olvasom" style used on blog cards */
.mo-btn-dark .wp-block-button__link { background-color: #111; border-radius: 2px; }
.mo-btn-dark .wp-block-button__link:hover { background-color: #000; }

/* -------------------------------------------------------------------------
   5. PRODUCT GRID ("KIEMELT AJÁNLATOK" + category archives)
   Matches the Oxygen columns-4 layout: centered titles, bold price,
   full-width uppercase buttons.
   ------------------------------------------------------------------------- */
.mo-products .products,
.woocommerce ul.products { text-align: center; }
.woocommerce ul.products li.product .woocommerce-loop-product__title {
	font-family: var(--wp--preset--font-family--open-sans);
	font-size: 17px;
	color: var(--wp--preset--color--mo-text);
}
.woocommerce ul.products li.product .price {
	color: var(--wp--preset--color--mo-text);
	font-size: 13px;
	font-weight: 700;
}
.woocommerce ul.products li.product .button {
	display: block;
	margin-top: 10px;
}
/* Sale badge in the Oxygen teal-ish green */
.woocommerce span.onsale { background-color: #6fcf97; color: #fff; }

/* Section heading style: Vidaloka uppercase, as on the old front page */
.mo-section-title {
	font-family: var(--wp--preset--font-family--vidaloka);
	font-size: 28px;
	text-transform: uppercase;
	letter-spacing: .02em;
}

/* -------------------------------------------------------------------------
   6. BLOG CARDS (front page + blog index, latest-posts block)
   ------------------------------------------------------------------------- */
.mo-blog-grid .wp-block-latest-posts__featured-image img {
	width: 100%; height: 230px; object-fit: cover;
}
.mo-blog-grid li {
	background: #fff;
	border: 1px solid rgba(0, 0, 0, .07);
	padding-bottom: 16px;
	margin-bottom: 24px;
}
.mo-blog-grid li > a {
	display: block;
	padding: 0 16px;
	font-size: 21px;
	font-weight: 600;
	color: #2c5aa0;               /* blue titles, as on the Oxygen cards */
	text-decoration: none;
	margin-top: 12px;
}
.mo-blog-grid li > a:hover { text-decoration: underline; }
.mo-blog-grid .wp-block-latest-posts__post-date { padding: 0 16px; font-size: 13px; color: #777; }
.mo-blog-grid .wp-block-latest-posts__post-excerpt { padding: 0 16px; font-size: 15px; color: #444; }

/* -------------------------------------------------------------------------
   7. FOOTER — same light bar as the header + centered menu + copyright.
   ------------------------------------------------------------------------- */
.mo-footer {
	background-color: var(--wp--preset--color--mo-light);
	font-size: 14px;
}
.mo-footer .wp-block-navigation a { color: #3f4757; text-decoration: none; }
.mo-footer .wp-block-navigation a:hover { color: var(--wp--preset--color--mo-blue); text-decoration: underline; }
.mo-footer .mo-copyright { font-size: 13px; color: #666; }

/* -------------------------------------------------------------------------
   8. RESPONSIVE — mirror the Oxygen breakpoints (768 / 480)
   ------------------------------------------------------------------------- */
@media (max-width: 781px) {
	/* Topbar: stack the NAP columns, keep it compact */
	.mo-topbar .mo-topbar-cols { gap: 4px !important; }
	.mo-hero__slide h1,
	.mo-hero__slide h2 { font-size: 30px; }
	.mo-hero__slide p { font-size: 16px; }
	.mo-hero__slide { min-height: 420px; }
}
@media (max-width: 480px) {
	.mo-topbar .wp-block-site-title a { font-size: 22px; }
	.mo-hero__slide h1,
	.mo-hero__slide h2 { font-size: 24px; }
}
