/* Spare parts shop: brand-first picker, model chips, card actions, mobile order bar (Sep 2026) */

/* Brand picker */
.brand-picker {
  margin: 8px 0 56px;
}
.brand-picker__title {
  font-size: var(--fs-b6);
  line-height: var(--lh-b6);
  font-weight: 700;
}
.brand-picker__sub {
  margin-top: 4px;
  font-size: var(--fs-b3);
  line-height: var(--lh-b3);
  color: var(--gray-400);
}
.brand-picker__grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  margin-top: 20px;
}
.brand-picker__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 22px 8px 16px;
  border: 1px solid #e3e6e9;
  border-radius: 14px;
  background: var(--white);
  color: var(--gray-500);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.brand-picker__item:hover,
.brand-picker__item:focus-visible {
  border-color: var(--yellow-500);
  background: #fffbea;
  color: var(--gray-500);
  transform: translateY(-2px);
}
.brand-picker__logo {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.brand-picker__logo img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}
.brand-picker__name {
  font-size: var(--fs-b3);
  line-height: var(--lh-b3);
  font-weight: var(--fw-semi-bold);
}
.shop-trust {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 32px;
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 10px;
  background: #e8f6ee;
  color: #1f8a4c;
  font-size: var(--fs-b2);
  line-height: var(--lh-b2);
  font-weight: var(--fw-semi-bold);
}

/* "All parts" heading with filters */
.products-all-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 32px;
}
.products-all-title {
  font-size: var(--fs-b6);
  line-height: var(--lh-b6);
  font-weight: 700;
}

/* Brand page: back link, logo in title, model chips */
.brand-back {
  display: none;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  font-size: var(--fs-b2);
  line-height: var(--lh-b2);
  font-weight: var(--fw-semi-bold);
  color: var(--gray-400);
}
.brand-title-logo {
  display: inline-flex;
  vertical-align: middle;
  margin-right: 10px;
}
.brand-title-logo:empty {
  display: none;
}
.brand-title-logo img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}
.model-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 8px;
}
.model-chips__item {
  flex: none;
  padding: 8px 16px;
  border: 1px solid #dde1e5;
  border-radius: 999px;
  background: var(--white);
  color: var(--gray-500);
  font-size: var(--fs-b2);
  line-height: var(--lh-b2);
  font-weight: var(--fw-semi-bold);
  white-space: nowrap;
  transition: all 0.2s ease;
}
.model-chips__item:hover {
  border-color: var(--gray-500);
  color: var(--gray-500);
}
.model-chips__item--active,
.model-chips__item--active:hover {
  background: var(--gray-500);
  border-color: var(--gray-500);
  color: var(--white);
}

/* Card actions: Əldə et + WhatsApp */
.section--products .product-card__body a.product-card__name {
  color: var(--gray-500);
}
.product-card__actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}
.section--products .product-card__actions .btn {
  flex: 1;
  min-width: 0;
  margin-top: 0;
}
.product-card__whatsapp {
  flex: none;
  width: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--br-8);
  background: #25d366;
  color: var(--white);
  transition: background 0.2s ease;
}
.product-card__whatsapp:hover {
  background: #1ebe5b;
  color: var(--white);
}

/* Order bar: mobile only */
.product-order-bar {
  display: none;
}

@media (max-width: 992px) {
  .brand-picker__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .product-order-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 98;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    background: var(--white);
    border-top: 1px solid #e3e6e9;
    box-shadow: 0 -6px 18px rgba(24, 39, 75, 0.07);
  }
  .product-order-bar__price {
    display: flex;
    flex-direction: column;
    margin-right: auto;
  }
  .product-order-bar__price strong {
    font-size: 22px;
    line-height: 1.1;
    font-weight: 800;
  }
  .product-order-bar__price span {
    margin-top: 3px;
    font-size: 11px;
    line-height: 14px;
    color: #1f8a4c;
    font-weight: var(--fw-medium);
    white-space: nowrap;
  }
  .product-order-bar .btn {
    flex: none;
    min-width: 0 !important;
    height: 48px;
    padding: 0 26px;
    border-radius: 12px;
    font-weight: 700;
  }
  .product-order-bar__whatsapp {
    width: 52px;
    height: 48px;
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #25d366;
    color: var(--white);
  }
  body:has(.product-order-bar) {
    padding-bottom: 76px;
  }
  body:has(.product-order-bar) #btn-whatsapp {
    display: none;
  }
}

@media (max-width: 576px) {
  /* Listing and brand pages: compact top so choices fit the first screen */
  .main--products .section--products,
  .main--products-category .section--products {
    padding-top: 12px;
  }
  .main--products .section--products .section__search,
  .main--products-category .section--products .section__search {
    margin-bottom: 14px;
  }
  .main--products .section--products .section__header,
  .main--products-category .section--products .section__header {
    padding: 0;
    margin-bottom: 0;
    text-align: left;
  }
  .main--products .section--products .section__header__container,
  .main--products-category .section--products .section__header__container {
    align-items: flex-start;
    margin-bottom: 0;
  }

  /* Listing: page H1 becomes a small label above the brand question */
  .main--products .section--products .section__header__title {
    font-size: 13px;
    line-height: 18px;
    font-weight: var(--fw-semi-bold);
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-align: left;
    margin: 0;
  }
  .main--products .section--products .section__header__desc {
    display: none;
  }

  .brand-picker {
    margin: 4px 0 28px;
  }
  .brand-picker__title {
    font-size: 21px;
    line-height: 26px;
    font-weight: 800;
  }
  .brand-picker__sub {
    font-size: 12.5px;
    line-height: 18px;
    margin-top: 2px;
  }
  .brand-picker__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 12px;
  }
  .brand-picker__item {
    padding: 12px 4px 9px;
    gap: 7px;
  }
  .brand-picker__logo {
    height: 34px;
  }
  .brand-picker__logo img {
    width: 36px;
    height: 34px;
  }
  .brand-picker__name {
    font-size: 12.5px;
    line-height: 16px;
  }
  .shop-trust {
    justify-content: space-between;
    gap: 6px;
    margin-top: 12px;
    padding: 10px 12px;
    font-size: 11.5px;
    line-height: 16px;
  }

  .products-all-header {
    margin-bottom: 14px;
  }
  .products-all-title {
    font-size: var(--fs-b4);
    line-height: var(--lh-b4);
  }
  .products-all-header .filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
  }

  /* Brand page: back link + logo title + model chips replace breadcrumbs, text tabs and model dropdown */
  .main--products-category .section__breadcrumbs,
  .main--products-category .section--products .products-category,
  .main--products-category .filters__item--model {
    display: none;
  }
  .brand-back {
    display: inline-flex;
  }
  .main--products-category .section--products .section__header__title {
    display: flex;
    align-items: center;
    font-size: 19px;
    line-height: 24px;
    font-weight: 800;
    text-align: left;
    margin: 0;
  }
  .brand-title-logo {
    margin-right: 8px;
  }
  .brand-title-logo img {
    width: 28px;
    height: 28px;
  }
  .main--products-category .section--products .section__header__desc,
  .main--products-category .section--products .section__header__container > p {
    display: none;
  }
  .main--products-category .section--products .filters {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    width: 100%;
    margin-top: 12px;
  }
  .model-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin: 12px -12px 14px;
    padding: 0 12px 2px;
    gap: 7px;
    scrollbar-width: none;
  }
  .model-chips::-webkit-scrollbar {
    display: none;
  }
  .model-chips__item {
    padding: 7px 13px;
    font-size: 13px;
    line-height: 18px;
  }

  .main--products-category .section--products .filters .filters__item,
  .products-all-header .filters .filters__item,
  .main--products-category .section--products .filters .dropdown__header,
  .products-all-header .filters .dropdown__header {
    width: 100%;
    min-width: 0;
  }
  .main--products-category .section--products .filters .dropdown__header,
  .products-all-header .filters .dropdown__header {
    height: 42px;
    padding: 8px 14px;
    font-size: 14px;
  }

  /* Two product cards per row */
  .row > .product-card-col {
    flex: 0 0 50%;
    width: 50%;
    max-width: 50%;
    padding-left: 5px;
    padding-right: 5px;
  }
  .row:has(> .product-card-col) {
    margin-left: -5px;
    margin-right: -5px;
    --bs-gutter-y: 10px;
  }
  .section--products .product-card-col .product-card {
    max-width: none;
    margin: 0;
    box-shadow: none;
    border: 1px solid #e6e8ea;
    border-radius: 12px;
    overflow: hidden;
  }
  .section--products .product-card-col .product-card__header {
    height: auto;
    aspect-ratio: 1 / 0.82;
    border-radius: 0;
  }
  .section--products .product-card-col .product-card__body--hover {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 8px 9px 9px;
  }
  .section--products .product-card-col .product-card__name {
    font-size: 12.5px;
    line-height: 16px;
    font-weight: var(--fw-medium);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 32px;
  }
  .section--products .product-card-col .product-card__price {
    font-size: 17px;
    line-height: 22px;
    font-weight: 800;
    margin-top: 4px;
  }
  .section--products .product-card-col .product-card__actions {
    margin-top: auto;
    padding-top: 8px;
    gap: 6px;
  }
  .section--products .product-card-col .product-card__actions .btn {
    min-width: 0;
    height: 34px;
    padding: 0 4px;
    border-radius: 8px;
    font-size: 12.5px;
    line-height: 16px;
    font-weight: 700;
  }
  .product-card-col .product-card__whatsapp {
    width: 36px;
    height: 34px;
  }
  .product-card-col .product-card__whatsapp svg {
    width: 18px;
    height: 18px;
  }
  #btn-whatsapp {
    right: 14px;
    bottom: 14px;
    padding: 11px;
  }
  #btn-whatsapp svg {
    width: 30px;
    height: 30px;
  }

  /* Product page: photo, title and specs above the fold like the prototype */
  .main--product-details .section--product-details {
    padding-top: 12px;
  }
  .main--product-details .section__breadcrumbs {
    justify-content: flex-start;
    margin-bottom: 12px;
    font-size: 12px;
    line-height: 18px;
  }
  .main--product-details .section__content {
    padding-top: 0;
  }
  .main--product-details .row.gy-5 {
    --bs-gutter-y: 16px;
  }
  .main--product-details .product-gallery__item img {
    max-height: 300px;
    width: 100%;
    object-fit: cover;
  }
  .main--product-details .product__text {
    gap: 12px;
  }
  .main--product-details .product__name {
    font-size: 22px;
    line-height: 28px;
    font-weight: 800;
  }
  .main--product-details .product__text__body .content {
    font-size: 14px;
    line-height: 22px;
  }
}

@media (max-width: 576px) {
  .main--products .section--products .section__header,
  .main--products-category .section--products .section__header {
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
  }
  .main--products .section--products .section__header__container,
  .main--products-category .section--products .section__header__container {
    width: 100%;
  }
  .main--products .section--products .section__header__title,
  .main--products-category .section--products .section__header__title {
    width: 100%;
    justify-content: flex-start;
  }
}

/* Homepage: compact brand grid on mobile only; desktop keeps the existing brands section */
.brand-picker--home {
  display: none;
}

@media (max-width: 576px) {
  /* Listing: keep the H1 for search engines but show one heading only */
  .main--products .section--products .section__header {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .main--products .brand-picker {
    margin-top: 0;
  }

  .brand-picker--home {
    display: block;
    margin: 0;
  }
  .section--brands:has(.brand-picker--home) {
    padding: 24px 0 32px;
  }
  .section--brands:has(.brand-picker--home) .section__header,
  .section--brands:has(.brand-picker--home) .section__content {
    display: none;
  }
  .brand-picker--home .brand-picker__title {
    font-size: 19px;
    line-height: 24px;
  }
  .brand-picker--home .brand-picker__grid {
    margin-top: 14px;
  }

  /* Shorter hero so the brand grid shows sooner */
  .section--welcome {
    margin-bottom: 0;
  }
  .section--welcome .swiper__welcome .swiper-slide {
    height: 400px;
    padding-top: 40px;
  }
  .section--welcome .section__header__title {
    font-size: 30px;
    line-height: 38px;
    font-weight: var(--fw-semi-bold);
  }
}

/* Prototype match (Sep 28): wordmark logos, one-row brand heading, compact product crumb */
.brand-picker__logo img[src*="/lexus.svg"] {
  width: 76px;
  height: 20px;
}
.product-crumb {
  display: none;
}

@media (max-width: 576px) {
  .brand-picker__logo img[src*="/lexus.svg"] {
    width: 64px;
    height: 16px;
  }
  .main--products .brand-picker__sub {
    display: block;
  }

  /* Brand page: ← logo title in one row, chips right after; search and part dropdown hidden */
  .main--products-category .section--products .section__search,
  .main--products-category .section--products .filters {
    display: none;
  }
  .main--products-category .section--products .section__header__title {
    font-size: 15px;
    line-height: 20px;
    font-weight: 700;
    gap: 0;
  }
  .main--products-category .brand-back {
    display: inline-flex;
    margin: 0 10px 0 0;
    font-size: 18px;
    line-height: 20px;
    color: var(--gray-400);
  }
  .main--products-category .brand-title-logo img {
    width: 24px;
    height: 20px;
  }
  .main--products-category .model-chips {
    margin-top: 14px;
  }

  /* Product page: photo first, small brand › category line above the title */
  .main--product-details .section__breadcrumbs {
    display: none;
  }
  .main--product-details .section--product-details {
    padding-top: 0;
  }
  .main--product-details .section--product-details > .container {
    padding-left: 0;
    padding-right: 0;
  }
  .main--product-details .section--product-details .row {
    margin-left: 0;
    margin-right: 0;
  }
  .main--product-details .section--product-details .row > * {
    padding-left: 0;
    padding-right: 0;
  }
  .main--product-details .product__gallery,
  .main--product-details .product-gallery__item,
  .main--product-details .product-gallery__item img {
    border-radius: 0;
  }
  .main--product-details .product__text {
    padding: 0 16px;
  }
  .product-crumb {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 4px;
    font-size: 11.5px;
    line-height: 16px;
    color: var(--gray);
  }
  .product-crumb a {
    color: var(--gray-400);
  }
  .main--product-details .product__advantages {
    color: #1f8a4c;
    font-weight: var(--fw-semi-bold);
    font-size: 13px;
  }
}

/* Prototype match: taller tiles, bigger marks */
@media (max-width: 576px) {
  .brand-picker__item {
    padding: 16px 4px 12px;
    gap: 9px;
  }
  .brand-picker__logo {
    height: 40px;
  }
  .brand-picker__logo img {
    width: 42px;
    height: 40px;
  }
  .brand-picker__logo img[src*="/lexus.svg"] {
    width: 78px;
    height: 20px;
  }
  .brand-picker__name {
    font-size: 12.5px;
    font-weight: 600;
  }
  .brand-picker__title {
    font-weight: 800;
  }
}

/* Shop pages on phones: compact header and search like the prototype */
@media (max-width: 576px) {
  body:has(.main--products, .main--products-category, .main--product-details) .header,
  body:has(.main--products, .main--products-category, .main--product-details) .header.fixed {
    padding: 8px 0;
  }
  body:has(.main--products, .main--products-category, .main--product-details) .header__logo img,
  body:has(.main--products, .main--products-category, .main--product-details) .header.fixed .header__logo img {
    height: 40px;
  }
  .main.main--products,
  .main.main--products-category,
  .main.main--product-details {
    padding-top: 57px;
  }
  .main--products .section--products .section__search__header input,
  .main--products-category .section--products .section__search__header input {
    height: 42px;
    font-size: 13px;
  }
  .main--products .section--products .section__search,
  .main--products-category .section--products .section__search {
    margin-bottom: 12px;
  }
}
@media (max-width: 576px) {
  .shop-trust {
    justify-content: flex-start;
    gap: 18px;
  }
}
@media (max-width: 576px) {
  .brand-picker--home .brand-picker__title {
    font-size: 17px;
    line-height: 22px;
  }
}
