:root {
  --catalog-ink: #16212f;
  --catalog-muted: #647386;
  --catalog-line: #dfe7ef;
  --catalog-bg: #f5f8fb;
  --catalog-surface: #ffffff;
  --catalog-primary: #155eef;
  --catalog-accent: #13a06f;
  --catalog-danger: #c62828;
  --catalog-shadow: 0 18px 50px rgba(22, 33, 47, 0.12);
}

.catalog-page {
  min-height: 100vh;
  background: var(--catalog-bg);
  color: var(--catalog-ink);
  font-family: Inter, Arial, sans-serif;
}

.catalog-loading,
.catalog-error {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
}

.catalog-spinner {
  width: 42px;
  height: 42px;
  border: 4px solid #d9e6f5;
  border-top-color: var(--catalog-primary);
  border-radius: 50%;
  animation: catalog-spin 0.8s linear infinite;
  margin: 0 auto 14px;
}

@keyframes catalog-spin {
  to { transform: rotate(360deg); }
}

.catalog-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 10%, rgba(255, 255, 255, 0.24), transparent 28%),
    linear-gradient(135deg, var(--catalog-primary), #0d2b54 72%);
  color: white;
}

.catalog-hero-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 18px 28px;
}

.catalog-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 28px;
}

.catalog-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.catalog-logo {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.26);
}

.catalog-logo-fallback {
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 20px;
}

.catalog-store-name {
  margin: 0;
  color: #ffffff;
  font-size: 18px;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.catalog-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.12);
  color: white;
  font-size: 13px;
  font-weight: 800;
}

.catalog-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(310px, 0.92fr);
  gap: 24px;
  align-items: end;
}

.catalog-kicker {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.catalog-title {
  margin: 0;
  max-width: 740px;
  font-size: clamp(30px, 6vw, 58px);
  line-height: 0.98;
  letter-spacing: -0.02em;
}

.catalog-subtitle {
  max-width: 680px;
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.45;
}

.catalog-hero-card {
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.20);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.catalog-hero-card strong {
  display: block;
  font-size: 26px;
}

.catalog-hero-card span {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.78);
}

.catalog-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px;
}

.catalog-toolbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  background: rgba(245, 248, 251, 0.92);
  backdrop-filter: blur(10px);
}

.catalog-search {
  position: relative;
}

.catalog-search input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px 0 42px;
  border: 1px solid var(--catalog-line);
  background: var(--catalog-surface);
  color: var(--catalog-ink);
  font: inherit;
  outline: none;
}

.catalog-search span {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--catalog-muted);
}

.catalog-cart-button,
.catalog-main-button,
.catalog-ghost-button,
.catalog-icon-button {
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.catalog-cart-button,
.catalog-main-button {
  min-height: 48px;
  padding: 0 16px;
  background: var(--catalog-primary);
  color: white;
}

.catalog-cart-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.catalog-categories {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 16px;
  scrollbar-width: none;
}

.catalog-categories::-webkit-scrollbar { display: none; }

.catalog-category {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--catalog-line);
  background: white;
  color: var(--catalog-muted);
  font-weight: 900;
  cursor: pointer;
}

.catalog-category.active {
  border-color: var(--catalog-primary);
  background: var(--catalog-primary);
  color: white;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.catalog-product {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: white;
  border: 1px solid var(--catalog-line);
  box-shadow: 0 6px 20px rgba(22, 33, 47, 0.05);
  overflow: hidden;
}

.catalog-product-media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #eaf0f6;
  overflow: hidden;
}

.catalog-product-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.catalog-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--catalog-muted);
  font-weight: 900;
}

.catalog-stock-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 6px 9px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--catalog-ink);
  font-size: 12px;
  font-weight: 900;
}

.catalog-product-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 8px;
  padding: 12px;
}

.catalog-product-category {
  color: var(--catalog-primary);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.catalog-product-title {
  margin: 0;
  color: var(--catalog-ink);
  font-size: 16px;
  line-height: 1.2;
}

.catalog-product-desc {
  margin: 0;
  color: var(--catalog-muted);
  font-size: 13px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.catalog-price-row {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.catalog-price {
  color: var(--catalog-accent);
  font-size: 20px;
  font-weight: 950;
}

.catalog-add {
  min-width: 42px;
  height: 42px;
  border: 0;
  background: var(--catalog-primary);
  color: white;
  font-size: 24px;
  cursor: pointer;
}

.catalog-add:disabled,
.catalog-main-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.catalog-empty {
  padding: 44px 18px;
  text-align: center;
  color: var(--catalog-muted);
  background: white;
  border: 1px dashed var(--catalog-line);
}

.catalog-drawer,
.catalog-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
}

.catalog-drawer.open,
.catalog-modal.open {
  display: block;
}

.catalog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 20, 31, 0.46);
}

.catalog-drawer-panel {
  position: absolute;
  right: 0;
  top: 0;
  width: min(420px, 100%);
  height: 100%;
  display: flex;
  flex-direction: column;
  background: white;
  box-shadow: var(--catalog-shadow);
}

.catalog-modal-panel {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(920px, calc(100% - 24px));
  max-height: calc(100vh - 24px);
  overflow: auto;
  background: white;
  box-shadow: var(--catalog-shadow);
}

.catalog-drawer-head,
.catalog-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px;
  border-bottom: 1px solid var(--catalog-line);
}

.catalog-icon-button {
  width: 40px;
  height: 40px;
  background: #eef3f8;
  color: var(--catalog-ink);
  font-size: 22px;
}

.catalog-cart-list {
  flex: 1;
  overflow: auto;
  padding: 10px 16px;
}

.catalog-cart-item {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--catalog-line);
}

.catalog-cart-thumb {
  width: 54px;
  height: 54px;
  object-fit: cover;
  background: #eef3f8;
}

.catalog-cart-item strong {
  display: block;
  line-height: 1.2;
}

.catalog-cart-item small {
  display: block;
  color: var(--catalog-muted);
  margin-top: 2px;
}

.catalog-qty {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.catalog-qty button {
  width: 30px;
  height: 30px;
  border: 1px solid var(--catalog-line);
  background: white;
  cursor: pointer;
}

.catalog-cart-footer {
  padding: 16px;
  border-top: 1px solid var(--catalog-line);
  background: #f9fbfd;
}

.catalog-total-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-weight: 950;
  font-size: 18px;
}

.catalog-form {
  display: grid;
  gap: 10px;
}

.catalog-form input,
.catalog-form textarea,
.catalog-size-select {
  width: 100%;
  min-height: 46px;
  padding: 11px 12px;
  border: 1px solid var(--catalog-line);
  background: white;
  color: var(--catalog-ink);
  font: inherit;
}

.catalog-form textarea {
  min-height: 76px;
  resize: vertical;
}

.catalog-product-detail {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 0;
}

.catalog-detail-image {
  min-height: 420px;
  background: #eaf0f6;
}

.catalog-detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.catalog-detail-content {
  padding: 18px;
}

.catalog-detail-content h2 {
  margin: 4px 0 10px;
  font-size: clamp(24px, 4vw, 38px);
  line-height: 1;
}

.catalog-size-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.catalog-size-option {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--catalog-line);
  background: white;
  color: var(--catalog-ink);
  cursor: pointer;
  font-weight: 900;
}

.catalog-size-option.active {
  border-color: var(--catalog-primary);
  background: var(--catalog-primary);
  color: white;
}

.catalog-size-option:disabled {
  color: #9aa6b2;
  background: #eef2f6;
  cursor: not-allowed;
}

.catalog-detail-actions {
  display: grid;
  grid-template-columns: minmax(168px, 0.48fr) minmax(0, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.catalog-quantity-picker {
  display: grid;
  grid-template-columns: 38px minmax(58px, 1fr) 38px;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 6px;
  border: 1px solid var(--catalog-line);
  border-radius: 16px;
  background: #ffffff;
}

.catalog-quantity-picker button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 12px;
  background: var(--catalog-soft-primary);
  color: var(--catalog-primary);
  cursor: pointer;
  font-size: 19px;
  font-weight: 950;
  line-height: 1;
}

.catalog-quantity-picker button:hover {
  background: var(--catalog-primary);
  color: #ffffff;
}

.catalog-quantity-picker input {
  width: 100%;
  min-width: 0;
  height: 38px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--catalog-ink);
  text-align: center;
  font-size: 16px;
  font-weight: 950;
}

.catalog-quantity-picker small {
  grid-column: 1 / -1;
  color: var(--catalog-muted);
  text-align: center;
  font-size: 11px;
  font-weight: 800;
}

.catalog-app-banner {
  margin-top: 24px;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: #0d2b54;
  color: white;
}

.catalog-app-banner p {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.74);
}

.catalog-app-banner a {
  color: white;
  font-weight: 950;
  white-space: nowrap;
}

@media (max-width: 980px) {
  .catalog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .catalog-hero-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .catalog-hero-inner { padding: 14px 14px 24px; }
  .catalog-shell { padding: 12px; }
  .catalog-toolbar { grid-template-columns: 1fr; }
  .catalog-cart-button { justify-content: center; }
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .catalog-product-body { padding: 10px; }
  .catalog-product-title { font-size: 14px; }
  .catalog-price { font-size: 17px; }
  .catalog-product-detail { grid-template-columns: 1fr; }
  .catalog-detail-image { min-height: 280px; }
  .catalog-app-banner { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 390px) {
  .catalog-grid { grid-template-columns: 1fr; }
}

/* Modern storefront refresh */
.catalog-page {
  --catalog-radius: 18px;
  background:
    linear-gradient(180deg, #eef6ff 0, #f7fafc 340px, #f7fafc 100%);
}

.catalog-hero {
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.32), transparent 28%),
    radial-gradient(circle at 88% 8%, rgba(19, 160, 111, 0.28), transparent 24%),
    linear-gradient(135deg, var(--catalog-primary), #082f64 62%, #071b36);
}

.catalog-hero-inner {
  max-width: 1240px;
  padding: 20px clamp(14px, 4vw, 28px) 34px;
}

.catalog-topbar {
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.10);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.10);
}

.catalog-brand {
  gap: 14px;
}

.catalog-logo {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: #ffffff;
  border: 3px solid rgba(255, 255, 255, 0.74);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.20);
}

.catalog-logo-fallback {
  color: var(--catalog-primary);
}

.catalog-store-name {
  max-width: min(54vw, 620px);
  color: #ffffff;
  font-size: clamp(22px, 4vw, 34px);
  font-weight: 950;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
}

.catalog-chip {
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.catalog-hero-grid {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  align-items: center;
  padding-top: 30px;
}

.catalog-kicker {
  color: rgba(255, 255, 255, 0.78);
}

.catalog-title {
  max-width: 780px;
  font-size: clamp(34px, 7vw, 68px);
  letter-spacing: 0;
}

.catalog-subtitle {
  max-width: 700px;
}

.catalog-hero-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.14);
}

.catalog-hero-card div {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.14);
}

.catalog-hero-card small {
  grid-column: 1 / -1;
  color: rgba(255, 255, 255, 0.78);
}

.catalog-shell {
  max-width: 1240px;
  padding: 16px clamp(10px, 4vw, 28px) 28px;
}

.catalog-toolbar {
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  padding: 12px;
  margin-top: -24px;
  border: 1px solid rgba(210, 222, 234, 0.82);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 50px rgba(22, 33, 47, 0.10);
}

.catalog-search input {
  min-height: 52px;
  padding-left: 76px;
  border-radius: 16px;
}

.catalog-search span {
  left: 14px;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.catalog-cart-button {
  min-height: 52px;
  border-radius: 16px;
  box-shadow: 0 12px 28px rgba(21, 94, 239, 0.22);
}

.catalog-cart-button strong {
  display: grid;
  min-width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}

.catalog-cart-button-hero {
  background: #ffffff;
  color: var(--catalog-primary);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.14);
}

.catalog-cart-button-hero strong {
  background: var(--catalog-primary);
  color: #ffffff;
}

.catalog-categories {
  padding: 18px 0;
}

.catalog-category {
  min-height: 42px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(22, 33, 47, 0.04);
}

.catalog-products {
  display: grid;
  gap: 14px;
}

.catalog-products-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.catalog-products-list {
  grid-template-columns: 1fr;
}

.catalog-product {
  border-radius: var(--catalog-radius);
  border-color: rgba(207, 219, 232, 0.92);
  box-shadow: 0 12px 34px rgba(22, 33, 47, 0.07);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.catalog-product:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(22, 33, 47, 0.12);
}

.catalog-products-list .catalog-product {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
}

.catalog-product-media {
  border: 0;
  cursor: pointer;
}

.catalog-products-list .catalog-product-media {
  aspect-ratio: auto;
  min-height: 190px;
}

.catalog-product-body {
  padding: 14px;
}

.catalog-products-list .catalog-product-body {
  padding: 18px;
}

.catalog-product-category {
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(21, 94, 239, 0.08);
}

.catalog-product-title {
  font-size: 17px;
}

.catalog-products-list .catalog-product-title {
  font-size: 22px;
}

.catalog-price-row {
  align-items: end;
}

.catalog-add {
  min-width: auto;
  height: 44px;
  padding: 0 14px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 950;
  white-space: nowrap;
}

.catalog-stock-badge {
  border-radius: 999px;
  box-shadow: 0 8px 22px rgba(22, 33, 47, 0.10);
}

.catalog-drawer-panel,
.catalog-modal-panel {
  border-radius: 22px 0 0 22px;
}

.catalog-modal-panel {
  border-radius: 24px;
}

.catalog-drawer-head small {
  display: block;
  margin-top: 3px;
  color: var(--catalog-muted);
  font-size: 12px;
}

.catalog-icon-button {
  width: auto;
  min-width: 42px;
  padding: 0 12px;
  border-radius: 14px;
  font-size: 13px;
}

.catalog-close-button {
  width: 42px;
  min-width: 42px;
  height: 42px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #eef3f8;
  color: var(--catalog-ink);
  line-height: 1;
  flex: 0 0 auto;
}

.catalog-close-button span {
  display: block;
  transform: translateY(-1px);
  font-size: 30px;
  font-weight: 400;
  line-height: 1;
}

.catalog-close-button:hover {
  background: var(--catalog-primary);
  color: #ffffff;
}

.catalog-cart-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--catalog-line);
  background: #f7fafc;
}

.catalog-cart-steps span {
  padding: 8px 7px;
  border-radius: 999px;
  background: #e9f0f7;
  color: var(--catalog-muted);
  text-align: center;
  font-size: 12px;
  font-weight: 950;
}

.catalog-cart-steps span.active {
  background: rgba(19, 160, 111, 0.14);
  color: var(--catalog-accent);
}

.catalog-cart-item {
  grid-template-columns: 64px minmax(0, 1fr) auto;
  padding: 12px 0;
}

.catalog-cart-thumb {
  width: 64px;
  height: 64px;
  border-radius: 14px;
}

.catalog-cart-info b {
  display: block;
  margin-top: 4px;
  color: var(--catalog-accent);
}

.catalog-qty {
  border: 1px solid var(--catalog-line);
  border-radius: 999px;
  padding: 3px;
}

.catalog-qty button {
  border: 0;
  border-radius: 999px;
  background: #edf3f9;
  font-weight: 950;
}

.catalog-total-row {
  padding: 12px;
  border-radius: 16px;
  background: #ffffff;
}

.catalog-form input,
.catalog-form textarea,
.catalog-size-select {
  border-radius: 14px;
}

.catalog-main-button {
  border-radius: 16px;
}

.catalog-app-banner {
  border-radius: 22px;
}

@media (max-width: 980px) {
  .catalog-products-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .catalog-topbar {
    align-items: flex-start;
    border-radius: 20px;
  }

  .catalog-logo {
    width: 62px;
    height: 62px;
  }

  .catalog-store-name {
    max-width: 58vw;
    font-size: 22px;
  }

  .catalog-cart-button-hero {
    display: none;
  }

  .catalog-hero-grid {
    padding-top: 22px;
  }

  .catalog-title {
    font-size: 34px;
    line-height: 1.04;
  }

  .catalog-hero-card {
    grid-template-columns: 1fr 1fr;
  }

  .catalog-toolbar {
    grid-template-columns: 1fr;
    margin-top: -16px;
  }

  .catalog-cart-button {
    width: 100%;
  }

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

  .catalog-products-list .catalog-product {
    grid-template-columns: 124px minmax(0, 1fr);
  }

  .catalog-products-list .catalog-product-media {
    min-height: 158px;
  }

  .catalog-products-list .catalog-product-title {
    font-size: 16px;
  }

  .catalog-products-list .catalog-product-desc {
    -webkit-line-clamp: 2;
  }

  .catalog-add {
    width: 100%;
  }

  .catalog-price-row {
    align-items: stretch;
    flex-direction: column;
  }

  .catalog-drawer-panel,
  .catalog-modal-panel {
    width: 100%;
    border-radius: 20px 20px 0 0;
  }

  .catalog-drawer-panel {
    top: auto;
    bottom: 0;
    height: min(92vh, 760px);
  }
}

@media (max-width: 430px) {
  .catalog-products-grid {
    grid-template-columns: 1fr;
  }

  .catalog-products-list .catalog-product {
    grid-template-columns: 112px minmax(0, 1fr);
  }

  .catalog-product-body {
    gap: 7px;
  }

  .catalog-cart-item {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .catalog-qty {
    grid-column: 2;
    width: fit-content;
  }
}

/* Mobile-friendly storefront polish driven by the app colors */
.catalog-page {
  --catalog-soft-primary: rgba(var(--catalog-primary-rgb, 21, 94, 239), 0.08);
  --catalog-soft-accent: rgba(var(--catalog-accent-rgb, 19, 160, 111), 0.10);
  background: #f8fafb;
}

.catalog-hero {
  background: var(--catalog-primary);
}

.catalog-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.08));
  pointer-events: none;
}

.catalog-hero-inner {
  position: relative;
  z-index: 1;
}

.catalog-topbar {
  background: rgba(255, 255, 255, 0.12);
  box-shadow: none;
  backdrop-filter: none;
}

.catalog-hero-card,
.catalog-hero-card div {
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: none;
}

.catalog-toolbar {
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(26, 37, 54, 0.08);
  backdrop-filter: none;
}

.catalog-qty button {
  background: var(--catalog-soft-primary);
}

.catalog-total-row {
  background: #ffffff;
}

.catalog-category {
  background: #ffffff;
  box-shadow: none;
}

.catalog-category.active {
  background: var(--catalog-primary);
}

.catalog-product {
  border-color: rgba(var(--catalog-primary-rgb, 21, 94, 239), 0.16);
  box-shadow: 0 8px 22px rgba(26, 37, 54, 0.06);
}

.catalog-product:hover {
  transform: none;
  box-shadow: 0 10px 26px rgba(26, 37, 54, 0.09);
}

.catalog-product-media,
.catalog-detail-image,
.catalog-cart-thumb {
  background: #ffffff;
}

.catalog-product-media {
  display: block;
  padding: 8px;
  border-bottom: 1px solid rgba(var(--catalog-primary-rgb, 21, 94, 239), 0.10);
}

.catalog-product-media img {
  width: 100%;
  height: 100%;
  border-radius: 14px;
  object-fit: contain;
  background: #f7f9fb;
}

.catalog-fallback {
  border-radius: 14px;
  background: var(--catalog-soft-primary);
}

.catalog-products-list .catalog-product-media {
  min-height: 170px;
}

.catalog-products-list .catalog-product-media img {
  object-fit: contain;
}

.catalog-product-category {
  background: var(--catalog-soft-primary);
  color: var(--catalog-primary);
}

.catalog-price {
  color: var(--catalog-accent);
}

.catalog-add,
.catalog-main-button,
.catalog-cart-button {
  background: var(--catalog-primary);
  box-shadow: none;
}

.catalog-cart-button strong {
  background: rgba(255, 255, 255, 0.22);
}

.catalog-cart-button-hero {
  background: #ffffff;
  color: var(--catalog-primary);
}

.catalog-cart-button-hero strong {
  background: var(--catalog-primary);
  color: #ffffff;
}

.catalog-stock-badge {
  box-shadow: none;
}

.catalog-detail-image {
  display: grid;
  place-items: center;
  padding: 14px;
}

.catalog-detail-image img {
  max-width: 100%;
  max-height: min(64vh, 560px);
  border-radius: 18px;
  object-fit: contain;
  background: #f7f9fb;
}

.catalog-modal-panel {
  overflow: hidden;
}

.catalog-product-detail {
  max-height: calc(100vh - 92px);
  overflow: auto;
}

.catalog-cart-steps {
  background: #ffffff;
}

.catalog-cart-steps span {
  background: var(--catalog-soft-primary);
}

.catalog-cart-steps span.active {
  background: var(--catalog-soft-accent);
}

.catalog-app-banner {
  background: var(--catalog-primary);
}

@media (max-width: 720px) {
  .catalog-page {
    background: #f8fafb;
  }

  .catalog-hero-inner {
    padding: 12px 12px 26px;
  }

  .catalog-topbar {
    padding: 9px;
    gap: 10px;
  }

  .catalog-logo {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    object-fit: contain;
  }

  .catalog-store-name {
    max-width: calc(100vw - 112px);
    font-size: 20px;
  }

  .catalog-chip {
    min-height: 28px;
    padding: 5px 9px;
    font-size: 12px;
  }

  .catalog-title {
    font-size: 30px;
  }

  .catalog-subtitle {
    font-size: 15px;
  }

  .catalog-shell {
    padding: 12px 10px 24px;
  }

  .catalog-toolbar {
    margin-top: -18px;
    padding: 10px;
    border-radius: 18px;
  }

  .catalog-products {
    gap: 10px;
  }

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

  .catalog-product {
    border-radius: 16px;
  }

  .catalog-product-media {
    aspect-ratio: 1 / 1;
    padding: 7px;
  }

  .catalog-product-media img,
  .catalog-fallback {
    border-radius: 12px;
  }

  .catalog-product-body {
    padding: 10px;
  }

  .catalog-product-title {
    font-size: 14px;
    line-height: 1.24;
  }

  .catalog-product-desc {
    font-size: 12px;
  }

  .catalog-products-list .catalog-product {
    grid-template-columns: 112px minmax(0, 1fr);
  }

  .catalog-products-list .catalog-product-media {
    min-height: 142px;
  }

  .catalog-detail-image {
    min-height: 250px;
    padding: 10px;
  }

  .catalog-detail-image img {
    max-height: 44vh;
    border-radius: 14px;
  }

  .catalog-product-detail {
    max-height: calc(92vh - 58px);
  }
}

@media (max-width: 430px) {
  .catalog-products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .catalog-price {
    font-size: 16px;
  }

  .catalog-add {
    min-height: 40px;
    height: auto;
    padding: 9px 10px;
    font-size: 13px;
  }
}

/* Compact catalog header focused on products */
.catalog-hero-inner {
  padding-bottom: 22px;
}

.catalog-hero-grid {
  grid-template-columns: 1fr;
  padding-top: 18px;
}

.catalog-kicker {
  margin-bottom: 6px;
  font-size: 12px;
}

.catalog-title {
  max-width: 760px;
  font-size: clamp(24px, 4.5vw, 42px);
  line-height: 1.08;
  font-weight: 900;
}

.catalog-subtitle {
  max-width: 620px;
  margin-top: 10px;
  font-size: clamp(14px, 1.8vw, 17px);
  line-height: 1.42;
}

.catalog-logo {
  object-fit: contain;
  padding: 6px;
  background: transparent;
  border-color: rgba(255, 255, 255, 0.34);
}

.catalog-logo[src$=".png"],
.catalog-logo[src*=".png?"],
.catalog-logo[src*="image/png"] {
  background: transparent;
}

.catalog-logo-fallback {
  padding: 0;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.catalog-toolbar {
  margin-top: -12px;
}

.catalog-topbar {
  background: rgba(255, 255, 255, 0.08);
}

.catalog-search input {
  direction: ltr;
  unicode-bidi: plaintext;
}

@media (max-width: 720px) {
  .catalog-hero-inner {
    padding-bottom: 20px;
  }

  .catalog-hero-grid {
    padding-top: 14px;
  }

  .catalog-title {
    max-width: 100%;
    font-size: 24px;
  }

  .catalog-subtitle {
    display: -webkit-box;
    margin-top: 8px;
    font-size: 14px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .catalog-toolbar {
    margin-top: -10px;
  }
}

/* Product size compatibility */
.catalog-size-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 24px;
}

.catalog-size-preview span {
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--catalog-soft-primary);
  color: var(--catalog-primary);
  font-size: 11px;
  font-weight: 900;
}

.catalog-size-preview span.disabled {
  color: #9aa6b2;
  background: #eef2f6;
  text-decoration: line-through;
}

.catalog-size-help {
  margin: -4px 0 10px;
  color: var(--catalog-muted);
  font-size: 13px;
}

.catalog-size-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 8px;
}

.catalog-size-option {
  display: grid;
  gap: 3px;
  min-height: 56px;
  padding: 9px 10px;
  border-radius: 14px;
  text-align: left;
}

.catalog-size-option strong,
.catalog-size-option small {
  display: block;
}

.catalog-size-option small {
  color: var(--catalog-muted);
  font-size: 11px;
  font-weight: 800;
}

.catalog-size-option.active small {
  color: rgba(255, 255, 255, 0.78);
}

.catalog-size-option:disabled strong,
.catalog-size-option:disabled small {
  color: #9aa6b2;
}

@media (max-width: 430px) {
  .catalog-size-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Floating checkout flow */
.catalog-floating-cart {
  position: fixed;
  left: max(12px, env(safe-area-inset-left));
  right: max(12px, env(safe-area-inset-right));
  bottom: max(14px, env(safe-area-inset-bottom));
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  border: 0;
  border-radius: 18px;
  background: var(--catalog-primary);
  color: #ffffff;
  box-shadow: 0 16px 34px rgba(26, 37, 54, 0.24);
  cursor: pointer;
  font: inherit;
  font-weight: 950;
}

.catalog-floating-cart[hidden] {
  display: none;
}

.catalog-floating-cart strong {
  display: grid;
  min-width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.20);
}

.catalog-page:has(.catalog-floating-cart:not([hidden])) .catalog-shell {
  padding-bottom: 90px;
}

.catalog-smart-chat {
  position: fixed;
  right: max(14px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 61;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 50px;
  padding: 0 15px 0 13px;
  border: 0;
  border-radius: 999px;
  background: #25d366;
  color: #ffffff;
  box-shadow: 0 16px 36px rgba(18, 140, 126, 0.34);
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 950;
}

.catalog-smart-chat span {
  position: relative;
  width: 23px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 8px;
}

.catalog-smart-chat span::after {
  content: '';
  position: absolute;
  left: 3px;
  bottom: -6px;
  width: 8px;
  height: 8px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  background: #25d366;
  transform: rotate(-35deg);
}

.catalog-page:has(.catalog-floating-cart:not([hidden])) .catalog-smart-chat {
  bottom: calc(max(16px, env(safe-area-inset-bottom)) + 64px);
}

.catalog-chat-panel {
  max-width: 560px;
  overflow: hidden;
  background:
    linear-gradient(rgba(229, 221, 213, 0.92), rgba(229, 221, 213, 0.92)),
    repeating-linear-gradient(
      45deg,
      rgba(18, 140, 126, 0.05) 0,
      rgba(18, 140, 126, 0.05) 2px,
      transparent 2px,
      transparent 12px
    );
}

.catalog-chat-head {
  align-items: center;
  margin: -22px -22px 14px;
  padding: 14px 16px;
  background: #075e54;
  color: #ffffff;
}

.catalog-chat-head .catalog-close-button {
  margin-left: auto;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.catalog-chat-avatar {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 999px;
  background: #25d366;
  color: #ffffff;
  font-size: 17px;
  font-weight: 950;
}

.catalog-chat-panel .catalog-modal-head small {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
  font-weight: 800;
}

.catalog-chat-form {
  display: grid;
  gap: 12px;
}

.catalog-chat-welcome {
  display: flex;
}

.catalog-chat-welcome span {
  position: relative;
  max-width: 82%;
  padding: 10px 12px;
  border-radius: 0 14px 14px 14px;
  background: #ffffff;
  color: #1f2933;
  box-shadow: 0 5px 16px rgba(20, 30, 45, 0.10);
  font-size: 14px;
  font-weight: 850;
}

.catalog-chat-context {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(18, 140, 126, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(4px);
}

.catalog-chat-context span {
  color: var(--catalog-muted);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.catalog-chat-context strong {
  color: var(--catalog-ink);
  font-size: 14px;
}

.catalog-chat-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.catalog-chat-suggestions button,
.catalog-chat-order,
.catalog-chat-inline {
  border: 1px solid rgba(18, 140, 126, 0.18);
  background: #ffffff;
  color: #075e54;
}

.catalog-chat-suggestions button {
  min-height: 36px;
  padding: 0 11px;
  border-radius: 14px 14px 14px 4px;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 4px 12px rgba(20, 30, 45, 0.08);
}

.catalog-chat-suggestions button:hover,
.catalog-chat-order:hover,
.catalog-chat-inline:hover {
  background: #dcf8c6;
  border-color: rgba(18, 140, 126, 0.28);
  color: #075e54;
}

.catalog-chat-form .catalog-main-button {
  background: #25d366;
  color: #ffffff;
  box-shadow: 0 14px 26px rgba(18, 140, 126, 0.22);
}

.catalog-chat-form textarea {
  min-height: 116px;
  resize: vertical;
  border-radius: 18px 18px 6px 18px;
}

.catalog-chat-form textarea,
.catalog-chat-form input {
  width: 100%;
  border: 1px solid var(--catalog-line);
  border-radius: 12px;
  background: #ffffff;
  color: var(--catalog-ink);
  font: inherit;
  padding: 12px;
  outline: none;
}

.catalog-chat-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.catalog-chat-order,
.catalog-chat-inline {
  min-height: 44px;
  padding: 0 13px;
  border-radius: 12px;
  color: #075e54;
}

@media (max-width: 720px) {
  .catalog-drawer-panel {
    height: 100%;
    border-radius: 0;
  }

  .catalog-smart-chat {
    right: 12px;
    min-height: 46px;
    padding: 0 13px 0 12px;
  }

  .catalog-chat-fields {
    grid-template-columns: 1fr;
  }
}

/* Layout presets */
.catalog-toolbar-title {
  min-height: 48px;
  display: flex;
  align-items: center;
  color: var(--catalog-ink);
  font-size: 18px;
  font-weight: 950;
}

.catalog-deal-board,
.catalog-editorial-stack,
.catalog-classified-callout {
  min-width: 0;
}

.catalog-deal-board {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.catalog-deal-card {
  min-height: 112px;
  padding: 14px;
  border: 0;
  border-radius: 18px;
  background: #ffffff;
  color: #111827;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.16);
}

.catalog-deal-card:nth-child(2) {
  background: var(--catalog-accent);
  color: #ffffff;
}

.catalog-deal-card:nth-child(3) {
  background: #ffedd5;
}

.catalog-deal-card strong,
.catalog-deal-card span {
  display: block;
}

.catalog-deal-card strong {
  font-size: 13px;
  text-transform: uppercase;
}

.catalog-deal-card span {
  margin-top: 6px;
  font-size: 20px;
  line-height: 1.05;
  font-weight: 950;
}

.catalog-editorial-stack {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  grid-template-rows: repeat(2, 132px);
  gap: 10px;
}

.catalog-editorial-tile {
  overflow: hidden;
  border: 0;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.14);
  cursor: pointer;
}

.catalog-editorial-tile:first-child {
  grid-row: span 2;
}

.catalog-editorial-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.catalog-editorial-tile span {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 42px;
  font-weight: 950;
}

.catalog-classified-callout {
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.catalog-classified-callout strong,
.catalog-classified-callout span,
.catalog-classified-callout small {
  display: block;
}

.catalog-classified-callout strong {
  font-size: 54px;
  line-height: 1;
}

.catalog-classified-callout span {
  margin-top: 4px;
  font-size: 18px;
  font-weight: 950;
}

.catalog-classified-callout small {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 14px;
  line-height: 1.35;
}

.catalog-feature-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 6px 0 18px;
}

.catalog-feature-card {
  min-height: 140px;
  position: relative;
  overflow: hidden;
  border: 0;
  border-radius: 20px;
  background: #ffffff;
  color: var(--catalog-ink);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 12px 34px rgba(22, 33, 47, 0.08);
}

.catalog-feature-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
}

.catalog-feature-card strong,
.catalog-feature-card span {
  position: relative;
  z-index: 1;
  display: block;
  margin: 12px;
  width: fit-content;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
}

.catalog-feature-card strong {
  padding: 7px 10px;
  font-size: 15px;
  font-weight: 950;
}

.catalog-feature-card span {
  padding: 5px 9px;
  color: var(--catalog-primary);
  font-size: 12px;
  font-weight: 900;
}

.catalog-layout-marketplace {
  --catalog-bg: #e9edf3;
  --catalog-surface: #ffffff;
  --catalog-radius: 10px;
}

.catalog-layout-marketplace .catalog-hero {
  background: #111827;
}

.catalog-layout-marketplace .catalog-hero-inner {
  max-width: 1280px;
  padding-bottom: 18px;
}

.catalog-layout-marketplace .catalog-topbar {
  margin-bottom: 18px;
}

.catalog-layout-marketplace .catalog-hero-grid {
  align-items: stretch;
}

.catalog-layout-marketplace .catalog-kicker {
  color: #fbbf24;
}

.catalog-layout-marketplace .catalog-title {
  font-size: clamp(30px, 4.7vw, 50px);
}

.catalog-layout-marketplace .catalog-shell {
  max-width: 1280px;
}

.catalog-layout-marketplace .catalog-products-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.catalog-layout-marketplace .catalog-product {
  border-radius: 10px;
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.08);
}

.catalog-layout-marketplace .catalog-product-media {
  aspect-ratio: 1 / 0.92;
}

.catalog-layout-marketplace .catalog-product-title {
  font-size: 14px;
  line-height: 1.22;
}

.catalog-layout-classifieds {
  --catalog-bg: #ffffff;
  --catalog-surface: #ffffff;
  --catalog-radius: 12px;
}

.catalog-layout-classifieds .catalog-hero {
  background: linear-gradient(90deg, var(--catalog-primary), #7c3aed);
}

.catalog-layout-classifieds .catalog-hero-inner,
.catalog-layout-classifieds .catalog-shell {
  max-width: 1120px;
}

.catalog-layout-classifieds .catalog-title {
  font-size: clamp(28px, 4vw, 44px);
}

.catalog-layout-classifieds .catalog-products-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.catalog-layout-classifieds .catalog-products-list .catalog-product {
  display: flex;
  border: 0;
  box-shadow: none;
}

.catalog-layout-classifieds .catalog-products-list .catalog-product-media {
  aspect-ratio: 1 / 0.78;
  min-height: auto;
  border-radius: 12px;
}

.catalog-layout-classifieds .catalog-products-list .catalog-product-body {
  padding: 10px 2px 4px;
}

.catalog-layout-classifieds .catalog-products-list .catalog-product-title {
  font-size: 15px;
}

.catalog-layout-classifieds .catalog-add {
  background: #111827;
}

.catalog-layout-boutique {
  --catalog-bg: #fffaf7;
  --catalog-surface: #ffffff;
  --catalog-radius: 18px;
}

.catalog-layout-boutique .catalog-hero {
  background: linear-gradient(135deg, #fff4fb, #f7ecff);
  color: #3f1438;
}

.catalog-layout-boutique .catalog-store-name,
.catalog-layout-boutique .catalog-title {
  color: #3f1438;
}

.catalog-layout-boutique .catalog-chip,
.catalog-layout-boutique .catalog-kicker,
.catalog-layout-boutique .catalog-subtitle {
  color: rgba(63, 20, 56, 0.72);
}

.catalog-layout-boutique .catalog-cart-button-hero {
  background: #7a145f;
}

.catalog-layout-boutique .catalog-title {
  font-size: clamp(32px, 5vw, 56px);
}

.catalog-layout-boutique .catalog-products-boutique,
.catalog-layout-boutique .catalog-products-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.catalog-layout-boutique .catalog-product {
  border: 0;
  border-radius: 18px;
  box-shadow: none;
  background: transparent;
}

.catalog-layout-boutique .catalog-product-media {
  border-radius: 18px;
  aspect-ratio: 1 / 1.24;
}

.catalog-layout-boutique .catalog-product-body {
  padding: 10px 2px 0;
  text-align: center;
}

.catalog-layout-boutique .catalog-product-category {
  margin: 0 auto;
  background: rgba(var(--catalog-accent-rgb), 0.13);
}

.catalog-layout-boutique .catalog-price-row {
  justify-content: center;
  flex-wrap: wrap;
}

.catalog-layout-boutique .catalog-add {
  border-radius: 999px;
}

.catalog-layout-showcase {
  --catalog-bg: #f3f7f6;
  --catalog-surface: #ffffff;
  --catalog-radius: 22px;
}

.catalog-layout-showcase .catalog-hero {
  background: linear-gradient(135deg, var(--catalog-primary), #083f3a);
}

.catalog-layout-showcase .catalog-products-showcase,
.catalog-layout-showcase .catalog-products-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.catalog-layout-showcase .catalog-product {
  border-radius: 22px;
}

.catalog-layout-showcase .catalog-product-media {
  aspect-ratio: 1 / 0.86;
}

.catalog-layout-showcase .catalog-product-title {
  font-size: 18px;
}

/* Social profile storefront */
.catalog-layout-social {
  --catalog-bg: #f6f7f9;
  --catalog-surface: #ffffff;
  --catalog-radius: 10px;
}

.catalog-social-profile {
  max-width: 980px;
  margin: 0 auto;
  background: #ffffff;
  border-right: 1px solid var(--catalog-line);
  border-left: 1px solid var(--catalog-line);
}

.catalog-social-cover {
  position: relative;
  min-height: clamp(210px, 34vw, 350px);
  overflow: hidden;
  background: var(--catalog-primary);
}

.catalog-social-cover-grid,
.catalog-social-cover-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  width: 100%;
  height: 100%;
}

.catalog-social-cover-grid {
  grid-template-columns: 1.55fr 0.8fr;
  grid-template-rows: 1fr 1fr;
  gap: 3px;
}

.catalog-social-cover-grid img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.catalog-social-cover-grid img:first-child {
  grid-row: 1 / 3;
}

.catalog-social-cover-count-1,
.catalog-social-cover-count-2 {
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: 1fr;
}

.catalog-social-cover-count-1 img:first-child,
.catalog-social-cover-count-2 img:first-child {
  grid-row: auto;
}

.catalog-social-cover-count-1 img:first-child {
  grid-column: 1 / 3;
}

.catalog-social-cover-fallback {
  grid-template-columns: 1.4fr 1fr 0.7fr;
  gap: 2px;
  background: var(--catalog-primary);
}

.catalog-social-cover-fallback span:nth-child(1) { background: rgba(255, 255, 255, 0.08); }
.catalog-social-cover-fallback span:nth-child(2) { background: rgba(var(--catalog-accent-rgb), 0.62); }
.catalog-social-cover-fallback span:nth-child(3) { background: rgba(255, 255, 255, 0.17); }

.catalog-social-cover-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 13, 20, 0.04), rgba(8, 13, 20, 0.44));
  pointer-events: none;
}

.catalog-social-cart {
  position: absolute;
  z-index: 2;
  top: 16px;
  right: 16px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 999px;
  background: rgba(20, 27, 38, 0.74);
  color: #ffffff;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.catalog-social-cart strong {
  min-width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--catalog-accent);
}

.catalog-social-profile-body {
  position: relative;
  padding: 74px clamp(16px, 5vw, 54px) 24px;
  text-align: center;
}

.catalog-social-avatar {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -50%);
  width: 132px;
  height: 132px;
  padding: 5px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(20, 30, 45, 0.2);
}

.catalog-social-avatar .catalog-logo {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 50%;
  box-shadow: none;
}

.catalog-social-label {
  color: var(--catalog-accent);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.catalog-social-name {
  margin: 5px 0 7px;
  color: var(--catalog-ink);
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.08;
}

.catalog-social-bio,
.catalog-social-headline {
  max-width: 620px;
  margin: 0 auto;
  color: var(--catalog-muted);
  font-size: 14px;
  line-height: 1.45;
}

.catalog-social-stats {
  display: flex;
  justify-content: center;
  gap: clamp(18px, 6vw, 54px);
  margin: 20px auto;
  padding: 14px 0;
  border-top: 1px solid var(--catalog-line);
  border-bottom: 1px solid var(--catalog-line);
}

.catalog-social-stats span,
.catalog-social-stats strong {
  display: block;
}

.catalog-social-stats span {
  color: var(--catalog-muted);
  font-size: 12px;
}

.catalog-social-stats strong {
  margin-bottom: 2px;
  color: var(--catalog-ink);
  font-size: 16px;
}

.catalog-social-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 0 auto 16px;
}

.catalog-social-action {
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--catalog-line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--catalog-ink);
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.catalog-social-action-primary {
  border-color: var(--catalog-primary);
  background: var(--catalog-primary);
  color: #ffffff;
}

.catalog-social-headline {
  padding-top: 2px;
  color: var(--catalog-ink);
  font-weight: 800;
}

.catalog-layout-social .catalog-shell {
  max-width: 980px;
  padding-top: 0;
}

.catalog-layout-social .catalog-toolbar {
  border-top: 1px solid var(--catalog-line);
}

.catalog-layout-social .catalog-products-social {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
}

.catalog-layout-social .catalog-product {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.catalog-layout-social .catalog-product-media {
  aspect-ratio: 1 / 1;
  border-radius: 0;
}

.catalog-layout-social .catalog-product-body {
  gap: 4px;
  padding: 9px 8px 11px;
}

.catalog-layout-social .catalog-product-category,
.catalog-layout-social .catalog-product-desc,
.catalog-layout-social .catalog-size-preview {
  display: none;
}

.catalog-layout-social .catalog-product-title {
  font-size: 13px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.catalog-layout-social .catalog-price {
  font-size: 16px;
}

.catalog-layout-social .catalog-add {
  width: auto;
  min-width: 0;
  height: 34px;
  padding: 0 9px;
  border-radius: 7px;
  font-size: 11px;
}

.catalog-layout-social .catalog-stock-badge {
  left: 6px;
  top: 6px;
  padding: 4px 6px;
  font-size: 9px;
}

@media (max-width: 1100px) {
  .catalog-layout-marketplace .catalog-products-grid,
  .catalog-layout-classifieds .catalog-products-list,
  .catalog-layout-boutique .catalog-products-boutique,
  .catalog-layout-boutique .catalog-products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .catalog-feature-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .catalog-social-profile {
    border: 0;
  }

  .catalog-social-cover {
    min-height: 220px;
  }

  .catalog-social-profile-body {
    padding: 66px 14px 18px;
  }

  .catalog-social-avatar {
    width: 112px;
    height: 112px;
  }

  .catalog-social-stats {
    gap: 14px;
    justify-content: space-around;
  }

  .catalog-layout-social .catalog-products-social {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3px;
  }

  .catalog-layout-social .catalog-product-body {
    padding: 7px 5px 9px;
  }

  .catalog-layout-social .catalog-price-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .catalog-layout-social .catalog-add {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .catalog-social-cover {
    min-height: 188px;
  }

  .catalog-social-cover-grid {
    grid-template-columns: 1fr 0.72fr;
  }

  .catalog-social-cart {
    top: 10px;
    right: 10px;
    min-height: 38px;
    padding: 0 11px;
  }

  .catalog-social-name {
    font-size: 24px;
  }

  .catalog-social-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .catalog-social-action {
    padding: 0 10px;
  }

  .catalog-social-stats span {
    font-size: 10.5px;
  }

  .catalog-social-stats strong {
    font-size: 14px;
  }

  .catalog-layout-social .catalog-products-social {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
  }
}

@media (max-width: 720px) {
  .catalog-deal-board,
  .catalog-editorial-stack {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  .catalog-editorial-tile,
  .catalog-editorial-tile:first-child {
    min-height: 150px;
    grid-row: auto;
  }

  .catalog-layout-marketplace .catalog-products-grid,
  .catalog-layout-classifieds .catalog-products-list,
  .catalog-layout-boutique .catalog-products-boutique,
  .catalog-layout-boutique .catalog-products-grid,
  .catalog-layout-showcase .catalog-products-showcase,
  .catalog-layout-showcase .catalog-products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .catalog-feature-row {
    grid-template-columns: 1fr;
  }

  .catalog-layout-classifieds .catalog-products-list .catalog-product-media {
    aspect-ratio: 1 / 0.92;
  }
}

@media (max-width: 430px) {
  .catalog-layout-marketplace .catalog-products-grid,
  .catalog-layout-classifieds .catalog-products-list,
  .catalog-layout-boutique .catalog-products-boutique,
  .catalog-layout-boutique .catalog-products-grid,
  .catalog-layout-showcase .catalog-products-showcase,
  .catalog-layout-showcase .catalog-products-grid {
    grid-template-columns: 1fr 1fr;
  }

  .catalog-layout-boutique .catalog-product-title,
  .catalog-layout-classifieds .catalog-product-title,
  .catalog-layout-marketplace .catalog-product-title {
    font-size: 13.5px;
  }
}

/* Final responsive polish for storefront templates */
.catalog-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0 14px;
}

.catalog-section-head-feature {
  margin-top: 2px;
}

.catalog-section-head small,
.catalog-section-head span {
  color: var(--catalog-muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.catalog-section-head h2 {
  margin: 2px 0 0;
  color: var(--catalog-ink);
  font-size: clamp(20px, 3vw, 28px);
  line-height: 1.05;
}

.catalog-layout-marketplace .catalog-section-head h2 {
  font-size: clamp(19px, 2.5vw, 25px);
}

.catalog-layout-boutique .catalog-section-head h2 {
  color: #3f1438;
  font-size: clamp(24px, 4vw, 34px);
  letter-spacing: 0;
}

.catalog-layout-marketplace .catalog-feature-card {
  border-radius: 12px;
}

.catalog-layout-boutique .catalog-feature-card {
  min-height: 190px;
  border-radius: 22px;
  box-shadow: none;
}

.catalog-layout-boutique .catalog-feature-card img {
  opacity: 0.78;
}

.catalog-layout-showcase .catalog-product-body {
  padding: 16px;
}

.catalog-layout-showcase .catalog-price {
  font-size: 22px;
}

.catalog-layout-classifieds .catalog-product-category {
  padding: 0;
  background: transparent;
  color: var(--catalog-muted);
  font-size: 11px;
}

@media (max-width: 860px) {
  .catalog-hero-inner,
  .catalog-layout-marketplace .catalog-hero-inner,
  .catalog-layout-classifieds .catalog-hero-inner,
  .catalog-layout-boutique .catalog-hero-inner,
  .catalog-layout-showcase .catalog-hero-inner {
    padding: 12px 12px 18px;
  }

  .catalog-topbar {
    gap: 10px;
    margin-bottom: 14px;
  }

  .catalog-brand {
    gap: 9px;
  }

  .catalog-logo {
    width: 46px;
    height: 46px;
    border-radius: 13px;
  }

  .catalog-store-name {
    max-width: 64vw;
    font-size: 17px;
  }

  .catalog-chip {
    min-height: 26px;
    padding: 4px 8px;
    font-size: 11px;
  }

  .catalog-title,
  .catalog-layout-marketplace .catalog-title,
  .catalog-layout-classifieds .catalog-title,
  .catalog-layout-boutique .catalog-title,
  .catalog-layout-showcase .catalog-title {
    max-width: 100%;
    font-size: clamp(25px, 8vw, 36px);
    line-height: 1.04;
  }

  .catalog-subtitle {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.38;
  }

  .catalog-kicker {
    margin-bottom: 6px;
    font-size: 11px;
  }

  .catalog-shell,
  .catalog-layout-marketplace .catalog-shell,
  .catalog-layout-classifieds .catalog-shell,
  .catalog-layout-boutique .catalog-shell,
  .catalog-layout-showcase .catalog-shell {
    padding: 10px;
  }

  .catalog-toolbar {
    top: 0;
    gap: 8px;
    padding: 8px 0;
    margin-top: 0;
  }

  .catalog-search input {
    min-height: 44px;
    padding-left: 40px;
    font-size: 14px;
  }

  .catalog-cart-button,
  .catalog-main-button {
    min-height: 44px;
  }

  .catalog-categories {
    gap: 7px;
    padding: 6px 0 12px;
  }

  .catalog-category {
    min-height: 34px;
    padding: 0 11px;
    font-size: 12px;
  }

  .catalog-deal-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .catalog-deal-card {
    min-height: 82px;
    padding: 10px;
    border-radius: 13px;
  }

  .catalog-deal-card span {
    font-size: 15px;
    line-height: 1.12;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .catalog-deal-card strong {
    font-size: 10px;
  }

  .catalog-editorial-stack {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 130px 130px;
    gap: 8px;
  }

  .catalog-editorial-tile:first-child {
    grid-row: span 2;
  }

  .catalog-classified-callout {
    padding: 14px;
    border-radius: 16px;
  }

  .catalog-classified-callout strong {
    font-size: 38px;
  }

  .catalog-classified-callout span {
    font-size: 15px;
  }

  .catalog-feature-row {
    display: flex;
    gap: 10px;
    margin: 0 -10px 16px;
    padding: 0 10px 4px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .catalog-feature-row::-webkit-scrollbar {
    display: none;
  }

  .catalog-feature-card {
    flex: 0 0 min(74vw, 280px);
    min-height: 116px;
    scroll-snap-align: start;
  }

  .catalog-layout-boutique .catalog-feature-card {
    min-height: 150px;
  }

  .catalog-section-head {
    align-items: start;
    margin: 8px 0 10px;
  }

  .catalog-section-head span {
    white-space: nowrap;
    font-size: 11px;
  }

  .catalog-products,
  .catalog-products-grid,
  .catalog-products-boutique,
  .catalog-products-showcase,
  .catalog-layout-marketplace .catalog-products-grid,
  .catalog-layout-classifieds .catalog-products-list,
  .catalog-layout-boutique .catalog-products-boutique,
  .catalog-layout-boutique .catalog-products-grid,
  .catalog-layout-showcase .catalog-products-showcase,
  .catalog-layout-showcase .catalog-products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .catalog-product {
    border-radius: 14px;
  }

  .catalog-product:hover {
    transform: none;
  }

  .catalog-product-media,
  .catalog-layout-marketplace .catalog-product-media,
  .catalog-layout-classifieds .catalog-products-list .catalog-product-media,
  .catalog-layout-showcase .catalog-product-media {
    aspect-ratio: 1 / 0.96;
    min-height: 0;
    border-radius: 13px 13px 0 0;
  }

  .catalog-layout-boutique .catalog-product-media {
    aspect-ratio: 1 / 1.18;
    border-radius: 16px;
  }

  .catalog-product-body,
  .catalog-layout-showcase .catalog-product-body,
  .catalog-products-list .catalog-product-body,
  .catalog-layout-classifieds .catalog-products-list .catalog-product-body {
    padding: 9px;
  }

  .catalog-layout-boutique .catalog-product-body {
    padding: 8px 1px 0;
  }

  .catalog-product-category {
    padding: 3px 6px;
    font-size: 9.5px;
  }

  .catalog-product-title,
  .catalog-products-list .catalog-product-title,
  .catalog-layout-showcase .catalog-product-title {
    font-size: 13.5px;
    line-height: 1.22;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .catalog-product-desc {
    display: none;
  }

  .catalog-size-preview {
    gap: 4px;
  }

  .catalog-size-preview span {
    padding: 3px 5px;
    font-size: 10px;
  }

  .catalog-price-row {
    gap: 6px;
  }

  .catalog-price,
  .catalog-layout-showcase .catalog-price {
    font-size: 16px;
  }

  .catalog-add {
    width: 100%;
    height: 36px;
    min-height: 36px;
    padding: 0 8px;
    border-radius: 11px;
    font-size: 12px;
  }

  .catalog-stock-badge {
    left: 6px;
    top: 6px;
    padding: 4px 6px;
    font-size: 10px;
  }

  .catalog-modal-panel {
    left: 0;
    right: 0;
    top: auto;
    bottom: 0;
    transform: none;
    width: 100%;
    max-height: 94vh;
    border-radius: 20px 20px 0 0;
  }

  .catalog-modal-head,
  .catalog-drawer-head {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 12px;
    background: #ffffff;
  }

  .catalog-product-detail {
    grid-template-columns: 1fr;
  }

  .catalog-detail-image {
    min-height: 0;
    aspect-ratio: 1 / 0.84;
  }

  .catalog-detail-content {
    padding: 14px;
  }

  .catalog-detail-content h2 {
    font-size: 24px;
    line-height: 1.04;
  }

  .catalog-detail-actions {
    grid-template-columns: 1fr;
  }

  .catalog-app-banner {
    align-items: stretch;
    flex-direction: column;
    padding: 14px;
    border-radius: 16px;
  }
}

@media (max-width: 380px) {
  .catalog-products,
  .catalog-products-grid,
  .catalog-products-boutique,
  .catalog-products-showcase,
  .catalog-layout-marketplace .catalog-products-grid,
  .catalog-layout-classifieds .catalog-products-list,
  .catalog-layout-boutique .catalog-products-boutique,
  .catalog-layout-boutique .catalog-products-grid,
  .catalog-layout-showcase .catalog-products-showcase,
  .catalog-layout-showcase .catalog-products-grid {
    gap: 7px;
  }

  .catalog-shell {
    padding: 8px;
  }

  .catalog-product-body,
  .catalog-layout-showcase .catalog-product-body,
  .catalog-products-list .catalog-product-body,
  .catalog-layout-classifieds .catalog-products-list .catalog-product-body {
    padding: 8px 7px;
  }

  .catalog-product-title,
  .catalog-products-list .catalog-product-title,
  .catalog-layout-showcase .catalog-product-title {
    font-size: 12.5px;
  }

  .catalog-price,
  .catalog-layout-showcase .catalog-price {
    font-size: 15px;
  }

  .catalog-add {
    font-size: 11.5px;
  }
}
