/* ─── WOOCOMMERCE — Swiss Austral ──────────────────────────────── */

/* ─── CATALOG ────────────────────────────────────────────────── */
.sa-catalog-hero {
  height: 200px;
  background: var(--sa-gray-bg);
  overflow: hidden;
  position: relative;
}
.sa-catalog-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.sa-catalog__layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: var(--sa-gap-lg);
  padding: var(--sa-gap-lg) 0;
}

/* Sidebar filtros */
.sa-catalog-sidebar {
  position: sticky;
  top: calc(var(--sa-header-height) + 24px);
  align-self: start;
  background: var(--sa-white);
  border: 1px solid var(--sa-gray-light);
  border-radius: var(--sa-radius-lg);
  padding: var(--sa-gap-md);
}

.sa-catalog-sidebar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sa-gap-md);
  padding-bottom: var(--sa-gap-sm);
  border-bottom: 1px solid var(--sa-gray-light);
}

.sa-catalog-sidebar__header h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--sa-dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

.sa-sidebar-clear {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 12px;
  color: var(--sa-gray);
  text-decoration: underline;
  padding: 0;
}
.sa-sidebar-clear:hover { color: var(--sa-red); }

.sa-filter-group { margin-bottom: var(--sa-gap-md); }
.sa-filter-group__title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--sa-dark);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  padding: 0;
}

.sa-filter-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sa-filter-check {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  color: var(--sa-dark);
  user-select: none;
}
.sa-filter-check input { width: 16px; height: 16px; cursor: pointer; accent-color: var(--sa-red); }
.sa-filter-check span { line-height: 1.2; }

.sa-filter-apply { width: 100%; justify-content: center; margin-top: var(--sa-gap-sm); }

/* Catalog toolbar / search */
.sa-catalog-toolbar { margin-bottom: var(--sa-gap-md); }
.sa-catalog-search {
  display: flex;
  border: 1.5px solid var(--sa-gray-light);
  border-radius: var(--sa-radius-full);
  overflow: hidden;
  max-width: 400px;
}
.sa-catalog-search__input {
  border: none;
  border-radius: 0;
  flex: 1;
  padding: 10px 16px;
}
.sa-catalog-search__btn {
  background: none;
  border: none;
  padding: 10px 16px;
  cursor: pointer;
  color: var(--sa-gray);
  transition: color var(--sa-transition);
}
.sa-catalog-search__btn:hover { color: var(--sa-red); }

/* Products grid */
.sa-products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sa-gap-md);
  min-height: 400px;
}

/* Product Card */
.sa-product-card {
  display: flex;
  flex-direction: column;
  background: var(--sa-white);
  border-radius: var(--sa-radius-lg);
  overflow: hidden;
  border: 1px solid var(--sa-gray-light);
  transition: box-shadow var(--sa-transition), transform var(--sa-transition);
}
.sa-product-card:hover { box-shadow: var(--sa-shadow-md); transform: translateY(-2px); }
.sa-product-card--outofstock { opacity: 0.75; }

.sa-product-card__image-wrapper {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--sa-gray-bg);
}
.sa-product-card__img { width: 100%; height: 100%; object-fit: contain; padding: 16px; transition: transform 0.3s; }
.sa-product-card:hover .sa-product-card__img { transform: scale(1.03); }
.sa-product-card__img-placeholder { width: 100%; height: 100%; background: var(--sa-gray-bg); }

.sa-product-card__tag-badges {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sa-product-card__tag-icon {
  width: 28px;
  height: 28px;
  background: var(--sa-white);
  border: 1px solid var(--sa-gray-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.sa-product-card__stock-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: var(--sa-dark);
  color: var(--sa-white);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--sa-radius-full);
}

.sa-product-card__info {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 16px;
  gap: 8px;
}
.sa-product-card__sku { font-size: 11px; color: var(--sa-gray); letter-spacing: 0.5px; text-transform: uppercase; }
.sa-product-card__title { font-size: 15px; font-weight: 600; line-height: 1.3; }
.sa-product-card__title a { color: var(--sa-dark); }
.sa-product-card__title a:hover { color: var(--sa-red); }
.sa-product-card__excerpt { font-size: 13px; color: var(--sa-gray); line-height: 1.5; flex: 1; }

.sa-product-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--sa-gray-light);
}
.sa-product-card__price { font-size: 14px; font-weight: 600; color: var(--sa-dark); }

/* ─── SINGLE PRODUCT ─────────────────────────────────────────── */
.sa-single-product { padding: 0 0 var(--sa-gap-xl); }

.sa-product-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sa-gap-xl);
  padding: var(--sa-gap-lg) 0;
}

.sa-product-image-wrapper {
  background: var(--sa-gray-bg);
  border-radius: var(--sa-radius-lg);
  overflow: hidden;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sa-gap-md);
}
.sa-product-img { max-height: 100%; object-fit: contain; }

.sa-product-code { font-size: 12px; color: var(--sa-red); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }
.sa-product-title { font-size: clamp(24px, 3vw, 36px); margin: 8px 0 12px; }

.sa-product-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.sa-product-meta__item { font-size: 13px; color: var(--sa-gray); }
.sa-product-meta__item strong { color: var(--sa-dark); }

.sa-product-organism-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.sa-product-tagline { font-size: 14px; color: var(--sa-gray); margin-bottom: 16px; }

/* Packing table */
.sa-packing-table-wrapper { margin-top: var(--sa-gap-md); border-radius: var(--sa-radius-lg); overflow: hidden; border: 1px solid var(--sa-gray-light); }
.sa-packing-table { width: 100%; border-collapse: collapse; }
.sa-packing-table thead tr { background: var(--sa-dark); }
.sa-packing-table thead th {
  padding: 12px 16px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: var(--sa-white);
  white-space: nowrap;
}
.sa-packing-table tbody tr { border-bottom: 1px solid var(--sa-gray-light); transition: background var(--sa-transition); }
.sa-packing-table tbody tr:last-child { border-bottom: none; }
.sa-packing-table tbody tr:hover { background: var(--sa-gray-bg); }
.sa-packing-table tbody tr:nth-child(even) { background: rgba(0,0,0,0.02); }
.sa-packing-table td { padding: 14px 16px; font-size: 14px; vertical-align: middle; }
.sa-packing-format { font-weight: 500; }
.sa-packing-price { color: var(--sa-dark); font-weight: 600; }

.sa-availability { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: var(--sa-radius-full); }
.sa-availability--green { background: #E8F5E9; color: #2E7D32; }
.sa-availability--gray  { background: var(--sa-gray-bg); color: var(--sa-gray); }
.sa-availability--red   { background: #FFEBEE; color: #C62828; }

.sa-packing-actions { white-space: nowrap; }
.sa-qty-wrapper { display: flex; align-items: center; gap: 8px; }
.sa-qty-control { display: flex; align-items: center; border: 1.5px solid var(--sa-gray-light); border-radius: var(--sa-radius-full); overflow: hidden; }
.sa-qty-btn { background: none; border: none; width: 28px; height: 28px; cursor: pointer; font-size: 16px; color: var(--sa-dark); transition: background var(--sa-transition); display: flex; align-items: center; justify-content: center; }
.sa-qty-btn:hover { background: var(--sa-gray-bg); }
.sa-qty-input { width: 36px; text-align: center; border: none; font-size: 14px; font-weight: 600; padding: 0; outline: none; -moz-appearance: textfield; }
.sa-qty-input::-webkit-outer-spin-button,
.sa-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; }

.sa-btn--sm { padding: 8px 16px; font-size: 13px; }

/* Tabs */
.sa-product-tabs { margin-top: var(--sa-gap-lg); }
.sa-product-tabs__nav {
  display: flex;
  border-bottom: 2px solid var(--sa-gray-light);
  gap: 0;
  margin-bottom: var(--sa-gap-md);
}
.sa-tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 500;
  color: var(--sa-gray);
  cursor: pointer;
  transition: all var(--sa-transition);
}
.sa-tab-btn:hover { color: var(--sa-dark); }
.sa-tab-btn.active { color: var(--sa-red); border-bottom-color: var(--sa-red); font-weight: 600; }

.sa-tab-panel { display: none; }
.sa-tab-panel.active { display: block; }

/* Docs */
.sa-docs-section, .sa-batch-section { margin-bottom: var(--sa-gap-lg); }
.sa-docs-section h3, .sa-batch-section h3 { font-size: 18px; margin-bottom: var(--sa-gap-sm); }
.sa-docs-list { display: flex; flex-wrap: wrap; gap: 12px; }
.sa-doc-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1.5px solid var(--sa-red);
  border-radius: var(--sa-radius-full);
  color: var(--sa-red);
  font-size: 14px;
  font-weight: 500;
  transition: all var(--sa-transition);
}
.sa-doc-link:hover { background: var(--sa-red); color: var(--sa-white); }

/* Batch search */
.sa-batch-search__input-wrapper { display: flex; max-width: 400px; border: 1.5px solid var(--sa-gray-light); border-radius: var(--sa-radius-full); overflow: hidden; margin: 12px 0 6px; }
.sa-batch-input { border: none; border-radius: 0; flex: 1; }
.sa-batch-search__btn { background: none; border: none; padding: 0 16px; cursor: pointer; color: var(--sa-gray); }
.sa-batch-search__btn:hover { color: var(--sa-red); }
.sa-batch-search__hint { font-size: 12px; color: var(--sa-gray); }
.sa-batch-search__result { margin-top: 12px; padding: 12px 16px; border-radius: var(--sa-radius); font-size: 14px; }
.sa-batch-search__result.success { background: #E8F5E9; color: #2E7D32; }
.sa-batch-search__result.error { background: #FFEBEE; color: #C62828; }

/* Featured In */
.sa-featured-in__list { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.sa-featured-in__list li a {
  color: var(--sa-red);
  font-size: 14px;
  text-decoration: underline;
}

/* Request a Sample Banner */
.sa-request-sample-banner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: var(--sa-radius-lg);
  overflow: hidden;
  border: 1px solid var(--sa-gray-light);
  margin: var(--sa-gap-lg) 0;
  min-height: 200px;
}
.sa-request-sample-banner__content {
  padding: var(--sa-gap-lg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--sa-gap-sm);
}
.sa-request-sample-banner__content h3 { font-size: 22px; }
.sa-request-sample-banner__image { overflow: hidden; }
.sa-request-sample-banner__image img { width: 100%; height: 100%; object-fit: cover; }

/* Related Products */
.sa-related-products { margin-top: var(--sa-gap-xl); }
.sa-related-products__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sa-gap-md);
}
.sa-related-products__nav { display: flex; gap: 8px; }
.sa-related-prev, .sa-related-next {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--sa-gray-light);
  background: var(--sa-white);
  cursor: pointer;
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--sa-transition);
}
.sa-related-prev:hover, .sa-related-next:hover { border-color: var(--sa-red); color: var(--sa-red); }
.sa-related-products__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sa-gap-md); }

/* Modal */
.sa-modal { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; }
.sa-modal[hidden] { display: none; }
.sa-modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.5); }
.sa-modal__box {
  position: relative;
  background: var(--sa-white);
  border-radius: var(--sa-radius-lg);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--sa-shadow-lg);
}
.sa-modal__close {
  position: absolute;
  top: 16px; right: 16px;
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  z-index: 1;
}
.sa-modal__header {
  padding: 28px 32px 20px;
}
.sa-modal__header--dark { background: var(--sa-dark); }
.sa-modal__header--dark h2,
.sa-modal__header--dark p { color: var(--sa-white); }
.sa-modal__header--dark p { opacity: 0.7; font-size: 13px; margin: 6px 0 0; }
.sa-modal__product-context { font-size: 11px; color: rgba(255,255,255,0.5); display: block; margin-bottom: 6px; }
.sa-modal__form { padding: 24px 32px; }
.sa-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.sa-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.sa-textarea { min-height: 100px; resize: vertical; }
.sa-modal__footer { display: flex; justify-content: flex-end; gap: 12px; padding-top: 8px; }

/* ─── RESPONSIVE WooCommerce ────────────────────────────────── */
@media (max-width: 1024px) {
  .sa-catalog__layout { grid-template-columns: 1fr; }
  .sa-catalog-sidebar { position: static; }
  .sa-products-grid { grid-template-columns: repeat(2, 1fr); }
  .sa-related-products__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .sa-product-layout { grid-template-columns: 1fr; }
  .sa-packing-table-wrapper { overflow-x: auto; }
  .sa-request-sample-banner { grid-template-columns: 1fr; }
  .sa-request-sample-banner__image { display: none; }
  .sa-form-row { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .sa-products-grid { grid-template-columns: 1fr; }
  .sa-related-products__grid { grid-template-columns: 1fr 1fr; }
}
