/* ============================================================================
   Price List Page — Clean, Compact Design
   ============================================================================ */

/* Page Layout */
.pl-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1rem 5rem;
}

/* ============================================================================
   Hero Header — "[Flag] [Warehouse] Price List"
   ============================================================================ */

.pl-hero {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--primary-100, #ccfbf1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.pl-hero-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.pl-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  background: var(--primary-600, #0d9488);
  color: #fff;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s;
}
.pl-download-btn:hover {
  background: var(--primary-700, #0f766e);
  color: #fff;
}
.pl-download-btn i {
  font-size: 1rem;
}

.pl-hero-flag {
  font-size: 2.5rem;
  line-height: 1;
}

.pl-hero h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--gray-900, #111827);
  margin: 0;
  line-height: 1.2;
}

.pl-hero p {
  font-size: 0.85rem;
  color: var(--gray-500, #6b7280);
  margin: 0.25rem 0 0;
  line-height: 1.4;
}

/* ============================================================================
   Warehouse Selector Strip
   ============================================================================ */

.pl-wh-strip {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1rem;
  background: var(--primary-50, #f0fdfa);
  border: 1px solid var(--primary-100, #ccfbf1);
  border-radius: 8px;
  margin-bottom: 1rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.pl-wh-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-600, #4b5563);
  white-space: nowrap;
  flex-shrink: 0;
}

.pl-wh-label i {
  color: var(--primary, #0d9488);
  margin-right: 4px;
}

.pl-wh-chips {
  display: flex;
  gap: 0.375rem;
  flex-shrink: 0;
}

.pl-wh-chip {
  padding: 0.25rem 0.625rem;
  background: var(--white, #fff);
  border: 1px solid var(--gray-200, #e5e7eb);
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--gray-700, #374151);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.pl-wh-chip:hover {
  border-color: var(--primary, #0d9488);
  color: var(--primary, #0d9488);
}

.pl-wh-chip.pl-wh-active {
  background: var(--primary, #0d9488);
  color: var(--white, #fff);
  border-color: var(--primary, #0d9488);
  font-weight: 600;
}

/* ============================================================================
   Controls — Filter Tabs + Search
   ============================================================================ */

.pl-controls {
  margin-bottom: 1rem;
}

.pl-filter-tabs {
  display: flex;
  gap: 0.375rem;
  margin-bottom: 0.625rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  flex-wrap: nowrap;
}

.pl-filter-tabs::-webkit-scrollbar { display: none; }

.pl-filter-btn {
  padding: 0.4rem 0.875rem;
  border: 1.5px solid var(--gray-300, #d1d5db);
  background: var(--white, #fff);
  color: var(--gray-600, #4b5563);
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}

.pl-filter-btn i {
  margin-right: 3px;
  font-size: 0.7rem;
}

.pl-filter-btn:hover {
  border-color: var(--primary, #0d9488);
  color: var(--primary, #0d9488);
}

.pl-filter-btn.active {
  background: var(--primary, #0d9488);
  color: var(--white, #fff);
  border-color: var(--primary, #0d9488);
}

.pl-search-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.pl-search-input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: 1.5px solid var(--gray-300, #d1d5db);
  border-radius: 6px;
  font-size: 0.85rem;
  font-family: inherit;
  transition: border-color 0.15s;
}

.pl-search-input:focus {
  outline: none;
  border-color: var(--primary, #0d9488);
  box-shadow: 0 0 0 2px var(--primary-50, #f0fdfa);
}

.pl-result-count {
  font-size: 0.78rem;
  color: var(--gray-500, #6b7280);
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ============================================================================
   Trust Strip
   ============================================================================ */

.pl-trust-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 0.625rem 1rem;
  margin-bottom: 1rem;
  background: var(--white, #fff);
  border: 1px solid var(--gray-200, #e5e7eb);
  border-radius: 8px;
}

.pl-trust-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gray-600, #4b5563);
  white-space: nowrap;
}

/* ============================================================================
   Prosperity Sale Strip
   ============================================================================ */

.pl-sale-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 0.5rem 1rem;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #fef2f2, #fff1f2);
  border: 1px solid #fecaca;
  border-radius: 8px;
}

.pl-sale-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #991b1b;
}

.pl-sale-tier {
  font-size: 0.78rem;
  color: #7f1d1d;
  background: rgba(255,255,255,0.6);
  padding: 2px 10px;
  border-radius: 100px;
}

.pl-sale-tier strong {
  color: #dc2626;
}

/* Popular Product Badge */
.pl-popular-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  color: #f59e0b;
  font-size: 0.7em;
}

.pl-row-popular {
  background: #fffbeb !important;
}

.pl-mobile-card-popular {
  border-left: 3px solid #f59e0b;
}

/* ============================================================================
   Desktop Table
   ============================================================================ */

.pl-mobile-only { display: none; }
.pl-desktop-only { display: block; }

.pl-table-wrapper {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--gray-200, #e5e7eb);
}

.pl-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white, #fff);
  table-layout: fixed;
}

/* Column widths */
.pl-table th:nth-child(1),
.pl-table td:nth-child(1) { width: 9%; }
.pl-table th:nth-child(2),
.pl-table td:nth-child(2) { width: 30%; }
.pl-table th.pl-col-spec,
.pl-table td.pl-col-spec { width: 17%; }
.pl-table th:nth-child(4),
.pl-table td:nth-child(4) { width: 11%; }
.pl-table th.pl-col-bulk,
.pl-table td.pl-col-bulk { width: 10%; }
.pl-table th.pl-col-stock,
.pl-table td.pl-col-stock { width: 11%; }
.pl-table th.pl-col-action,
.pl-table td.pl-col-action { width: 9%; }

.pl-table th {
  background: var(--gray-800, #1f2937);
  color: var(--white, #fff);
  padding: 0.625rem 0.75rem;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: none;
}

.pl-col-right { text-align: right !important; }
.pl-col-center { text-align: center !important; }

/* Category Headers */
.pl-cat-header {
  background: var(--primary, #0d9488) !important;
}

.pl-cat-header td {
  padding: 0.5rem 0.75rem;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--white, #fff);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.pl-cat-header:hover {
  background: var(--primary, #0d9488) !important;
}

.pl-cat-header i {
  margin-right: 6px;
  font-size: 0.85rem;
}

/* Product Rows */
.pl-row {
  border-bottom: 1px solid var(--gray-100, #f3f4f6);
  transition: background 0.1s;
}

.pl-row:nth-child(even) {
  background: var(--gray-50, #f9fafb);
}

.pl-row:hover {
  background: var(--primary-50, #f0fdfa);
}

.pl-row td {
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  color: var(--gray-800, #1f2937);
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pl-catno {
  font-weight: 600;
  color: var(--primary, #0d9488);
  text-decoration: none;
  font-size: 0.8rem;
}

.pl-catno:hover {
  text-decoration: underline;
}

.pl-name-link {
  color: var(--gray-900, #111827);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.85rem;
}

.pl-name-link:hover {
  color: var(--primary, #0d9488);
  text-decoration: underline;
}

.pl-spec {
  color: var(--gray-500, #6b7280);
  font-size: 0.8rem;
}

.pl-price {
  font-weight: 700;
  color: var(--gray-900, #111827);
  font-size: 0.85rem;
  white-space: nowrap;
}

.pl-price-contact {
  color: var(--primary, #0d9488);
  font-weight: 600;
  font-style: italic;
}

.pl-price-bulk {
  color: var(--gray-600, #4b5563);
  font-weight: 600;
  font-size: 0.82rem;
}

/* Raw Materials Tiered Pricing */
.pl-raw-tiers {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}
.pl-raw-tier {
  font-weight: 700;
  color: var(--gray-900, #111827);
  font-size: 0.83rem;
}
.pl-raw-tier-label {
  font-weight: 500;
  color: var(--gray-500, #6b7280);
  font-size: 0.75rem;
}
.pl-raw-sep {
  color: var(--gray-300, #d1d5db);
  font-size: 0.7rem;
}
.pl-mobile-raw-tiers {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
}
.pl-mobile-raw-tier {
  font-weight: 700;
  color: var(--gray-900, #111827);
  font-size: 0.78rem;
  white-space: nowrap;
}
.pl-mobile-raw-tier .pl-raw-tier-label {
  font-weight: 500;
  color: var(--gray-500, #6b7280);
  font-size: 0.68rem;
}

/* Stock Badge */
.pl-stock-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  background: #ecfdf5;
  color: #059669;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.pl-stock-badge i {
  font-size: 0.65rem;
}

.pl-stock-inline {
  color: #059669;
  font-weight: 600;
}

.pl-stock-inline i {
  font-size: 0.6rem;
}

/* Add to Cart Button */
.pl-add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-width: 44px;
  min-height: 44px;
  background: var(--primary, #0d9488);
  color: var(--white, #fff);
  border: none;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s;
}

.pl-add-btn:hover {
  background: var(--primary-dark, #0f766e);
  transform: scale(1.05);
}

/* Mobile Add to Cart Button */
.pl-mobile-add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--primary, #0d9488);
  color: var(--white, #fff);
  border: none;
  border-radius: 6px;
  font-size: 0.7rem;
  cursor: pointer;
  transition: all 0.15s;
  margin-top: 4px;
  flex-shrink: 0;
}

.pl-mobile-add-btn:hover {
  background: var(--primary-dark, #0f766e);
}

.pl-mobile-add-btn:active {
  transform: scale(0.92);
}

/* No Results */
.pl-no-results {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--gray-500, #6b7280);
  font-size: 0.9rem;
}

/* ============================================================================
   Mobile Cards
   ============================================================================ */

.pl-mobile-cards {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--gray-200, #e5e7eb);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.pl-mobile-cat-header {
  background: var(--primary, #0d9488);
  color: var(--white, #fff);
  padding: 0.5rem 0.75rem;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.pl-mobile-cat-header:first-child { margin-top: 0; }
.pl-mobile-cat-header .fas { margin-right: 6px; font-size: 0.75rem; }

.pl-mobile-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--gray-100, #f3f4f6);
  background: var(--white, #fff);
  text-decoration: none;
  color: inherit;
  gap: 0.5rem;
  min-height: 44px;
}

.pl-mobile-card:nth-child(even) {
  background: var(--gray-50, #f9fafb);
}

.pl-mobile-card:active {
  background: var(--primary-50, #f0fdfa);
}

.pl-mobile-card-left {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.pl-mobile-card-name {
  display: block;
  font-weight: 600;
  color: var(--gray-900, #111827);
  font-size: 0.85rem;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pl-mobile-card-spec {
  display: block;
  font-size: 0.7rem;
  color: var(--gray-400, #9ca3af);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pl-mobile-card-right {
  flex-shrink: 0;
  text-align: right;
}

.pl-mobile-card-price {
  display: block;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--gray-900, #111827);
  white-space: nowrap;
}

.pl-mobile-card-bulk {
  display: block;
  font-size: 0.68rem;
  color: #16a34a;
  font-weight: 600;
  margin-top: 1px;
  white-space: nowrap;
}

/* ============================================================================
   Sticky Cart Bar
   ============================================================================ */

.pl-cart-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 900;
  background: var(--white, #fff);
  border-top: 2px solid var(--primary, #0d9488);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
}

.pl-cart-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.625rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.pl-cart-bar-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-800, #1f2937);
}

.pl-cart-bar-info i {
  color: var(--primary, #0d9488);
}

.pl-cart-bar-actions {
  display: flex;
  gap: 0.5rem;
}

.pl-cart-bar-btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
  white-space: nowrap;
}

.pl-cart-bar-view {
  background: var(--gray-100, #f3f4f6);
  color: var(--gray-700, #374151);
}

.pl-cart-bar-view:hover {
  background: var(--gray-200, #e5e7eb);
}

.pl-cart-bar-checkout {
  background: var(--primary, #0d9488);
  color: var(--white, #fff);
}

.pl-cart-bar-checkout:hover {
  background: var(--primary-dark, #0f766e);
}

/* ============================================================================
   Badges (used in some legacy elements)
   ============================================================================ */

.pl-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.pl-badge-popular {
  background: var(--primary, #0d9488);
  color: var(--white, #fff);
}

.pl-badge-new {
  background: #7c3aed;
  color: var(--white, #fff);
}

.pl-badge-value {
  background: #f59e0b;
  color: var(--white, #fff);
}

/* ============================================================================
   Responsive — Tablet (max 1023px)
   ============================================================================ */

@media (max-width: 1023px) {
  .pl-table {
    table-layout: auto;
  }

  .pl-col-spec { display: none; }
  .pl-col-stock { display: none; }

  .pl-table th:nth-child(1),
  .pl-table td:nth-child(1) { width: auto; }
  .pl-table th:nth-child(2),
  .pl-table td:nth-child(2) { width: auto; }
  .pl-table th:nth-child(4),
  .pl-table td:nth-child(4) { width: auto; }
  .pl-table th.pl-col-bulk,
  .pl-table td.pl-col-bulk { width: auto; }
  .pl-table th.pl-col-action,
  .pl-table td.pl-col-action { width: auto; }
}

/* ============================================================================
   Responsive — Mobile (max 768px)
   ============================================================================ */

@media (max-width: 768px) {
  .pl-mobile-only { display: block; }
  .pl-desktop-only { display: none; }

  .pl-page {
    padding: 1rem 0.5rem 4.5rem;
  }

  .pl-hero {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    flex-wrap: wrap;
  }

  .pl-hero-flag {
    font-size: 2rem;
  }

  .pl-hero h1 {
    font-size: 1.25rem;
  }

  .pl-hero p {
    font-size: 0.75rem;
  }

  .pl-download-btn {
    padding: 0.5rem 0.9rem;
    font-size: 0.78rem;
  }

  .pl-wh-strip {
    padding: 0.5rem 0.625rem;
    margin-bottom: 0.75rem;
    gap: 0.5rem;
  }

  .pl-wh-label {
    font-size: 0.72rem;
  }

  .pl-wh-chip {
    padding: 0.2rem 0.5rem;
    font-size: 0.72rem;
  }

  .pl-controls {
    margin-bottom: 0.75rem;
  }

  .pl-trust-strip {
    gap: 0.75rem 1.25rem;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.75rem;
  }

  .pl-trust-item {
    font-size: 0.72rem;
  }

  .pl-sale-strip {
    gap: 0.5rem 1rem;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.75rem;
  }

  .pl-sale-label {
    font-size: 0.72rem;
    width: 100%;
    text-align: center;
  }

  .pl-sale-tier {
    font-size: 0.7rem;
  }

  .pl-filter-btn {
    padding: 0.35rem 0.625rem;
    font-size: 0.75rem;
    min-height: 36px;
  }

  .pl-search-input {
    padding: 0.5rem 0.625rem;
    font-size: 0.85rem;
    min-height: 40px;
  }

  .pl-result-count {
    font-size: 0.72rem;
  }

  .pl-cart-bar-view { display: inline-flex; }

  .pl-cart-bar {
    bottom: 64px; /* above mobile bottom nav */
  }

  .pl-cart-bar-inner {
    padding: 0.5rem 0.625rem;
    gap: 0.5rem;
  }

  .pl-cart-bar-info {
    font-size: 0.78rem;
    flex: 1;
    min-width: 0;
  }

  .pl-cart-bar-btn {
    padding: 0.5rem 0.875rem;
    font-size: 0.78rem;
  }
}

/* ============================================================================
   Responsive — Small Mobile (max 480px)
   ============================================================================ */

@media (max-width: 480px) {
  .pl-page {
    padding: 0.75rem 0.375rem 4rem;
  }

  .pl-hero-flag {
    font-size: 1.75rem;
  }

  .pl-hero h1 {
    font-size: 1.1rem;
  }

  .pl-hero p {
    font-size: 0.7rem;
  }

  .pl-hero {
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
  }

  .pl-wh-strip {
    padding: 0.375rem 0.5rem;
    margin-bottom: 0.5rem;
  }

  .pl-wh-label {
    font-size: 0.68rem;
  }

  .pl-wh-chip {
    padding: 0.175rem 0.375rem;
    font-size: 0.68rem;
  }

  .pl-controls {
    margin-bottom: 0.5rem;
  }

  .pl-filter-btn {
    padding: 0.3rem 0.5rem;
    font-size: 0.7rem;
    min-height: 32px;
  }

  .pl-filter-btn i {
    display: none;
  }

  .pl-search-row {
    gap: 0.5rem;
  }

  .pl-search-input {
    padding: 0.4rem 0.5rem;
    font-size: 0.82rem;
    min-height: 36px;
  }

  .pl-mobile-card {
    padding: 0.4rem 0.5rem;
    min-height: 40px;
  }

  .pl-mobile-card-name {
    font-size: 0.8rem;
  }

  .pl-mobile-card-spec {
    font-size: 0.65rem;
  }

  .pl-mobile-card-price {
    font-size: 0.82rem;
  }

  .pl-mobile-card-bulk {
    font-size: 0.62rem;
  }

  .pl-mobile-cat-header {
    padding: 0.4rem 0.5rem;
    font-size: 0.72rem;
  }

  .pl-cart-bar-inner {
    padding: 0.4rem 0.5rem;
  }

  .pl-cart-bar-info {
    font-size: 0.72rem;
  }

  .pl-cart-bar-btn {
    padding: 0.4rem 0.625rem;
    font-size: 0.72rem;
  }
}

/* ============================================================================
   Responsive — Extra Small (max 359px)
   ============================================================================ */

@media (max-width: 359px) {
  .pl-hero-flag {
    font-size: 1.5rem;
  }

  .pl-hero h1 {
    font-size: 1rem;
  }

  .pl-hero p {
    font-size: 0.65rem;
  }

  .pl-wh-strip {
    flex-wrap: wrap;
    gap: 0.25rem;
  }

  .pl-wh-chip {
    font-size: 0.62rem;
    padding: 0.15rem 0.3rem;
  }

  .pl-cart-bar-btn {
    padding: 0.35rem 0.5rem;
    font-size: 0.65rem;
  }
}

/* ============================================================================
   Print
   ============================================================================ */

@media print {
  .pl-controls,
  .pl-wh-strip,
  .pl-cart-bar,
  .pl-col-action {
    display: none;
  }

  .pl-table-wrapper {
    box-shadow: none;
    border: 1px solid #ccc;
  }

  .pl-row:hover {
    background: inherit;
  }
}

/* ============================================================================
   Focus States
   ============================================================================ */

.pl-filter-btn:focus,
.pl-search-input:focus {
  outline: 2px solid var(--primary, #0d9488);
  outline-offset: 2px;
}

.pl-catno:focus,
.pl-name-link:focus {
  outline: 2px solid var(--primary, #0d9488);
  outline-offset: 1px;
  border-radius: 2px;
}
