// ── Element IDs ──────────────────────────────────────────────

export const ELEMENT_IDS = {
  SPY_SHOP_BTN: 'autoshopee_spy_shop_btn',
  SPY_SEARCH_BTN: 'autoshopee_spy_search_btn',
  STATS_SEARCH: 'autoshopee_stats_search',
  PRODUCT_SEARCH: 'autoshopee_product_search',
  PRODUCT_SPY_DETAIL: 'autoshopee-product-spy-detail',
  PRODUCT_SPY_BUTTON: 'autoshopee-product-spy-button',
  PRODUCT_OPEN_BUTTON: 'autoshopee-product-open-button',
  PRODUCT_REVIEW_BUTTON: 'autoshopee-product-review-button',
  BTN_DOWNLOAD_IMAGE: 'autoshopee-btn-download-image',
  BULK_ACTION_BAR: 'autoshopee-bulk-action-bar',
};

// ── CSS Class Names ─────────────────────────────────────────

export const CSS_CLASSES = {
  COPY_BTN: 'autoshopee-copy-btn',
  SPY_ADS_BTN: 'autoshopee-spyads-btn',
  BID_ADS_BTN: 'autoshopee-bidads-btn',
  BULK_SELECT_WRAP: 'autoshopee-bulk-select-wrap',
  BULK_SELECT_CB: 'autoshopee-bulk-select-cb',
};

// ── CSS Selectors ───────────────────────────────────────────

export const SELECTORS = {
  SEARCH_HEADER: 'span.shopee-search-result-header__text',
  SEARCH_PRODUCT_LIST: 'section > ul > li > div > div > div > a.contents',
  SEARCH_ITEM_RESULT: 'ul.row.shopee-search-item-result__items',
  IMAGE_WRAPPER: 'div.relative.z-0.w-full',
  PRODUCT_ROOT: 'div.page-product__content > div.page-product__content--left > div.product-detail.page-product__detail',
  PRODUCT_REVIEW: 'div.product-rating-overview',
  PRODUCT_DETAIL_HEADING: 'div.page-product__content--left > div.product-detail.page-product__detail > section:nth-child(1) > h2',
  SHOP_SELECTION: '#sll2-pdp-product-shop > section',
  IMAGE_ROOT_IN_PRODUCT: 'div.DfREf5 > div > div.HHru-k > div.fS94mY > div',
  IMAGE_ROOT_IN_DESCRIPTION: 'div.page-product__content > div.page-product__content--left > div.product-detail.page-product__detail > div > div > div > div > div > div > img',
};

// ── Spy Button Styles ───────────────────────────────────────

export const SPY_BTN_BASE_STYLE = {
  position: 'fixed',
  right: '16px',
  top: '50%',
  transform: 'translateY(-50%)',
  zIndex: '9999',
  display: 'flex',
  flexDirection: 'row',
  alignItems: 'center',
  justifyContent: 'center',
  padding: '10px 18px',
  color: '#fff',
  background: 'linear-gradient(135deg, #3c00b1 0%, #7c3aed 100%)',
  borderRadius: '24px',
  cursor: 'pointer',
  border: '2px solid rgba(255,255,255,0.2)',
  boxShadow: '0 4px 14px rgba(60,0,177,0.55)',
  transition: 'all 0.2s ease',
  whiteSpace: 'nowrap',
};

export const SPY_BTN_HOVER_STYLE = {
  transform: 'translateY(-50%) scale(1.05)',
  boxShadow: '0 6px 20px rgba(60,0,177,0.7)',
};

export const SPY_BTN_NORMAL_STYLE = {
  transform: 'translateY(-50%) scale(1)',
  boxShadow: '0 4px 14px rgba(60,0,177,0.55)',
};

// ── Feature Toggles ────────────────────────────────────────

export const CONTENT_OPTIONS = {
  spyShopBtn: true,
  spySearchBtn: true,
  spyProductDetail: true,
  spyAds: true,
  cloneBtn: true,
  imageDownloader: true,
  floatSpySearchBtn: false,
  floatSpyShopBtn: false,
  bulkDownload: true,
};

// ── Bulk Download ───────────────────────────────────────────

export const BULK_DOWNLOAD = {
  softLimit: 30,
  fetchDelayMs: 2000,
  imageConcurrency: 4,
};

// ── Shop Page ───────────────────────────────────────────────

export const SHOP_RESERVED_SEGMENTS = [
  'search', 'buyer', 'cart', 'account', 'chat', 'order',
  'product', 'mall', 'voucher', 'blog', 'help',
];
