.mid-sales-nav {
  position: fixed; top: var(--mid-sales-nav-top, 145px); left: 0; right: 0; width: 100%; max-width: 520px; margin: auto; z-index: 19; display: flex; justify-content: center; gap: 15px;
  padding: 5px 10px; background: #121724; color: white;
}
.mid-sales-nav a { padding: 7px 14px; color: white; text-decoration: none; font-weight: 700; }
.mid-sales-nav a[aria-current="page"] { border-bottom: 3px solid #ff3f76; }
.mid-reel-product { display: grid; justify-items: start; gap: 5px; margin-bottom: 7px; color: white; }
.mid-reel-product strong { max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mid-reel-sale-label { background: #b71850; border-radius: 20px; padding: 4px 9px; font-size: 12px; font-weight: 750; }
.mid-reel-product-images { display: flex; gap: 5px; max-width: 100%; overflow-x: auto; pointer-events: auto; }
.mid-reel-product-images a { flex: 0 0 clamp(38px, 10vw, 68px); }
.mid-reel-product-images img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; border-radius: 8px; border: 1px solid #fff8; }
.mid-reel-buy { display: inline-block; pointer-events: auto; padding: 7px 12px; color: white !important; background: #b71850; border-radius: 18px; font-weight: 750; text-decoration: none; }
.short-sale-product { display: grid; gap: 7px; border: 1px solid #9b6074; border-radius: 12px; }
.short-sale-product[hidden] { display: none; }
.shop-mode-switch { display: flex; flex-direction: column; gap: 3px; font: 700 12px system-ui, sans-serif; }
.shop-mode-switch select { min-height: 38px; max-width: 150px; padding: 4px 9px; color: white !important; background: #1755ad !important; border-radius: 18px; }
[data-shop-mode="seller"] .shop-mode-switch select { background: #8a4d05 !important; }
[data-shop-mode="provider"] .shop-mode-switch select { background: #63249a !important; }
.shop-mode-banner { order: -1; padding: clamp(16px, 4vw, 28px); color: white; border-radius: 16px; margin-bottom: 12px; background: linear-gradient(120deg,#163c91,#512494); }
.shop-mode-banner h1,.shop-mode-banner p { color: white !important; margin: 0; }
.shop-mode-banner p { margin-top: 6px; }
[data-shop-mode="seller"] .shop-mode-banner { background: linear-gradient(120deg,#10449c,#5028ad); }
[data-shop-mode="provider"] .shop-mode-banner { background: linear-gradient(120deg,#351172,#852d9b); }
.shop-provider-links:not([hidden]) { display: grid; gap: 8px; padding: 0; position: static; }
.shop-provider-links a { min-height: 46px; padding: 12px 14px; background: #f4efff; color: #311760 !important; border-radius: 12px; font-weight: 750; text-decoration: none; }
.shop-provider-links a::after { content: '→'; float: right; }
.mid-shop[data-shop-mode="provider"] :is(.shops-toolbar, #marketGrid, .market-filters, #marketChips, #marketReviews, .market-top-actions),
.mid-shop[data-shop-mode="provider"] :is(.mid-seller-shops > section),
.mid-shop[data-shop-mode="seller"][data-shop-mine="0"] :is(#marketGrid, .market-filters, #marketChips, .mid-seller-shops > section),
.mid-shop[data-shop-mode="client"] :is(#marketProfileButton,#marketPublishButton,#marketReviews),
.mid-shop[data-shop-seller="0"] :is(#marketProfileButton,#marketPublishButton),
.shop-provider-links[hidden] { display: none !important; }
.mid-shop[data-shop-mode="client"] .shops-toolbar { margin-bottom: 12px; }
@media (max-width: 420px) {
  .mid-sales-nav { gap: 3px; }
  .mid-sales-nav a { padding-inline: 10px; }
}

.mid-record-menu {
  width: min(calc(100% - 28px),420px); padding: 18px; border: 1px solid #444051;
  border-radius: 20px; background: #15131e; color: white;
}
.mid-record-menu::backdrop { background: #0009; }
.mid-record-menu h2 { margin: 0 0 12px; color: white; }
.mid-record-menu button {
  display: block; width: 100%; min-height: 44px; margin: 5px 0; padding: 9px 12px;
  border: 0; border-radius: 11px; background: #31263f; color: white; text-align: left; font-weight: 700;
}
.mid-record-menu button[data-record="ad"] { background: #a61a50; }
.mid-record-menu button[data-record="close"] { background: transparent; }
.short-photo-previews { display: flex; flex-wrap: wrap; gap: 6px; }
.short-photo-previews:empty { display: none; }
.short-photo-previews img { width: 55px; height: 55px; object-fit: cover; border-radius: 7px; }
#shortUploadDialog.mid-ad-composer .short-source-choices {
  display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-bottom: 12px;
}
#shortUploadDialog.mid-ad-composer #shortSaleProduct { margin-top: 10px; }

html body .short-home #shortFeed .short-reel[data-short-sale] > :is(video,.short-start-cover) {
  inset: 0 0 auto !important; width: 100% !important; height: 51% !important; object-fit: cover !important;
}
html body .short-home #shortFeed .short-reel[data-short-sale] > .short-caption {
  top: auto !important; bottom: 49% !important; left: 7px; right: 57px;
  padding: 6px 8px;
}
.short-reel[data-short-sale] > .short-caption small { display: none; }
.short-reel[data-short-sale] > .short-caption p { margin: 3px 0 0; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.short-reel[data-short-sale] > .mid-reel-sale-label {
  position: absolute; top: 45px; left: 12px; z-index: 4; color: white; pointer-events: none;
}
.short-reel[data-short-sale] .mid-reel-product {
  position: absolute; inset: 51% 0 0 0; z-index: 3; display: flex; flex-direction: column; align-items: stretch;
  gap: 4px; padding: 6px 10px 8px; margin: 0; background: #141319; border-radius: 15px 15px 0 0;
}
html body .short-home #shortFeed .short-reel[data-short-sale] > :is(.short-actions,.video-engagement-bar) {
  top: auto !important; bottom: 50% !important; z-index: 5 !important; gap: 3px !important;
}
.mid-ad-gallery { min-height: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.mid-ad-gallery-stage { position: relative; min-height: 0; flex: 1; overflow: hidden; background: #24212a; border-radius: 9px; }
.mid-ad-gallery-stage img { display: block; width: 100%; height: 100%; object-fit: contain; }
.mid-ad-gallery-stage button,.mid-ad-gallery-count {
  position: absolute; padding: 3px 8px; color: white !important; background: #14131acc !important; border: 0 !important; border-radius: 999px;
}
.mid-ad-gallery-stage button { top: 50%; transform: translateY(-50%); min-height: 30px; }
.mid-ad-gallery-stage button[data-ad-step="-1"] { left: 5px; }
.mid-ad-gallery-stage button[data-ad-step="1"] { right: 5px; }
.mid-ad-gallery-count { bottom: 4px; right: 5px; font-size: 11px; }
.mid-ad-gallery-thumbs { display: flex; gap: 4px; }
.mid-ad-gallery-thumbs button {
  display: block; width: clamp(25px,9vw,45px); height: clamp(22px,7vh,40px);
  background: transparent !important; margin: 0; padding: 0 !important; min-height: 0 !important;
  border: 1px solid #666 !important; border-radius: 6px; overflow: hidden;
}
.mid-ad-gallery-thumbs button[aria-pressed="true"] { border: 2px solid #ff407c !important; }
.mid-ad-gallery-thumbs img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mid-ad-product-meta { display: flex; justify-content: space-between; gap: 7px; font-size: 13px; }
.mid-ad-product-meta small { flex-shrink: 0; }
.mid-ad-product-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.mid-ad-product-actions a {
  display: flex; align-items: center; justify-content: center; min-height: 32px; padding: 3px 5px;
  background: #43404c; color: white !important; border-radius: 9px; text-align: center; text-decoration: none; font: 750 12px system-ui,sans-serif;
}
.mid-ad-product-actions .mid-reel-buy { background: #b71850; }

/* Banner thumbnails preserve the full product photo instead of cropping to square. */
.mid-ad-gallery-thumbs button{height:auto;aspect-ratio:16/9}
.mid-ad-gallery-thumbs img{object-fit:contain;background:#24212a}
