/* VOC Sourcing Shop — e-commerce style product browser */

.voc-shop-page {
  background: #f1f5f9;
}

.voc-shop-topbar {
  position: sticky;
  top: 0;
  z-index: 900;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
}

.voc-shop-topbar__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  max-width: 1400px;
  margin: 0 auto;
}

.voc-shop-topbar__brand {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.9rem;
  color: #0c4a6e;
  white-space: nowrap;
}

.voc-shop-topbar__brand i {
  color: #0ea5e9;
  font-size: 1.1rem;
}

.voc-shop-topbar__search-wrap {
  flex: 1;
  position: relative;
  max-width: 520px;
}

.voc-shop-topbar__search-wrap i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
}

.voc-shop-topbar__search {
  width: 100%;
  padding: 0.65rem 1rem 0.65rem 2.5rem;
  border: 2px solid #e2e8f0;
  border-radius: 50px;
  font-size: 0.9rem;
  background: #f8fafc;
}

.voc-shop-topbar__search:focus {
  outline: none;
  border-color: #0ea5e9;
  background: #fff;
}

.voc-shop-topbar__cart {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border: none;
  border-radius: 50px;
  background: linear-gradient(135deg, #0369a1, #0ea5e9);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  position: relative;
}

.voc-shop-topbar__cart em,
.voc-shop-fab em {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 50px;
  background: #ef4444;
  color: #fff;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.voc-shop-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 0;
  max-width: 1400px;
  margin: 0 auto;
  min-height: calc(100vh - 120px);
}

.voc-shop-sidebar {
  background: #fff;
  border-right: 1px solid #e2e8f0;
  padding: 1.25rem 0.75rem;
  position: sticky;
  top: 56px;
  align-self: start;
  max-height: calc(100vh - 56px);
  overflow-y: auto;
}

.voc-shop-sidebar__title {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #64748b;
  padding: 0 0.5rem 0.75rem;
  margin: 0;
}

.voc-shop-sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.voc-shop-cat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: none;
  border-radius: 10px;
  background: transparent;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: background 0.15s;
}

.voc-shop-cat span {
  flex: 1;
  line-height: 1.3;
}

.voc-shop-cat em {
  font-size: 0.65rem;
  font-style: normal;
  color: #94a3b8;
  font-weight: 700;
}

.voc-shop-cat i {
  color: #0ea5e9;
  width: 18px;
  text-align: center;
}

.voc-shop-cat:hover,
.voc-shop-cat.is-active {
  background: #f0f9ff;
  color: #0369a1;
}

.voc-shop-main {
  padding: 1.25rem 1.25rem 3rem;
}

.voc-shop-main__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.voc-shop-main__head h1 {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.voc-shop-main__meta {
  font-size: 0.82rem;
  color: #64748b;
  margin: 0.2rem 0 0;
}

.voc-shop-sort {
  padding: 0.45rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #334155;
  background: #fff;
}

.voc-shop-banner {
  font-size: 0.82rem;
  color: #0369a1;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  border-radius: 12px;
  padding: 0.65rem 1rem;
  margin-bottom: 1.25rem;
}

.voc-shop-banner i {
  margin-right: 0.35rem;
}

.voc-shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.voc-shop-card {
  background: #fff;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.2s;
}

.voc-shop-card:hover {
  box-shadow: 0 12px 32px rgba(14, 165, 233, 0.12);
  transform: translateY(-3px);
}

.voc-shop-card__media {
  position: relative;
  height: 160px;
  overflow: hidden;
  contain: paint;
}

.voc-shop-card__media--instant {
  background: linear-gradient(
    145deg,
    hsl(var(--thumb-hue, 200), 52%, 93%),
    hsl(calc(var(--thumb-hue, 200) + 35), 48%, 85%)
  );
}

.voc-shop-card__thumb-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.2s ease;
  pointer-events: none;
  z-index: 1;
}

.voc-shop-card__thumb-fallback::before {
  content: "";
  width: 2rem;
  height: 2rem;
  border: 2px solid hsl(var(--thumb-hue, 200), 40%, 80%);
  border-top-color: hsl(var(--thumb-hue, 200), 50%, 45%);
  border-radius: 50%;
  animation: voc-shop-thumb-spin 0.7s linear infinite;
}

@keyframes voc-shop-thumb-spin {
  to {
    transform: rotate(360deg);
  }
}

.voc-shop-card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 2;
  background: #f1f5f9;
}

.voc-shop-card__media.has-photo .voc-shop-card__img {
  opacity: 1;
}

.voc-shop-card__media.has-photo .voc-shop-card__thumb-fallback {
  opacity: 0;
  visibility: hidden;
}

.voc-shop-card__media.has-photo .voc-shop-card__thumb-fallback::before {
  display: none;
}

.voc-shop-card__badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  z-index: 3;
}

.voc-shop-card__badge--hot {
  background: #ef4444;
  color: #fff;
}

.voc-shop-card__body {
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.35rem;
}

.voc-shop-card__cat {
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #0ea5e9;
}

.voc-shop-card__title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.35;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.voc-shop-card__hub {
  font-size: 0.72rem;
  color: #64748b;
  margin: 0;
}

.voc-shop-card__hub i {
  color: #0ea5e9;
}

.voc-shop-card__margin {
  font-size: 0.7rem;
  font-weight: 700;
  color: #16a34a;
}

.voc-shop-card__foot {
  margin-top: auto;
  padding-top: 0.5rem;
}

.voc-shop-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.55rem 0.85rem;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.15s;
}

.voc-shop-btn--cart {
  width: 100%;
  background: #f0f9ff;
  color: #0369a1;
  border: 2px solid #0ea5e9;
}

.voc-shop-btn--cart:hover {
  background: #0ea5e9;
  color: #fff;
}

.voc-shop-btn--cart.is-in-cart {
  background: #dcfce7;
  border-color: #22c55e;
  color: #166534;
}

.voc-shop-btn--primary {
  background: linear-gradient(135deg, #0369a1, #0ea5e9);
  color: #fff;
}

.voc-shop-btn--ghost {
  background: #f1f5f9;
  color: #334155;
}

.voc-shop-btn--block {
  width: 100%;
  padding: 0.75rem;
}

.voc-shop-load-more {
  display: block;
  width: 100%;
  max-width: 280px;
  margin: 2rem auto 0;
  padding: 0.85rem;
  border: 2px solid #0ea5e9;
  background: #fff;
  color: #0369a1;
  font-weight: 700;
  border-radius: 50px;
  cursor: pointer;
}

.voc-shop-loading,
.voc-shop-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1rem;
  color: #64748b;
}

.voc-shop-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #e2e8f0;
  border-top-color: #0ea5e9;
  border-radius: 50%;
  animation: vocShopSpin 0.7s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes vocShopSpin {
  to {
    transform: rotate(360deg);
  }
}

.voc-shop-hint {
  text-align: left;
  font-size: 0.75rem;
  background: #f8fafc;
  padding: 0.75rem;
  border-radius: 8px;
  margin-top: 1rem;
}

/* Cart drawer */
.voc-shop-cart {
  position: fixed;
  inset: 0;
  z-index: 10070;
  pointer-events: none;
}

.voc-shop-cart.is-open {
  pointer-events: auto;
}

.voc-shop-cart__overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  opacity: 0;
  transition: opacity 0.25s;
}

.voc-shop-cart.is-open .voc-shop-cart__overlay {
  opacity: 1;
}

.voc-shop-cart__panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 420px;
  height: 100%;
  background: #fff;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  box-shadow: -8px 0 40px rgba(15, 23, 42, 0.15);
}

.voc-shop-cart.is-open .voc-shop-cart__panel {
  transform: translateX(0);
}

body.voc-shop-cart-open {
  overflow: hidden;
}

.voc-shop-cart__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid #e2e8f0;
}

.voc-shop-cart__head h2 {
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0;
  color: #0c4a6e;
}

.voc-shop-cart__close {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: #f1f5f9;
  cursor: pointer;
}

.voc-shop-cart__list {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 1rem;
}

.voc-shop-cart-empty {
  font-size: 0.88rem;
  color: #64748b;
  line-height: 1.6;
  text-align: center;
  padding: 2rem 0.5rem;
}

.voc-shop-cart-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.5rem;
  align-items: start;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f1f5f9;
}

.voc-shop-cart-item__main strong {
  display: block;
  font-size: 0.85rem;
  color: #0f172a;
  line-height: 1.3;
}

.voc-shop-cart-item__main small {
  display: block;
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 0.15rem;
}

.voc-shop-cart-note {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.35rem 0.5rem;
  font-size: 0.72rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.voc-shop-cart-item__qty {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background: #f8fafc;
  border-radius: 8px;
  padding: 0.2rem;
}

.voc-shop-cart-item__qty button {
  width: 28px;
  height: 28px;
  border: none;
  background: #fff;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
}

.voc-shop-cart-item__qty span {
  min-width: 24px;
  text-align: center;
  font-weight: 700;
  font-size: 0.85rem;
}

.voc-shop-cart-remove {
  border: none;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  padding: 0.25rem;
}

.voc-shop-cart-remove:hover {
  color: #ef4444;
}

.voc-shop-cart__checkout {
  border-top: 1px solid #e2e8f0;
  padding: 1rem 1.15rem 1.25rem;
  background: #f8fafc;
}

.voc-shop-checkout-form__lead {
  font-size: 0.8rem;
  color: #64748b;
  margin-bottom: 0.75rem;
}

.voc-shop-field {
  margin-bottom: 0.55rem;
}

.voc-shop-field label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: #475569;
  margin-bottom: 0.2rem;
}

.voc-shop-field label span {
  color: #ef4444;
}

.voc-shop-field input,
.voc-shop-field textarea {
  width: 100%;
  padding: 0.45rem 0.6rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 0.85rem;
}

.voc-shop-checkout-note {
  font-size: 0.68rem;
  color: #94a3b8;
  text-align: center;
  margin: 0.5rem 0 0;
}

.voc-shop-checkout-success {
  text-align: center;
  padding: 1rem 0;
}

.voc-shop-checkout-success__icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 0.75rem;
  border-radius: 50%;
  background: #dcfce7;
  color: #16a34a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

.voc-shop-fab {
  display: none;
  position: fixed;
  z-index: 9988;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #0369a1, #0ea5e9);
  color: #fff;
  font-size: 1.25rem;
  box-shadow: 0 8px 24px rgba(14, 165, 233, 0.4);
  cursor: pointer;
}

.voc-shop-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #0f172a;
  color: #fff;
  padding: 0.65rem 1.25rem;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 600;
  z-index: 10080;
  opacity: 0;
  transition: transform 0.3s, opacity 0.3s;
  pointer-events: none;
  max-width: 90vw;
  text-align: center;
}

.voc-shop-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 991px) {
  .voc-shop-layout {
    grid-template-columns: 1fr;
  }

  .voc-shop-sidebar {
    position: static;
    max-height: none;
    border-right: none;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.75rem;
  }

  .voc-shop-sidebar__nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  .voc-shop-cat {
    width: auto;
    flex: 0 1 auto;
  }

  .voc-shop-cat em {
    display: none;
  }

  .voc-shop-fab {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

@media (max-width: 575px) {
  .voc-shop-topbar__brand span {
    display: none;
  }

  .voc-shop-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.65rem;
  }

  .voc-shop-card__media {
    height: 130px;
  }
}
