/* Theme A – components (buttons, cards, forms, drawers, rails) */

/* ---------- Buttons: .a-btn + --primary / --ghost, sizes --sm / --block ---------- */
.a-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--a-space-2);
  min-block-size: 44px;
  padding-block: var(--a-space-2);
  padding-inline: var(--a-space-5);
  border: 1px solid transparent;
  border-radius: var(--a-radius-pill);
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.a-btn:hover {
  text-decoration: none;
}
.a-btn--primary {
  background: var(--a-brand);
  color: var(--a-on-brand);
}
.a-btn--primary:hover {
  opacity: 0.9;
}
.a-btn--ghost {
  border-color: var(--a-line);
  background: var(--a-bg);
  color: var(--a-ink);
}
.a-btn--ghost:hover {
  border-color: var(--a-ink);
}
.a-btn--sm {
  min-block-size: 40px;
  padding-block: var(--a-space-1);
  padding-inline: var(--a-space-4);
  font-size: var(--a-text-sm);
}
.a-btn--block {
  display: flex;
  inline-size: 100%;
}
.a-btn:disabled,
.a-btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
}
.a-btn svg {
  flex: none;
}

/* ---------- Rail: horizontal, swipeable list (minimal.js wires the arrow buttons) ---------- */
.a-rail {
  position: relative;
}
.a-rail__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 46%;
  gap: var(--a-space-3);
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.a-rail__track::-webkit-scrollbar {
  display: none;
}
.a-rail__item {
  min-inline-size: 0;
  scroll-snap-align: start;
}
.a-rail__btn {
  display: none;
}
@media (min-width: 768px) {
  .a-rail__track {
    grid-auto-columns: 31%;
    gap: var(--a-space-4);
  }
}
@media (min-width: 1024px) {
  .a-rail__track {
    grid-auto-columns: 23%;
    gap: var(--a-space-5);
  }
  /* The arrows sit above the track at its end edge, on the line of the section title, so they
     never cover a card and never stick out of the container (no horizontal page scroll). */
  .a-rail__btn {
    position: absolute;
    inset-block-end: calc(100% + var(--a-space-3));
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    inline-size: 40px;
    block-size: 40px;
    padding: 0;
    border: 1px solid var(--a-line);
    border-radius: 50%;
    background: var(--a-bg);
    color: var(--a-ink);
    font-size: 1.375rem;
    line-height: 1;
  }
  .a-rail__btn--prev {
    inset-inline-end: calc(40px + var(--a-space-2));
  }
  .a-rail__btn--next {
    inset-inline-end: 0;
  }
  .a-rail__btn:hover {
    border-color: var(--a-ink);
  }
  /* a long title in the head wraps before it reaches the arrows */
  :where(.a-section__head, .section-head):has(+ .a-rail) {
    padding-inline-end: calc(80px + var(--a-space-2) + var(--a-space-4));
  }
}

/* ---------- Form controls ---------- */
.a-input,
.a-select {
  min-block-size: 44px;
  max-inline-size: 100%;
  padding-block: var(--a-space-2);
  padding-inline: var(--a-space-4);
  border: 1px solid var(--a-line);
  border-radius: var(--a-radius-pill);
  background: var(--a-bg);
  color: var(--a-ink);
  font-size: var(--a-text-sm);
  transition: border-color 0.15s ease;
}
.a-input:focus,
.a-select:focus {
  border-color: var(--a-ink);
}
.a-input::placeholder {
  color: var(--a-muted);
  opacity: 1;
}
.a-select {
  padding-inline: var(--a-space-3) var(--a-space-2);
  cursor: pointer;
}
.a-select--sm {
  min-block-size: 40px;
  padding-block: var(--a-space-1);
}
.a-field {
  display: grid;
  gap: var(--a-space-1);
}
.a-field__label {
  font-size: var(--a-text-sm);
  font-weight: 600;
}
.a-check {
  display: flex;
  align-items: center;
  gap: var(--a-space-2);
  min-block-size: 40px;
  font-size: var(--a-text-sm);
  cursor: pointer;
}
.a-check input {
  flex: none;
  inline-size: 18px;
  block-size: 18px;
  margin: 0;
  accent-color: var(--a-brand);
  cursor: pointer;
}
.a-swatch {
  flex: none;
  inline-size: 18px;
  block-size: 18px;
  border: 1px solid var(--a-line);
  border-radius: 50%;
}

/* ---------- Pills (subcategory row) ---------- */
.stsg-subcat-pills {
  margin-block-end: var(--a-space-5);
}
.stsg-subcat-pills ul {
  display: flex;
  gap: var(--a-space-2);
  margin: 0;
  padding: 0;
  overflow-x: auto;
  list-style: none;
  scrollbar-width: none;
}
.stsg-subcat-pills ul::-webkit-scrollbar {
  display: none;
}
.stsg-subcat-pills li {
  flex: none;
}
.stsg-subcat-pills a {
  display: inline-flex;
  align-items: center;
  min-block-size: 40px;
  padding-inline: var(--a-space-4);
  border: 1px solid var(--a-line);
  border-radius: var(--a-radius-pill);
  background: var(--a-bg);
  font-size: var(--a-text-sm);
  white-space: nowrap;
}
.stsg-subcat-pills a:hover {
  border-color: var(--a-ink);
  text-decoration: none;
}
.stsg-subcat-pills a.is-active {
  border-color: var(--a-brand);
  background: var(--a-brand);
  color: var(--a-on-brand);
}

/* ---------- Breadcrumb ---------- */
.breadcrumb ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--a-space-1) 0;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--a-muted);
  font-size: var(--a-text-sm);
  line-height: 1.4;
}
.breadcrumb li {
  display: inline-flex;
  align-items: center;
  min-inline-size: 0;
}
.breadcrumb a {
  display: inline-flex;
  align-items: center;
  min-block-size: 32px;
}
.breadcrumb a:hover {
  color: var(--a-ink);
}
.breadcrumb .delimiter {
  margin-inline: var(--a-space-2);
  color: var(--a-line);
}
.breadcrumb .current-item {
  color: var(--a-ink);
  font-weight: 500;
  overflow-wrap: anywhere;
}

/* ---------- Pager (core Html.Pager markup); 40px touch targets ---------- */
.pager ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--a-space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}
.pager li a,
.pager li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-inline-size: 40px;
  min-block-size: 40px;
  padding-inline: var(--a-space-3);
  border: 1px solid var(--a-line);
  border-radius: var(--a-radius-pill);
  background: var(--a-bg);
  color: var(--a-ink);
  font-size: var(--a-text-sm);
  font-weight: 500;
}
.pager li a:hover {
  border-color: var(--a-ink);
  text-decoration: none;
}
.pager li.current-page span {
  border-color: var(--a-brand);
  background: var(--a-brand);
  color: var(--a-on-brand);
}
.pager li.total-summary {
  inline-size: 100%;
  color: var(--a-muted);
  font-size: var(--a-text-sm);
  text-align: center;
}

/* ---------- Notices and empty states ---------- */
.a-notice {
  margin-block-end: var(--a-space-4);
  padding: var(--a-space-3) var(--a-space-4);
  border-radius: var(--a-radius-md);
  background: var(--a-bg-alt);
  font-size: var(--a-text-sm);
}
.a-notice--warning {
  border-inline-start: 3px solid var(--a-warning);
}
.a-empty {
  display: grid;
  justify-items: center;
  gap: var(--a-space-3);
  padding-block: var(--a-space-7);
  padding-inline: var(--a-space-4);
  border-radius: var(--a-radius-lg);
  background: var(--a-bg-alt);
  color: var(--a-muted);
  text-align: center;
}
.a-empty__text {
  max-inline-size: 36ch;
  margin: 0;
  color: var(--a-ink);
  font-weight: 500;
}

/* ---------- Product card (Shared/_ProductBox) ---------- */
.a-card-product {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--a-space-3);
  block-size: 100%;
  min-inline-size: 0;
}
.a-card-product__media {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--a-radius-md);
  background: var(--a-bg-alt);
}
.a-card-product__media > a,
.a-card-product__media .swiper,
.a-card-product__media .swiper-wrapper,
.a-card-product__media .swiper-slide {
  display: block;
  inline-size: 100%;
  block-size: 100%;
}
.a-card-product__media img {
  display: block;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.a-card-product:hover .a-card-product__media img {
  transform: scale(1.03);
}
/* skeleton while the picture loads (product-image-loading.js removes .is-loading) */
.a-card-product__media.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, var(--a-bg), transparent);
  background-size: 200% 100%;
  opacity: 0.6;
  animation: a-shimmer 1.2s linear infinite;
  pointer-events: none;
}
@keyframes a-shimmer {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}
.a-card-product__media .swiper-pagination {
  inset-block-end: var(--a-space-2);
}
.a-card-product__media .swiper-pagination-bullet-active {
  background: var(--a-brand);
}
.a-card-product__badge {
  position: absolute;
  inset-block-start: var(--a-space-2);
  inset-inline-start: var(--a-space-2);
  z-index: 3;
  padding-block: 2px;
  padding-inline: var(--a-space-2);
  border-radius: var(--a-radius-pill);
  background: var(--a-danger);
  color: var(--a-on-brand);
  font-size: var(--a-text-xs);
  font-weight: 700;
  line-height: 1.5;
}
.a-card-product__badge--new {
  background: var(--a-brand);
}
.a-card-product__quick,
.a-card-product__wish {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  inline-size: 40px;
  block-size: 40px;
  padding: 0;
  border: 1px solid var(--a-line);
  border-radius: 50%;
  background: var(--a-bg);
  color: var(--a-ink);
  transition: border-color 0.15s ease, opacity 0.15s ease;
}
.a-card-product__quick:hover,
.a-card-product__wish:hover {
  border-color: var(--a-ink);
}
/* Both icon buttons float on the picture's end corner (the card is the positioning box), so the
   add-to-cart button gets the full card width: wishlist on top, quick view under it. Quick view
   is a preview for pointer users and starts at 768px; on hover screens it shows on hover/focus. */
.a-card-product__wish,
.a-card-product__quick {
  position: absolute;
  inset-inline-end: var(--a-space-2);
  z-index: 3;
  border-color: transparent;
  box-shadow: var(--a-shadow-sm);
}
.a-card-product__wish {
  inset-block-start: var(--a-space-2);
}
.a-card-product__quick {
  inset-block-start: calc(var(--a-space-2) * 2 + 40px);
  display: none;
}
@media (min-width: 768px) {
  .a-card-product__quick {
    display: inline-flex;
  }
}
@media (hover: hover) {
  .a-card-product__quick {
    opacity: 0;
  }
  .a-card-product:hover .a-card-product__quick,
  .a-card-product__quick:focus-visible {
    opacity: 1;
  }
}
.a-card-product__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: var(--a-space-1);
  min-inline-size: 0;
}
.a-card-product__tag {
  align-self: flex-start;
  color: var(--a-muted);
  font-size: var(--a-text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.a-card-product__name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  min-block-size: calc(2 * 1.4em);
  margin: 0;
  overflow: hidden;
  font-family: var(--a-font-body);
  font-size: var(--a-text-sm);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0;
}
.a-card-product__name a:hover {
  text-decoration: underline;
}
.a-card-product__sku {
  color: var(--a-muted);
  font-size: var(--a-text-xs);
}
.a-card-product__desc {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  color: var(--a-muted);
  font-size: var(--a-text-sm);
}
.a-card-product__desc p {
  margin: 0;
}
.a-card-product__rating {
  display: flex;
  align-items: center;
  gap: var(--a-space-2);
  color: var(--a-muted);
  font-size: var(--a-text-xs);
}
.a-card-product__rating .rating {
  position: relative;
  inline-size: 70px;
  block-size: 12px;
  background: repeating-linear-gradient(90deg, var(--a-line) 0 12px, transparent 12px 14.5px);
}
.a-card-product__rating .rating > div {
  block-size: 100%;
  background: repeating-linear-gradient(90deg, var(--a-warning) 0 12px, transparent 12px 14.5px);
}
.a-card-product__info {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: var(--a-space-3);
}
.a-card-product__prices {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 var(--a-space-2);
}
.a-card-product__price {
  color: var(--a-brand);
  font-size: var(--a-text-md);
  font-weight: 700;
}
.a-card-product__old-price {
  color: var(--a-muted);
  font-size: var(--a-text-sm);
  text-decoration: line-through;
}
.a-card-product__prices .base-price-pangv,
.a-card-product__prices .tax-shipping-info {
  inline-size: 100%;
  color: var(--a-muted);
  font-size: var(--a-text-xs);
}
.a-card-product__actions {
  display: flex;
  align-items: center;
  gap: var(--a-space-2);
  margin-block-start: auto;
}
.a-card-product__actions .product-box-add-to-cart-button {
  flex: 1 1 auto;
  min-inline-size: 0;
  padding-inline: var(--a-space-3);
  font-size: var(--a-text-xs);
}
.a-card-product__actions .product-box-add-to-cart-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (min-width: 768px) {
  .a-card-product__name {
    font-size: var(--a-text-md);
  }
  .a-card-product__price {
    font-size: var(--a-text-lg);
  }
  .a-card-product__actions .product-box-add-to-cart-button {
    font-size: var(--a-text-sm);
  }
}

/* list view mode: the same card as a row */
.a-card-product--row {
  flex-direction: row;
  gap: var(--a-space-4);
}
.a-card-product--row .a-card-product__media {
  flex: none;
  inline-size: 36%;
  max-inline-size: 220px;
  align-self: flex-start;
}
.a-card-product--row .a-card-product__name {
  min-block-size: 0;
}
.a-card-product--row .a-card-product__actions {
  margin-block-start: var(--a-space-2);
}
.a-card-product--row .a-card-product__wish {
  position: static;
  border-color: var(--a-line);
  box-shadow: none;
}
.a-card-product--row .a-card-product__quick {
  inset-block-start: var(--a-space-2);
}
@media (min-width: 768px) {
  .a-card-product--row .a-card-product__actions {
    max-inline-size: 320px;
  }
}

/* ---------- Quick view dialog (_Root, product-quick-view.js) ---------- */
body.stsg-quick-view-open {
  overflow: hidden;
}
.stsg-quick-view {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: grid;
  place-items: center;
  padding: var(--a-space-4);
}
.stsg-quick-view__backdrop {
  position: absolute;
  inset: 0;
  background: var(--a-overlay);
}
.stsg-quick-view__dialog {
  position: relative;
  display: grid;
  gap: var(--a-space-4);
  inline-size: min(720px, 100%);
  max-block-size: calc(100vh - 2 * var(--a-space-4));
  overflow-y: auto;
  padding: var(--a-space-4);
  border-radius: var(--a-radius-lg);
  background: var(--a-bg);
  box-shadow: var(--a-shadow-md);
}
.stsg-quick-view__close {
  position: absolute;
  inset-block-start: var(--a-space-2);
  inset-inline-end: var(--a-space-2);
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 44px;
  block-size: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--a-bg);
  color: var(--a-ink);
}
.stsg-quick-view__close:hover {
  background: var(--a-bg-alt);
}
.stsg-quick-view__media {
  overflow: hidden;
  border-radius: var(--a-radius-md);
  background: var(--a-bg-alt);
}
.stsg-quick-view__media img {
  display: block;
  inline-size: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}
.stsg-quick-view__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--a-space-4);
}
.stsg-quick-view__title {
  margin: 0;
  padding-inline-end: var(--a-space-7);
  font-size: var(--a-text-xl);
}
.stsg-quick-view__prices {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--a-space-2);
}
.stsg-quick-view__price {
  color: var(--a-brand);
  font-size: var(--a-text-xl);
  font-weight: 700;
}
.stsg-quick-view__old-price {
  color: var(--a-muted);
  text-decoration: line-through;
}
.stsg-quick-view__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  min-block-size: 44px;
  padding-inline: var(--a-space-5);
  border-radius: var(--a-radius-pill);
  background: var(--a-brand);
  color: var(--a-on-brand);
  font-weight: 600;
}
.stsg-quick-view__link:hover {
  opacity: 0.9;
  text-decoration: none;
}
@media (min-width: 768px) {
  .stsg-quick-view__dialog {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--a-space-5);
    padding: var(--a-space-5);
  }
}

/* ---------- Bar notification (public.common.js displayBarNotification: add to cart, errors) ---------- */
.bar-notification-container {
  position: fixed;
  inset-block-start: var(--a-space-4);
  inset-inline: var(--a-space-4);
  z-index: 1200;
  display: grid;
  justify-items: center;
  pointer-events: none;
}
.bar-notification {
  display: flex;
  align-items: center;
  gap: var(--a-space-3);
  inline-size: min(480px, 100%);
  padding-block: var(--a-space-3);
  padding-inline: var(--a-space-4) var(--a-space-2);
  border-radius: var(--a-radius-md);
  background: var(--a-ink);
  color: var(--a-on-brand);
  box-shadow: var(--a-shadow-md);
  font-size: var(--a-text-sm);
  pointer-events: auto;
}
.bar-notification.error {
  background: var(--a-danger);
}
.bar-notification.warning {
  background: var(--a-warning);
}
.bar-notification .content {
  flex: 1 1 auto;
  margin: 0;
}
.bar-notification .content a {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
}
.bar-notification .close {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  inline-size: 40px;
  block-size: 40px;
  border-radius: 50%;
  cursor: pointer;
}
.bar-notification .close::before {
  content: "\00d7";
  font-size: 1.5rem;
  line-height: 1;
}
.bar-notification .close:hover {
  background: rgb(255 255 255 / 0.15);
}

/* ---------- Tabs (product page, minimal.js initTabs): the tab bar scrolls sideways on phones ---------- */
.a-tabs__list {
  display: flex;
  gap: var(--a-space-1);
  margin-block-end: var(--a-space-5);
  border-block-end: 1px solid var(--a-line);
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
}
.a-tabs__list::-webkit-scrollbar {
  display: none;
}
.a-tabs__tab {
  flex: none;
  min-block-size: 44px;
  margin-block-end: -1px;
  padding-block: var(--a-space-2);
  padding-inline: var(--a-space-4);
  border: 0;
  border-block-end: 2px solid transparent;
  background: none;
  color: var(--a-muted);
  font-size: var(--a-text-md);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.a-tabs__tab:hover {
  color: var(--a-ink);
}
.a-tabs__tab[aria-selected="true"] {
  border-block-end-color: var(--a-brand);
  color: var(--a-ink);
}
.a-tabs__tab:focus-visible,
.a-tabs__panel:focus-visible {
  outline: 2px solid var(--a-brand);
  outline-offset: 2px;
}
.a-tabs__panel {
  scroll-margin-block-start: 96px;
}

/* ---------- Quantity stepper (_AddToCart) ---------- */
.a-qty {
  display: inline-flex;
  align-items: stretch;
  block-size: 44px;
  border: 1px solid var(--a-line);
  border-radius: var(--a-radius-pill);
  background: var(--a-bg);
  overflow: hidden;
}
.a-qty__btn {
  inline-size: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--a-ink);
  font-size: var(--a-text-lg);
  line-height: 1;
  cursor: pointer;
}
.a-qty__btn:hover {
  background: var(--a-bg-alt);
}
.a-qty__input {
  inline-size: 3.25rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--a-ink);
  font-size: var(--a-text-md);
  font-weight: 600;
  text-align: center;
}
.a-qty__input:focus {
  outline: none;
}
.a-qty:focus-within {
  border-color: var(--a-ink);
}

/* ---------- Pill options (radio / checkbox attribute values): the label is the pill ---------- */
.a-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--a-space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}
.a-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-block-size: 40px;
  padding-block: var(--a-space-1);
  padding-inline: var(--a-space-4);
  border: 1px solid var(--a-line);
  border-radius: var(--a-radius-pill);
  background: var(--a-bg);
  color: var(--a-ink);
  font-size: var(--a-text-sm);
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.a-pill input {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.a-pill:hover {
  border-color: var(--a-ink);
}
.a-pill:has(input:checked) {
  border-color: var(--a-brand);
  box-shadow: inset 0 0 0 1px var(--a-brand);
  font-weight: 600;
}
.a-pill:has(input:focus-visible) {
  outline: 2px solid var(--a-brand);
  outline-offset: 2px;
}
.a-pill:has(input:disabled) {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ---------- Small text actions (wishlist, compare, email a friend) ---------- */
.a-action {
  display: inline-flex;
  align-items: center;
  gap: var(--a-space-2);
  min-block-size: 40px;
  padding-block: var(--a-space-1);
  padding-inline: var(--a-space-3);
  border: 0;
  border-radius: var(--a-radius-pill);
  background: none;
  color: var(--a-ink);
  font-size: var(--a-text-sm);
  cursor: pointer;
}
.a-action:hover {
  background: var(--a-bg-alt);
}

/* ---------- Data table (specifications, tier prices) ---------- */
.a-table {
  inline-size: 100%;
  border-collapse: collapse;
  font-size: var(--a-text-sm);
}
.a-table td,
.a-table th {
  padding-block: var(--a-space-3);
  padding-inline: var(--a-space-3);
  border-block-end: 1px solid var(--a-line);
  text-align: start;
  vertical-align: top;
}

/* ---------- Section head link ("view all") ---------- */
.a-section__link {
  color: var(--a-brand);
  font-size: var(--a-text-sm);
  font-weight: 600;
}

/* ---------- Post card (Shared/_BlogCard): blog list, home Blog block, related posts ---------- */
.a-card-post {
  position: relative;
  display: flex;
  flex-direction: column;
  block-size: 100%;
  overflow: hidden;
  border: 1px solid var(--a-line);
  border-radius: var(--a-radius-md);
  background: var(--a-bg);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.a-card-post:hover {
  border-color: transparent;
  box-shadow: var(--a-shadow-md);
}
.a-card-post__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--a-brand-soft);
}
.a-card-post__media img {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.a-card-post:hover .a-card-post__media img {
  transform: scale(1.03);
}
.a-card-post__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--a-space-4);
  color: var(--a-brand);
  font-family: var(--a-font-heading);
  font-weight: 600;
  text-align: center;
}
.a-card-post__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--a-space-2);
  padding: var(--a-space-4);
}
.a-card-post__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--a-space-2);
  margin: 0;
  color: var(--a-muted);
  font-size: var(--a-text-xs);
}
.a-card-post__title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  margin: 0;
  font-size: var(--a-text-lg);
  line-height: 1.35;
  overflow-wrap: anywhere;
}
/* the title link covers the whole card */
.a-card-post__title a::after {
  content: "";
  position: absolute;
  inset: 0;
}
.a-card-post__title a:hover {
  text-decoration: none;
}
.a-card-post:hover .a-card-post__title a {
  color: var(--a-brand);
}
.a-card-post__excerpt {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  margin: 0;
  color: var(--a-muted);
  font-size: var(--a-text-sm);
}

/* ==========================================================================
   Core nopCommerce markup kept from stsg (cart, checkout, account, forms).
   Scoped to the main column and popups with :where() so the selectors stay at
   class-level specificity and the a-* components above keep winning.
   ========================================================================== */

/* ---------- Buttons: .button-1 = primary, .button-2 = ghost (stsg also uses primary-btn / secoendry-btn) ---------- */
:where(.a-main, .ui-dialog) :is(.button-1, .primary-btn, .bs_primary_button, .button-2, .secoendry-btn, .px_secondary_button, .px_clear_cart_btn button):not(:where(.a-btn, .a-action)) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--a-space-2);
  min-block-size: 44px;
  max-inline-size: 100%;
  padding-block: var(--a-space-2);
  padding-inline: var(--a-space-5);
  border: 1px solid transparent;
  border-radius: var(--a-radius-pill);
  background: var(--a-brand);
  color: var(--a-on-brand);
  font-size: var(--a-text-sm);
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  text-transform: none;
  cursor: pointer;
  transition: opacity 0.15s ease, border-color 0.15s ease;
}
:where(.a-main, .ui-dialog) :is(.button-1, .primary-btn, .bs_primary_button):not(:where(.a-btn, .a-action)):hover {
  opacity: 0.9;
  text-decoration: none;
}
:where(.a-main, .ui-dialog) :is(.button-2, .secoendry-btn, .px_secondary_button, .px_clear_cart_btn button):not(:where(.a-btn, .a-action)) {
  border-color: var(--a-line);
  background: var(--a-bg);
  color: var(--a-ink);
}
:where(.a-main, .ui-dialog) :is(.button-2, .secoendry-btn, .px_secondary_button, .px_clear_cart_btn button):not(:where(.a-btn, .a-action)):hover {
  border-color: var(--a-ink);
  text-decoration: none;
}
:where(.a-main) :is(.button-1, .button-2, .primary-btn):disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
:where(.a-main) .buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--a-space-3);
  margin-block: var(--a-space-5) 0;
}

/* ---------- Fields: 44px, --a-radius-sm, brand focus ring ---------- */
:where(.a-main, .ui-dialog) :where(input:not([type="checkbox"], [type="radio"], [type="hidden"], [type="submit"], [type="button"], [type="image"], [type="file"], [type="range"]), select, textarea):where(:not(.a-input, .a-select, .a-qty__input, .search-box-text, .a-textarea)) {
  min-block-size: 44px;
  inline-size: 100%;
  max-inline-size: 100%;
  padding-block: var(--a-space-2);
  padding-inline: var(--a-space-3);
  border: 1px solid var(--a-line);
  border-radius: var(--a-radius-sm);
  background: var(--a-bg);
  color: var(--a-ink);
  font-size: var(--a-text-md);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
:where(.a-main, .ui-dialog) :where(textarea) {
  min-block-size: 140px;
  resize: vertical;
}
:where(.a-main, .ui-dialog) :where(input, select, textarea):where(:not([type="checkbox"], [type="radio"])):focus {
  border-color: var(--a-brand);
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--a-brand) 22%, transparent);
}
:where(.a-main, .ui-dialog) :where(input[type="checkbox"], input[type="radio"]) {
  flex: none;
  inline-size: 18px;
  block-size: 18px;
  margin: 0;
  accent-color: var(--a-brand);
  cursor: pointer;
  vertical-align: middle;
}
:where(.a-main) :where(.fieldset, fieldset) {
  min-inline-size: 0;
  margin: 0 0 var(--a-space-5);
  padding: 0;
  border: 0;
}
:where(.a-main) :where(.fieldset > .title, fieldset > legend) {
  margin-block: 0 var(--a-space-3);
  font-size: var(--a-text-lg);
  font-weight: 600;
}
:where(.a-main) .form-fields {
  display: grid;
  gap: var(--a-space-4);
}
:where(.a-main) .inputs {
  position: relative;
  display: grid;
  gap: var(--a-space-1);
  min-inline-size: 0;
}
:where(.a-main) :where(.inputs > label, .inputs .label-wrapper, .px_field_label) {
  font-size: var(--a-text-sm);
  font-weight: 600;
}
:where(.a-main) .inputs.reversed {
  display: flex;
  align-items: center;
  gap: var(--a-space-2);
}
:where(.a-main) :where(.required, .required-star) {
  color: var(--a-danger);
  font-weight: 600;
}
/* the star printed after the field moves up beside the label (or into the field's corner when there is no label) */
:where(.a-main) .inputs > .required {
  position: absolute;
  inset-block-start: 0;
  inset-inline-end: 0;
  line-height: 1.4;
}
:where(.a-main) .inputs:has(> label + * + .required, > label + .required) {
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: var(--a-space-1);
}
:where(.a-main) .inputs:has(> label + * + .required, > label + .required) > * {
  grid-column: 1 / -1;
}
:where(.a-main) .inputs:has(> label + * + .required, > label + .required) > label {
  grid-column: 1;
}
:where(.a-main) .inputs:has(> label + * + .required, > label + .required) > .required {
  position: static;
  grid-column: 2;
  grid-row: 1;
}
/* stsg field with an icon in front: one bordered box, the input inside has no border */
:where(.a-main) :where(.px_input_field, .px_input) {
  display: flex;
  align-items: center;
  min-block-size: 44px;
  border: 1px solid var(--a-line);
  border-radius: var(--a-radius-sm);
  background: var(--a-bg);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
:where(.a-main) :where(.px_input_field, .px_input):focus-within {
  border-color: var(--a-brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--a-brand) 22%, transparent);
}
:where(.a-main) :where(.px_input_field, .px_input) :where(input, textarea, select) {
  flex: 1 1 auto;
  min-block-size: 42px;
  min-inline-size: 0;
  border: 0;
  background: transparent;
}
:where(.a-main) :where(.px_input_field, .px_input) :where(input, textarea, select):focus {
  box-shadow: none;
}
:where(.a-main) :where(.px_input_field, .px_input) .px_icon {
  flex: none;
  padding-inline-start: var(--a-space-3);
}
:where(.a-main) :where(.px_input_field, .px_input) .px_icon::before {
  margin: 0;
}
/* stsg custom checkbox: label + input + a 21x21 tick svg; keep the native box, drop the svg */
:where(.a-main, .ui-dialog) label.checkbox {
  display: inline-flex;
  align-items: center;
  gap: var(--a-space-2);
  cursor: pointer;
}
:where(.a-main, .ui-dialog) label.checkbox > svg {
  display: none;
}

/* ---------- Validation and messages ---------- */
:where(.a-main) .field-validation-error {
  display: block;
  color: var(--a-danger);
  font-size: var(--a-text-sm);
}
:where(.a-main) :where(.input-validation-error, .px_input_field:has(.input-validation-error), .px_input:has(.input-validation-error)) {
  border-color: var(--a-danger);
}
:where(.a-main) :is(.message-error, .validation-summary-errors) {
  padding: var(--a-space-3) var(--a-space-4);
  border: 1px solid color-mix(in srgb, var(--a-danger) 35%, transparent);
  border-radius: var(--a-radius-sm);
  background: color-mix(in srgb, var(--a-danger) 7%, var(--a-bg));
  color: var(--a-danger);
  font-size: var(--a-text-sm);
}
:where(.a-main) :is(.message-error, .validation-summary-errors):empty,
:where(.a-main) .message-error:has(> .validation-summary-valid) {
  display: none;
}
:where(.a-main) :is(.message-error, .validation-summary-errors) ul {
  margin: 0;
  padding-inline-start: var(--a-space-4);
}
:where(.a-main) .result {
  padding: var(--a-space-3) var(--a-space-4);
  border: 1px solid color-mix(in srgb, var(--a-success) 35%, transparent);
  border-radius: var(--a-radius-sm);
  background: color-mix(in srgb, var(--a-success) 8%, var(--a-bg));
  color: var(--a-success);
}
:where(.a-main) :is(.min-amount-warning, .min-order-warning, .vat-number-warning, .checkout-disabled) {
  padding: var(--a-space-3) var(--a-space-4);
  border-radius: var(--a-radius-sm);
  background: color-mix(in srgb, var(--a-warning) 9%, var(--a-bg));
  color: var(--a-warning);
  font-size: var(--a-text-sm);
}
.bar-notification.success {
  background: var(--a-success);
}
:where(.a-main) .no-data {
  padding: var(--a-space-6) var(--a-space-4);
  border: 1px dashed var(--a-line);
  border-radius: var(--a-radius-md);
  color: var(--a-muted);
  text-align: center;
}
:where(.a-main) .please-wait {
  color: var(--a-muted);
  font-size: var(--a-text-sm);
}

/* ---------- Data tables (orders, downloads, reward points, return requests) ---------- */
:where(.a-main) .table-wrapper {
  max-inline-size: 100%;
  overflow-x: auto;
}
:where(.a-main) :where(.data-table, .cart, .compare-products-table) :where(th, td) {
  padding: var(--a-space-3);
  border-block-end: 1px solid var(--a-line);
  text-align: start;
  vertical-align: middle;
}
:where(.a-main) :where(.data-table, .cart) th {
  color: var(--a-muted);
  font-size: var(--a-text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* ---------- Popups: jQuery UI dialog, ajax loading block, sweetalert2 ---------- */
.ui-dialog {
  z-index: 1300 !important;
  max-inline-size: calc(100vw - 2 * var(--a-space-4));
  padding: 0;
  border: 0 !important;
  border-radius: var(--a-radius-md);
  background: var(--a-bg);
  box-shadow: var(--a-shadow-md);
  font-family: var(--a-font-body);
  overflow: hidden;
}
.ui-dialog .ui-dialog-titlebar {
  display: flex;
  align-items: center;
  gap: var(--a-space-3);
  padding: var(--a-space-3) var(--a-space-4);
  border: 0;
  border-block-end: 1px solid var(--a-line);
  border-radius: 0;
  background: var(--a-bg);
  color: var(--a-ink);
}
.ui-dialog .ui-dialog-title {
  flex: 1 1 auto;
  float: none;
  inline-size: auto;
  margin: 0;
  font-weight: 600;
  white-space: normal;
}
.ui-dialog .ui-dialog-titlebar-close {
  position: static;
  inline-size: 40px;
  block-size: 40px;
  margin: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
}
.ui-dialog .ui-dialog-titlebar-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  padding: 0;
  color: var(--a-ink);
  font-size: 0;
  cursor: pointer;
}
.ui-dialog .ui-dialog-titlebar-close::before {
  content: "\00d7";
  font-size: 1.5rem;
  line-height: 1;
}
.ui-dialog .ui-dialog-titlebar-close:hover {
  background: var(--a-bg-alt);
}
.ui-dialog .ui-dialog-titlebar-close .ui-icon {
  display: none;
}
.ui-dialog .ui-dialog-content {
  max-block-size: 70vh;
  padding: var(--a-space-4) !important;
  color: var(--a-ink);
  font-size: var(--a-text-sm);
  line-height: var(--a-leading);
  overflow: auto;
}
.ui-widget-overlay {
  background: var(--a-overlay);
  opacity: 1;
}
.ajax-loading-block-window {
  position: fixed;
  inset-block-start: 50%;
  inset-inline-start: 50%;
  z-index: 1400;
  inline-size: 64px;
  block-size: 64px;
  margin-block-start: -32px;
  margin-inline-start: -32px;
  border-radius: var(--a-radius-md);
  background: var(--a-bg) url("ajax-loader.gif") center no-repeat;
  box-shadow: var(--a-shadow-md);
}
.swal2-container .swal2-popup {
  max-inline-size: calc(100vw - 2 * var(--a-space-4));
  padding: var(--a-space-5) var(--a-space-4);
  border-radius: var(--a-radius-md);
  font-family: var(--a-font-body);
}
.swal2-container .swal2-title {
  color: var(--a-ink);
  font-size: var(--a-text-xl);
  font-weight: 600;
}
.swal2-container :is(.swal2-html-container, .swal2-content) {
  color: var(--a-muted);
  font-size: var(--a-text-md);
}
.swal2-container .swal2-actions {
  gap: var(--a-space-2);
}
.swal2-container .swal2-styled {
  min-block-size: 44px;
  margin: 0;
  padding-inline: var(--a-space-5);
  border-radius: var(--a-radius-pill);
  font-size: var(--a-text-sm);
  font-weight: 600;
}
.swal2-container .swal2-styled.swal2-cancel {
  border: 1px solid var(--a-line);
  background: var(--a-bg) !important;
  color: var(--a-ink);
}
