/* FactOffers Storefront Upgrade v4.0.0 (1-to-1 Preview Detail Sheet + Inline Quick Order) */

/* 0) Strict [hidden] safety so hidden pills/boxes NEVER leak */
[hidden],
.fo-autofill-btn[hidden],
.fo-inline-order[hidden],
.fo-detail-social[hidden],
.fo-img-vid-pill[hidden],
.fo-media-tabs[hidden],
#foShopHotSection[hidden] {
  display: none !important;
}

/* 1) Bottom safe area & distraction-free checkout */
#home {
  padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)) !important;
}

body.fo-checkout-open .bottom {
  display: none !important;
}

/* 2) Sleek Compact Hero Banner + 4-Column Trust Strip */
.fo-utility-v1b {
  padding: 4px 14px 4px !important;
  margin: 0 !important;
}

.fo-utility-v1b .fo-utility-banner-v1b {
  position: relative !important;
  background: linear-gradient(135deg, #1e293b 0%, #334155 56%, #9a3412 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 20px !important;
  padding: 14px 16px !important;
  min-height: 0 !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14) !important;
  overflow: hidden !important;
  display: block !important;
}

.fo-utility-v1b .fo-utility-banner-v1b::after {
  content: "" !important;
  position: absolute !important;
  top: -40px !important;
  left: -30px !important;
  width: 140px !important;
  height: 140px !important;
  border-radius: 999px !important;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.34), transparent 70%) !important;
  pointer-events: none !important;
}

.fo-utility-v1b .fo-utility-visual-v1b {
  display: none !important;
}

.fo-utility-v1b .fo-utility-copy-v1b {
  position: relative !important;
  z-index: 2 !important;
  width: 100% !important;
  max-width: 100% !important;
  text-align: right !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 5px !important;
}

.fo-utility-v1b .fo-utility-mini-v1b {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  padding: 3px 10px !important;
  border-radius: 999px !important;
  background: rgba(249, 115, 22, 0.22) !important;
  border: 1px solid rgba(251, 146, 60, 0.42) !important;
  color: #fed7aa !important;
  font-size: 10.5px !important;
  font-weight: 800 !important;
  margin: 0 !important;
}

.fo-utility-v1b .fo-utility-copy-v1b h1 {
  color: #ffffff !important;
  font-size: 16.5px !important;
  font-weight: 900 !important;
  line-height: 1.38 !important;
  margin: 2px 0 0 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18) !important;
}

.fo-utility-v1b .fo-utility-copy-v1b p {
  color: rgba(241, 245, 249, 0.86) !important;
  font-size: 11.5px !important;
  line-height: 1.45 !important;
  margin: 0 0 4px !important;
}

.fo-utility-v1b .fo-utility-button-v1b {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%) !important;
  color: #ffffff !important;
  border: 0 !important;
  border-radius: 12px !important;
  padding: 8px 16px !important;
  min-height: 36px !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  box-shadow: 0 6px 16px rgba(234, 88, 12, 0.34) !important;
  margin: 2px 0 0 !important;
}

.fo-utility-v1b .fo-benefits-v1b {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 6px !important;
  margin-top: 8px !important;
  padding: 0 !important;
}

.fo-utility-v1b .fo-benefit-v1b {
  background: #ffffff !important;
  border: 1px solid rgba(15, 23, 42, 0.06) !important;
  border-radius: 13px !important;
  padding: 7px 4px !important;
  gap: 4px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03) !important;
}

.fo-utility-v1b .fo-benefit-icon-v1b {
  width: 30px !important;
  height: 30px !important;
  border-radius: 9px !important;
  background: #fff7ed !important;
  color: #ea580c !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
}

.fo-utility-v1b .fo-benefit-icon-v1b svg {
  width: 16px !important;
  height: 16px !important;
}

.fo-utility-v1b .fo-benefit-v1b b {
  font-size: 10px !important;
  font-weight: 800 !important;
  color: #334155 !important;
  line-height: 1.25 !important;
  text-align: center !important;
  white-space: nowrap !important;
}

/* 3) Hot Instagram Carousel */
#foShopHotSection {
  margin: 10px 14px 4px;
  direction: rtl;
}

.fo-hot-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.fo-hot-title {
  font-size: 13.5px;
  font-weight: 900;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 5px;
}

.fo-hot-all-btn {
  border: 1px solid rgba(234, 88, 12, 0.24);
  background: #fff7ed;
  color: #c2410c;
  font-family: inherit;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
}

.fo-hot-rail {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 2px 2px 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.fo-hot-rail::-webkit-scrollbar {
  display: none;
}

.fo-hot-card {
  flex: 0 0 138px;
  scroll-snap-align: start;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  text-align: right;
  padding: 0;
  font-family: inherit;
}

.fo-hot-img-wrap {
  position: relative;
  width: 138px;
  height: 122px;
  background: #ffffff;
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fo-hot-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #ffffff;
  padding: 5px;
  box-sizing: border-box;
  display: block;
}

.fo-hot-pill {
  position: absolute;
  top: 6px;
  right: 6px;
  background: linear-gradient(135deg, #ea580c, #f97316);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(234, 88, 12, 0.30);
}

.fo-hot-vid {
  position: absolute;
  bottom: 6px;
  left: 6px;
  background: rgba(15, 23, 42, 0.78);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 999px;
}

.fo-hot-info {
  padding: 7px 8px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.fo-hot-name {
  font-size: 11px;
  font-weight: 800;
  color: #1e293b;
  line-height: 1.38;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 30px;
}

.fo-hot-price {
  font-size: 11.5px;
  font-weight: 900;
  color: #ea580c;
  margin-top: auto;
}

/* 4) Quick Category Chips Bar */
#foShopCatBar {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 4px 14px 8px;
  margin: 2px 0 2px;
  direction: rtl;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

#foShopCatBar::-webkit-scrollbar {
  display: none;
}

.fo-cat-chip {
  flex: 0 0 auto;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: #ffffff;
  color: #334155;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.fo-cat-chip.active {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(234, 88, 12, 0.25);
}

/* 5) Upgraded Product Grid Cards */
#grid {
  gap: 10px !important;
  padding: 4px 12px 14px !important;
}

#grid .shop-card.fo-card-v3 {
  background: #ffffff !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  border-radius: 18px !important;
  overflow: hidden !important;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05) !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 0 !important;
  transition: transform 0.14s ease, box-shadow 0.14s ease !important;
}

#grid .shop-card.fo-card-v3:active {
  transform: scale(0.985);
}

.shop-card-media {
  position: relative !important;
  aspect-ratio: 1 / 1 !important;
  background: #ffffff !important;
  border-bottom: 1px solid rgba(15, 23, 42, 0.05) !important;
  overflow: hidden !important;
  border-radius: 0 !important;
  margin: 0 !important;
}

.shop-card-media img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  object-position: center !important;
  background: #ffffff !important;
  padding: 6px !important;
  box-sizing: border-box !important;
  display: block !important;
}

.shop-card-media .shop-card-code {
  position: absolute !important;
  top: 7px !important;
  right: 7px !important;
  left: auto !important;
  bottom: auto !important;
  z-index: 4 !important;
  font-size: 9.5px !important;
  font-weight: 800 !important;
  padding: 2px 7px !important;
  min-height: 0 !important;
  height: auto !important;
  line-height: 1.45 !important;
  border-radius: 999px !important;
  background: rgba(248, 250, 252, 0.94) !important;
  border: 1px solid rgba(15, 23, 42, 0.09) !important;
  color: #475569 !important;
  backdrop-filter: blur(4px);
}

.shop-card-media .fo-card-heart {
  position: absolute !important;
  top: 7px !important;
  left: 7px !important;
  right: auto !important;
  bottom: auto !important;
  z-index: 5 !important;
  width: 28px !important;
  height: 28px !important;
  padding: 0 !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.92) !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
}

.shop-card-media .fo-card-video-badge {
  position: absolute !important;
  top: auto !important;
  bottom: 7px !important;
  right: 7px !important;
  left: auto !important;
  z-index: 5 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 3px !important;
  padding: 2px 7px !important;
  min-height: 0 !important;
  height: auto !important;
  border-radius: 999px !important;
  background: rgba(15, 23, 42, 0.80) !important;
  color: #ffffff !important;
  font-size: 9.5px !important;
  font-weight: 800 !important;
  line-height: 1.4 !important;
  backdrop-filter: blur(4px);
  box-shadow: none !important;
}

.fo-card-hot-badge {
  position: absolute !important;
  bottom: 7px !important;
  left: 7px !important;
  z-index: 5 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 2px !important;
  padding: 2px 7px !important;
  border-radius: 999px !important;
  background: linear-gradient(135deg, #ea580c 0%, #f97316 100%) !important;
  color: #ffffff !important;
  font-size: 9.5px !important;
  font-weight: 800 !important;
  line-height: 1.4 !important;
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.30);
  pointer-events: none;
}

.fo-card-v3 .shop-card-info {
  padding: 9px 10px 10px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  flex: 1 !important;
}

.fo-card-v3 .shop-card-title {
  font-size: 12px !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  line-height: 1.45 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  min-height: 34px !important;
  margin: 0 !important;
}

.fo-card-cod-line {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 800;
  color: #047857;
  background: #ecfdf5;
  border: 1px solid rgba(16, 185, 129, 0.18);
  padding: 2px 7px;
  border-radius: 8px;
  align-self: flex-start;
}

.fo-card-v3 .shop-card-bottom {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 6px !important;
  margin-top: auto !important;
  padding-top: 6px !important;
  border-top: 1px solid rgba(15, 23, 42, 0.05) !important;
}

.fo-card-v3 .shop-card-price {
  font-size: 12.5px !important;
  font-weight: 900 !important;
  color: #ea580c !important;
  white-space: nowrap !important;
  margin: 0 !important;
}

.fo-card-buy-btn {
  border: 0 !important;
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%) !important;
  color: #ffffff !important;
  font-family: inherit !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  padding: 5px 11px !important;
  border-radius: 10px !important;
  min-height: 28px !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  box-shadow: 0 3px 10px rgba(234, 88, 12, 0.24) !important;
  flex-shrink: 0 !important;
}

/* =====================================================================
   6) 1-TO-1 PREVIEW DETAIL SHEET (#detail)
   ===================================================================== */
#detail .product-modal-panel {
  border-radius: 26px 26px 0 0 !important;
  background: #ffffff !important;
}

#detail .product-modal-scroll {
  padding: 0 16px 18px !important;
  background: #ffffff !important;
}

#detail .product {
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Header: [X] right, Title centered, [♥] left (exact preview match) */
#detail .product-modal-head {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  padding: 6px 16px 10px !important;
  border-bottom: 0 !important;
  background: #ffffff !important;
}

#detail .product-modal-close {
  position: static !important;
  transform: none !important;
  order: 1 !important;
  margin: 0 !important;
  width: 38px !important;
  height: 38px !important;
  border-radius: 999px !important;
  background: #f1f5f9 !important;
  border: 0 !important;
  color: #0f172a !important;
  font-size: 20px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}

#detail .product-modal-heading {
  position: static !important;
  transform: none !important;
  order: 2 !important;
  flex: 1 !important;
  margin: 0 !important;
  font-size: 15.5px !important;
  font-weight: 900 !important;
  color: #0f172a !important;
  text-align: center !important;
}

.fo-detail-fav-btn {
  order: 3 !important;
  width: 38px !important;
  height: 38px !important;
  border-radius: 999px !important;
  background: #f1f5f9 !important;
  border: 0 !important;
  color: #94a3b8 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
  transition: transform 0.14s ease, background 0.14s ease, color 0.14s ease !important;
}

.fo-detail-fav-btn svg {
  width: 19px;
  height: 19px;
  fill: currentColor;
}

.fo-detail-fav-btn.liked {
  background: #fff1f2 !important;
  color: #e11d48 !important;
}

.fo-detail-fav-btn:active {
  transform: scale(0.92);
}

/* Segmented Media Tabs — ABOVE image (exact preview match) */
.fo-media-tabs {
  display: flex;
  gap: 6px;
  padding: 5px;
  background: #f1f5f9;
  border-radius: 16px;
  margin: 2px 0 12px;
}

.fo-media-tab {
  flex: 1;
  border: 0;
  background: transparent;
  color: #475569;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 800;
  padding: 9px 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.fo-media-tab.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

/* Product Image Box + Floating "▶ پخش ویدیو کوتاه" Pill */
#detail .product-image {
  position: relative !important;
  height: 220px !important;
  max-height: 220px !important;
  min-height: 0 !important;
  padding: 10px !important;
  background: #fffcf7 !important;
  border: 1px solid rgba(15, 23, 42, 0.06) !important;
  border-radius: 20px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 0 12px !important;
  overflow: hidden !important;
}

#detail .product-image[hidden] {
  display: none !important;
}

#detail #detailImage {
  max-height: 196px !important;
  max-width: 100% !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  border-radius: 12px !important;
}

.fo-img-vid-pill {
  position: absolute;
  bottom: 10px;
  left: 10px;
  z-index: 6;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.84);
  color: #ffffff;
  font-family: inherit;
  font-size: 11px;
  font-weight: 800;
  padding: 6px 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.22);
  backdrop-filter: blur(4px);
}

/* Video Box: clean inside tab without duplicate button */
#detailVideoBox {
  margin: 0 0 12px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

#detailVideoBox.fo-v2-tabs-active #detailVideoButton {
  display: none !important;
}

#detailVideoBox.fo-v2-hidden-box {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

#detailVideoPlayer {
  border-radius: 20px !important;
  overflow: hidden !important;
  background: #0f172a !important;
}

#detailVideoPlayer video.fo-detail-video {
  max-height: 300px !important;
  width: 100% !important;
  display: block !important;
}

/* Product Body Flex Hierarchy matching Preview 1-to-1 */
#detail .product-body {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* 1st: Video player slot (when video tab active) */
#detail #detailVideoBox {
  order: 1 !important;
}

/* 2nd: Status pill (right) + Code pill (left) — ABOVE Title! */
#detail .product-status-row {
  order: 2 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: nowrap !important;
  gap: 8px !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

#detail #detailStock {
  order: 1 !important;
  margin: 0 !important;
  padding: 5px 11px !important;
  border-radius: 999px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  background: #ecfdf5 !important;
  border: 1px solid rgba(16, 185, 129, 0.24) !important;
  color: #059669 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

#detail #detailStock.loading {
  background: #f8fafc !important;
  border-color: rgba(15, 23, 42, 0.10) !important;
  color: #64748b !important;
}

#detail #detailStock.out,
#detail #detailStock.unavailable,
#detail #detailStock.err {
  background: #fef2f2 !important;
  border-color: rgba(239, 68, 68, 0.24) !important;
  color: #dc2626 !important;
}

#detail .product-meta-row {
  order: 2 !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  flex-shrink: 0 !important;
}

#detail #detailCode {
  margin: 0 !important;
  padding: 5px 11px !important;
  border-radius: 999px !important;
  background: #f1f5f9 !important;
  border: 0 !important;
  color: #475569 !important;
  font-size: 11px !important;
  font-weight: 800 !important;
}

/* 3rd: Bold Product Title */
#detail #detailTitle {
  order: 3 !important;
  font-size: 16px !important;
  font-weight: 900 !important;
  line-height: 1.5 !important;
  margin: 0 !important;
  color: #0f172a !important;
  text-align: right !important;
}

/* 4th: Full-width Instagram Social Proof Banner */
.fo-detail-social {
  order: 4 !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 14px;
  background: #fff7ed;
  border: 1px solid rgba(251, 146, 60, 0.34);
  color: #c2410c;
  font-size: 12px;
  font-weight: 800;
}

.fo-detail-social-chip {
  background: #ffffff;
  color: #ea580c;
  border: 1px solid rgba(234, 88, 12, 0.20);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 900;
  white-space: nowrap;
  flex-shrink: 0;
}

/* 5th: Two-Column Info Cards (Payment Method + Category) */
.fo-detail-info-grid {
  order: 5 !important;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.fo-detail-info-card {
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 15px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: right;
}

.fo-detail-info-card small {
  font-size: 10.5px;
  font-weight: 700;
  color: #64748b;
}

.fo-detail-info-card strong {
  font-size: 12px;
  font-weight: 900;
  color: #0f172a;
}

/* 6th: Full-Width Direct Link Copy Bar */
.fo-detail-link-bar {
  order: 6 !important;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 13px;
  border-radius: 15px;
  background: #f8fafc;
  border: 1px solid rgba(15, 23, 42, 0.08);
  color: #0f172a;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.fo-detail-link-bar:active {
  background: #f1f5f9;
}

.fo-detail-link-url {
  direction: ltr;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 7th: Inline Quick Order Box (exact preview screenshot 88956 match!) */
.fo-inline-order {
  order: 7 !important;
  background: #fff9f2;
  border: 1.5px solid rgba(249, 115, 22, 0.34);
  border-radius: 20px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  animation: foInlineSlide 0.18s ease-out;
}

@keyframes foInlineSlide {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.fo-io-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}

.fo-io-title {
  font-size: 13px;
  font-weight: 900;
  color: #c2410c;
  display: flex;
  align-items: center;
  gap: 4px;
}

.fo-io-cancel {
  border: 0;
  background: transparent;
  color: #64748b;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 8px;
  cursor: pointer;
}

.fo-io-input,
.fo-io-textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1.5px solid rgba(234, 88, 12, 0.22);
  background: #ffffff;
  color: #0f172a;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 11px 13px;
  border-radius: 13px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.fo-io-input:focus,
.fo-io-textarea:focus {
  border-color: #f97316;
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.14);
}

.fo-io-input.ltr {
  direction: ltr;
  text-align: left;
  letter-spacing: 0.6px;
}

.fo-io-loc-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.fo-io-loc-row[hidden] {
  display: none !important;
}

.fo-io-submit {
  width: 100%;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 900;
  min-height: 46px;
  padding: 10px 14px;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(5, 150, 105, 0.28);
  transition: opacity 0.15s ease, transform 0.12s ease;
}

.fo-io-submit:disabled {
  opacity: 0.65;
  cursor: wait;
}

.fo-io-submit:active:not(:disabled) {
  transform: scale(0.99);
}

.fo-io-alt-btn {
  width: 100%;
  border: 0;
  background: transparent;
  color: #64748b;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 800;
  padding: 4px 6px 0;
  cursor: pointer;
  text-align: center;
}

.fo-io-success {
  text-align: center;
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}

.fo-io-success-icon {
  font-size: 40px;
  line-height: 1;
}

.fo-io-success h3 {
  margin: 0;
  font-size: 15.5px;
  font-weight: 900;
  color: #047857;
}

.fo-io-success p {
  margin: 0;
  font-size: 12px;
  color: #334155;
  line-height: 1.65;
}

/* 8th: Supplier Features (cleanly below inline order) */
#detail #detailFeatures {
  order: 8 !important;
  margin: 2px 0 4px !important;
}

/* Single-Row Sticky Action Footer matching Preview 1-to-1 */
#detail .product-modal-action {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)) !important;
  background: #ffffff !important;
  border-top: 1px solid rgba(15, 23, 42, 0.08) !important;
}

#detail #orderButton.btn.primary {
  order: 1 !important;
  flex: 1 1 auto !important;
  width: auto !important;
  margin: 0 !important;
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%) !important;
  border: 0 !important;
  color: #ffffff !important;
  font-size: 13.5px !important;
  font-weight: 900 !important;
  min-height: 48px !important;
  padding: 0 14px !important;
  border-radius: 16px !important;
  box-shadow: 0 8px 20px rgba(234, 88, 12, 0.28) !important;
  white-space: nowrap !important;
}

#detail #orderButton.btn.primary:disabled {
  opacity: 0.62 !important;
  box-shadow: none !important;
}

#detail .product-modal-price {
  order: 2 !important;
  flex: 0 0 auto !important;
  text-align: left !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  justify-content: center !important;
  min-width: 96px !important;
}

#detail .product-modal-price small {
  font-size: 10.5px !important;
  font-weight: 700 !important;
  color: #64748b !important;
  margin: 0 0 2px !important;
}

#detail #detailPrice.bigprice {
  font-size: 15px !important;
  font-weight: 900 !important;
  color: #0f172a !important;
  white-space: nowrap !important;
  line-height: 1.25 !important;
}

/* Fallback styles for #order1/#order2/#done if ever opened */
#order1 .btn.primary,
#order2 .btn.primary,
#done .btn.primary {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%) !important;
  border-color: transparent !important;
  color: #ffffff !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  min-height: 48px !important;
  border-radius: 14px !important;
  box-shadow: 0 10px 22px rgba(234, 88, 12, 0.28) !important;
}

.fo-autofill-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  align-self: flex-start;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid rgba(234, 88, 12, 0.28);
  background: #ffffff;
  color: #c2410c;
  font-family: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
