/*
 * Starmoto.az — site-specific components and fixes on top of the theme.
 * Loaded last, so it can refine theme rules without editing vendor CSS.
 */

/* ------------------------------------------------------------------
 * Base
 * ------------------------------------------------------------------ */
.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 10000;
  padding: 10px 18px;
  border-radius: 5px;
  background: var(--mainColor);
  color: var(--whiteColor);
  font-weight: 600;
  transition: top .2s ease;
}
.skip-link:focus { top: 16px; color: var(--whiteColor); }

:focus-visible {
  outline: 2px solid var(--mainColor) !important;
  outline-offset: 2px;
}

.icon {
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  vertical-align: -0.125em;
}

button { font: inherit; }

/* Every page now has a single H1 inside the banner; keep the theme sizes. */
.breadcrumb-wrap .breadcrumb-title h1 {
  font-size: 48px;
  color: var(--whiteColor);
  margin-bottom: 10px;
}
@media (max-width: 767px) {
  .breadcrumb-wrap .breadcrumb-title h1 { font-size: 30px; }
}

/* ------------------------------------------------------------------
 * Header
 * ------------------------------------------------------------------ */
.header-wrap .navbar-brand img { width: 140px; height: auto; }

.lang-switch a.is-current { color: var(--mainColor) !important; }

.header-wrap .social-profile a,
.footer-wrap .social-profile a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.header-wrap .social-profile .icon { font-size: 15px; }
.footer-wrap .social-profile .icon { font-size: 18px; }

.header-bottom .other-options .option-item .searchbox button,
.search-area button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--blackColor);
}
.header-bottom .other-options .option-item .searchbox button .icon,
.search-area button .icon { font-size: 18px; }

.mobile-bar-wrap .searchbtn {
  background: none;
  border: 0;
  color: var(--whiteColor);
  font-size: 22px;
  line-height: 1;
  padding: 6px;
}

.mobile-menu button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 62% 38% 46% 54% / 60% 63% 37% 40%;
  background-color: var(--mainColor);
  color: var(--whiteColor);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.menu-close button {
  background: none;
  border: 0;
  font-size: 26px;
  line-height: 1;
  color: var(--blackColor);
}

.menu-backdrop {
  position: fixed;
  inset: 0;
  /* Just below .header-wrap (z-index 99), which contains the off-canvas menu. */
  z-index: 98;
  background: rgba(1, 6, 15, .55);
}
body.menu-is-open { overflow: hidden; }

/* ------------------------------------------------------------------
 * Hero slider (replaces Owl Carousel: same look, no jQuery)
 * ------------------------------------------------------------------ */
.hero-one .container-fluid { position: relative; min-height: min(90vh, 820px); }

.hero-slider { display: grid; }
.hero-slider > .hero-slide-item {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
  transition: opacity .8s ease, visibility .8s ease;
}
.hero-slider > .hero-slide-item.is-active { opacity: 1; visibility: visible; }

.hero-one .hero-slide-item .hero-content h1,
.hero-one .hero-slide-item .hero-content .h1 {
  color: var(--whiteColor);
  margin-bottom: 15px;
}
.hero-one .hero-img-wrap .hero-img {
  width: 100%;
  max-height: 560px;
  object-fit: contain;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-slide-item.is-active .hero-content > * {
    animation: heroFadeUp .9s both;
  }
  .hero-slide-item.is-active .hero-content > :nth-child(2) { animation-delay: .1s; }
  .hero-slide-item.is-active .hero-content > :nth-child(3) { animation-delay: .2s; }
  .hero-slide-item.is-active .hero-content > :nth-child(4) { animation-delay: .3s; }
}
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 2;
}
.hero-dots button {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 2px solid var(--whiteColor);
  border-radius: 50%;
  background: transparent;
  transition: background-color .3s ease, transform .3s ease;
}
.hero-dots button[aria-current="true"] {
  background: var(--mainColor);
  border-color: var(--mainColor);
  transform: scale(1.15);
}

/* ------------------------------------------------------------------
 * Product cards: every photo fits the same box, nothing is cropped.
 * ------------------------------------------------------------------ */
.product-card-two { display: flex; flex-direction: column; height: calc(100% - 30px); }
.product-card-two .product-img {
  aspect-ratio: 4 / 3;
  background: #fff;
  padding: 18px;
}
.product-card-two .product-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0;
  transition: transform .5s ease;
}
.product-card-two:hover .product-img img { transform: scale(1.04); }
.product-card-two .product-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}
.product-card-two .product-info h3 { margin: 0; }
.product-card-two .product-info .btn-one { margin-top: auto; }

/* ------------------------------------------------------------------
 * Page banner without an uploaded image
 * ------------------------------------------------------------------ */
.page-banner { background-color: var(--heroColor); }
.breadcrumb-wrap .breadcrumb-menu { margin: 0; padding: 0; }
.breadcrumb-title .breadcrumb-menu li { padding-right: 20px; margin-right: 4px; }
.breadcrumb-title .breadcrumb-menu li:after { opacity: .6; }

/* ------------------------------------------------------------------
 * Product detail: gallery, video, description, actions
 * ------------------------------------------------------------------ */
.product-gallery-main {
  position: relative;
  display: block;
  width: 100%;
  padding: 24px;
  border: 1px solid var(--grayColor);
  border-radius: 10px;
  background: #fff;
  cursor: zoom-in;
}
.product-gallery-main img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
}
.product-gallery-zoom {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--mainColor);
  color: var(--whiteColor);
  font-size: 18px;
}
.product-gallery-thumbs {
  display: flex;
  gap: 12px;
  margin: 14px 0 0;
  padding: 0 0 4px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.product-gallery-thumbs li { flex: 0 0 auto; }
.product-gallery-thumbs button {
  display: block;
  width: 104px;
  padding: 6px;
  border: 2px solid var(--grayColor);
  border-radius: 8px;
  background: #fff;
  transition: border-color .2s ease;
}
.product-gallery-thumbs button[aria-current="true"],
.product-gallery-thumbs button:hover { border-color: var(--mainColor); }
.product-gallery-thumbs img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: contain;
}

.video-facade {
  position: relative;
  margin-top: 30px;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
}
.video-facade button {
  position: absolute;
  inset: 0;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.video-facade img { width: 100%; height: 100%; object-fit: cover; opacity: .85; transition: opacity .3s ease; }
.video-facade button:hover img { opacity: 1; }
.video-facade-play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 76px;
  height: 76px;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--mainColor);
  color: var(--whiteColor);
  font-size: 30px;
  box-shadow: 0 0 0 10px rgba(250, 40, 55, .25);
}
.video-facade iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.product-description { margin-top: 36px; }

.prose { color: var(--paraColor); line-height: 1.75; }
.prose h2 { font-size: 26px; margin: 0 0 16px; color: var(--blackColor); }
.prose h3 { font-size: 21px; margin: 26px 0 12px; color: var(--blackColor); }
.prose p, .prose li { font-size: 16px; }
.prose ul, .prose ol { padding-left: 22px; margin-bottom: 18px; }
.prose li { margin-bottom: 6px; }
.prose img { border-radius: 8px; height: auto; }
.prose table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
.prose th, .prose td { border: 1px solid var(--grayColor); padding: 10px 12px; }
.prose blockquote { border-left: 3px solid var(--mainColor); padding-left: 16px; font-style: italic; }

.product-sidebar .sidebar-widget-one p { margin-bottom: 18px; }
.product-actions { display: grid; gap: 12px; }
.product-actions a,
.cta-band-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-one { border-color: var(--mainColor); color: var(--mainColor); }
.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 31px;
  border-radius: 5px;
  background: #25D366;
  color: #fff;
  font-weight: 600;
  line-height: 26px;
  white-space: nowrap;
}
.btn-whatsapp:hover { background: #1da851; color: #fff; }
.product-addresses li { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; color: var(--paraColor); }
.product-addresses .icon { color: var(--mainColor); margin-top: 4px; }

/* Lightbox */
.lightbox {
  width: min(1100px, 94vw);
  max-height: 92vh;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: #fff;
  overflow: visible;
}
.lightbox::backdrop { background: rgba(1, 6, 15, .88); }
.lightbox img { display: block; width: 100%; max-height: 88vh; object-fit: contain; padding: 20px; }
.lightbox button {
  position: absolute;
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: var(--mainColor);
  color: #fff;
  font-size: 22px;
}
.lightbox-close { top: -18px; right: -18px; }
.lightbox-prev, .lightbox-next { top: 50%; transform: translateY(-50%); }
.lightbox-prev { left: -23px; }
.lightbox-next { right: -23px; }
@media (max-width: 767px) {
  .lightbox-close { top: 8px; right: 8px; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
}

/* ------------------------------------------------------------------
 * Call-to-action band
 * ------------------------------------------------------------------ */
.cta-band { background: var(--heroColor); padding: 60px 0; }
.cta-band-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.cta-band h2 { color: var(--whiteColor); font-size: 28px; margin: 0 0 8px; max-width: 640px; }
.cta-band p { color: var(--offwhiteColor); margin: 0; }
.cta-band-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ------------------------------------------------------------------
 * Listing pagination, search, empty and error states
 * ------------------------------------------------------------------ */
.page-nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.page-nav a, .page-nav span {
  min-width: 44px;
  height: 44px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  background: var(--whiteColor);
  color: var(--blackColor);
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(79, 139, 173, .15);
}
.page-nav span[aria-current], .page-nav a:hover { background: var(--mainColor); color: var(--whiteColor); }

.search-page-form {
  display: flex;
  gap: 10px;
  max-width: 640px;
  margin: 0 auto 30px;
}
.search-page-form input { height: 52px; border-radius: 5px; background: var(--whiteColor); }
.search-summary { text-align: center; margin-bottom: 26px; }
.empty-state, .error-page { text-align: center; }
.empty-state { padding: 20px 0 40px; }
.empty-state p { margin-bottom: 20px; }
.empty-state a, .error-actions a { margin: 0 6px 10px; }
.error-page { padding: 220px 0 100px; }
.error-code { font-size: 110px; font-weight: 700; line-height: 1; color: var(--mainColor); margin-bottom: 10px; }
.error-page h1 { font-size: 36px; margin-bottom: 14px; }
.error-page .search-page-form { margin-top: 30px; }

/* ------------------------------------------------------------------
 * Contact page
 * ------------------------------------------------------------------ */
.form-messages { max-width: 860px; margin: 0 auto 30px; }
.contact-item { display: flex; gap: 18px; align-items: flex-start; }
.contact-icon {
  flex: 0 0 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(250, 40, 55, .1);
  color: var(--mainColor);
  font-size: 22px;
}
.contact-info h2.h3 { font-size: 20px; margin-bottom: 6px; }
.contact-info p { margin-bottom: 4px; }
.contact-form-title { font-size: 26px; margin-bottom: 20px; }
.contact-subject { margin-bottom: 18px; }
.contact-form input,
.contact-form textarea { border-radius: 5px; }
.contact-form textarea { min-height: 160px; }
.field-error { color: #d61f2c; font-size: 14px; margin-top: 6px; }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.map-embed {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  overflow: hidden;
  background: var(--optionalColor);
}
.map-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-caption { display: flex; gap: 8px; align-items: center; margin: 12px 0 0; }
.map-caption .icon { color: var(--mainColor); }

/* ------------------------------------------------------------------
 * Footer
 * ------------------------------------------------------------------ */
.footer-wrap .footer-widget-title { font-size: 22px; }
.footer-wrap .contact-info li { position: relative; }
.footer-wrap .contact-info li > .icon {
  position: absolute;
  left: 0;
  top: 3px;
  font-size: 22px;
  color: var(--mainColor);
}
.footer-wrap .contact-info h3.h6 { color: var(--whiteColor); font-size: 16px; margin-bottom: 4px; }
.footer-wrap .contact-info p { margin-bottom: 2px; }
.footer-menu a { display: inline-flex; align-items: center; gap: 4px; }
.footer-menu .footer-more { color: var(--mainColor); font-weight: 600; }
.footer-wrap .footer-logo img { width: 220px; height: auto; }
.copyright-text .footer-credit { display: inline-block; margin-left: 8px; opacity: .75; }
.copyright-text .footer-credit a { color: inherit; text-decoration: underline; }

/* ------------------------------------------------------------------
 * Back to top (replaces the icon-font progress circle)
 * ------------------------------------------------------------------ */
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 99;
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: var(--mainColor);
  color: var(--whiteColor);
  font-size: 20px;
  box-shadow: 0 6px 20px rgba(250, 40, 55, .35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .3s ease, visibility .3s ease, transform .3s ease;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: none; }

/* ------------------------------------------------------------------
 * Dark theme refinements for the new components
 * ------------------------------------------------------------------ */
.theme-dark .product-card-two .product-img,
.theme-dark .product-gallery-main,
.theme-dark .product-gallery-thumbs button { background: #fff; }
.theme-dark .prose,
.theme-dark .prose h2,
.theme-dark .prose h3 { color: var(--offwhiteColor); }
.theme-dark .page-nav a { background: var(--codColor); color: var(--whiteColor); }
.theme-dark .menu-close button { color: var(--whiteColor); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
