.client-catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.client-product-card {
  border: 1px solid rgba(255,255,255,.09);
  background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.028));
  border-radius: 18px;
  padding: 12px;
  min-height: 150px;
  display: flex;
  align-items: stretch;
  gap: 12px;
  cursor: pointer;
  color: var(--text-white);
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.client-product-card:hover,
.client-product-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(0,113,227,.42);
  background: linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,.038));
  box-shadow: 0 18px 38px rgba(0,0,0,.25);
  outline: none;
}
.client-product-card.owned {
  border-color: rgba(34,197,94,.28);
}
.client-product-thumb {
  width: 92px;
  flex: 0 0 92px;
  aspect-ratio: 210 / 297;
  border-radius: 11px;
  overflow: hidden;
  border: 1px dashed rgba(255,255,255,.16);
  background: rgba(255,255,255,.06);
}
.client-product-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #fff;
}
.client-product-thumb-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px;
  text-align: center;
  color: var(--text-gray);
}
.client-product-thumb-fallback span {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(239,68,68,.18);
  color: #ffd1d1;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
}
.client-product-thumb-fallback small {
  font-size: 10px;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}
.client-product-summary {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.client-product-topline,
.client-product-bottom,
.client-cart-row,
.client-catalog-modal-actions,
.client-cart-total-row,
.client-owned-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.client-cart-chip {
  display: inline-flex;
  width: fit-content;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(34,197,94,.14);
  color: #86efac;
  font-size: 11px;
  font-weight: 800;
}
.client-cart-chip.owned {
  background: rgba(0,113,227,.18);
  color: #cfe4ff;
}
.client-product-card h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.15;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.client-product-meta {
  display: grid;
  gap: 5px;
  color: var(--text-gray);
  font-size: 12px;
  line-height: 1.25;
}
.client-product-bottom {
  margin-top: auto;
}
.client-product-bottom strong,
.client-modal-price {
  font-size: 18px;
  font-weight: 900;
}
.client-product-bottom span {
  color: #cfe4ff;
  font-size: 12px;
  font-weight: 800;
}
.client-cart-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255,255,255,.10);
  background: var(--accent-blue);
  color: #fff;
  border-radius: 999px;
  padding: 12px 16px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}
.client-cart-button span {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(0,0,0,.26);
}
.client-cart-row {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
}
.client-cart-row strong,
.client-cart-row span {
  display: block;
}
.client-cart-row span {
  margin-top: 4px;
  color: var(--text-gray);
}
.client-cart-row button {
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.05);
  color: var(--text-white);
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
}
.client-catalog-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 10000;
}
.client-catalog-modal.is-open {
  display: block;
}
.client-catalog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.78);
  backdrop-filter: blur(8px);
}
.client-catalog-dialog,
.client-cart-dialog {
  position: relative;
  z-index: 1;
  max-height: 92vh;
  overflow: auto;
  margin: 4vh auto;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(15,15,16,.98);
  box-shadow: 0 30px 80px rgba(0,0,0,.48);
  padding: 18px;
}
.client-catalog-dialog {
  width: min(100% - 24px, 1120px);
}
.client-cart-dialog {
  width: min(100% - 24px, 620px);
}
.client-cart-dialog h2 {
  margin: 0 0 16px;
  font-size: 30px;
}
.client-cart-modal-list {
  display: grid;
  gap: 10px;
}
.client-cart-total-row {
  margin-top: 14px;
  padding: 14px 0;
  border-top: 1px solid rgba(255,255,255,.08);
  color: var(--text-gray);
}
.client-cart-total-row strong {
  color: var(--text-white);
  font-size: 24px;
}
.client-checkout-placeholder {
  width: 100%;
  margin-top: 4px;
}
.client-catalog-close {
  position: sticky;
  top: 0;
  margin-left: auto;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(15,23,42,.92);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}
.client-catalog-content {
  display: grid;
  grid-template-columns: minmax(320px,.95fr) minmax(280px,1.05fr);
  gap: 24px;
  align-items: center;
  min-width: 0;
}
.client-modal-preview,
.client-modal-preview-column {
  min-width: 0;
}
.client-catalog-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(12px,3vw,34px);
  border-left: 1px solid rgba(255,255,255,.08);
}
.client-catalog-info h2 {
  margin: 0;
  font-size: clamp(26px,4vw,44px);
  line-height: 1.05;
  overflow-wrap: anywhere;
}
.client-modal-author {
  color: var(--text-gray);
  font-size: 15px;
}
.client-modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.client-modal-meta span {
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  color: #d1d1d6;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 700;
}
.client-modal-desc {
  margin: 2px 0 0;
  color: #d1d1d6;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.client-modal-author[hidden],
.client-modal-meta[hidden],
.client-modal-desc[hidden],
.client-owned-note[hidden],
.client-owned-actions[hidden] {
  display: none;
}
.client-owned-note {
  border: 1px solid rgba(34,197,94,.24);
  background: rgba(34,197,94,.10);
  color: #bbf7d0;
  border-radius: 14px;
  padding: 12px 14px;
  font-weight: 800;
}
.client-add-cart,
.client-owned-action {
  width: fit-content;
  border: 0;
  border-radius: 999px;
  padding: 13px 18px;
  background: var(--accent-blue);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  text-decoration: none;
}
.client-owned-action.secondary {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
}
.client-add-cart:disabled {
  opacity: .72;
  cursor: not-allowed;
}
.client-catalog-cover {
  display: grid;
  place-items: center;
}
.client-catalog-cover img {
  max-height: 58vh;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(255,255,255,.08);
}
.client-preview-carousel { display: grid; gap: 10px; }
.client-preview-body {
  display: grid;
  grid-template-columns: 42px minmax(0,1fr) 42px;
  align-items: center;
  gap: 10px;
}
.client-preview-viewport {
  overflow: hidden;
  min-width: 0;
  border-radius: 18px;
}
.client-preview-track {
  display: flex;
  transition: transform .24s ease;
}
.client-preview-slide {
  flex: 0 0 100%;
  margin: 0;
  display: grid;
  gap: 8px;
  justify-items: center;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.025);
  border-radius: 18px;
  padding: 12px;
}
.client-preview-slide img {
  max-height: 58vh;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  border-radius: 14px;
  background: #fff;
}
.client-preview-slide figcaption,
.client-preview-counter {
  color: var(--text-gray);
  font-size: 13px;
}
.client-preview-nav {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(15,15,16,.94);
  color: #fff;
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
}
.client-preview-nav:disabled {
  opacity: .35;
  cursor: not-allowed;
}
.client-preview-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 0 54px;
}
.client-preview-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.client-preview-dot {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.24);
  cursor: pointer;
}
.client-preview-dot.is-active {
  background: var(--accent-blue);
}
body.modal-open { overflow: hidden; }
@media (max-width: 900px) {
  .client-catalog-content { grid-template-columns: 1fr; }
  .client-catalog-info {
    border-left: 0;
    border-top: 1px solid rgba(255,255,255,.08);
    padding: 18px 4px 4px;
  }
}
@media (max-width: 640px) {
  .client-catalog-grid { grid-template-columns: 1fr; }
  .client-product-card { flex-direction: column; }
  .client-product-thumb { width: 100%; height: 180px; flex-basis: auto; aspect-ratio: auto; }
  .client-preview-body { grid-template-columns: 36px minmax(0,1fr) 36px; }
  .client-preview-nav { width: 36px; height: 36px; font-size: 26px; }
  .client-preview-footer { padding: 0 44px; }
  .client-preview-slide img,
  .client-catalog-cover img { max-height: 42vh; }
  .client-catalog-modal-actions,
  .client-owned-actions { flex-direction: column; align-items: stretch; }
  .client-add-cart,
  .client-owned-action { width: 100%; text-align: center; }
}
