/* Grid / table view switch and the table view of the collection. */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Toggle sits at the right of the "Browse by edit" row. */
#reset[hidden] + .view-toggle { margin-left: auto; }
.view-toggle {
  display: inline-flex; flex-shrink: 0;
  border: 1px solid #dfe1d6; border-radius: 4px; padding: 3px; gap: 2px;
}
.category-row .view-toggle button {
  display: inline-flex; align-items: center; gap: 7px;
  margin: 0; border: 0; border-radius: 3px; text-decoration: none;
  background: transparent; color: #5c6357;
  min-height: 38px; padding: 0 12px; font-size: 12px; font-weight: 500;
}
.view-toggle svg { width: 17px; height: 17px; flex-shrink: 0; }
.category-row .view-toggle button:hover { background: #eef0e8; color: #283729; }
.category-row .view-toggle button.active { background: #283729; color: #fff; }

/* Table */
.table-view { display: block; }
.scent-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.scent-table thead th {
  text-align: left; font-size: 10px; font-weight: 600; letter-spacing: 1.6px;
  text-transform: uppercase; color: #7d8276;
  padding: 0 14px 12px; border-bottom: 1px solid #283729;
}
.scent-table td { padding: 14px; border-bottom: 1px solid #e3e5dc; vertical-align: middle; }
.scent-table th:first-child, .scent-table td:first-child { padding-left: 4px; }
.scent-table th:last-child, .scent-table td:last-child { padding-right: 4px; text-align: right; width: 1%; }
.scent-table tbody tr { transition: background-color 150ms ease; }
.scent-table tbody tr:hover { background: #f1f2ec; }
.scent-table tr.is-selected { background: #eef2e6; }
.col-thumb { width: 1%; }
.scent-table td.col-thumb { padding-top: 10px; padding-bottom: 10px; }
.table-thumb {
  display: block; width: 56px; height: 56px; padding: 0; border: 0; border-radius: 4px;
  overflow: hidden; background: #ece9e3; cursor: pointer;
}
.table-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 60%; }
.col-code { color: #848a7d; font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; width: 1%; }
.table-name {
  display: block; background: none; border: 0; padding: 0; margin: 0 0 3px;
  font: inherit; font-size: 14px; font-weight: 550; color: #222820; text-align: left; cursor: pointer;
}
.table-name:hover { text-decoration: underline; text-underline-offset: 3px; }
.table-house { display: block; font-size: 11px; color: #7d8276; }
.table-meta { display: none; }
.col-edit, .col-for { color: #4e5648; }
.col-for { white-space: nowrap; }
.col-price { white-space: nowrap; font-weight: 500; }
.col-price small { color: #848a7d; font-weight: 400; margin-left: 4px; }
.col-add .add { width: 40px; height: 40px; }

/* Tablet: drop the edit column. */
@media (max-width: 900px) {
  .scent-table .col-edit { display: none; }
}
/* Phone: compact two-column list (fragrance details + select button). */
@media (max-width: 600px) {
  .scent-table thead { display: none; }
  .scent-table .col-code, .scent-table .col-for, .scent-table .col-price { display: none; }
  .scent-table td { padding: 14px 4px; }
  .scent-table td.col-thumb { padding: 12px 12px 12px 0; }
  .table-thumb { width: 64px; height: 64px; }
  .table-name { font-size: 15px; line-height: 1.35; }
  .table-house { font-size: 12px; margin-bottom: 4px; }
  .table-meta { display: block; font-size: 12px; color: #848a7d; }
  .col-add .add { width: 44px; height: 44px; }
  /* Give the edit dropdown room: the switch takes its own full-width row. */
  .category-row { flex-wrap: wrap; }
  .category-row .view-toggle, #reset[hidden] + .view-toggle { order: 3; width: 100%; margin-left: 0; }
  .category-row .view-toggle button { flex: 1; justify-content: center; min-height: 40px; }
}
