/*
 * Makerique Boutique theme for OpenCart 4
 * Copyright (c) 2026 Heliopsy. All Rights Reserved.
 * https://makerique.com
 * SPDX-License-Identifier: LicenseRef-Proprietary
 * Proprietary and confidential. Unauthorized copying, distribution, or
 * modification of this file, by any means, is strictly prohibited.
 */

/* ──────────────────────────────────────────────────────────────────
   Makerique Boutique — OPTIONAL homepage hero slider (carousel)
   New CSS only. Auto-loaded via the stylesheet event's components/ glob.
   Consumed by the guarded {% if mr_hero.enabled %} block that the LEAD
   pastes into common/home.twig (see docs/hero_home_block.twig.txt).
   Everything is driven off the --mr-* design tokens — no hardcoded
   brand colors.
   ────────────────────────────────────────────────────────────────── */

/* Carousel wrapper — full-bleed within the section, brand rounding. */
.mr-hero-carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--mr-radius, 14px);
  background: var(--mr-surface-2, #f4ece3);
}

/* Each slide fills the configured height (set inline via --mr-hero-h). */
.mr-hero-slide {
  position: relative;
  height: var(--mr-hero-h, 520px);
  background-color: var(--mr-surface-2, #f4ece3);
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
}

/* Fallback <img> layer (when a slide uses an <img> rather than bg-image). */
.mr-hero-slide-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* Darkening overlay for caption legibility (opacity set inline). */
.mr-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: var(--mr-heading, #211e1a);
  opacity: var(--mr-hero-overlay, .25);
  pointer-events: none;
}

/* Caption container — respects the design max-width, sits above overlay. */
.mr-hero-caption {
  position: relative;
  z-index: 2;
  height: 100%;
  max-width: var(--mr-container, 1240px);
  margin-inline: auto;
  padding: clamp(1.5rem, 5vw, 4rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: .75rem;
}

/* Alignment variants. */
.mr-hero--left   .mr-hero-caption { align-items: flex-start;  text-align: left; }
.mr-hero--center .mr-hero-caption { align-items: center;      text-align: center; }
.mr-hero--right  .mr-hero-caption { align-items: flex-end;    text-align: right; }

/* Caption inner block keeps line lengths readable. */
.mr-hero-caption-inner {
  max-width: 58ch;
}

/* Typography off the tokens; light text over the dark overlay. */
.mr-hero-eyebrow {
  display: inline-block;
  font-family: var(--mr-font-body, sans-serif);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .28);
  padding: .3em .8em;
  border-radius: var(--mr-radius-pill, 999px);
  margin-bottom: .35rem;
}

.mr-hero-heading {
  font-family: var(--mr-font-heading, Georgia, serif);
  font-weight: var(--mr-heading-weight, 600);
  color: #fff;
  font-size: clamp(1.9rem, 4.5vw, 3.2rem);
  line-height: 1.12;
  letter-spacing: -.01em;
  margin: 0;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .28);
}

.mr-hero-subheading {
  font-family: var(--mr-font-body, sans-serif);
  color: rgba(255, 255, 255, .92);
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  margin: 0;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .28);
}

.mr-hero-cta {
  margin-top: .9rem;
}

/* CTA uses the primary button styling (tokens via .btn-primary in the
   base stylesheet). Kept here as a safety net if the class is absent. */
.mr-hero-cta .btn {
  font-family: var(--mr-font-button, sans-serif);
}

/* ── Indicators ─────────────────────────────────────────────────── */
.mr-hero-carousel .carousel-indicators {
  margin-bottom: 1rem;
  z-index: 3;
}
.mr-hero-carousel .carousel-indicators [data-bs-target] {
  width: 10px;
  height: 10px;
  border-radius: var(--mr-radius-pill, 999px);
  border: 0;
  background-color: rgba(255, 255, 255, .55);
  opacity: 1;
  transition: background-color var(--mr-transition, .22s ease);
}
.mr-hero-carousel .carousel-indicators .active {
  background-color: var(--mr-primary, #b4694e);
}

/* ── Prev / next controls ───────────────────────────────────────── */
.mr-hero-carousel .carousel-control-prev,
.mr-hero-carousel .carousel-control-next {
  width: 8%;
  z-index: 3;
  opacity: .85;
}
.mr-hero-carousel .carousel-control-prev-icon,
.mr-hero-carousel .carousel-control-next-icon {
  background-color: var(--mr-primary, #b4694e);
  border-radius: var(--mr-radius-pill, 999px);
  padding: 1.1rem;
  background-size: 45% 45%;
}

/* ── Responsive height reduction on mobile ──────────────────────── */
@media (max-width: 767.98px) {
  .mr-hero-slide {
    height: clamp(300px, 60vh, var(--mr-hero-h, 520px));
  }
  .mr-hero-caption {
    padding: 1.25rem;
  }
  /* On small screens center-align always reads best for off-center text. */
  .mr-hero--left .mr-hero-caption,
  .mr-hero--right .mr-hero-caption {
    align-items: center;
    text-align: center;
  }
}

/* Hero CTA group — multiple buttons (static hero + slides). Fixes the mobile
   misalignment: on small screens buttons stack full-width and evenly. */
.mr-hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: center;
}
.mr-hero .mr-hero-cta { justify-content: inherit; }
@media (max-width: 767.98px) {
  .mr-hero-cta {
    flex-direction: column;
    align-items: stretch;
  }
  .mr-hero-cta .btn {
    width: 100%;
    margin: 0;
  }
}
