/*
 * Homepage Showcase (Control Pro) — public styles.
 * The sections are built from the theme's own pieces (Sahara: the .catalog / .warna heading line, .pricolor
 * prices, .btn-primary buttons, .imag / .kategoris category tiles), so the theme's colours, fonts and icons
 * apply to them; this file only lays them out. Everything is scoped under .cps / .cps-card; the numbers a
 * section sets arrive as custom properties (--cps-per, --cps-gap, --cps-r, --cps-ratio, --cps-lines,
 * --cps-fit). Neutrals are the theme's own (#ddd borders, #888 secondary text, #f1efef photo ground).
 */

.cps { display: flow-root; clear: both; position: relative; margin: 0 0 20px; }
.cps-slot { clear: both; }
/* the theme's own category carousel: no box of ours, so it lays out exactly as without the showcase
   (a block here would keep a margin the theme lets collapse); the visual editor needs one to select */
.cps-theme-cats { display: contents; }
.cps-theme-cats[data-cps-edit] { display: flow-root; clear: both; }

/* heading: the theme's .catalog line; the h2 takes the line's size, not .catalog h2's 20px */
.cps__head.catalog { margin-bottom: 10px; }
.cps__title.warna { font-size: inherit; line-height: inherit; font-weight: inherit; text-transform: inherit; margin: 0; }
.cps__title .fa { margin-right: 2px; }
.cps__cta a { text-transform: none; }
.cps__sub { clear: both; margin: -4px 0 10px; color: #888; font-size: 13px; }

/* track: a scroll-snap row (carousel) or a grid */
.cps__stage { position: relative; }
.cps__viewport { position: relative; }
.cps__viewport:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.cps__track { list-style: none; margin: 0; padding: 0; }
.cps__slide { min-width: 0; margin: 0; padding: 0; }
.cps--carousel .cps__track {
  display: flex; gap: var(--cps-gap, 16px); overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; padding: 2px 2px 8px;
}
.cps--carousel .cps__track::-webkit-scrollbar { display: none; }
.cps--carousel .cps__slide {
  flex: 0 0 calc((100% - (var(--cps-per, 4) - 1) * var(--cps-gap, 16px)) / var(--cps-per, 4));
  scroll-snap-align: start;
}
.cps--grid .cps__track { display: grid; gap: var(--cps-gap, 16px); grid-template-columns: repeat(var(--cps-per, 4), minmax(0, 1fr)); }
.cps--fade .cps__track { transition: opacity .3s ease; }
.cps--fade .cps__track.is-fading { opacity: 0; }

/* controls: the theme's owl look (round dots, soft arrows at the sides) */
.cps__nav { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 22px; }
.cps__nav[hidden] { display: none; }
.cps__btn {
  display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0;
  border: 1px solid #ddd; border-radius: 50%; background: rgba(255, 255, 255, .94); color: #555; cursor: pointer;
  font-size: 14px; line-height: 1; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); transition: opacity .2s, color .2s;
}
.cps__btn:hover { color: #222; }
.cps__btn:focus-visible { outline: 2px solid #555; outline-offset: 2px; }
.cps__btn[disabled] { opacity: .35; cursor: default; }
.cps__prev, .cps__next { position: absolute; top: 38%; z-index: 3; transform: translateY(-50%); }
.cps__prev { left: -6px; }
.cps__next { right: -6px; }
.cps__pause { width: 26px; height: 26px; font-size: 11px; box-shadow: none; }
.cps__dots { display: flex; flex-wrap: wrap; justify-content: center; }
.cps__dot { width: 26px; height: 22px; padding: 0; border: 0; background: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.cps__dot::before { content: ""; width: 12px; height: 12px; border-radius: 20px; background: #869791; opacity: .5; }
.cps__dot[aria-current="true"]::before { opacity: 1; }
.cps__dot:focus-visible { outline: 2px solid #555; outline-offset: -2px; border-radius: 6px; }

/* card */
.cps-card {
  position: relative; display: flex; flex-direction: column; height: 100%; min-width: 0; overflow: hidden;
  background: #fff; border-radius: var(--cps-r, 6px); transition: transform .2s ease, box-shadow .2s ease;
}
.cps--bg-mist .cps-card { background: #f7f7f7; }
.cps--bg-cream .cps-card { background: #fbfaf6; }
.cps--border .cps-card { border: 1px solid #ddd; }
.cps--shadow-soft .cps-card { box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.cps--shadow-lift .cps-card { box-shadow: 0 4px 14px rgba(0, 0, 0, .10); }
.cps--hover-lift .cps-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0, 0, 0, .12); }
.cps--hover-zoom .cps-card__img img { transition: transform .35s ease; }
.cps--hover-zoom .cps-card:hover .cps-card__img img { transform: scale(1.04); }

.cps-card__media { position: relative; aspect-ratio: var(--cps-ratio, 4 / 3); max-width: 100%; overflow: hidden; background: #f1efef; flex: 0 0 auto; }
.cps-card__img { display: block; width: 100%; height: 100%; }
.cps-card__img img { display: block; width: 100%; height: 100%; object-fit: var(--cps-fit, cover); }
.cps-card__noimg { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: #bbb; font-size: 32px; }

.cps-card__body { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; padding: 10px 12px; }
.cps--sp-tight .cps-card__body { padding: 8px; }
.cps--sp-roomy .cps-card__body { padding: 14px 16px; }
.cps-card__title {
  margin: 0 0 6px; font-size: 14px; line-height: 1.3; font-weight: 700; overflow: hidden; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: var(--cps-lines, 2); line-clamp: var(--cps-lines, 2);
}
.cps-card__title a { color: inherit; }
.cps-card__price { margin: 0 0 6px; font-size: 16px; font-weight: 700; line-height: 1.25; }
.cps-card__ref { font-size: .82em; font-weight: 400; color: #888; white-space: nowrap; }
.cps-card__desc { margin: 0 0 6px; color: #666; font-size: 12px; line-height: 1.4; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.cps-card__meta.loc { display: flex; flex-wrap: wrap; gap: 3px 12px; margin: auto 0 0; padding-top: 6px; border-top: 1px dotted #ddd; font-size: 12px; }
.cps-card__meta span { min-width: 0; overflow-wrap: anywhere; }
.cps-card__cta { align-self: flex-start; margin-top: 8px; }
.cps--type-sm .cps-card__title { font-size: 13px; }
.cps--type-sm .cps-card__price { font-size: 14px; }
.cps--type-lg .cps-card__title { font-size: 16px; }
.cps--type-lg .cps-card__price { font-size: 18px; }

/* the price on the photo: a band at its foot; what sits in the bottom corners moves above it */
.cps-card__pricetag.pricolor {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 22px 10px 8px; color: #fff;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, .58)); font-weight: 700; font-size: 15px; line-height: 1.2;
}
.cps-card__pricetag .cps-card__ref { color: rgba(255, 255, 255, .85); }
.cps-card__media:has(.cps-card__pricetag) .cpa-badge--card,
.cps-card__media:has(.cps-card__pricetag) .cpb-stack--bl,
.cps-card__media:has(.cps-card__pricetag) .cpb-stack--br { bottom: 44px; }

/* presets */
.cps--p-image .cps-card__body { padding: 8px 2px 4px; background: transparent; }
.cps--p-image .cps-card { background: transparent; }
.cps--p-editorial .cps-card__title { letter-spacing: .01em; }
.cps--p-horizontal .cps-card { flex-direction: row; }
.cps--p-horizontal .cps-card__media { flex: 0 0 40%; align-self: stretch; aspect-ratio: auto; min-height: 120px; }
@media (max-width: 599px) {
  .cps--m-stack.cps--p-horizontal .cps-card { flex-direction: column; }
  .cps--m-stack.cps--p-horizontal .cps-card__media { flex-basis: auto; aspect-ratio: var(--cps-ratio, 4 / 3); min-height: 0; }
  .cps--m-horizontal .cps-card { flex-direction: row; }
  .cps--m-horizontal .cps-card__media { flex: 0 0 38%; aspect-ratio: auto; min-height: 110px; align-self: stretch; }
  .cps__prev { left: -2px; }
  .cps__next { right: -2px; }
}

/* categories in the theme's tiles */
.cps--cats .cps__slide > a { display: block; }
.cps--cats .imag { margin: 10px auto; }
.cps--cats-small .fa.kategoris { font-size: 40px; padding: 10px; }

/* the theme's design: the category carousel's own wrappers (.cater > .product-pages > .owl-carousel), plugin
   and tile (.imag: the .fa.kategoris box, then a line of text), the listing in the box. The sizes are the
   theme's: nothing here sets a width, a height, a margin or a padding of the carousel or of the tile, so
   it keeps the category carousel's geometry; a plain block like the theme's .cater (no margin of ours) */
.cps--theme { display: block; margin: 0; }
.cps--theme .cater { clear: both; } /* below a heading: the theme's .catalog line floats */
.cps--theme .owl-pagination { display: none; } /* as the theme hides it on its category carousel */
.cps--theme .owl-buttons > div:focus-visible { outline: 2px solid #555; outline-offset: 2px; opacity: 1; }
.cps--theme.cps--short .cater { opacity: .55; }
.cps-tile .cps-tile__box { position: relative; }
/* the icon stays in the box, keeping its height; with a photo it is not seen */
.cps-tile .cps-tile__box.has-img::before { color: transparent; }
/* the box's inside (within the theme's border); the icon font's size and smoothing are not the text's */
.cps-tile__media.cpf-media {
  position: absolute; inset: 0; display: block; min-height: 0; overflow: hidden; background: #f1efef;
  font: normal normal 400 14px/1.3 var(--cps-font, Arial, Helvetica, sans-serif); text-align: left;
  -webkit-font-smoothing: auto; -moz-osx-font-smoothing: auto;
}
.cps-tile__box:not(.has-img) .cps-tile__media { background: transparent; }
.cps-tile__img { display: block; width: 100%; height: 100%; }
.cps-tile__img img { display: block; width: 100%; height: 100%; object-fit: var(--cps-fit, cover); }
/* the price on the photo, at its foot; what sits in the bottom corners moves above it */
.cps-tile__price.pricolor {
  position: absolute; left: 4px; bottom: 4px; z-index: 2; max-width: calc(100% - 8px); padding: 2px 5px; border-radius: 3px;
  background: rgba(255, 255, 255, .94); box-shadow: 0 1px 2px rgba(16, 24, 40, .25);
  font-size: 12px; font-weight: 700; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cps-tile__media:has(.cps-tile__price) .cpa-badge--card,
.cps-tile__media:has(.cps-tile__price) .cpb-stack--bl,
.cps-tile__media:has(.cps-tile__price) .cpb-stack--br { bottom: 27px; }
/* the box is a category icon's (about 120 × 80 px on a phone, 130 × 110 on a desktop), not a card's photo: the
   heart is drawn smaller (a 32px button, still above the 24px target size), and every badge is in one row in the
   top-left corner, left of the heart, small, on at most two lines above the price (one above Sold / Reserved) —
   ShowcaseRenderer::tile puts them there, the disclosure first — so nothing covers anything at any width */
.cps-tile .cpf-fav--card { top: 2px; right: 2px; }
.cps-tile .cpf-heart { width: 32px; height: 32px; }
.cps-tile .cpf-fav--card .cpf-heart::before { inset: 3px; }
.cps-tile .cpf-heart__icon { width: 16px; height: 16px; }
.cps-tile .cpb-stack--tl {
  top: 6px; left: 6px; right: 40px; max-width: none; max-height: 38px; /* two lines of 17px */
  flex-flow: row wrap; align-items: flex-start; align-content: flex-start;
}
.cps-tile__media:not(:has(.cpf-fav)) .cpb-stack--tl { right: 6px; }
.cps-tile__media:has(.cpa-badge--card) .cpb-stack--tl { max-height: 17px; }
.cps-tile .cpb-stack .cpb { --cpb-pad-y: 2px; --cpb-pad-x: 5px; font-size: 10px; white-space: nowrap; }
/* the line under the box: the title, on the lines the longest category name takes (cp-showcase.js) */
.cps-tile__title {
  overflow: hidden; overflow-wrap: anywhere; min-height: var(--cps-title-h, 0);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: var(--cps-lines, 1); line-clamp: var(--cps-lines, 1);
}
.cps-tile__probe { position: absolute; left: 0; top: 0; visibility: hidden; pointer-events: none; }
/* no carousel plugin on the page: the row scrolls, as many tiles to a screen as the theme's carousel shows */
.cps--noowl .cps-owl { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.cps--noowl .cps-tile { flex: 0 0 calc(100% / 6); min-width: 0; scroll-snap-align: start; }
@media (max-width: 1182px) { .cps--noowl .cps-tile { flex-basis: calc(100% / 5); } }
@media (max-width: 986px) { .cps--noowl .cps-tile { flex-basis: 25%; } }
@media (max-width: 750px) { .cps--noowl .cps-tile { flex-basis: calc(100% / 3); } }
@media (max-width: 430px) { .cps--noowl .cps-tile { flex-basis: 50%; } }

/* the visual editor's marker for a section with nothing to show (never drawn for visitors) */
.cps--empty .cps__empty { margin: 0; padding: 16px; border: 2px dashed #ccc; border-radius: 6px; color: #888; text-align: center; }
/* … and for one with fewer listings than its minimum: the cards drawn under the marker, dimmed */
.cps--short { outline: 2px dashed #ccc; outline-offset: 4px; }
.cps--short .cps__short { clear: both; margin: 0 0 10px; padding: 8px 12px; border-radius: 6px; background: #fff8e1; color: #6b5300; font-size: 13px; }
.cps--short .cps__stage { opacity: .55; }

.cps-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* the administrator's preview bar */
.cps-preview-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 2147483000; padding: 8px 16px; background: #333; color: #fff;
  font: 13px/1.4 Helvetica, Arial, sans-serif; text-align: center; box-shadow: 0 -2px 8px rgba(0, 0, 0, .2);
}
.cps-preview-bar a { color: #fff; text-decoration: underline; }
.cps-preview-bar--studio { padding: 4px 10px; font-size: 12px; opacity: .9; }

@media (prefers-reduced-motion: reduce) {
  .cps--carousel .cps__track { scroll-behavior: auto; }
  .cps-card, .cps-card__img img, .cps--fade .cps__track, .cps__btn { transition: none !important; }
  .cps--hover-lift .cps-card:hover, .cps--hover-zoom .cps-card:hover .cps-card__img img { transform: none; }
}
