/* Site-specific overrides on top of Bulma. The bulk of styling comes
   from Bulma; this file holds a single brand color used across every
   storefront (legacy was uniform), the navbar logo sizing, and the
   centered auth-container layout. */

:root {
  --brand-primary: #1f4e79; /* Ligado-aligned navy */
}

/* Header / navbar */

.site-header {
  border-bottom: 1px solid #ebebeb;
}

.brand__logo {
  max-height: 40px;
  width: auto;
}

/* Logout button styled to match a navbar-item dropdown row. */

.navbar-logout-form { margin: 0; }

.navbar-logout-button {
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

/* Uniform row-action buttons for table rows. Apply on the <td>:
     <td class="row-actions">
       <a class="button is-small">Edit</a>
       <form>...<button class="button is-small is-danger is-light">Delete</button></form>
     </td>
   Inline-flex keeps form buttons and anchor buttons on the same
   baseline; gap gives consistent spacing regardless of mix. */

td.row-actions {
  text-align: right;
  white-space: nowrap;
  width: 1%; /* shrink to content so text columns get the slack */
}

td.row-actions > .row-actions__group {
  display: inline-flex;
  gap: 0.375rem;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: nowrap;
}

td.row-actions form {
  margin: 0;
  display: inline-flex;
}

td.row-actions .button {
  margin: 0;
}

/* Sortable table headers (table-tools.js). */

th[data-sort]:hover {
  background-color: rgba(0, 0, 0, 0.04);
}

.sort-arrow {
  font-size: 0.65em;
  margin-left: 0.35rem;
  color: var(--brand-primary);
  vertical-align: middle;
}

/* Admin dashboard cards. */

.dashboard-card-link {
  display: block;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.dashboard-card-link:hover .dashboard-card {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.dashboard-card {
  height: 100%;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.dashboard-card__head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.dashboard-card__title {
  font-weight: 600;
  color: #333;
}

.dashboard-card__value {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--brand-primary);
  margin-bottom: 0.75rem;
}

.dashboard-card__breakdown {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.85rem;
}

.dashboard-card__breakdown div {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Hub-page storefront list (bare-domain landing). */

.hub-storefront-list { list-style: none; margin-left: 0 !important; }
.hub-storefront-list li { padding: 0.35rem 0; }
.hub-storefront-list a { color: var(--brand-primary); text-decoration: none; }
.hub-storefront-list a:hover { text-decoration: underline; }

/* Auth container — centered narrow card-like layout used by login,
   forgot-password, reset-password, and admin/users/new. */

.auth-container {
  max-width: 460px;
  margin: 0 auto;
}

.auth-container > .title:first-child { margin-bottom: 0.5rem; }

/* Use the storefront's brand-primary color for the primary button
   instead of Bulma's default. Bulma 1's button.is-primary picks up
   --bulma-primary-* CSS vars; we just override the literal background
   for our common case (the "Sign in" / "Update password" / "Create
   user" CTAs). */

.button.is-primary,
.button.is-primary:hover,
.button.is-primary:focus {
  background-color: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #fff;
}

.button.is-primary:hover {
  filter: brightness(1.15);
}

/* Footer breathing room */

.site-footer {
  margin-top: auto;
  padding: 1.5rem;
}

/* Catalog grid + cards */

.card-link {
  display: block;
  color: inherit;
  text-decoration: none;
  height: 100%;
}

.product-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.card-link:hover .product-card {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

a.doc-card {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}
a.doc-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.product-card__image {
  background: #f8f8f8;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.product-card__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-card__placeholder {
  color: #aaa;
  font-size: 0.85rem;
  text-align: center;
  padding: 24px;
  width: 100%;
}

.product-detail__image {
  background: #f8f8f8;
  border-radius: 4px;
  overflow: hidden;
}

.product-detail__image img {
  width: 100%;
  height: auto;
  object-fit: contain;
  max-height: 480px;
}

.product-detail__image--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
}

.product-detail__thumbs .image img {
  border: 1px solid #eee;
  border-radius: 4px;
}

.product-detail__description {
  font-size: 0.95rem;
}

.product-detail__description table {
  font-size: 0.9rem;
}
