/* Mobile product availability and CTA polish. Loaded after brand.css. */
.product-card-1--unavailable .product-image img {
  opacity: 0.72;
  filter: saturate(0.72);
}

.product-card-1--unavailable .current-price {
  color: #4b5563 !important;
}

.product-card-status-row {
  display: none;
  align-items: center;
  min-height: 28px;
  margin: -4px 0 10px;
}

.product-card-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  min-height: 24px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0;
  text-align: left;
}

.product-card-status-badge i {
  flex: 0 0 auto;
  font-size: 0.86rem;
  line-height: 1;
}

.product-card-status-badge--orderable {
  border: 1px solid var(--color-brand-accent-light);
  background: var(--color-brand-accent-lighter);
  color: var(--color-primary);
}

.product-card-status-badge--out {
  border: 1px solid #d1d5db;
  background: #f3f4f6;
  color: #4b5563;
}

.product-card-status-badge--preorder {
  border: 1px solid rgba(202, 138, 4, 0.34);
  background: #fef3c7;
  color: #854d0e;
}

.product-card-status-badge--coming-soon {
  border: 1px solid rgba(37, 99, 235, 0.22);
  background: #dbeafe;
  color: #1d4ed8;
}

.card-cta-label--short {
  display: none;
}

.product-detail-purchase-row {
  align-items: stretch !important;
}

.product-detail-qty-selector {
  min-height: 52px;
  background: #fff;
}

.product-detail-qty-selector.is-disabled {
  border-color: #d1d5db !important;
  background: #f3f4f6;
  color: #8b93a1;
  opacity: 0.82;
}

.product-detail-qty-selector.is-disabled button,
.product-detail-qty-selector.is-disabled input {
  color: #8b93a1 !important;
  cursor: not-allowed;
}

.product-detail-submit-btn {
  min-height: 52px;
  min-width: 0;
  line-height: 1.2;
  text-align: center;
}

.product-detail-unavailable-cta,
.product-detail-unavailable-cta:disabled,
.product-detail-unavailable-cta:hover {
  border: 1px solid #d1d5db !important;
  background: #e5e7eb !important;
  color: #6b7280 !important;
  opacity: 1 !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
}

.product-detail-unavailable-cta svg {
  color: #8b93a1 !important;
  stroke: currentColor !important;
}

@media (max-width: 479px) {
  .cat-product-grid {
    gap: 1rem;
  }

  .cat-product-grid .product-card-1 {
    padding: 12px !important;
    border-radius: 14px;
  }

  .cat-product-grid .product-image {
    height: 188px !important;
    margin-bottom: 10px !important;
  }

  .cat-product-grid .product-image img {
    object-fit: contain !important;
    background: #fff;
  }

  .cat-product-grid .product-badge-ribbon {
    top: 8px;
    left: 8px;
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    max-width: calc(100% - 16px);
    padding: 0 9px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0;
    box-shadow: 0 8px 18px rgba(17, 24, 39, 0.12);
  }

  .cat-product-grid .product-badge-ribbon.product-availability-ribbon {
    display: none;
  }

  .cat-product-grid .product-card-status-row {
    display: flex;
  }

  .cat-product-grid .product-content h5 {
    font-size: 0.92rem;
    line-height: 1.3;
  }

  .cat-product-grid .price-section {
    margin-bottom: 10px !important;
    gap: 4px 8px !important;
  }

  .btn-section--purchase,
  .btn-section--backorder {
    grid-template-columns: 34px minmax(0, 1fr) !important;
    gap: 6px !important;
  }

  .btn-section--purchase .card-wishlist-btn,
  .btn-section--backorder .card-wishlist-btn {
    width: 34px;
    height: 34px;
    align-self: start;
  }

  .btn-section--purchase .product-card-action-stack,
  .btn-section--backorder .product-card-action-stack {
    gap: 6px;
  }

  .btn-section--purchase .card-cta-btn,
  .btn-section--backorder .card-cta-btn,
  .btn-section--backorder .product-card-notify-btn {
    min-height: 36px;
    padding: 7px 8px;
    border-radius: 9px;
    font-size: 0.72rem;
    line-height: 1.05;
    gap: 4px !important;
  }

  .btn-section--backorder .card-cta-btn i,
  .btn-section--backorder .product-card-notify-btn i {
    display: none;
  }

  .btn-section--backorder .card-cta-label--full {
    display: none;
  }

  .btn-section--backorder .card-cta-label--short {
    display: inline;
  }

  .btn-section--purchase .card-cta-label,
  .btn-section--backorder .card-cta-label,
  .btn-section--backorder .product-card-notify-btn .card-cta-label {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }

  .product-detail-purchase-row {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 12px !important;
  }

  .product-detail-qty-selector,
  .product-detail-submit-btn {
    width: 100%;
  }

  .product-detail-submit-btn {
    flex: 0 0 auto !important;
    padding: 13px 18px !important;
  }
}

@media (max-width: 374px) {
  .card-cta-label {
    display: inline;
    white-space: normal;
  }

  .btn-section--purchase .card-cta-btn,
  .btn-section--backorder .card-cta-btn,
  .btn-section--backorder .product-card-notify-btn {
    padding-inline: 6px;
    font-size: 0.68rem;
  }
}
