/* ============================================
   PRODUCTS PAGE — UX/4 Visual Improvements
   Professional, modern, sober POS/minimarket aesthetic
   Blue electric: primary interaction | Purple: secondary | Black/grey: structure
   Green: success only (sober) | Amber: warning | Red: error
   ============================================ */

/* ---------- PRODUCTS PAGE CONTAINER ---------- */
.products-page-form {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-4);
}

.products-page-title {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: var(--font-lg);
  letter-spacing: 0.04em;
  color: var(--color-text-primary);
  margin: 0 0 var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.products-page-title svg {
  color: var(--color-electric-blue);
}

/* ---------- PRODUCT FORM SECTIONS ---------- */
.product-form-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.product-form-section-title {
  font-family: var(--font-mono);
  font-size: var(--font-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  font-weight: 700;
  margin: 0 0 var(--space-2);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--color-border);
}

.product-extra-section {
  padding-top: var(--space-3);
  margin-top: var(--space-2);
  border-top: 1px dashed var(--color-border);
}

/* ---------- TYPE TABS ---------- */
.type-tabs {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.type-tab {
  flex: 1;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--font-xs);
  letter-spacing: 0.04em;
  cursor: pointer;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  transition: border-color var(--transition-normal), background var(--transition-normal), color var(--transition-normal);
  min-height: 40px;
}

.type-tab:hover {
  background: var(--color-info-bg);
  border-color: var(--color-electric-blue);
  color: var(--color-text-primary);
}

.type-tab:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.type-tab.active {
  background: var(--color-electric-blue);
  border-color: var(--color-electric-blue);
  color: #fff;
}

.type-tab svg {
  font-size: 14px;
}

/* ---------- FORM FIELDS ---------- */
.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.field > label {
  font-family: var(--font-mono);
  font-size: var(--font-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  font-weight: 600;
}

.field input,
.field select,
.field textarea {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: var(--space-2) var(--space-3);
  color: var(--color-text-primary);
  font-family: var(--font-ui);
  font-size: var(--font-base);
  outline: none;
  min-height: var(--control-h-md);
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--color-electric-blue);
  box-shadow: var(--ring-focus);
}

.field input:disabled,
.field select:disabled,
.field textarea:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--color-text-placeholder);
}

/* Select styling */
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23A0A0A0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-3) center;
  padding-right: var(--space-10);
}

.field select:focus {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230077FF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

/* Row layout */
.row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

@media (max-width: 640px) {
  .row2 {
    grid-template-columns: 1fr;
  }
}

/* Price with unit */
.price-with-unit {
  display: flex;
  gap: var(--space-2);
}

.price-with-unit input {
  flex: 1;
  min-width: 0;
}

.price-with-unit select {
  width: 72px;
  padding: var(--space-2) var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--font-xs);
  flex-shrink: 0;
}

/* Logo/image row */
.logo-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.product-img-preview,
.logo-preview {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-surface-hover);
}

/* Cost hint */
.cost-hint {
  font-family: var(--font-ui);
  font-size: var(--font-xs);
  color: var(--color-text-muted);
}

/* ---------- SAVE CATALOG ROW ---------- */
.save-catalog-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-xs);
  color: var(--color-text-muted);
  font-family: var(--font-ui);
}

.save-catalog-row input[type="checkbox"] {
  accent-color: var(--color-electric-blue);
  width: 16px;
  height: 16px;
}

/* ---------- PRODUCTS ACTION BAR ---------- */
.products-action-bar {
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--color-border);
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}

@media (min-width: 981px) {
  .products-action-bar {
    position: fixed;
    left: 236px;
    right: 0;
    bottom: 0;
    z-index: 5;
    box-shadow: 0 -10px 22px rgba(0,0,0,0.14);
  }
  body:has(#pageProductos:not([hidden])) #pageProductos {
    padding-bottom: 96px;
  }
}

@media (max-width: 980px) {
  .products-action-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(84px + env(safe-area-inset-bottom));
    z-index: 5;
    box-shadow: 0 -10px 22px rgba(0,0,0,0.18);
    padding-bottom: calc(var(--space-3) + env(safe-area-inset-bottom));
  }
  body:has(#pageProductos:not([hidden])) #pageProductos {
    padding-bottom: 150px;
  }
}

.products-save-btn {
  width: 100%;
  min-height: 48px;
  font-size: var(--font-sm);
}

@media (min-width: 641px) {
  .products-save-btn {
    width: auto;
    min-width: 220px;
  }
}

.products-form-msg {
  margin-top: var(--space-2);
  text-align: center;
  font-family: var(--font-mono);
  font-size: var(--font-xs);
  color: var(--color-text-muted);
}

/* ---------- CATALOG PANEL ---------- */
#pageProductos .history-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-6);
  margin-top: var(--space-4);
}

#pageProductos .history-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
  gap: var(--space-3);
}

#pageProductos .history-panel-head h3 {
  font-family: var(--font-mono);
  font-size: var(--font-sm);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-primary);
  margin: 0;
}

.history-head-actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

/* ---------- VIEW TABS ---------- */
.view-tabs {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin: var(--space-3) 0 var(--space-2);
}

.view-tab {
  background: var(--color-surface);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  padding: var(--space-2) var(--space-4);
  min-height: 38px;
  font-family: var(--font-mono);
  font-size: var(--font-xs);
  letter-spacing: 0.04em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  transition: border-color var(--transition-normal), background var(--transition-normal), color var(--transition-normal);
}

.view-tab:hover {
  border-color: var(--color-electric-blue);
  background: var(--color-surface-hover);
  color: var(--color-text-primary);
}

.view-tab:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.view-tab.active {
  background: var(--color-electric-blue);
  color: #fff;
  border-color: var(--color-electric-blue);
}

/* ---------- PENDIENTES RESUMEN ---------- */
.pendientes-resumen {
  font-family: var(--font-mono);
  font-size: var(--font-xs);
  color: var(--color-text-muted);
  margin: var(--space-2) 0;
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.pend-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-family: var(--font-mono);
  font-size: var(--font-xs);
  padding: 2px var(--space-2);
  border-radius: var(--radius-pill);
  background: var(--color-error-bg);
  color: var(--color-error);
  white-space: nowrap;
}

.pend-badge.amber {
  background: var(--color-warning-bg);
  color: var(--color-warning);
}

.pend-badge.red {
  background: var(--color-error-bg);
  color: var(--color-error);
}

.pend-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex: none;
}

.pend-dot.red {
  background: var(--color-error);
}

.pend-dot.amber {
  background: var(--color-warning);
}

/* ---------- CATALOG SEARCH ---------- */
.catalog-search-row {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

#productPageSearch {
  flex: 1;
  min-width: 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3) var(--space-2) var(--space-10);
  color: var(--color-text-primary);
  font-family: var(--font-ui);
  font-size: var(--font-base);
  outline: none;
  min-height: var(--control-h-lg);
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23707070' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: var(--space-3) center;
}

#productPageSearch:focus {
  border-color: var(--color-electric-blue);
  box-shadow: var(--ring-focus);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%230077FF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E");
}

#productPageSearch::placeholder {
  color: var(--color-text-placeholder);
}

/* ---------- CATEGORY CHIPS ---------- */
#productPageCategoryChips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.category-chip {
  background: var(--color-surface);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  padding: var(--space-1) var(--space-3);
  min-height: var(--control-h-sm);
  font-family: var(--font-mono);
  font-size: var(--font-xs);
  letter-spacing: 0.04em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  transition: border-color var(--transition-normal), background var(--transition-normal), color var(--transition-normal);
}

.category-chip:hover {
  border-color: var(--color-electric-blue);
  background: var(--color-surface-hover);
  color: var(--color-text-primary);
}

.category-chip:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.category-chip.active {
  background: var(--color-electric-blue);
  border-color: var(--color-electric-blue);
  color: #fff;
}

/* ---------- CATALOG COUNT ---------- */
.catalog-count {
  font-family: var(--font-mono);
  font-size: var(--font-xs);
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin: var(--space-2) 0;
}

/* ---------- PRODUCT CATALOG TABLE ---------- */
  #productPageList {
    display: table-row-group;
  }

  .catalog-row {
    transition: background var(--transition-fast);
  }

  .catalog-row:hover {
    background: var(--color-surface-hover);
  }

  .catalog-cell-thumb,
  .catalog-cell-name,
  .catalog-cell-price,
  .catalog-cell-stock,
  .catalog-cell-actions {
    padding: var(--space-2) var(--space-3);
    vertical-align: middle;
  }

  .catalog-cell-thumb {
    width: 60px;
    text-align: center;
  }

  .catalog-cell-thumb .chip-thumb,
  .catalog-cell-thumb .chip-thumb-placeholder {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: #fff;
    border: 1px solid var(--color-border);
  }

  .catalog-cell-name {
    font-weight: 600;
    color: var(--color-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 280px;
  }

  .catalog-cell-price {
    font-family: var(--font-mono);
    font-size: var(--font-base);
    font-weight: 700;
    color: var(--color-text-primary);
    white-space: nowrap;
  }

  .catalog-cell-stock .chip-stock {
    font-size: var(--font-xs);
    padding: 2px 6px;
  }

  .catalog-cell-actions {
    width: 1%;
    white-space: nowrap;
  }

  .catalog-row .chip-actions-toggle,
  .catalog-row .chip-edit,
  .catalog-row .chip-del,
  .catalog-row .chip-restock {
    min-width: 40px;
    min-height: 36px;
    padding: var(--space-1) var(--space-2);
  }

  /* ---------- PRODUCT CATALOG GRID (for inventory grid view) ---------- */
  #inventoryGrid {
    display: grid;
    gap: var(--space-3);
  }

  @media (min-width: 641px) and (max-width: 980px) {
    #inventoryGrid {
      grid-template-columns: repeat(2, 1fr);
    }
  }

  @media (min-width: 981px) {
    #inventoryGrid {
      grid-template-columns: repeat(3, 1fr);
    }
  }

/* ---------- CATALOG CHIP (product card) ---------- */
.catalog-chip {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color var(--transition-normal), transform var(--transition-normal), box-shadow var(--transition-normal);
}

.catalog-chip:hover {
  border-color: var(--color-electric-blue);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.catalog-chip:active {
  transform: translateY(0);
}

/* Thumbnail area */
.chip-thumb {
  width: 100%;
  height: 140px;
  object-fit: contain;
  background: #fff;
  border-bottom: 1px solid var(--color-border);
}

.catalog-chip:not(:has(.chip-thumb)) .chip-thumb-placeholder {
  width: 100%;
  height: 140px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: 32px;
  border-bottom: 1px solid var(--color-border);
}

/* Chip content */
.chip-add {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: var(--space-3);
  gap: var(--space-2);
  min-width: 0;
  background: none;
  border: none;
  color: var(--color-text-primary);
  cursor: pointer;
  text-align: left;
}

.chip-name {
  font-family: var(--font-ui);
  font-size: var(--font-sm);
  font-weight: 600;
  color: var(--color-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.chip-name > svg {
  flex-shrink: 0;
}

.chip-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding-top: var(--space-2);
  border-top: 1px solid var(--color-border);
  margin-top: auto;
}

.chip-price {
  font-family: var(--font-mono);
  font-size: var(--font-lg);
  font-weight: 700;
  color: var(--color-text-primary);
  white-space: nowrap;
}

.chip-stock {
  font-family: var(--font-mono);
  font-size: var(--font-xs);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: var(--color-surface-hover);
  color: var(--color-text-muted);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

.chip-stock.low {
  background: var(--color-warning-bg);
  color: var(--color-warning);
}

.chip-stock.zero {
  background: var(--color-error-bg);
  color: var(--color-error);
}

.chip-stock-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: var(--radius-pill);
}

.chip-stock-badge.normal {
  background: var(--color-success-green-bg);
  color: var(--color-success-green);
}

.chip-stock-badge.low {
  background: var(--color-warning-bg);
  color: var(--color-warning);
}

.chip-stock-badge.zero {
  background: var(--color-error-bg);
  color: var(--color-error);
}

/* Add button on card (for Caja) */
.chip-add-mark {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  background: var(--color-electric-blue);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  transition: background var(--transition-normal), transform var(--transition-fast), box-shadow var(--transition-normal);
  margin-left: auto;
}

.chip-add:hover .chip-add-mark {
  background: var(--color-electric-blue-light);
  box-shadow: var(--shadow-glow-blue);
  transform: scale(1.05);
}

.chip-add:active .chip-add-mark {
  transform: scale(0.98);
}

/* Pending badges row */
.chip-pend-row {
  width: 100%;
  padding: 0 var(--space-3) var(--space-2);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}

/* Actions toggle */
.chip-actions-toggle {
  width: 40px;
  min-width: 40px;
  min-height: var(--control-h-md);
  flex-shrink: 0;
  background: none;
  border: none;
  border-left: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-normal), color var(--transition-normal);
}

.chip-actions-toggle:hover,
.chip-actions-toggle[aria-expanded="true"] {
  background: var(--color-bg);
  color: var(--color-text-primary);
}

.chip-actions {
  flex: 1 1 100%;
  display: none;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-top: 1px dashed var(--color-border);
}

.catalog-chip.actions-open .chip-actions,
.catalog-row.actions-open .chip-actions {
  display: flex;
}

.chip-actions .chip-edit,
.chip-actions .chip-restock,
.chip-actions .chip-del {
  flex: 1;
  border: none;
  border-radius: var(--radius-sm);
  min-width: 44px;
  min-height: var(--control-h-md);
  background: var(--color-surface);
  color: var(--color-text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-normal), color var(--transition-normal);
}

.chip-actions .chip-edit:hover {
  background: var(--color-electric-blue);
  color: #fff;
}

.chip-actions .chip-restock:hover {
  background: var(--color-purple);
  color: #fff;
}

.chip-actions .chip-del:hover {
  background: var(--color-error);
  color: #fff;
}

/* Individual action buttons (for inline display) */
.chip-edit,
.chip-restock,
.chip-del {
  background: none;
  border: none;
  border-left: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: var(--font-sm);
  min-width: 44px;
  min-height: var(--control-h-md);
  padding: 0 var(--space-3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-normal), color var(--transition-normal);
}

.chip-edit:hover {
  color: #fff;
  background: var(--color-electric-blue);
}

.chip-restock:hover {
  color: #fff;
  background: var(--color-purple);
}

.chip-del:hover {
  color: #fff;
  background: var(--color-error);
}

.chip-edit svg,
.chip-restock svg,
.chip-del svg {
  font-size: 16px;
}

/* ---------- LOAD MORE BUTTON ---------- */
.load-more-btn {
  grid-column: 1 / -1;
  justify-self: center;
  background: var(--color-bg);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  min-height: var(--control-h-md);
  padding: var(--space-2) var(--space-5);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: var(--font-sm);
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background var(--transition-normal), border-color var(--transition-normal);
}

.load-more-btn:hover {
  background: var(--color-surface-hover);
  border-color: var(--color-electric-blue);
}

.load-more-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ---------- EMPTY STATE ---------- */
.catalog-empty {
  font-family: var(--font-mono);
  font-size: var(--font-sm);
  color: var(--color-text-muted);
  line-height: 1.5;
  text-align: center;
  padding: var(--space-6) var(--space-4);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 640px) {
  .products-page-form {
    padding: var(--space-4);
  }

  .products-page-title {
    font-size: var(--font-base);
  }

  .product-form-section-title {
    font-size: 10px;
  }

  .type-tab {
    padding: var(--space-1) var(--space-2);
    font-size: 10px;
    min-height: 36px;
  }

  .field input,
  .field select,
  .field textarea {
    font-size: var(--font-sm);
    min-height: var(--control-h-md);
  }

  .products-action-bar {
    padding: var(--space-3) var(--space-4);
  }

  .products-save-btn {
    width: 100%;
  }

  #pageProductos .history-panel {
    padding: var(--space-4);
  }

  #productPageSearch {
    min-height: var(--control-h-md);
    font-size: var(--font-sm);
  }

  .category-chip {
    min-height: 36px;
    padding: var(--space-1) var(--space-2);
    font-size: 10px;
  }

  #productPageList {
    grid-template-columns: 1fr;
  }

  .chip-thumb {
    height: 120px;
  }

  .chip-add {
    padding: var(--space-2);
  }

  .chip-name {
    font-size: var(--font-xs);
  }

  .chip-price {
    font-size: var(--font-base);
  }

  .chip-stock {
    font-size: 10px;
    padding: 1px 5px;
  }

  .chip-actions-toggle {
    width: 36px;
    min-width: 36px;
  }
}

@media (max-width: 480px) {
  .row2 {
    grid-template-columns: 1fr;
  }

  .price-with-unit select {
    width: 100%;
  }

  .chip-thumb {
    height: 100px;
  }

  .history-head-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .history-head-actions .key-small {
    width: 100%;
    justify-content: center;
  }
}

/* Print styles */
@media print {
  .products-page-form,
  .products-action-bar,
  .view-tabs,
  .catalog-search-row,
  #productPageCategoryChips,
  .catalog-count,
  .load-more-btn,
  .chip-actions-toggle,
  .chip-actions {
    display: none !important;
  }

  #productPageList {
    display: block !important;
  }

  .catalog-chip {
    break-inside: avoid;
    border: 1px solid var(--color-border);
    margin-bottom: var(--space-2);
  }
}