.shop-page {
  padding-top: 10px;
}

/* ── Header two-col ─────────────────────────────────────────────── */
.shop-header {
  padding: 22px;
  margin-bottom: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.9fr);
  gap: 22px;
  align-items: start;
}

/* LEFT column */
.shop-header__left {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

/* Brand row: logo + name/meta, with rating badge top-right */
.shop-header__brand {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  min-width: 0;
  position: relative;
}

.shop-header__logo-wrap {
  width: 68px;
  height: 68px;
  min-width: 68px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  overflow: hidden;
}

html[data-theme="light"] .shop-header__logo-wrap {
  background: #ffffff;
  border-color: rgba(148, 163, 184, 0.18);
}

.shop-header__logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 11px;
  background: #fff;
}

.shop-header__content {
  min-width: 0;
  flex: 1;
}

.shop-header__title {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
  margin: 0;
}

.shop-header__lead {
  margin-top: 6px;
  font-size: 13px;
  color: #94a3b8;
  max-width: 520px;
}

html[data-theme="light"] .shop-header__lead {
  color: #64748b;
}

.shop-header__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.shop-header__meta-pill {
  min-height: 26px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
}

html[data-theme="light"] .shop-header__meta-pill {
  background: #f1f5f9;
  border-color: rgba(148, 163, 184, 0.18);
  color: #475569;
}

/* Rating badge top-right of the brand block */
.shop-header__rating {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.shop-header__stars {
  color: #facc15;
  font-size: 13px;
  letter-spacing: 1px;
  line-height: 1;
}

.shop-header__rating-text {
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
}

html[data-theme="light"] .shop-header__rating-text {
  color: #64748b;
}

/* Stats row below brand */
.shop-header__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.shop-stat {
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
}

html[data-theme="light"] .shop-stat {
  background: #f8fafc;
  border-color: rgba(148, 163, 184, 0.14);
}

.shop-stat__value {
  font-size: 20px;
  line-height: 1.05;
  font-weight: 800;
  color: #fff;
  font-family: var(--font-heading);
}

html[data-theme="light"] .shop-stat__value {
  color: #0f172a;
}

.shop-stat__label {
  margin-top: 3px;
  font-size: 11px;
  color: #94a3b8;
  font-weight: 700;
}

html[data-theme="light"] .shop-stat__label {
  color: #64748b;
}

/* RIGHT column — popular products only */
.shop-header__right {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.shop-popular-mini__title {
  font-size: 11px;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.shop-popular-mini__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  transition: border-color .18s ease, background .18s ease;
  text-decoration: none;
  color: inherit;
}

html[data-theme="light"] .shop-popular-mini__item {
  background: #f8fafc;
  border-color: rgba(148, 163, 184, 0.14);
}

.shop-popular-mini__item:hover {
  border-color: rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
}

html[data-theme="light"] .shop-popular-mini__item:hover {
  border-color: rgba(148, 163, 184, 0.26);
  background: #fff;
}

.shop-popular-mini__img-wrap {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 9px;
  overflow: hidden;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  display: grid;
  place-items: center;
}

html[data-theme="light"] .shop-popular-mini__img-wrap {
  background: #fff;
  border-color: rgba(148, 163, 184, 0.14);
}

.shop-popular-mini__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 3px;
}

.shop-popular-mini__info {
  min-width: 0;
  flex: 1;
}

.shop-popular-mini__name {
  font-size: 12px;
  font-weight: 700;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

html[data-theme="light"] .shop-popular-mini__name {
  color: #0f172a;
}

.shop-popular-mini__price {
  margin-top: 2px;
  font-size: 12px;
  font-weight: 800;
  color: #facc15;
}

/* ── Tabs ───────────────────────────────────────────────────────── */
.shop-tabs-wrap {
  margin-top: 22px;
}

.shop-tabs-bar {
  display: flex;
  align-items: center;
  gap: 2px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  margin-bottom: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.shop-tabs-bar::-webkit-scrollbar { display: none; }

html[data-theme="light"] .shop-tabs-bar {
  border-bottom-color: rgba(148, 163, 184, 0.18);
}

.shop-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 10px 10px 0 0;
  font-size: 13px;
  font-weight: 800;
  color: #64748b;
  white-space: nowrap;
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}

.shop-tab:hover {
  color: #cbd5e1;
  background: rgba(255,255,255,0.03);
}

html[data-theme="light"] .shop-tab:hover {
  color: #334155;
  background: rgba(15,23,42,0.03);
}

.shop-tab.is-active {
  color: #facc15;
  border-bottom-color: #facc15;
}

.shop-tab__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(255,255,255,0.07);
  font-size: 11px;
  font-weight: 800;
  color: #94a3b8;
}

.shop-tab.is-active .shop-tab__count {
  background: rgba(250, 204, 21, 0.15);
  color: #facc15;
}

html[data-theme="light"] .shop-tab__count {
  background: #e2e8f0;
  color: #64748b;
}



/* Tab panels */
.shop-tab-content {
  padding-top: 18px;
}

.shop-tab-panel { display: none; }
.shop-tab-panel.is-active { display: block; }

/* ── Filters bar (shared across tabs) ───────────────────────────── */
.shop-products-filters {
  margin-bottom: 18px;
  padding: 16px;
  display: grid;
  grid-template-columns:
    minmax(260px, 1.6fr)
    minmax(180px, 1fr)
    minmax(180px, 0.9fr)
    minmax(220px, 1fr)
    auto;
  gap: 12px;
  align-items: end;
}

.shop-products-filters__group { min-width: 0; }

.shop-products-filters__label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 800;
  color: #9aa9c4;
}

html[data-theme="light"] .shop-products-filters__label { color: #64748b; }

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .shop-header {
    grid-template-columns: 1fr;
  }

  .shop-header__right {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
  }

  .shop-popular-mini__title {
    grid-column: 1 / -1;
  }

  .shop-products-filters {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .shop-header {
    padding: 16px;
    grid-template-columns: 1fr;
  }

  .shop-header__right {
    grid-template-columns: 1fr;
  }

  .shop-header__stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .shop-products-filters {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .shop-header__stats {
    grid-template-columns: 1fr 1fr;
  }
}
/* shop tabs = same style as set.php top tabs */
.shop-tabs-bar {
  margin-top: 22px;
  display: flex;
  align-items: center;
  gap: 0px;
  flex-wrap: wrap;
  padding: 0 4px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding-bottom: 10px;
}

.shop-tab {
  position: relative;
  padding: 8px 0;
  font-size: 14px;
  font-weight: 800;
  color: #c8d4e6;
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: color .18s ease;
  padding-left: 15px; padding-right: 15px;
}

.shop-tab:hover,
.shop-tab.is-active,
.shop-tab[aria-selected="true"] {
  color: #ffffff;  
}

.shop-tab.is-active::after,
.shop-tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -11px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, #fde047, #facc15);

}

html[data-theme="light"] .shop-tabs-bar {
  border-bottom-color: rgba(148, 163, 184, 0.18);
}

html[data-theme="light"] .shop-tab {
  color: #64748b;
}

html[data-theme="light"] .shop-tab:hover,
html[data-theme="light"] .shop-tab.is-active,
html[data-theme="light"] .shop-tab[aria-selected="true"] {
  color: #0f172a;
}

html[data-theme="light"] .shop-tab.is-active::after,
html[data-theme="light"] .shop-tab[aria-selected="true"]::after {
  background: linear-gradient(180deg, #facc15, #eab308);
}

@media (max-width: 760px) {
  .shop-tabs-bar {
    gap: 14px;
  }

  .shop-tab {
    font-size: 13px;
  }
}
/* ───────── POPULAR PRODUCTS: match site styling ───────── */

.shop-header__right {
    width: 320px;
    min-width: 320px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-self: flex-start;
}

.shop-popular-mini__title {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 2px;
}

.shop-popular-mini {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 12px;
    align-items: center;

    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #fff;

    text-decoration: none;
    color: inherit;

    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.shop-popular-mini__image {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.shop-popular-mini__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.shop-popular-mini__info {
    min-width: 0;
}

.shop-popular-mini__name {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.2;
    color: #0f172a;
    margin-bottom: 4px;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.shop-popular-mini__price {
    font-size: 0.95rem;
    font-weight: 800;
    color: #f5b301;
}

.shop-popular-mini:hover {
    transform: translateY(-1px);
    border-color: rgba(245, 179, 1, 0.35);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.shop-popular-mini:hover .shop-popular-mini__name {
    color: #0f172a;
}

@media (max-width: 980px) {
    .shop-header__right {
        width: 100%;
        min-width: 0;
    }
}
.shop-header {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 24px;
}
.shop-header__left {
    flex: 1;
    min-width: 0;
}
.shop-header__right {
    width: 320px;
    flex-shrink: 0;
    margin-left: auto; /* 🔥 THIS is what fixes the alignment */
}
.shop-header__right {
    align-self: flex-start;
}
.shop-products-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.shop-products-toolbar__right {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
  margin-left: auto;
}

.shop-show-control {
  min-width: 108px;
}

.shop-show-control__label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
}

.shop-show-control .select-base {
  min-width: 96px;
  height: 48px;
  padding-right: 38px;
  border-radius: 16px;
  font-weight: 800;
}

.shop-view-control {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.shop-view-control__label {
  display: block;
  margin-bottom: 0;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
}

html[data-theme="light"] .shop-show-control__label,
html[data-theme="light"] .shop-view-control__label {
  color: #64748b;
}

@media (max-width: 760px) {
  .shop-products-toolbar {
    align-items: stretch;
  }

  .shop-products-toolbar__right {
    width: 100%;
    justify-content: space-between;
    margin-left: 0;
  }

  .shop-show-control {
    min-width: 0;
    flex: 1;
  }
}
/* FIX shop header mobile overflow */
@media (max-width: 760px) {
  .shop-header.panel {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 16px;
    overflow: hidden;
  }

  .shop-header__left,
  .shop-header__right {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin-left: 0;
  }

  .shop-header__brand {
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
  }

  .shop-header__content,
  .shop-header__title,
  .shop-header__lead {
    min-width: 0;
    max-width: 100%;
  }

  .shop-header__title {
    font-size: 18px;
    word-break: break-word;
  }

  .shop-header__rating {
    position: static;
    grid-column: 2;
    margin-top: 2px;
    justify-content: flex-start;
  }

  .shop-header__lead {
    font-size: 12px;
    line-height: 1.45;
  }

  .shop-header__stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .shop-popular-mini {
    width: 100%;
    max-width: 100%;
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .shop-popular-mini__name {
    font-size: 14px;
  }
}

@media (max-width: 420px) {
  .shop-header__brand {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .shop-header__logo-wrap {
    width: 58px;
    height: 58px;
    min-width: 58px;
  }

  .shop-header__stats {
    grid-template-columns: 1fr 1fr;
  }

  .shop-stat {
    padding: 12px;
  }
}

.shop-header-reviews {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.shop-header-review {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.025);
  min-width: 0;
}

.shop-header-review__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.shop-header-review__top strong {
  font-size: 13px;
  font-weight: 900;
  color: #fff;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.shop-header-review__top span {
  color: #facc15;
  font-size: 12px;
  white-space: nowrap;
}

.shop-header-review__meta {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
}

.shop-header-review__text {
  margin-top: 7px;
  font-size: 12px;
  line-height: 1.45;
  color: #cbd5e1;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

html[data-theme="light"] .shop-header-review {
  background: #f8fafc;
  border-color: rgba(148,163,184,0.14);
}

html[data-theme="light"] .shop-header-review__top strong {
  color: #0f172a;
}

html[data-theme="light"] .shop-header-review__meta {
  color: #64748b;
}

html[data-theme="light"] .shop-header-review__text {
  color: #475569;
}

@media (max-width: 900px) {
  .shop-header-reviews {
    grid-template-columns: 1fr;
  }
}
.shop-header__rating {
  cursor: pointer;
  text-decoration: none;
}

.shop-header__rating:hover {
  opacity: 0.85;
}
@media (max-width: 760px) {
  .shop-header {
    position: relative;
  }

  .shop-header__mobile-toggle {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 5;
    border: 0;
    background: transparent;
    cursor: pointer;
  }

  .shop-header:not(.is-open) .shop-header__lead,
  .shop-header:not(.is-open) .shop-header__rating,
  .shop-header:not(.is-open) .shop-header__stats,
  .shop-header:not(.is-open) .shop-header-reviews,
  .shop-header:not(.is-open) .shop-header__right {
    display: none !important;
  }

  .shop-header:not(.is-open) {
    padding: 10px 14px;
  }

  .shop-header:not(.is-open) .shop-header__brand {
    margin-bottom: 0;
  }

  .shop-header:not(.is-open) .shop-header__logo-wrap {
    width: 52px;
    height: 52px;
    min-width: 52px;
    border-radius: 14px;
  }

  .shop-header:not(.is-open) .shop-header__title {
    font-size: 20px;
  }
}

@media (min-width: 761px) {
  .shop-header__mobile-toggle {
    display: none;
  }
}
