#adata-promo-wrap * {
    box-sizing: border-box;
}

#adata-promo-wrap {
    max-width: 1300px;
    margin: 2rem auto;
    padding: 0 1.25rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1f2937;
}

/* all remaining CSS */  
#adata-promo-wrap * {
    box-sizing: border-box;
  }
  
  #adata-promo-wrap {
    max-width: 1300px;
    margin: 2rem auto;
    padding: 0 1.25rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1f2937;
  }
  
  #adata-promo-wrap h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #111827;
  }

  /* Toolbar */
  .promo-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1.5rem;
  }
  
  #promo-search {
    width: 100%;
    padding: 0.55rem 2.2rem 0.55rem 0.9rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color .2s;
  }
  
  #promo-search:focus {
    border-color: #1da3dd;
  }
  
  .btn-download {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.2rem;
    background: #1da3dd;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    transition: background .2s;
  }
  
  .btn-download:hover {
    background: #0084b8;
  }

  /* Price range slider (logged in only) */
  .filter-stats-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin: 0 0 1.25rem 0;
    flex-wrap: wrap;
  }
  
  #promo-count {
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    background: #f9fafb;
    padding: 0.4rem 0.9rem;
    border-radius: 6px;
    white-space: nowrap;
  }
  
  .price-range-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #f9fafb;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    flex-wrap: wrap;
  }
  
  .price-range-labels {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
  }
  
  .price-range-slider-container {
    position: relative;
    width: 240px;
    height: 4px;
    background: #e5e7eb;
    border-radius: 4px;
  }
  
  .price-range-track {
    position: absolute;
    height: 4px;
    background: #1da3dd;
    border-radius: 4px;
  }
  
  .price-range-input {
    position: absolute;
    width: 100%;
    height: 4px;
    background: transparent;
    pointer-events: none;
    -webkit-appearance: none;
  }
  
  .price-range-input::-webkit-slider-thumb {
    pointer-events: auto;
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #1da3dd;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    cursor: pointer;
  }
  
  .price-range-input::-webkit-slider-thumb:hover {
    transform: scale(1.2);
  }
  
  .price-manual-inputs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  
  .price-manual-input {
    display: flex;
    align-items: center;
    gap: 0.25rem;
  }
  
  .price-manual-input span {
    font-size: 11px;
    font-weight: 600;
    color: #6b7280;
  }
  
  .price-manual-input input {
    width: 70px;
    padding: 0.25rem 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 12px;
    font-family: monospace;
    font-weight: 600;
    text-align: right;
    outline: none;
    transition: border-color .15s;
  }
  
  .price-manual-input input:focus {
    border-color: #1da3dd;
    box-shadow: 0 0 0 2px rgba(29,163,221,0.1);
  }
  
  .reset-price-btn {
    background: none;
    border: 1px solid #d1d5db;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    color: #6b7280;
    transition: all .15s;
    white-space: nowrap;
  }
  
  .reset-price-btn:hover {
    background: #fff;
    border-color: #1da3dd;
    color: #1da3dd;
  }

  /* Brand filter tags */
  #brand-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #f0f0f0;
  }
  
  .brand-tag {
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #374151;
    font-size: 12px;
    cursor: pointer;
    transition: all .15s;
    font-weight: 500;
  }
  
  .brand-tag:hover {
    border-color: #1da3dd;
    color: #1da3dd;
    background: #f0f9ff;
  }
  
  .brand-tag.active {
    background: #1da3dd;
    color: #fff;
    border-color: #1da3dd;
  }

  /* Guest banner */
  .guest-banner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1.2rem;
    margin-bottom: 1.5rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    font-size: 14px;
    color: #1e40af;
  }
  
  .guest-banner a {
    font-weight: 700;
    color: #1d4ed8;
    text-decoration: underline;
  }

  /* Table */
  #promo-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    border-radius: 8px;
    overflow: hidden;
  }
  
  #promo-table thead tr {
    background: #1da3dd;
  }
  
  #promo-table th {
    padding: 0.85rem 1rem;
    text-align: left;
    font-weight: 600;
    color: #fff;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .05em;
    white-space: nowrap;
    position: relative;
  }
  
  #promo-table th.sortable {
    cursor: pointer;
    user-select: none;
  }
  
  #promo-table th.sortable:hover {
    background: #0084b8;
  }
  
  #promo-table th .sort-icon {
    margin-left: 0.4rem;
    font-size: 10px;
    opacity: 0.8;
  }
  
  #promo-table th.sort-asc .sort-icon::after {
    content: '▲';
  }
  
  #promo-table th.sort-desc .sort-icon::after {
    content: '▼';
  }
  
  #promo-table th:not(.sort-asc):not(.sort-desc) .sort-icon::after {
    content: '⇅';
  }

  #promo-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
  }
  
  #promo-table tbody tr:hover {
    background: #fafafa;
  }

  /* Brand column */
  .brand-cell {
    width: 140px;
    min-width: 120px;
    text-align: center;
  }
  
  .brand-cell a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
  }
  
  .brand-cell img {
    width: 100px;
    height: 60px;
    object-fit: contain;
    display: block;
  }
  
  .brand-cell .brand-text {
    font-size: 12px;
    font-weight: 700;
    color: #374151;
  }

  /* SKU column */
  .sku-cell {
    width: 270px;
    min-width: 200px;
    white-space: normal;
  }

  .sku-copy {
    display: inline-flex;
    align-items: flex-start;
    gap: 0.3rem;
    font-family: monospace;
    font-size: 12px;
    color: #6b7280;
    cursor: pointer;
    padding: 0.25rem 0.45rem;
    border-radius: 4px;
    border: 1px dashed transparent;
    transition: all .15s;
    user-select: none;
    white-space: normal;
    word-break: break-word;
    line-height: 1.35;
    max-width: 250px;
  }
  
  .sku-copy:hover {
    border-color: #d1d5db;
    background: #f9fafb;
    color: #374151;
  }
  
  .sku-copy.sku-copied {
    border-color: #16a34a;
    background: #f0fdf4;
    color: #16a34a;
  }

  /* Description column — thumbnail inline */
  .desc-cell {
    color: #1f2937;
  }
  
  .desc-inner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
  }
  
  .desc-thumb {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    object-fit: contain;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #fff;
  }
  
  .desc-thumb-placeholder {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 18px;
  }
  
  .desc-text {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
  }

  /* Stock */
  .stock-cell {
    width: 130px;
    white-space: nowrap;
  }
  
  .stock-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
  }
  
  .stock-in {
    background: #dcfce7;
    color: #15803d;
  }
  
  .stock-low {
    background: #fef9c3;
    color: #854d0e;
  }
  
  .stock-out {
    background: #fee2e2;
    color: #b91c1c;
  }
  
  /* Login button for stock column - matching price button */
  .login-stock-btn {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: #1da3dd;
    color: #fff !important;
    border-radius: 6px;
    font-size: 12px;
    text-decoration: none !important;
    white-space: nowrap;
    font-weight: 600;
    transition: background .2s;
  }
  
  .login-stock-btn:hover {
    background: #0084b8;
  }

  /* Price */
  .price-cell-wrap {
    width: 130px;
    white-space: nowrap;
  }
  
  .price-val {
    font-weight: 700;
    color: #15803d;
    font-size: 15px;
  }
  
  .poa-val {
    color: #6b7280;
    font-style: italic;
  }
  
  .login-price-btn {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: #1da3dd;
    color: #fff !important;
    border-radius: 6px;
    font-size: 12px;
    text-decoration: none !important;
    white-space: nowrap;
    font-weight: 600;
    transition: background .2s;
  }
  
  .login-price-btn:hover {
    background: #0084b8;
  }

  /* View product */
  .action-cell {
    width: 120px;
  }
  
  .view-product-btn {
    display: inline-block;
    padding: 0.35rem 0.9rem;
    background: #fff;
    color: #1da3dd !important;
    border: 1px solid #1da3dd;
    border-radius: 6px;
    font-size: 12px;
    text-decoration: none !important;
    white-space: nowrap;
    font-weight: 600;
    transition: all .15s;
  }
  
  .view-product-btn:hover {
    background: #1da3dd;
    color: #fff !important;
  }

  #no-results {
    display: none;
    padding: 2rem;
    text-align: center;
    color: #9ca3af;
    font-size: 15px;
  }

  /* Pagination */
  #promo-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
  }

  .promo-page-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 0.6rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #fff;
    color: #374151;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all .15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .promo-page-btn:hover:not(:disabled) {
    border-color: #1da3dd;
    color: #1da3dd;
    background: #f0f9ff;
  }

  .promo-page-btn.active {
    background: #1da3dd;
    color: #fff;
    border-color: #1da3dd;
    font-weight: 700;
  }

  .promo-page-btn:disabled {
    opacity: 0.4;
    cursor: default;
  }

  .promo-page-info {
    font-size: 12px;
    color: #6b7280;
    margin: 0 0.5rem;
    white-space: nowrap;
  }

  /* Toast */
  #adata-copy-toast {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #1e293b;
    color: #fff;
    padding: 0.5rem 1.2rem;
    border-radius: 8px;
    font-size: 13px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s, transform .2s;
    z-index: 9999;
    white-space: nowrap;
  }
  
  #adata-copy-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }

  /* ── Mobile Responsive Accordion Overrides ── */
  
  /* Hidden by default on desktop */
  .control-col, 
  .control-cell {
    display: none;
    width: 44px;
    text-align: center;
    cursor: pointer;
  }
  
  .toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #1da3dd;
    color: white;
    font-weight: bold;
    font-size: 16px;
    line-height: 1;
    transition: background 0.2s;
  }
  
  /* Child Row Styling */
  .child-row {
    display: none;
    background: #f8fafc;
  }
  
  .child-row.open {
    display: table-row;
  }
  
  .child-row td {
    padding: 0.8rem 1rem !important;
    border-bottom: 2px solid #e5e7eb;
  }
  
  .mobile-details-list {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  
  .mobile-details-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e5e7eb;
    gap: 1rem;
    text-align: right;
  }
  
  .mobile-details-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }
  
  .mobile-details-label {
    font-weight: 600;
    color: #6b7280;
    font-size: 13px;
    text-align: left;
  }
  
  .main-row.open td {
    border-bottom: none;
  }

  @media (max-width: 768px) {
    #adata-promo-wrap {
      padding: 0 0.75rem;
    }
    
    .promo-toolbar {
      flex-direction: column;
      align-items: stretch;
    }
    
    .btn-download {
      justify-content: center;
    }
    
    .filter-stats-bar {
      flex-direction: column;
      align-items: stretch;
      gap: 1rem;
    }
    
    .price-range-bar {
      width: 100%;
      justify-content: space-between;
    }
    
    #promo-table th, 
    #promo-table td {
      padding: 0.5rem 0.4rem;
    }
    
    .control-col, 
    .control-cell {
      display: table-cell;
    }
    
    #promo-table th[data-col="brand"], 
    .brand-cell, 
    #promo-table th[data-col="sku"], 
    .sku-cell, 
    #promo-table th[data-col="stock"], 
    .stock-cell, 
    .action-col, 
    .action-cell {
      display: none !important;
    }
    
    .desc-thumb, 
    .desc-thumb-placeholder {
      width: 36px;
      height: 36px;
    }
    
    .desc-text {
      font-size: 13px;
    }
    
    .brand-cell img {
      width: 80px;
      height: 40px;
    }
  }