/* mybook.gr header – GeneratePress Premium
   Breakpoint: 900px (desktop ≥ 901px) */

:root {
	--mb-teal: #0a85a3;
	--mb-teal-dark: #076d86;
	--mb-ink: #1b2432;
	--mb-muted: #5d6877;
	--mb-red: #ea4336;
	--mb-line: #e6ecef;
	--mb-soft: #f4f8f9;
	--mb-font: "Manrope", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
	--mb-wrap: 1480px;
	--mb-pad: 24px;
}

/* ---------- Reset του GeneratePress header ---------- */
.has-mybook-header .site-header,
.has-mybook-header #masthead {
	background: #fff;
	padding: 0;
	position: sticky;
	top: 0;
	z-index: 999;
	box-shadow: none;
}
.has-mybook-header .site-header .inside-header,
.has-mybook-header #mobile-header,
.has-mybook-header .main-navigation,
.has-mybook-header .site-branding-container { display: none !important; }
.admin-bar.has-mybook-header #masthead { top: 32px; }
@media (max-width: 782px) { .admin-bar.has-mybook-header #masthead { top: 46px; } }

.screen-reader-text { position: absolute !important; clip: rect(1px,1px,1px,1px); width: 1px; height: 1px; overflow: hidden; }

/* ---------- Βάση ---------- */
.mb-header { font-family: var(--mb-font); color: var(--mb-ink); background: #fff; }
.mb-header *, .mb-drawer *, .mb-tabbar * { box-sizing: border-box; }
.mb-header a, .mb-drawer a, .mb-tabbar a { text-decoration: none; color: inherit; }
.mb-header ul, .mb-drawer ul { list-style: none; margin: 0; padding: 0; }
.mb-header button, .mb-drawer button, .mb-tabbar button { font-family: inherit; font-size: inherit; line-height: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
.mb-wrap { max-width: var(--mb-wrap); margin: 0 auto; padding: 0 var(--mb-pad); }
.mb-ico { display: block; flex: none; }

/* ---------- Topbar ---------- */
.mb-topbar { background: var(--mb-teal); color: #fff; font-size: 14px; font-weight: 600; }
.mb-topbar__in { display: flex; align-items: center; justify-content: space-between; min-height: 44px; }
.mb-topbar__msg { display: flex; align-items: center; gap: 10px; color: #fff !important; }
.mb-topbar__msg .mb-ico { width: 22px; height: 22px; }
.mb-topbar__ico-truck, .mb-topbar__arrow { display: none; }
.mb-topbar__links { display: flex; align-items: center; }
.mb-topbar__links a { display: inline-flex; align-items: center; gap: 8px; color: #fff !important; padding: 0 18px; line-height: 1; transition: opacity .15s; }
.mb-topbar__links a + a { border-left: 1px solid rgba(255,255,255,.55); }
.mb-topbar__links a:last-child { padding-right: 0; }
.mb-topbar__links a:hover, .mb-topbar__msg:hover { opacity: .85; }
.mb-topbar__links .mb-ico { width: 18px; height: 18px; }

/* ---------- Κεντρική γραμμή ---------- */
.mb-main__in { display: flex; align-items: center; gap: 40px; min-height: 92px; transition: min-height .2s; }
.mb-burger { display: none; }

.mb-logo, .mb-header .custom-logo-link { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.mb-header .custom-logo { height: 56px; width: auto; display: block; }
.mb-logo__mark { width: 52px; height: 46px; flex: none; }
.mb-logo__text { font-size: 44px; font-weight: 800; letter-spacing: -.035em; line-height: 1; color: var(--mb-ink); }
.mb-logo__text span { color: var(--mb-teal); }

.mb-main__search { flex: 1 1 auto; max-width: 720px; margin-left: auto; margin-right: auto; }

/* Αναζήτηση (pill) */
.mb-search { display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 5px 0 20px; background: #fff; border: 2px solid #d9e0e4; border-radius: 999px; box-shadow: 0 2px 8px rgba(20,40,60,.05) inset; transition: border-color .15s, box-shadow .15s; }
.mb-search:focus-within { border-color: var(--mb-teal); box-shadow: 0 0 0 4px rgba(10,133,163,.14); }
.mb-search .mb-ico { width: 24px; height: 24px; color: var(--mb-ink); }
.mb-search__input { flex: 1; min-width: 0; height: 100%; border: 0 !important; outline: 0 !important; background: transparent !important; box-shadow: none !important; padding: 0 !important; margin: 0; font: 500 16px/1 var(--mb-font); color: var(--mb-ink); -webkit-appearance: none; }
.mb-search__input::placeholder { color: #707b88; opacity: 1; }
.mb-search__input::-webkit-search-cancel-button { display: none; }
.mb-search__btn { height: 100%; padding: 0 30px !important; border-radius: 999px !important; background: var(--mb-teal) !important; color: #fff !important; font-weight: 700; font-size: 17px; transition: background .15s; }
.mb-search__btn:hover { background: var(--mb-teal-dark) !important; }

/* Εικονίδια ενεργειών */
.mb-actions { display: flex; align-items: center; gap: 30px; margin-left: auto; flex: none; }
.mb-action { position: relative; display: grid; place-items: center; width: 44px; height: 44px; color: var(--mb-ink) !important; transition: color .15s; }
.mb-action .mb-ico { width: 34px; height: 34px; stroke-width: 1.6; }
.mb-action:hover { color: var(--mb-teal) !important; }
.mb-badge { position: absolute; top: -4px; right: -8px; min-width: 24px; height: 24px; padding: 0 6px; display: grid; place-items: center; border-radius: 999px; background: var(--mb-teal); color: #fff; font: 800 13px/1 var(--mb-font); border: 2px solid #fff; }
.mb-badge.is-empty { display: grid; }

/* ---------- Γραμμή μενού ---------- */
.mb-nav { border-top: 1px solid var(--mb-line); border-bottom: 1px solid var(--mb-line); background: #fff; }
.mb-nav__in { display: flex; align-items: center; min-height: 64px; gap: 6px; }
.mb-catwrap { position: relative; flex: none; }
.mb-catbtn { display: inline-flex; align-items: center; gap: 14px; height: 64px; padding-right: 8px; font-weight: 800; font-size: 18px; color: var(--mb-ink); }
.mb-catbtn .mb-ico:first-child { width: 30px; height: 30px; }
.mb-catbtn .mb-ico:last-child { width: 20px; height: 20px; transition: transform .2s; }
.mb-catwrap.is-open .mb-catbtn .mb-ico:last-child { transform: rotate(180deg); }
.mb-catbtn:hover { color: var(--mb-teal); }
.mb-nav__sep { width: 1px; height: 40px; background: var(--mb-line); margin: 0 26px 0 22px; flex: none; }
.mb-nav__more { display: none; }

.mb-nav__menu { flex: 1; min-width: 0; }
.mb-menu, .mb-nav__menu > ul { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; }
.mb-nav__menu li { position: relative; margin: 0; }
.mb-nav__menu li > a { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 999px; font-weight: 700; font-size: 17px; color: var(--mb-ink) !important; white-space: nowrap; transition: background .15s, color .15s; }
.mb-nav__menu li > a:hover { background: var(--mb-soft); color: var(--mb-teal) !important; }
.mb-nav__menu li.menu-item-has-children > a::after { content: ""; width: 8px; height: 8px; margin-top: -3px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }
/* Pill "Προσφορές" – πρόσθεσε την κλάση mb-pill στο CSS Classes του menu item */
.mb-nav__menu li.mb-pill > a { background: var(--mb-red); color: #fff !important; padding: 0 22px; }
.mb-nav__menu li.mb-pill > a:hover { background: #d3352a; color: #fff !important; }
/* Υπομενού */
.mb-nav__menu .sub-menu { position: absolute; left: 0; top: 100%; min-width: 230px; padding: 10px; margin-top: 8px; background: #fff; border: 1px solid var(--mb-line); border-radius: 16px; box-shadow: 0 16px 40px rgba(20,40,60,.14); opacity: 0; visibility: hidden; transform: translateY(6px); transition: .18s; z-index: 30; display: block; }
.mb-nav__menu li:hover > .sub-menu, .mb-nav__menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.mb-nav__menu .sub-menu a { display: flex; width: 100%; height: auto; padding: 10px 14px; border-radius: 10px; font-size: 16px; font-weight: 600; }

/* Mega panel κατηγοριών */
.mb-catpanel { position: absolute; left: 0; top: calc(100% + 1px); width: min(1100px, calc(100vw - 2 * var(--mb-pad))); padding: 28px 30px 30px; background: #fff; border: 1px solid var(--mb-line); border-radius: 0 0 20px 20px; box-shadow: 0 24px 50px rgba(20,40,60,.16); z-index: 40; }
.mb-catpanel[hidden] { display: none; }
.mb-cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px 32px; }
.mb-cats__title { display: block; font-weight: 800; font-size: 17px; margin-bottom: 8px; color: var(--mb-teal) !important; }
.mb-cats ul a { display: block; padding: 5px 0; font-size: 15px; font-weight: 600; color: var(--mb-ink); }
.mb-cats ul a:hover, .mb-cats__title:hover { text-decoration: underline; }

/* Sticky shrink (desktop) */
.mb-header.is-scrolled .mb-main__in { min-height: 72px; }
.mb-header.is-scrolled .mb-logo__text { font-size: 36px; }
.mb-header.is-scrolled .mb-logo__mark { width: 44px; height: 39px; }
.mb-header.is-scrolled .custom-logo { height: 46px; }
.mb-header.is-scrolled .mb-topbar { display: none; }

/* ---------- Drawer / overlay / tabbar (κρυφά σε desktop) ---------- */
.mb-overlay { position: fixed; inset: 0; z-index: 1000; background: rgba(15,25,35,.5); opacity: 0; transition: opacity .25s; }
.mb-overlay.is-open { opacity: 1; }
.mb-overlay[hidden] { display: none; }
.mb-drawer { position: fixed; z-index: 1001; top: 0; bottom: 0; left: 0; width: min(88vw, 400px); background: #fff; font-family: var(--mb-font); color: var(--mb-ink); transform: translateX(-102%); transition: transform .28s cubic-bezier(.2,.8,.2,1); display: flex; flex-direction: column; box-shadow: 8px 0 40px rgba(0,0,0,.18); }
.mb-drawer.is-open { transform: none; }
.mb-drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--mb-line); }
.mb-drawer__head .mb-logo__text { font-size: 30px; }
.mb-drawer__head .mb-logo__mark { width: 38px; height: 34px; }
.mb-drawer__close { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; }
.mb-drawer__close:hover { background: var(--mb-soft); }
.mb-drawer__body { overflow-y: auto; padding: 8px 18px 28px; overscroll-behavior: contain; }
.mb-drawer__h { margin: 22px 0 8px; font: 800 13px/1 var(--mb-font); text-transform: uppercase; letter-spacing: .08em; color: var(--mb-muted); }
.mb-drawer__cats > li { border-bottom: 1px solid var(--mb-line); padding: 12px 0; }
.mb-drawer__cats .mb-cats__title { margin: 0 0 4px; font-size: 17px; }
.mb-drawer__cats ul { display: flex; flex-wrap: wrap; gap: 6px 8px; margin-top: 8px; }
.mb-drawer__cats ul a { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--mb-soft); font-size: 14px; font-weight: 600; }
.mb-drawer__menu a { display: block; padding: 13px 0; border-bottom: 1px solid var(--mb-line); font-weight: 700; font-size: 17px; }
.mb-drawer__menu .sub-menu a { padding-left: 16px; font-weight: 600; font-size: 15px; }
.mb-drawer__menu li.mb-pill > a { color: var(--mb-red); }
.mb-drawer__links { display: grid; gap: 4px; margin-top: 22px; }
.mb-drawer__links a { padding: 8px 0; color: var(--mb-muted); font-weight: 600; }
.mb-tabbar { display: none; }
html.mb-lock { overflow: hidden; }

/* =========================================================
   MOBILE / TABLET  (≤ 900px)
   ========================================================= */
@media (max-width: 900px) {
	:root { --mb-pad: 16px; }

	/* Topbar: κεντραρισμένο μήνυμα με truck + βελάκι */
	.mb-topbar__links, .mb-topbar__ico-book { display: none; }
	.mb-topbar__ico-truck, .mb-topbar__arrow { display: block; }
	.mb-topbar__in { justify-content: center; min-height: 40px; }
	.mb-topbar__msg { gap: 8px; font-size: 12.5px; white-space: nowrap; }
	.mb-topbar__msg .mb-ico { width: 20px; height: 20px; }
	.mb-topbar__arrow .mb-ico { width: 18px; height: 18px; }

	/* Γραμμή: burger | logo (κέντρο) | εικονίδια */
	.mb-main__in { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; grid-template-areas: "burger logo actions" "search search search"; gap: 8px 8px; min-height: 0; padding-top: 10px; padding-bottom: 12px; align-items: center; }
	.mb-burger { display: grid; place-items: center; grid-area: burger; width: 44px; height: 44px; margin-left: -6px; }
	.mb-burger .mb-ico { width: 30px; height: 30px; }
	.mb-main__in > .mb-logo, .mb-main__in > .custom-logo-link { grid-area: logo; justify-self: center; }
	.mb-logo__text { font-size: 28px; }
	.mb-logo__mark { width: 34px; height: 30px; }
	.mb-logo { gap: 8px; }
	.mb-header .custom-logo { height: 40px; }
	.mb-actions { grid-area: actions; gap: 4px; margin: 0; }
	.mb-action { width: 36px; height: 36px; }
	.mb-action .mb-ico { width: 26px; height: 26px; }
	.mb-badge { top: -2px; right: -4px; min-width: 20px; height: 20px; font-size: 11px; padding: 0 4px; }
	.mb-main__search { grid-area: search; max-width: none; width: 100%; margin: 0; }
	.mb-search { height: 50px; padding-left: 16px; gap: 10px; }
	.mb-search__input { font-size: 16px; } /* 16px = χωρίς zoom στο iOS */
	.mb-search__btn { padding: 0 22px !important; font-size: 15px; }

	/* Μενού: scrollable pills */
	.mb-nav { border-bottom: 0; }
	.mb-nav__in { min-height: 54px; gap: 0; padding-right: 0; }
	.mb-catbtn { height: 54px; gap: 8px; font-size: 15px; padding-right: 12px; }
	.mb-catbtn .mb-ico:first-child { display: none; }
	.mb-catbtn .mb-ico:last-child { width: 16px; height: 16px; }
	.mb-catpanel { display: none !important; }
	.mb-nav__sep { display: none; }
	.mb-nav__menu { overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
	.mb-nav__menu::-webkit-scrollbar { display: none; }
	.mb-nav__menu li > a { height: 38px; padding: 0 14px; font-size: 15px; }
	.mb-nav__menu li.menu-item-has-children > a::after, .mb-nav__menu .sub-menu { display: none; }
	.mb-nav__menu li.mb-pill > a { padding: 0 16px; }
	.mb-nav__menu li:first-child:not(.mb-pill) { display: none; } /* "Βιβλία" = ήδη στο Κατηγορίες */
	.mb-nav__menu li:nth-child(n+5) { display: none; } /* στο mobile δείχνουμε τα 4 πρώτα, τα υπόλοιπα στο drawer */
	.mb-nav__more { display: grid; place-items: center; flex: none; width: 48px; height: 54px; border-left: 1px solid var(--mb-line); color: var(--mb-ink); }
	.mb-nav__more .mb-ico { width: 28px; height: 28px; }
	.mb-header.is-scrolled .mb-topbar { display: block; }

	/* Bottom tab bar */
	body.has-mybook-header { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
	.mb-tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 998; height: calc(66px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: #fff; border-top: 1px solid var(--mb-line); box-shadow: 0 -6px 20px rgba(20,40,60,.07); font-family: var(--mb-font); }
	.mb-tabbar a, .mb-tabbar button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #3b4656; font-size: 12px; font-weight: 600; -webkit-tap-highlight-color: transparent; }
	.mb-tabbar .mb-ico { width: 28px; height: 28px; stroke-width: 1.6; }
	.mb-tabbar .is-active { color: var(--mb-teal); font-weight: 800; }
	.mb-tabbar .is-active .mb-ico { fill: currentColor; fill-opacity: .15; }
	.mb-tabbar .mb-badge { top: 6px; right: calc(50% - 26px); min-width: 20px; height: 20px; font-size: 11px; padding: 0 4px; border-color: #fff; }
	.mb-tabbar .mb-badge.is-empty { display: grid; }
}

@media (max-width: 420px) {
	.mb-logo__text { font-size: 26px; }
	.mb-search__btn { padding: 0 16px !important; }
}

@media (min-width: 901px) and (max-width: 1180px) {
	.mb-main__in { gap: 24px; }
	.mb-logo__text { font-size: 36px; }
	.mb-actions { gap: 18px; }
	.mb-nav__menu li > a { padding: 0 12px; font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
	.mb-drawer, .mb-overlay, .mb-nav__menu .sub-menu { transition: none; }
}
