/* =============================================
   GForce — Shop Page Styles (shop.css)
   Mobile-first approach
   ============================================= */

/* =============================================
   SHOP INTRO
   ============================================= */

.shop-intro {
  background-color: var(--color-black);
  padding: 60px var(--gutter);
  overflow: hidden;
}

.shop-intro__inner {
  max-width: var(--container-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.shop-intro__left {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.shop-intro__title {
  font-family: "Funnel Sans";
  font-weight: 400;
  font-size: 46px;
  line-height: 1;
  text-transform: none;
  color: var(--color-white);
}

.shop-intro__right {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.shop-intro__desc {
  font-family: "Funnel Sans";
  font-size: 16px;
  line-height: 1.3;
  color: var(--color-gray-200);
}

/* ── Filter Pills ── */

.shop-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 5px;
  align-content: flex-start;
}

.shop-filters__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px 8px;
  height: 27px;
  border: 1px solid var(--color-gray-700);
  border-radius: 0;
  font-family: "Funnel Sans";
  font-size: 14px;
  font-weight: 400;
  color: var(--color-gray-200);
  background: transparent;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

/* Скругленные кнопки: 1, 3, 5, 7, 9  (нечетные) */
.shop-filters__btn:nth-child(odd) {
  border-radius: 100px !important;
}

.shop-filters__btn:hover {
  border-color: var(--color-gray-300);
  color: var(--color-white);
}

.shop-filters__btn.is-active {
  background-color: var(--color-white);
  border-color: var(--color-white);
  color: var(--color-black);
}

/* ── Search Bar ── */

.shop-search {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--color-gray-700);
  padding-bottom: 8px;
  gap: 10px;
}

.shop-search__input {
  flex: 1;
  background: transparent;
  color: var(--color-gray-100) !important;
  font-size: 16px;
  font-weight: 600;
  font-family: "Funnel Sans";
  border: none !important;
  outline: none;
  box-shadow: none;
}

.shop-search__input:focus {
  border: none !important;
  outline: none;
  box-shadow: none;
}

.shop-search__input::placeholder {
  color: var(--color-gray-100);
}

.shop-search__icon {
  flex-shrink: 0;
  color: #b3b3b3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: opacity 0.2s;
}

.shop-search__icon:hover {
  opacity: 0.7;
}

.shop-search__icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.shop-search__clear {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--color-gray-300);
  opacity: 0.7;
  transition: opacity 0.15s;
}

.shop-search__clear[hidden] {
  display: none;
}

.shop-search__clear:hover {
  opacity: 1;
  color: var(--color-gray-100);
}

/* =============================================
   SHOP SECTIONS (shared)
   ============================================= */

.shop-section {
  padding: 60px 40px;
}

.shop-section__inner {
  max-width: var(--container-width);
  margin: 0 auto;
}

.shop-archive.is-results-loading .shop-section {
  pointer-events: none;
}

.shop-archive.is-results-loading .shop-section__inner {
  opacity: 0.6;
  filter: blur(2px);
  transition: opacity 0.2s ease, filter 0.2s ease;
}

.shop-section__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0;
}

.shop-section__title {
  font-family: "Funnel Sans";
  font-weight: 400;
  font-size: 28px;
  line-height: 1;
  text-transform: none;
  margin-bottom: 60px;
}

/* ── Bundles Section ── */

.shop-section--bundles {
  background-color: var(--color-red-100);
}

.shop-section--bundles .shop-section__title {
  color: var(--color-black);
  margin-bottom: 30px;
}

/* ── Instruments Section ── */

.shop-section--instruments {
  background-color: var(--color-gray-900);
}

.shop-section--instruments .shop-section__title {
  color: var(--color-white);
  margin-bottom: 30px;
}

/* ── Hidden state for filtering ── */

.shop-section[data-section].is-hidden {
  display: none;
}

/* =============================================
   PRODUCT GRID
   ============================================= */

.shop-grid {
  display: flex;
  flex-direction: column;
  gap: 0px;
}

/* ── Card hidden state for filtering/search ── */

.bundle-card.is-hidden,
.instrument-card.is-hidden {
  display: none;
}

/* =============================================
   BUNDLE CARD
   ============================================= */

.bundle-card {
  display: flex;
  flex-direction: column;
  min-width: 0;    /* prevent overflow of grid cell */
  width: 100%;
}

.bundle-card__link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
  height: 100%;
}

.bundle-card__images {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 0px;
  aspect-ratio: 351 / 281;
  border-radius: 4px;
  overflow: hidden;
}

.bundle-card__images::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.35) 0%,
    rgba(0, 0, 0, 0.12) 45%,
    transparent 100%
  );
  transition: opacity 0.35s ease;
}

.bundle-card__img-wrap {
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.bundle-card__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1);
  transition: transform 0.4s ease;
}

.bundle-card__img-wrap .shop-badge {
  z-index: 3;
}

.bundle-card__count {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.5);
  font-family: "Funnel Sans";
  font-size: 18px;
  font-weight: 600;
  color: var(--color-white);
}

.bundle-card__details {
  padding-bottom: 40px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.bundle-card__title-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.bundle-card__title {
  font-family: "Funnel Sans";
  font-weight: 600;
  font-size: 22px;
  text-transform: none;
  color: var(--color-black);
  transition: color 0.2s ease;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-top: 6px;
  flex: 1;
  min-width: 0;
}

.bundle-card__arrow {
  display: none;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  margin-top: 6px;
  color: var(--color-black);
  line-height: 0;
  overflow: visible;
}

.bundle-card__arrow svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.bundle-card__description-wrap {
  position: relative;
  width: 100%;
  min-height: calc(1.3em * 2);
}

.bundle-card__description {
  font-family: "Funnel Sans";
  font-weight: 400;
  font-size: 14px;
  line-height: 1.3;
  color: var(--color-black);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bundle-card__popover {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 10;
  min-width: 220px;
  max-width: 320px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #b9b9b9;
  border-radius: 8px;
  color: var(--color-black);
  font-family: "Funnel Sans";
  font-size: 13px;
  line-height: 1.35;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  pointer-events: none;
}

.bundle-card__description-wrap:hover .bundle-card__popover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.bundle-card__pricing {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.bundle-card__price {
  font-family: "Funnel Sans";
  font-weight: 600;
  font-size: 21px;
  color: var(--color-black);
  transition: color 0.2s ease;
}

.bundle-card__original {
  font-family: "Funnel Sans";
  font-weight: 400;
  font-size: 21px;
  color: var(--color-gray-600, #666);
  text-decoration: line-through;
}

@media (hover: hover) {
  .bundle-card__arrow {
    display: block;
    opacity: 0;
    transform: translateY(8px) rotate(-90deg);
    transform-origin: center center;
    transition: opacity 0.4s ease, transform 0.45s ease;
  }

  .bundle-card:hover .bundle-card__images::after {
    opacity: 1;
  }

  .bundle-card:hover .bundle-card__img-wrap img {
    transform: scale(1.06);
  }

  .bundle-card:hover .bundle-card__title,
  .bundle-card:hover .bundle-card__price {
    color: var(--color-gray-500, #808080);
  }

  .bundle-card:hover .bundle-card__arrow {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
  }
}

/* =============================================
   INSTRUMENT CARD
   ============================================= */

.instrument-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
}

.instrument-card__link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
  height: 100%;
}

.instrument-card__image {
  position: relative;
  aspect-ratio: 353 / 281;
  width: 100%;
  border-radius: 4px;
  overflow: hidden;
}

.instrument-card__image img,
.instrument-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.instrument-card__image::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 40%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.4), transparent);
  pointer-events: none;
  z-index: 1;
}

.instrument-card__details {
  padding-bottom: 40px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.instrument-card__title-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.instrument-card__title {
  font-family: "Funnel Sans";
  font-weight: 500;
  font-size: 18px;
  /* line-height: 1.1; */
  color: var(--color-white);
  transition: color 0.2s ease;
  text-transform: none;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-top: 6px;
  flex: 1;
  min-width: 0;
}

.instrument-card__arrow {
  display: none;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  margin-top: 6px;
  color: var(--color-white);
  line-height: 0;
  overflow: visible;
}

.instrument-card__arrow svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.instrument-card__description-wrap {
  position: relative;
  width: 100%;
  min-height: calc(1.3em * 2);
}

.instrument-card__description {
  font-family: "Funnel Sans";
  font-weight: 400;
  font-size: 14px;
  line-height: 1.3;
  color: var(--color-gray-300);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.instrument-card__popover {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 10;
  min-width: 220px;
  max-width: 320px;
  padding: 8px 10px;
  background: #1f1f1f;
  border: 1px solid #3f3f3f;
  border-radius: 8px;
  color: var(--color-white);
  font-family: "Funnel Sans";
  font-size: 13px;
  line-height: 1.35;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  pointer-events: none;
}

.instrument-card__description-wrap:hover .instrument-card__popover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.instrument-card__pricing {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.instrument-card__price {
  font-family: "Funnel Sans";
  font-weight: 600;
  font-size: 18px;
  color: var(--color-white);
  transition: color 0.2s ease;
}

.instrument-card__original {
  font-family: "Funnel Sans";
  font-weight: 400;
  font-size: 18px;
  color: var(--color-gray-500);
  text-decoration: line-through;
}

@media (hover: hover) {
  .instrument-card__arrow {
    display: block;
    opacity: 0;
    transform: translateY(8px) rotate(-90deg);
    transform-origin: center center;
    transition: opacity 0.4s ease, transform 0.45s ease;
  }

  .instrument-card:hover .instrument-card__arrow {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
  }

  .instrument-card:hover .instrument-card__title,
  .instrument-card:hover .instrument-card__price {
    color: var(--color-gray-500, #808080);
  }
}

/* =============================================
   SHOP BADGES
   ============================================= */

.shop-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Funnel Sans";
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.shop-badge--sale {
  background-color: rgba(0, 0, 0, 0.7);
  color: var(--color-white);
  padding: 4px 8px 6px;
  border-radius: 0;
  font-size: 18px;
}

.shop-badge--new {
  background-color: rgba(255, 255, 255, 0.7);
  color: var(--color-black);
  padding: 4px 12px 6px;
  border-radius: 100px;
  font-size: 18px;
}

/* =============================================
   LOAD MORE
   ============================================= */

.shop-load-more {
  display: flex;
  align-items: center;
  margin-top: 10px;
}

.shop-load-more__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  height: 48px;
  width: 100%;
  border: 1px solid #999999;
  border-radius: 100px;
  font-family: "Funnel Sans";
  font-weight: 500;
  font-size: 21px;
  white-space: nowrap;
  cursor: pointer;
  background: transparent;
  color: var(--color-black);
  transition: opacity 0.2s;
}

.shop-load-more__btn:hover {
  opacity: 0.7;
}

.shop-load-more__btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.shop-load-more__btn.is-loading {
  opacity: 0.6;
  cursor: wait;
}

.shop-section--bundles .shop-load-more__btn {
  color: var(--color-black);
}

.shop-section--instruments .shop-load-more__btn {
  color: var(--color-white);
  border-color: #999999;
}

.shop-load-more__line {
  flex: 1;
  height: 1px;
  background-color: #999999;
  margin-left: 20px;
  display: none;
}

/* ── Load More hidden state ── */

.shop-load-more.is-hidden {
  display: none;
}

.shop-load-more:empty {
  min-height: 40px;
}

/* ── Loading Spinner ── */

.shop-load-more__spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: shop-spinner-rotate 0.6s linear infinite;
  margin-right: 8px;
}

@keyframes shop-spinner-rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* =============================================
   NO RESULTS MESSAGE
   ============================================= */

.shop-no-results {
  display: none;
  padding: 40px 0;
}

.shop-no-results p {
  font-family: "Funnel Sans";
  font-size: 24px;
  font-weight: 500;
  line-height: 1.2;
  margin: 0;
}

.shop-section--bundles .shop-no-results p {
  color: var(--color-black);
}

.shop-section--instruments .shop-no-results p {
  color: var(--color-white);
}

/* =============================================
   TABLET (768px+)
   ============================================= */

@media (min-width: 768px) {

  /* ── Shop Intro ── */
  .shop-intro {
    padding: 0;
  }

  .shop-intro__inner {
    flex-direction: row;
  }

  .shop-intro__left {
    flex: 0 0 50%;
    justify-content: center;
  }

  .shop-intro__title {
    font-size: 60px;
  }

  .shop-intro__right {
    flex: 1;
    padding: 80px 40px;
    border-left: 1px solid var(--color-gray-700);
  }

  .shop-intro__desc {
    font-size: 18px;
    line-height: 1.3;
  }

  /* ── Filters ── */
  .shop-filters__btn {
    padding: 6px 18px 8px;
    height: 30px;
    font-size: 15px;
  }

  /* ── Shop Sections ── */
  .shop-section {
    padding: 80px var(--gutter) 100px;
  }

  .shop-section__header {
    margin-bottom: 30px;
  }

  .shop-section__title {
    font-size: 40px;
  }

  .shop-section--bundles .shop-section__title,
  .shop-section--instruments .shop-section__title {
    margin-bottom: 0;
  }

  /* ── Bundle Grid ── */
  .shop-grid--bundles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .bundle-card__images {
    aspect-ratio: 595 / 476;
  }

  .bundle-card__title {
    font-size: 32px;
    font-weight: 500;
  }

  .bundle-card__description {
    font-size: 16px;
  }

  .bundle-card__price {
    font-size: 22px;
  }

  /* ── Instrument Grid ── */
  .shop-grid--instruments {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .instrument-card__title {
    font-size: 26px;
  }

  .instrument-card__description {
    font-size: 16px;
  }

  .instrument-card__price {
    font-size: 20px;
  }

  .instrument-card__original {
    font-size: 20px;
  }

  /* ── Load More ── */
  .shop-load-more__btn {
    font-size: 21px;
    height: 48px;
    width: 392px;
  }

  .shop-load-more__line {
    display: block;
    flex: 1;
    height: 1px;
    margin-left: 20px;
  }

  .shop-section--bundles .shop-load-more__line {
    background-color: #999999;
  }

  .shop-section--instruments .shop-load-more__line {
    background-color: #999999;
  }

  .shop-load-more {
    justify-content: center;
  }
}

/* =============================================
   DESKTOP (1280px+))
   ============================================= */

@media (min-width: 1280px) {

  /* ── Shop Intro ── */
  .shop-intro {
    padding: 0;
  }

  .shop-intro__title {
    font-size: 72px;
  }

  .shop-intro__right {
    padding: 100px 0px 80px 80px;
    gap: 40px;
  }

  .shop-intro__desc {
    font-size: 18px;
    line-height: 1.3;
  }

  .shop-search__input {
    font-size: 18px;
  }

  /* ── Filters ── */
  .shop-filters__btn {
    padding: 6px 20px 8px;
    height: 32px;
    font-size: 16px;
  }

  /* ── Shop Sections ── */
  .shop-section {
    padding: 100px var(--gutter);
  }

  .shop-section--bundles {
    padding-top: 80px;
    padding-bottom: 100px;
  }

  .shop-section--instruments {
    padding-top: 80px;
    padding-bottom: 100px;
  }

  .shop-section__title {
    font-size: 46px;
  }

  .shop-section--bundles .shop-section__title,
  .shop-section--instruments .shop-section__title {
    margin-bottom: 0;
  }

  .shop-section__header {
    margin-bottom: 30px;
  }

  /* ── Bundle Cards ── */
  .bundle-card__details {
    padding-bottom: 50px;
  }

  .bundle-card__title {
    font-size: 38px;
  }

  .bundle-card__arrow {
    width: 36px;
    height: 36px;
  }

  .bundle-card__description {
    font-size: 16px;
  }

  .bundle-card__price {
    font-size: 24px;
  }

  .bundle-card__count {
    font-size: 24px;
  }

  /* ── Instrument Grid ── */
  .shop-grid--instruments {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .instrument-card__details {
    padding-bottom: 70px;
  }

  .instrument-card__title {
    font-size: 30px;
  }

  .instrument-card__arrow {
    width: 36px;
    height: 36px;
  }

  .instrument-card__description {
    font-size: 16px;
  }

  .instrument-card__price {
    font-size: 21px;
  }

  .instrument-card__original {
    font-size: 21px;
  }

  /* ── Load More ── */
  .shop-load-more__btn {
    font-size: 21px;
    height: 48px;
    width: 392px;
  }
}
