/* =========================================================================
   CSThemes – block homepage (inc/homeblocks/). Loaded on that page only.
   Every block: <section class="hb hb--TYPE hb-space--X [your class]">
   ========================================================================= */
.hb-home { display: block; }
.hb { position: relative; }
.hb-space--none { padding: 0; }
.hb-space--sm { padding: 7px 0; }
.hb-space--md { padding: 22px 0; }
.hb-space--lg { padding: 48px 0; }
.hb-home > .hb:first-of-type { padding-top: 14px; }
.hb-notices { padding-top: 14px; }

.hb-box { background: var(--cs-bg); border-radius: var(--cs-radius-sm, 6px); box-shadow: 0 1px 2px rgba(0,0,0,.06); padding: 18px 20px; }
.hb-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 14px; }
.hb-head__title { margin: 0; font-size: 1.15rem; text-transform: uppercase; letter-spacing: .01em; color: var(--cs-shop, var(--cs-heading)); }
.hb-head__more { font-size: .9rem; color: var(--cs-shop, var(--cs-primary)); white-space: nowrap; }

.hb-align--center { text-align: center; }
.hb-heading h2 { margin: 0 0 .3em; }
.hb-heading p { margin: 0 auto; max-width: 720px; color: var(--cs-text-light); font-size: 1.05rem; }
.hb-size--md h2 { font-size: 1.4rem; }
.hb-size--lg h2 { font-size: 2rem; }
.hb-size--xl h2 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.15; }
.hb-text.is-narrow { max-width: 780px; margin: 0 auto; }
.hb-text > :last-child { margin-bottom: 0; }

.hb-image { margin: 0 auto; }
.hb-image img { display: block; width: 100%; height: auto; }
.hb-image.is-rounded img { border-radius: calc(var(--cs-radius) + 6px); }

/* Width options. */
.hb-full { width: 100%; }
.hb-narrow { max-width: 860px; }
.hb-w--full .hb-banner.is-rounded .hb-banner__item, .hb-w--full .hb-banner.is-rounded { border-radius: 0; }

/* Banner: slider | grid (1 big + 2 small) | row | stack. Auto height = the image decides (nothing cut off). */
.hb-banner { position: relative; }
.hb-banner__item { display: block; overflow: hidden; background: var(--cs-bg-alt); min-width: 0; }
.hb-banner__item img { display: block; width: 100%; height: auto; }
.hb-banner.is-rounded .hb-banner__item { border-radius: var(--cs-radius-sm, 6px); }
.hb-banner.is-fixed .hb-banner__item { height: var(--hb-h, 420px); }
.hb-banner.is-fixed .hb-banner__item img { height: 100%; object-fit: cover; }
a.hb-banner__item img { transition: transform .4s; }
a.hb-banner__item:hover img { transform: scale(1.02); }

.hb-banner--slider { overflow: hidden; }
.hb-banner.is-rounded.hb-banner--slider { border-radius: var(--cs-radius-sm, 6px); }
.hb-banner__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; align-items: flex-start; }
.hb-banner__track::-webkit-scrollbar { display: none; }
.hb-banner--slider .hb-banner__item { flex: 0 0 100%; scroll-snap-align: start; border-radius: 0 !important; }
.hb-banner--slider a.hb-banner__item:hover img { transform: none; }
.hb-banner__nav { position: absolute; top: 50%; z-index: 2; width: 42px; height: 42px; margin-top: -21px; border: 0; border-radius: 50%; background: rgba(255,255,255,.88); color: #111; box-shadow: 0 2px 10px rgba(0,0,0,.18); display: flex; align-items: center; justify-content: center; cursor: pointer; opacity: 0; transition: opacity .2s; }
.hb-banner__nav--prev { left: 14px; }
.hb-banner__nav--next { right: 14px; }
.hb-banner--slider:hover .hb-banner__nav, .hb-banner__nav:focus-visible { opacity: 1; }
.hb-banner__dots { position: absolute; left: 0; right: 0; bottom: 12px; z-index: 2; display: flex; justify-content: center; gap: 7px; }
.hb-banner__dots button { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 999px; background: rgba(255,255,255,.65); box-shadow: 0 0 0 1px rgba(0,0,0,.12); cursor: pointer; transition: width .25s, background .25s; }
.hb-banner__dots button.is-active { width: 24px; background: #fff; }

.hb-banner--grid { display: grid; gap: 8px; grid-template-columns: 2fr 1fr; }
.hb-banner--grid.hb-banner--n3 { grid-template-rows: 1fr 1fr; }
.hb-banner--grid.hb-banner--n3 .hb-banner__item:first-child { grid-row: 1 / 3; }
.hb-banner--grid .hb-banner__item img { height: 100%; object-fit: cover; }
.hb-banner--grid.hb-banner--n1 { grid-template-columns: 1fr; }
.hb-banner--row { display: grid; gap: 8px; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.hb-banner--stack { display: grid; gap: 8px; }

.hb-mt { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.hb-mt--right .hb-mt__media { order: 2; }
.hb-mt__media img { display: block; width: 100%; height: auto; max-height: 440px; object-fit: cover; border-radius: calc(var(--cs-radius) + 6px); }
.hb-mt__body h2 { margin-top: 0; }

.hb-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 28px; border-radius: 999px; background: var(--cs-shop, var(--cs-primary)); color: #fff; font-weight: 600; border: 2px solid var(--cs-shop, var(--cs-primary)); transition: .2s; }
.hb-btn:hover { color: #fff; filter: brightness(.92); }
.hb-btn.is-outline { background: transparent; color: var(--cs-shop, var(--cs-primary)); }
.hb-btn.is-outline:hover { background: var(--cs-shop, var(--cs-primary)); color: #fff; filter: none; }

.hb-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 4px; }
.hb-cats__item { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 6px; border-radius: var(--cs-radius-sm, 6px); color: var(--cs-text); text-align: center; font-size: .85rem; line-height: 1.3; transition: box-shadow .15s; }
.hb-cats__item:hover { color: var(--cs-shop, var(--cs-primary)); box-shadow: 0 0 0 1px var(--cs-border), 0 3px 10px rgba(0,0,0,.06); }
.hb-cats__img { width: 72px; height: 72px; border-radius: 50%; overflow: hidden; background: var(--cs-bg-alt); display: flex; align-items: center; justify-content: center; color: var(--cs-text-light); }
.hb-cats__img img { width: 100%; height: 100%; object-fit: cover; }

.hb-box .cs-pcard__box { box-shadow: none; border-color: var(--cs-border); }
.hb-home .home-section { margin-bottom: 0; }

@media (max-width: 767px) {
	.hb-hide-mobile { display: none !important; }
	.hb-space--md { padding: 14px 0; }
	.hb-space--lg { padding: 28px 0; }
	.hb-box { padding: 14px 12px; }
	.hb-mt { grid-template-columns: 1fr; gap: 18px; }
	.hb-mt--right .hb-mt__media { order: 0; }
	.hb-banner.is-fixed .hb-banner__item { height: var(--hb-hm, 200px); }
	.hb-banner__nav { display: none; }
	.hb-banner--grid { grid-template-columns: 1fr 1fr; grid-template-rows: auto !important; }
	.hb-banner--grid .hb-banner__item:first-child { grid-column: 1 / -1; grid-row: auto !important; }
	.hb-banner--row { grid-auto-flow: row; grid-template-columns: 1fr 1fr; }
	.hb-cats { grid-template-columns: none; grid-auto-flow: column; grid-template-rows: repeat(2, auto); grid-auto-columns: 23%; overflow-x: auto; }
	.hb-cats__img { width: 56px; height: 56px; }
	.hb-head__title { font-size: 1rem; }
}
.hb-error { margin: 10px 0; padding: 10px 14px; border: 1px solid #fecaca; background: #fef2f2; color: #991b1b; border-radius: 8px; font-size: .88rem; }
.hb-error code { font-size: .8rem; background: none; }
