/* Responsive adjustments for King Motors Hero & Header */
@media (max-width: 991px) {
  .header {
    .navbar {
      min-height: 76px;
    }

    .navbar-brand img {
      height: 44px;
    }
  }

  .hero {
    min-height: 680px;
    height: auto;

    .hero-slide {
      min-height: 680px;
      height: auto;
      padding-top: 120px;
      padding-bottom: 70px;
    }

    .hero-slide-bg {
      background-position: 25% center;
      background:
        linear-gradient(180deg,
          rgba(57, 107, 53, 0.88) 0%,
          rgba(57, 107, 53, 0.96) 60%,
          rgba(50, 94, 46, 0.98) 100%),
        var(--slide-bg, url("../images/hero/hero-1.webp"));
      background-size: cover;
      background-position: center;
    }

    .hero-content {
      max-width: 100%;
      text-align: center;
      margin: 0 auto;
    }

    .hero-eyebrow {
      justify-content: center;
    }

    .hero-copy {
      margin-left: auto;
      margin-right: auto;
    }

    .hero-actions {
      justify-content: center;
    }

    .hero-index,
    .hero-slider-nav {
      display: none !important;
    }

    .hero-mobile-nav {
      display: flex;
    }
  }

  .about-km {
    background-image: none;
    padding: 60px 0 50px;
    min-height: auto;

    .about-km-bg {
      display: block;
    }

    .about-km-shape,
    .about-km-frame {
      display: none;
    }

    .about-km-panel-line {
      clip-path: polygon(0 calc(55% - 2px), 100% calc(45% - 2px), 100% 100%, 0 100%);
    }

    .about-km-panel {
      clip-path: polygon(0 55%, 100% 45%, 100% 100%, 0 100%);
    }

    .about-cards {
      max-width: 540px;
      aspect-ratio: auto;
      gap: 24px;
      margin: 70px auto 0;
    }

    .about-card {
      position: relative;
      inset: auto;
      width: 100%;
      height: auto;
      min-height: 0;
      aspect-ratio: 4 / 3;
      transform: none;

      &::before,
      &::after {
        display: none;
      }
    }

    .about-content {
      max-width: 100%;
      text-align: center;
      margin: 0 auto;
    }

    .about-eyebrow {
      justify-content: center;
    }

    .about-desc {
      margin-left: auto;
      margin-right: auto;
    }

    .about-action {
      display: flex;
      justify-content: center;
    }
  }
}

@media (max-width: 576px) {
  .hero {
    min-height: 600px;
    padding-top: 100px;
    padding-bottom: 50px;

    .hero-title {
      font-size: 32px;
      line-height: 1.25;
    }

    .hero-copy {
      font-size: 14px;
      line-height: 1.75;
    }

    .btn-hero-gold,
    .btn-hero-video {
      width: 100%;
      justify-content: center;
    }
  }

  .about-km {
    padding: 45px 0 30px;

    .about-title {
      font-size: 28px;
    }

    .about-desc {
      font-size: 14px;
      line-height: 1.8;
    }

    .about-cards {
      margin-top: 50px;
    }

    .about-card .about-card-media {
      border-radius: 12px;
    }

    .about-card-pivot::after {
      display: none;
    }
  }
}

@media (max-width: 767px) {
  .hero.hero-mobile {
    min-height: 0;
    height: auto;

    .hero-slide {
      display: block;
      height: 78svh;
      min-height: 560px;
      max-height: 760px;
      padding: 0;
    }

    .hero-mobile-media {
      position: absolute;
      inset: 0;
      overflow: hidden;

      &::after {
        content: "";
        position: absolute;
        inset: 0;
        background:
          linear-gradient(0deg,
            var(--km-green-deep) 0%,
            rgba(0, 43, 34, 0.9) 30%,
            rgba(0, 43, 34, 0.45) 55%,
            rgba(0, 43, 34, 0) 75%),
          linear-gradient(180deg, rgba(0, 25, 20, 0.55) 0%, rgba(0, 25, 20, 0) 25%);
      }
    }

    .hero-mobile-img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .hero-content {
      position: absolute;
      inset-inline: 0;
      bottom: 0;
      max-width: none;
      margin: 0;
      padding: 0 16px 64px;
      text-align: start;
    }

    .hero-eyebrow {
      justify-content: flex-start;

      .hero-brand-text {
        font-size: 13px;
      }
    }

    .hero-title {
      font-size: 28px;
      line-height: 1.3;
      margin-bottom: 12px;
    }

    .hero-copy {
      font-size: 14px;
      line-height: 1.75;
      max-width: none;
      margin: 0 0 20px;
    }

    .hero-actions {
      justify-content: flex-start;
    }

    .btn-hero-gold,
    .btn-hero-video {
      width: auto;
      font-size: 14px;
    }

    .btn-hero-gold {
      padding: 10px 22px;
    }

    .btn-hero-video {
      padding-block: 5px;
      padding-inline: 18px 6px;

      .btn-video-icon {
        width: 30px;
        height: 30px;
      }
    }

    .hero-mobile-nav {
      display: flex;
      bottom: 24px;
      left: auto;
      inset-inline-start: 16px;
      transform: none;
    }
  }
    .hero-title-gold:not(.hero-line),
  .hero-title-gold .hero-line-inner {
    background: var(--km-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    height:auto !important;
  }
}


.about {
  .about-visual {
    height: 470px;
  }
}

.product-card {
  min-height: 380px;
}

.service-tile:not(.service-main) {
  min-height: 260px;

  .service-overlay p {
    max-height: 80px;
    opacity: 1;
  }
}

.cap-visual {
  min-height: 340px;

  &::before {
    width: 400px;
    height: 400px;
  }
}

.footer {
  padding-top: 60px;
}


@media (max-width: 600px) {

  .loading .loader-container {
    width: 170px;
  }

  .services-page .service-tile.service-card {
    min-height: 380px;
  }

  .project-card .project-photo {
    height: 220px;
  }



  .back-to-top {
    inset-inline-start: 13px;
  }

  .section {
    padding: 80px 0;
  }

  .header {
    .navbar {
      min-height: 76px;
    }

    .navbar>.container-fluid .navbar-brand {
      img {
        width: 120px;

      }
    }
  }

  .about .about-visual {
    height: 340px;
  }

  .about .about-copy p {
    font-size: 15px;
  }

  .product-card {
    min-height: 340px;
  }

  .service-overlay {
    left: 24px;
    right: 65px;
    bottom: 24px;
  }

  .service-tile:not(.service-main) {
    min-height: 240px;
  }

  .cap-visual {
    min-height: 300px;

    &::before {
      width: 340px;
      height: 340px;
    }
  }

  .orb {
    width: 170px;
    height: 170px;

    span {
      font-size: 44px;
    }

    i {
      width: 210px;
    }
  }

  .cap-items {
    >div {
      padding: 26px;
    }

    .cap-head i {
      width: 40px;
      height: 40px;
      font-size: 16px;
    }

    h3 {
      margin: 22px 0 10px;
    }
  }
}

@media (prefers-reduced-motion: reduce) {

  .service-tile,
  .service-tile img,
  .service-overlay {
    transition: none !important;
  }

  .social-whatsapp::before {
    animation: none !important;
  }
}

@media (max-width: 991px) {
  .page-banner {
    min-height: 460px;
    padding: 130px 0 60px;
  }
}

@media (max-width: 600px) {
  .page-banner {
    min-height: 400px;
    padding: 110px 0 50px;

    p {
      font-size: 14px;
    }
  }

  .stats>div {
    padding: 24px 18px;
  }

  .contact-form {
    padding: 24px 18px;
  }

  .contact-map iframe {
    height: 320px;
  }
}

@media (max-width: 991px) {
  .details-image {
    min-height: 360px;
  }

  .details-sticky {
    position: static;
  }
}

@media (max-width: 600px) {
  .details-image {
    min-height: 260px;
  }

  .details-nav,
  .details-box {
    padding: 26px 20px;
  }

  .process-steps>div {
    padding-right: 0;
  }

  .details-slider-nav button {
    width: 36px;
    height: 36px;
  }

  .details-specs {

    th,
    td {
      padding: 13px 14px;
    }
  }
}


/* ===== King Motors: products / why / brands / quote / footer ===== */
@media (max-width: 1199px) {
  .km-tab {
    gap: 12px;
    padding: 14px;
  }

  .km-tab-icon {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }

  .km-tab-text strong {
    font-size: 17px;
  }

  .km-article.is-featured {
    min-height: 400px;
  }
}

@media (max-width: 991px) {
  .km-articles {
    padding: 90px 0;
  }

  .km-articles-head {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    margin-bottom: 36px;
  }

  .km-articles-intro,
  .km-articles-all {
    grid-column: 1;
    justify-self: center;
  }

  .km-articles-all {
    margin-bottom: 0;
  }
}

@media (max-width: 767px) {
  .km-article.is-featured {
    min-height: 420px;

    .km-article-body {
      padding: 20px;
    }

    .km-article-title {
      font-size: 19px;
    }
  }
}

@media (max-width: 991px) {
  .km-products-banner {
    min-height: 0;
    padding: 70px 0 110px;
  }

  .km-products-banner-img {
    width: 100%;
    clip-path: none;
    opacity: 0.4;
  }

  .km-products-banner-lines {
    display: none;
  }

  .km-products-banner-shade {
    background: linear-gradient(90deg, rgba(0, 25, 20, 0.92) 0%, rgba(0, 25, 20, 0.55) 100%);
  }

  .km-products-tabs {
    padding: 6px;
  }

  .km-tab {
    min-height: 76px;

    &::before,
    &::after {
      display: none;
    }
  }

  .km-products-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .km-products-heading {
    align-self: flex-start;
  }

  .km-products-tools {
    justify-content: space-between;
  }

  .km-search {
    flex: 1;

    input {
      width: 100%;
    }
  }

  .km-products.is-list .swiper-wrapper {
    grid-template-columns: 1fr;
  }

  .km-why,
  .km-contact,
  .km-selector {
    padding: 90px 0;
  }

  .km-contact-visual {
    display: none;
  }

  .km-contact-item {
    flex-direction: row;
    justify-content: flex-start;
  }

  .km-contact-socials {
    justify-content: center;
  }

  .km-selector-bg::after {
    background:
      linear-gradient(180deg, rgba(0, 43, 34, 0.88) 0%, rgba(0, 43, 34, 0.55) 45%, rgba(0, 25, 20, 0.85) 100%);
  }

  .km-selector-bg-img {
    object-position: 75% 50%;
  }

  .km-selector-content {
    min-height: 0;
  }

  .km-selector-desc {
    margin-bottom: 40px;
  }

  .km-stats {
    max-width: none;
    margin: 20px 0 0;
  }

  .km-stats .col-6:nth-child(even) .km-stat {
    translate: none;
  }
}

@media (max-width: 576px) {
  .km-products {
    padding-bottom: 70px;
  }

  .km-products-intro p {
    font-size: 15px;
  }

  .km-tab {
    flex-direction: column;
    gap: 8px;
    padding: 12px 8px;
    text-align: center;
  }

  .km-tab-text {
    align-items: center;
  }

  .km-products-tools {
    gap: 8px;
  }

  .km-search {
    flex: 1 1 100%;
  }

  .km-sort {
    flex: 1;

    select {
      width: 100%;
    }
  }

  .km-products.is-list {
    .km-product-card {
      flex-direction: column;
    }

    .km-product-media {
      aspect-ratio: 4 / 3;
      min-height: 0;
    }
  }

  .km-products-nav {
    gap: 24px;
  }

  .km-feature {
    padding: 18px;
  }

  .km-stat {
    padding: 26px 14px;
  }

  .km-brands {
    padding: 70px 0 60px;
  }

  .km-marquee-list li {
    padding: 24px 30px;
  }

  .km-contact-card,
  .km-selector-card {
    padding: 24px 18px;
    border-radius: 18px;
  }

  .km-selector-features {
    row-gap: 22px;

    li:nth-child(odd) {
      border-inline-start: 0;
    }
  }

  .km-selector-group .km-select {
    flex-basis: 96px;
  }

  .km-selector-group-icon {
    width: 46px;
  }
}

/* ===== King Motors: footer ===== */
@media (max-width: 1599px) {
  .km-footer-inner {
    --km-f-pump-w: 27vw;
  }
}

@media (max-width: 1399px) {
  .km-footer-desc,
  .km-footer-list a,
  .km-footer-contact-data :is(a, p) {
    /* font-size: 16px; */
  }

  .km-footer-list {
    gap: 24px;
  }

  .km-footer-contact li {
    gap: 14px;
  }

  .km-footer-social {
    gap: 8px;

    a {
      width: 38px;
      height: 38px;
      font-size: 15px;
    }
  }
}

@media (max-width: 1199px) {
  .km-footer-inner {
    padding-top: 64px;
  }

  .km-footer-left-deco,
  .km-footer-arch {
    display: none;
  }

  .km-footer-top {
    width: auto;
  }

  .km-footer-title {
    margin-top: 0;
  }

  .km-footer-mid {
    margin-top: 32px;
  }
}

@media (max-width: 991px) {
  .km-footer-brand {
    padding-inline: max(calc(var(--bs-gutter-x) * 0.5), calc((100% - 420px) / 2));

    > * {
      max-width: none;
    }
  }
}

@media (max-width: 767px) {
  .km-footer-inner {
    padding-top: 48px;
  }

  .km-footer-container {
    width: calc(100% - 32px);
  }

  .km-footer-bottom {
    flex-direction: column;
    justify-content: center;
    padding: 18px 0 22px;
    text-align: center;
  }
}

@media (max-width: 575px) {
  .km-footer-inner {
    padding-top: 56px;
  }

  .km-footer-top-curve {
    width: 100%;
    height: 22px;
  }

  .km-footer-logo img {
    width: 160px;
  }

  .km-footer-desc {
    margin-top: 16px;
    font-size: 14px;
    line-height: 1.8;
  }

  .km-footer-social {
    margin-top: 18px;

    a {
      width: 36px;
      height: 36px;
      font-size: 14px;
    }
  }

  .km-footer-title {
    margin-bottom: 18px;
    padding-bottom: 10px;
    font-size: 16px;

    &::after {
      width: 32px;
    }
  }

  .km-footer-list {
    gap: 14px;

    a {
      gap: 10px;
      font-size: 14px;
      line-height: 22px;
    }

    i {
      font-size: 10px;
    }
  }

  .km-footer-contact li {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .km-footer-contact-icon {
    width: 38px;
    height: 38px;
    font-size: 15px;
  }

  .km-footer-contact-data :is(a, p) {
    font-size: 13.5px;
    line-height: 22px;
  }

  .km-footer-mid {
    margin-top: 24px;
  }

  .km-footer-left-deco {
    display: block;
    inset-inline-start: 0;
    width: 300px;
  }

  .km-footer-arch {
    position: relative;
    bottom: auto;
    display: block;
    width: min(200px, 55%);
    margin-inline-start: auto;
    margin-bottom: -9px;
  }

  .km-footer-bottom {
    font-size: 13px;
  }
}

/* ===== King Motors: inner pages ===== */
@media (max-width: 1199px) {
  .km-about-badge {
    inset-inline-end: 16px;
  }
}

@media (max-width: 991px) {
  .km-page-header {
    padding: 140px 0 60px;
  }

  .km-about-block {
    padding: 64px 0;
  }

  .km-about-text {
    max-width: none;
  }

  .km-about-image img {
    height: 420px;
  }

  .km-shop {
    padding: 48px 0 72px;
  }

  .km-shop-filters {
    --bs-offcanvas-width: min(360px, 88vw);

    .offcanvas-body {
      scrollbar-width: thin;
      scrollbar-color: color-mix(in srgb, var(--main-color) 45%, transparent) transparent;
    }

    .offcanvas-header {
      justify-content: space-between;
      border-bottom: 1px solid #eeebe3;

      .btn-close {
        margin: 0;
      }
    }
  }

  .km-shop-form {
    position: static;
    padding: 0;
    border: 0;
    background: none;
  }

  .km-result {
    padding: 64px 0 72px;
  }

  .km-result-card {
    padding: 22px 18px;
  }

  .km-news,
  .km-faq {
    padding: 64px 0 72px;
  }

  .km-post {
    padding: 56px 0 64px;
  }

  .km-related {
    padding: 56px 0 72px;
  }

  .km-news-featured-media {
    min-height: 280px;
  }

  .km-news-featured-body {
    padding: 28px 24px;
  }

  .km-post-sidebar {
    height: auto;
    margin-top: 16px;
  }

  .km-chero {
    padding: 140px 0 64px;
  }

  .km-cform-card {
    margin-bottom: 0;
    padding: 28px 22px;
  }

  .km-channels {
    padding: 64px 0;
  }

  .km-channels-head {
    margin-bottom: 40px;
  }

  .km-channel {
    padding: 10px 18px;
  }

  .km-location {
    padding: 56px 0 64px;
  }

  .km-location-map {
    min-height: 300px;
  }

  .km-location-info {
    padding: 32px 24px;
  }

  .km-cart {
    padding: 56px 0 72px;
  }

  .km-cart-summary {
    position: static;
  }

  .km-pd {
    padding: 56px 0 64px;
  }

  .km-pd-gallery {
    position: static;
  }

  .km-pd-tabs {
    margin-top: 48px;
  }

  .km-pd-panes {
    padding: 22px 18px;
  }

  .km-sd {
    padding: 56px 0 64px;
  }

  .km-sd-sidebar {
    height: auto;
  }

  .km-sd-process {
    padding: 36px 24px;
  }

  .km-sd-steps {
    &::before {
      display: none;
    }
  }
}

@media (max-width: 575px) {
  .km-prose {
    font-size: 14.5px;

    h2 {
      font-size: 18px;
    }

    h3 {
      font-size: 16px;
    }
  }

  .km-prose blockquote {
    padding: 18px 20px;
    font-size: 15px;
  }

  .km-post-content .km-prose blockquote {
    padding: 64px 20px 20px;

    &::before {
      top: 18px;
      inset-inline-start: 20px;
      width: 38px;
      height: 38px;
      translate: none;
      font-size: 15px;
    }
  }

  .km-post-content .km-prose h2::before {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }

  .km-post-date {
    top: 14px;
    inset-inline-start: 14px;
    min-width: 62px;
    padding: 8px;

    strong {
      font-size: 22px;
    }
  }

  .km-post-tip {
    flex-direction: column;
    gap: 14px;
    padding: 20px;
  }

  .km-post-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .km-faq-list .accordion-button {
    font-size: 15px;
  }

  .km-chero-actions > * {
    flex: 1;
    justify-content: center;
  }

  .km-location-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .km-cart-panel,
  .km-cart-summary {
    padding: 22px 18px;
  }

  .km-cart-item {
    grid-template-columns: 72px 1fr auto;
    gap: 12px 14px;
  }

  .km-cart-thumb {
    grid-row: span 2;
  }

  .km-pd-buy .km-qty {
    width: 100%;
    justify-content: space-between;
  }

  .km-pd-tabs-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;

    &::-webkit-scrollbar {
      display: none;
    }

    button {
      flex-shrink: 0;
      padding: 12px 16px;
      font-size: 14px;
      white-space: nowrap;
    }
  }

  .km-pd-table th {
    width: 45%;
  }

  .km-sd-media {
    padding-bottom: 40px;
  }

  .km-sd-media-main {
    aspect-ratio: 4 / 3;
    border-radius: 20px;
  }

  .km-sd-media-sub {
    inset-inline-end: 14px;
    width: 34%;
    border-width: 5px;
  }

  .km-sd-media-stat {
    top: 14px;
    inset-inline-start: 14px;

    strong {
      font-size: 18px;
    }
  }

  .km-sd-media-stat-icon {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  .km-sd-media-tag {
    bottom: 56px;
    inset-inline-start: 14px;
    padding: 8px 14px;
    font-size: 13px;
  }

  .km-sd-checks {
    .km-sd-check {
      gap: 8px;
      padding: 10px;
      font-size: 13px;
    }

    i {
      width: 24px;
      height: 24px;
      font-size: 11px;
    }
  }

  .km-sd-features {
    .km-sd-feature {
      display: grid;
      grid-template-columns: 52px 1fr;
      column-gap: 14px;
      align-items: start;
      padding: 18px 16px;
    }

    h3 {
      padding-inline-end: 44px;
      font-size: 15px;
    }

    p {
      grid-column: 2;
    }
  }

  .km-sd-feature-icon {
    grid-row: span 2;
    width: 52px;
    height: 52px;
    margin: 0;
    border-radius: 16px;
    font-size: 21px;
  }

  .km-sd-feature-num {
    top: 14px;
    inset-inline-end: 14px;
    font-size: 34px;
  }

  .km-sd-process-head {
    margin-bottom: 26px;
  }

  .km-sd-steps {
    li {
      display: grid;
      grid-template-columns: 56px 1fr;
      column-gap: 16px;
      align-items: start;
      text-align: start;

      &:not(:last-child)::after {
        content: "";
        position: absolute;
        top: 64px;
        bottom: -20px;
        inset-inline-start: 27px;
        border-inline-start: 2px dashed rgba(255, 255, 255, 0.3);
      }
    }

    h3 {
      margin-top: 6px;
    }

    p {
      grid-column: 2;
    }
  }

  .km-sd-step-icon {
    grid-row: span 2;
    width: 56px;
    height: 56px;
    margin: 0;
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.12);
    font-size: 21px;

    small {
      width: 22px;
      height: 22px;
      font-size: 11px;
    }
  }

  .km-sd-brands li {
    padding: 12px 18px;
    font-size: 14px;
  }

  .km-qty {
    grid-column: 2;
    justify-self: start;
  }

  .km-cart-remove {
    grid-column: 3;
    grid-row: 1;
  }
}

@media (min-width: 992px) {
  .km-shop-filters .offcanvas-header {
    display: none;
  }
}

@media (max-width: 767px) {
  .km-channel + .km-channel {
    padding-top: 32px;
    border-inline-start: 0;
    border-top: 1px solid transparent;
    border-image: linear-gradient(90deg, transparent, rgba(237, 164, 31, 0.55), transparent) 1;
  }

  .km-shop.is-list {
    .km-product-card {
      flex-direction: column;
    }

    .km-product-media {
      aspect-ratio: 4 / 3;
      min-height: 0;
    }

    .km-product-btn {
      max-width: none;
    }
  }

  .km-shop-toolbar {
    padding: 12px;

    .km-products-tools {
      width: 100%;
    }

    .km-sort {
      flex: 1;

      select {
        width: 100%;
      }
    }
  }
}

@media (max-width: 575px) {
  .km-page-header {
    padding: 120px 0 48px;
  }

  .km-about-block {
    padding: 48px 0;
  }

  .km-about-image img {
    height: 300px;
  }

  .km-about-figure {
    margin-bottom: 12px;

    &::after,
    &.is-flip::after {
      top: 20px;
      bottom: -12px;
      inset-inline: 28px -8px;
    }

    &.is-flip::after {
      inset-inline: -8px 28px;
    }
  }

  .km-about-badge {
    bottom: 16px;
    padding: 12px 16px;

    strong {
      font-size: 32px;
    }

    span {
      font-size: 13px;
    }
  }

  .km-about-text p,
  .km-about-list li {
    font-size: 15px;
  }

  .km-result {
    padding: 48px 0 56px;
  }

  .km-result-stat {
    padding: 18px;
  }

  .km-spec-list > div {
    align-items: flex-start;
  }

  .km-result-actions > * {
    flex: 1;
    justify-content: center;
  }
}
