/* =============================================
   Amibo Homepage (amibohome module)
   Inherits theme typography (Montserrat) & black
   primary buttons. Scoped under .page-home.
   ============================================= */

/* This stylesheet only loads on the homepage. Remove the theme's
   #wrapper top padding there (two-ID specificity beats the theme rule). */
#index #wrapper { padding-top: 0; }

.page-home .amh-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

.page-home .amh-section-block {
  padding: 42px 0;
}

.page-home .amh-section-block.amh-topcategories {
  padding: 100px 0 120px 0;
  margin-bottom: 46px;
}

.page-home .amh-heading {
  font-size: 32px;
  font-weight: normal;
  text-align: center;
  margin: 0 0 24px;
}

.page-home .amh-intro-text {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 28px;
  color: #555;
}

.page-home .amh-center {
  text-align: center;
  margin-top: 28px;
}

/* Buttons — match theme's black primary */
.page-home .amh-btn {
  display: inline-block;
  width: auto;
  padding: 12px 28px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
  border-radius: 0;
}
.page-home .amh-btn-dark {
  background: #000;
  color: #fff;
}

/* WYSIWYG (RTE) content — inherits the section's color and respects the
   line breaks/paragraphs entered in the editor. `pre-line` keeps literal
   newlines (\r\n) as visible breaks while still collapsing extra spaces;
   it sits fine next to the <p>/<br> that the editor emits. */
.page-home .rte-content { color: inherit; /*white-space: pre-line;*/ }
.page-home .rte-content p,
.page-home .rte-content div { margin: 0 0; }
.page-home .rte-content > :last-child { margin-bottom: 0; }
/* Keep empty lines (an empty paragraph from pressing Enter) visible. */
.page-home .rte-content p:empty,
.page-home .rte-content div:empty { min-height: 1em; }
.page-home .rte-content ul,
.page-home .rte-content ol { margin: 0 0 1em; padding-left: 22px; text-align: left; display: inline-block; }
.page-home .rte-content a { text-decoration: underline; }
.page-home .rte-content strong { font-weight: 700; }

/* Generic grids */
.page-home .amh-grid {
  display: grid;
  gap: 20px;
}
.page-home .amh-grid-4 { grid-template-columns: repeat(4, 1fr); }
.page-home .amh-grid-3 { grid-template-columns: repeat(3, 1fr); }
.page-home .amh-grid-products { grid-template-columns: repeat(4, 1fr); }

/* ---------------- Hero ---------------- */
/* Full-bleed: image spans the full viewport while content stays boxed.
   Breaks out of the theme's centered .container. */
.page-home .amh-hero {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-bottom: 8px;
}
.page-home .amh-hero-inner {
  position: relative;
  min-height: 360px;
  display: flex;
  align-items: center;
}
.page-home .amh-hero-media {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.page-home .amh-hero-media img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.page-home .amh-hero-inner.has-image::after {
  content: '';
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, rgba(0,0,0,.45), rgba(0,0,0,0));
}
/* Boxed content overlaid on the full-width image */
.page-home .amh-hero-container {
  position: relative;
  z-index: 2;
  width: 100%;
}
.page-home .amh-hero-content {
  max-width: 620px;
  padding: 48px 0;
}
.page-home .amh-hero-inner.has-image .amh-hero-content { color: #fff; }
.page-home .amh-hero-title { font-size: 48px; font-weight: 800; margin: 0 0 10px; }
.page-home .amh-hero-subtitle { font-size: 20px; margin: 0 0 14px; }
.page-home .amh-hero-intro { font-size: 15px; margin: 0 0 22px; }

/* Trust bar — full-width strip, boxed content */
.page-home .amh-trustbar {
  background: #f6f6f6;
  border-top: 1px solid #eee;
}
.page-home .amh-trustbar-inner {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 28px;
  padding: 18px 20px;
}
.page-home .amh-trust-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #333;
}
.page-home .amh-trust-item .material-icons { font-size: 22px; color: #000; }

/* ---------------- Collections cards (title over image) ---------------- */
.page-home .amh-collection-card {
  display: block;
  color: inherit;
  text-decoration: none;
}
.page-home .amh-collection-media {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #f6f6f6;
}
.page-home .amh-collection-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.page-home .amh-collection-card:hover img { transform: scale(1.04); }
.page-home .amh-collection-name {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  color: #fff;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: .02em;
  background: rgba(0, 0, 0, .28);
  text-shadow: 0 1px 6px rgba(0, 0, 0, .55);
}

/* ---------------- Bestsellers (CTA tile + products) ---------------- */
/* Desktop: CTA tile ~38% on the left (image on top, button below),
   products fill the rest in a single row. */
.page-home .amh-bestsellers .amh-bs-layout {
  display: flex;
  gap: 20px;
  align-items: stretch;
}
.page-home .amh-bestsellers .amh-bs-cta {
  flex: 0 0 38%;
  max-width: 38%;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: #000;
  gap: 10px;
}
.page-home .amh-bs-products .product-miniature .thumbnail-top {
  margin-bottom: auto;
}
.page-home .amh-bestsellers .amh-cta-media {
  flex: 1 1 auto;
  min-height: 220px;
  overflow: hidden;
  background: #f0eae6;
}
.page-home .amh-bestsellers .amh-cta-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.page-home .amh-bestsellers .amh-bs-cta:hover .amh-cta-media img { transform: scale(1.04); }
.page-home .amh-bestsellers .amh-cta-btn {
  display: block;
  text-align: center;
  padding: 14px 18px;
  background: #000;
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.page-home .amh-bestsellers .amh-bs-products {
  flex: 1 1 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
}

/* Responsive: CTA tile full-width on top, products as a 2x2 grid. */
@media (max-width: 991px) {
  .page-home .amh-bestsellers .amh-bs-layout { flex-direction: column; }
  .page-home .amh-bestsellers .amh-bs-cta { flex: none; max-width: none; width: 100%; }
  .page-home .amh-bestsellers .amh-cta-media { min-height: 200px; }
  .page-home .amh-bestsellers .amh-bs-products { grid-template-columns: repeat(2, 1fr); }
}

/* Equal-height product cards: image on top, price/buttons pushed to bottom. */
.page-home .amh-bs-products .amh-product-cell,
.page-home .amh-bs-products .amh-product-cell > .js-product,
.page-home .amh-bs-products .product-miniature,
.page-home .amh-bs-products .thumbnail-container {
  height: 100%;
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
}
.page-home .amh-bs-products .amh-product-cell {
  border: 1px solid gray;
}
.page-home .amh-bs-products .product-description {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}
/* Everything from the price downward sticks to the bottom of the card. */
.page-home .amh-bs-products .product-price-and-shipping { margin-top: auto; }

/* ---------------- Hero product ---------------- */
.page-home .amh-heroproduct { padding: 48px 0 0 0; }
.page-home .amh-heroproduct-inner {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  align-items: center;
  background: #fff;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}
.page-home .amh-heroproduct-image img,
.page-home .amh-heroproduct-side img {
  width: 100%; height: 100%;
  object-fit: cover;
  max-height: 360px;
}
.page-home .amh-heroproduct-body { padding: 40px; }
.page-home .amh-heroproduct-brand {
  font-size: 12px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: #999;
}
.page-home .amh-heroproduct-title { font-size: 24px; font-weight: 700; margin: 8px 0 12px; }
.page-home .amh-heroproduct-desc { color: #666; line-height: 1.6; margin-bottom: 18px; }
.page-home .amh-heroproduct-price { font-size: 20px; font-weight: 700; margin-bottom: 20px; }

/* ---------------- Top category boxes ---------------- */
.page-home .amh-cat-box {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  padding: 20px;
  background: #f6f6f6;
  text-align: center;
  text-decoration: none;
  color: #000;
  transition: background .2s;
}
.page-home .amh-cat-box:hover { background: #ececec; }
.page-home .amh-cat-box h3 { margin: 0; font-size: 18px; font-weight: 600; }

/* Najtraženije kategorije — full-width black band, white heading, white boxes */
.page-home .amh-topcategories {
  background: linear-gradient(to right, #000, #152331);
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}
.page-home .amh-topcategories .amh-heading { color: #fff; }
.page-home .amh-topcategories .amh-cat-box { background: #fff; color: #000; }
.page-home .amh-topcategories .amh-cat-box:hover { background: #ececec; }
.page-home .amh-topcategories .amh-cat-box h3 { color: #000; }

/* ---------------- Recommended categories (content left, squares right) ---------------- */
/* Full-width subtle background, boxed content. */
.page-home .amh-recommendedcats {
  background: #f4f1ee;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}
.page-home .amh-reccat-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.4fr;
  gap: 56px;
  align-items: center;
}
.page-home .amh-recommendedcats .amh-reccat-title {
  text-align: left;
  margin: 0 0 16px;
}
.page-home .amh-reccat-intro {
  text-align: left;
  max-width: none;
  margin: 0;
  color: #555;
  font-size: 16px;
  line-height: 1.7;
}
.page-home .amh-reccat-squares {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.page-home .amh-cat-square {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px;
  background: #fff;
  border: 1px solid #e6e0da;
  color: #000;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.3;
  transition: background .2s, color .2s, border-color .2s;
}
.page-home .amh-cat-square:hover {
  background: #000;
  color: #fff;
  border-color: #000;
}

@media (max-width: 991px) {
  .page-home .amh-reccat-grid { grid-template-columns: 1fr; gap: 28px; }
  .page-home .amh-recommendedcats .amh-reccat-title { text-align: center; }
  .page-home .amh-reccat-intro { text-align: center; }
  .page-home .amh-reccat-squares { grid-template-columns: repeat(2, 1fr); }
}

/* ---------------- Why us ---------------- */
/* Full-bleed background, boxed content (like the hero). */
.page-home .amh-whyus {
  background: #f9f7f5;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-bottom: 42px;
  margin-top: 42px;
}
.page-home .amh-whyus .amh-heading {
  margin-bottom: 46px;
}
.page-home .amh-whyus-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
  margin-top: 20px;
}
.page-home .amh-why-item { text-align: center; }
.page-home .amh-why-icon { font-size: 40px; color: #000; }
.page-home .amh-why-item h3 { font-size: 16px; font-weight: 700; margin: 12px 0 6px; }
.page-home .amh-why-item p { font-size: 13px; color: #666; margin: 0; }

/* ---------------- Locations — content left, map right ---------------- */
.page-home .amh-locations-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.page-home .amh-locations-content { text-align: left; }
.page-home .amh-locations .amh-locations-title {
  text-align: left;
  margin-bottom: 18px;
}
.page-home .amh-locations-content .rte-content {
  font-size: 16px;
  line-height: 1.7;
  color: #444;
}
.page-home .amh-locations-map iframe {
  width: 100%;
  min-height: 420px;
  border: 0;
  display: block;
}

@media (max-width: 991px) {
  .page-home .amh-locations-grid { grid-template-columns: 1fr; gap: 28px; }
  .page-home .amh-locations-map iframe { min-height: 320px; }
}

/* ---------------- Responsive ---------------- */
@media (max-width: 991px) {
  .page-home .amh-grid-4,
  .page-home .amh-grid-products { grid-template-columns: repeat(2, 1fr); }
  .page-home .amh-whyus-grid { grid-template-columns: repeat(3, 1fr); }
  .page-home .amh-heroproduct-inner { grid-template-columns: 1fr; }
  .page-home .amh-heroproduct-side { display: none; }
  .page-home .amh-hero-title { font-size: 34px; }
}
@media (max-width: 575px) {
  .page-home .amh-grid-3,
  .page-home .amh-grid-4,
  .page-home .amh-grid-products { grid-template-columns: 1fr 1fr; }
  .page-home .amh-whyus-grid { grid-template-columns: 1fr 1fr; }
  .page-home .amh-hero-content { padding: 32px 0; }
  .page-home .amh-hero-title { font-size: 28px; }
  .page-home .amh-hero-inner .amh-hero-content {
    text-align: center;
  }
  .page-home .amh-hero-inner.has-image::after {
    background: rgba(0,0,0,.45);
  }
}
