/* Product Catalog — matches ecom_design.html exactly */

/* Theme overrides — prevent global resets from stripping component styles */
.bc-catalog h1 {
  font-size: 34px;
  font-family: 'Playfair Display', var(--bc-font-serif, Georgia), serif;
  line-height: 1.15;
}

.bc-catalog a {
  color: inherit;
  text-decoration: none;
}

.bc-catalog {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 32px 80px;
  font-family: 'Outfit', var(--bc-font, sans-serif);
}

/* Breadcrumbs */
.bc-catalog__breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 0;
  font-size: 13px;
  color: var(--bc-muted, #9CA3AF);
}

.bc-catalog__breadcrumbs a {
  color: var(--bc-muted, #9CA3AF);
  text-decoration: none;
  transition: color 0.2s;
}

.bc-catalog__breadcrumbs a:hover {
  color: var(--bc-text, #111827);
}

.bc-catalog__breadcrumbs span {
  color: var(--bc-text, #111827);
}

.bc-catalog__breadcrumbs svg {
  flex-shrink: 0;
}

/* Title */
.bc-catalog__title {
  font-family: 'Playfair Display', var(--bc-font-serif, Georgia), serif;
  font-size: 34px;
  line-height: 1.15;
  color: var(--bc-text, #111827);
  margin: 0 0 6px;
}

.bc-catalog__subtitle {
  color: var(--bc-text-secondary, #4B5563);
  font-size: 15px;
  margin: 0 0 20px;
}

/* Search */
.bc-catalog__search {
  margin-bottom: 20px;
}

.bc-catalog__search-input {
  width: 100%;
  padding: 11px 14px 11px 44px;
  border: 1.5px solid var(--bc-grey-200, #E5E7EB);
  border-radius: 100px;
  font-size: 14px;
  color: var(--bc-text, #111827);
  background: var(--bc-bg, #fff);
  transition: all 0.2s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%239CA3AF' stroke-width='2'%3E%3Ccircle cx='8' cy='8' r='6.5'/%3E%3Cpath d='M15 15l3 3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 16px center;
}

.bc-catalog__search-input:focus {
  outline: none;
  border-color: var(--bc-navy, #0A1628);
  box-shadow: 0 0 0 3px rgba(10,22,40,0.08);
}

.bc-catalog__search-input::placeholder {
  color: var(--bc-grey-400, #9CA3AF);
}

/* Toolbar */
.bc-catalog__toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.bc-catalog__filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.bc-catalog__filter {
  padding: 10px 24px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: var(--bc-grey-100, #F1F3F5);
  transition: all 0.25s;
  color: var(--bc-text-secondary, #4B5563);
  font-family: 'Outfit', var(--bc-font, sans-serif);
}

.bc-catalog__filter:hover {
  background: var(--bc-grey-200, #E5E7EB);
  color: var(--bc-text, #111827);
}

.bc-catalog__filter.is-active {
  background: var(--bc-accent, #DC2626);
  color: #fff;
  box-shadow: 0 4px 12px rgba(220,38,38,0.3);
}

.bc-catalog__sort {
  padding: 10px 38px 10px 18px;
  border: none;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--bc-text-secondary, #4B5563);
  background-color: var(--bc-grey-100, #F1F3F5);
  appearance: none;
  cursor: pointer;
  transition: all 0.25s;
  font-family: 'Outfit', var(--bc-font, sans-serif);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236B7280' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

.bc-catalog__sort:hover {
  background-color: var(--bc-grey-200, #E5E7EB);
  color: var(--bc-text, #111827);
}

.bc-catalog__sort:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(220,38,38,0.12);
}

/* Count */
.bc-catalog__count {
  font-size: 14px;
  color: var(--bc-muted, #9CA3AF);
  margin-bottom: 16px;
}

/* Grid */
.bc-catalog__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 20px;
}

/* Loading / Empty */
.bc-catalog__loading,
.bc-catalog__empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--bc-muted, #9CA3AF);
  font-size: 15px;
}

/* ── Product Card (matches ecom_design.html .product-card) ── */
.pc {
  background: var(--bc-bg, #fff);
  border-radius: var(--bc-radius-lg, 16px);
  border: 1px solid var(--bc-grey-100, #F1F3F5);
  overflow: hidden;
  transition: all 0.3s;
  position: relative;
  cursor: pointer;
}

.pc:hover {
  box-shadow: 0 20px 40px rgba(0,0,0,0.08), 0 8px 16px rgba(0,0,0,0.04);
  border-color: transparent;
  transform: translateY(-4px);
}

.pc:hover .pc-img-overlay {
  opacity: 1;
}

.pc:hover .pc-quick-actions {
  opacity: 1;
  transform: translateY(0);
}

.pc:hover .pc-img-inner img {
  transform: scale(1.05);
}

/* Image wrap */
.pc-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--bc-grey-100, #F1F3F5);
}

.pc-img-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pc-img-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.pc-img-placeholder {
  font-size: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: var(--bc-grey-100, #F1F3F5);
}

/* Image overlay gradient */
.pc-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.4), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

/* Badges */
.pc-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 2;
}

.pc-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  background: var(--bc-navy, #0A1628);
  color: #fff;
}


/* Quick actions on hover */
.pc-quick-actions {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  z-index: 2;
  display: flex;
  gap: 8px;
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.3s;
}

.pc-quick-actions .pc-action-btn {
  flex: 1;
  padding: 10px;
  border-radius: var(--bc-radius, 8px);
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all 0.2s;
  line-height: 1.2;
  white-space: nowrap;
  text-align: center;
  text-decoration: none;
}

.pc-action-btn--white {
  background: rgba(255,255,255,0.92);
  color: var(--bc-text, #111827);
}

.pc-action-btn--white:hover {
  background: #fff;
}

.pc-action-btn--dark {
  background: rgba(10,22,40,0.85);
  color: #fff;
}

.pc-action-btn--dark:hover {
  background: var(--bc-navy, #0A1628);
}

/* Card body */
.pc-body {
  padding: 16px;
}

.pc-platform {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--bc-grey-400, #9CA3AF);
  margin-bottom: 6px;
}

.pc-title {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--bc-text, #111827);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 10px;
  min-height: 40px;
}

.pc-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}

.pc-price {
  font-size: 20px;
  font-weight: 800;
  color: var(--bc-navy, #0A1628);
}

.pc-price-orig {
  font-size: 13px;
  color: var(--bc-grey-400, #9CA3AF);
  text-decoration: line-through;
}

.pc-price-save {
  font-size: 11px;
  font-weight: 700;
  color: var(--bc-accent, #DC2626);
}

.pc-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pc-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
}

.pc-rating .stars {
  color: #F59E0B;
  font-size: 12px;
  letter-spacing: -1px;
}

.pc-orders {
  font-size: 12px;
  color: var(--bc-grey-400, #9CA3AF);
}

/* Load More */
.bc-catalog__more {
  text-align: center;
  margin-top: 40px;
}

.bc-catalog__load-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 48px;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.2px;
  border: none;
  background: var(--bc-accent, #DC2626);
  color: #fff;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 14px rgba(220,38,38,0.3);
  font-family: 'Outfit', var(--bc-font, sans-serif);
}

.bc-catalog__load-more:hover {
  background: #c41f1f;
  box-shadow: 0 6px 20px rgba(220,38,38,0.4);
  transform: translateY(-2px);
}

/* ── Parse overlay (image search → PDP) ── */
.pc--parsing {
  pointer-events: none;
}

.pc-parse-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(4px);
  border-radius: var(--bc-radius-lg, 16px);
  font-size: 13px;
  font-weight: 600;
  color: var(--bc-navy, #0A1628);
}

.pc-parse-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--bc-grey-200, #E5E7EB);
  border-top-color: var(--bc-navy, #0A1628);
  border-radius: 50%;
  animation: pcSpin 0.7s linear infinite;
}

@keyframes pcSpin {
  to { transform: rotate(360deg); }
}

.pc-parse-toast {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  z-index: 11;
  padding: 10px 14px;
  border-radius: var(--bc-radius, 8px);
  background: #fef2f2;
  color: #991b1b;
  font-size: 12px;
  font-weight: 500;
  text-align: center;
  animation: pcToastIn 0.2s ease-out;
}

@keyframes pcToastIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .bc-catalog {
    padding: 16px 20px 60px;
  }

  .bc-catalog__title {
    font-size: 28px;
  }

  .bc-catalog__grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
  }
}
