/* Products Preview Redesign Styles */
/* V3.0.2 Preview — NOT FOR PRODUCTION */
/* Uses unique class names (pp-*) to avoid site.css conflicts */

/* Hero Section */
.products-hero {
  padding: 3rem 0 2rem;
  background: var(--bg-light, #f7f7f5);
  text-align: center;
}
.products-hero h1 {
  font-size: 2.2rem;
  margin-bottom: 0.75rem;
  color: var(--text-dark, #1a1a1a);
}
.products-hero .hero-desc {
  font-size: 1.05rem;
  color: var(--text-mid, #666);
  max-width: 600px;
  margin: 0 auto;
}
.breadcrumb {
  font-size: 0.85rem;
  color: var(--text-mid, #666);
  margin-bottom: 1.5rem;
}
.breadcrumb a { color: var(--gold, #b8860b); text-decoration: none; }
.breadcrumb span { margin: 0 0.5rem; }

/* Toolbar: sticky filters */
.products-toolbar {
  position: sticky;
  top: 24px;
  z-index: 500;
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
  padding: 1rem 0;
}
.toolbar-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }

/* Search Box */
.search-box {
  position: relative;
  flex: 1 1 260px;
  max-width: 360px;
}
.search-box input {
  width: 100%;
  padding: 0.6rem 1rem 0.6rem 2.5rem;
  border: 1px solid #d0d0d0;
  border-radius: 6px;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}
.search-box input:focus { border-color: var(--gold, #b8860b); }
.search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
  font-size: 1.1rem;
}

/* Category Filter Buttons */
.cat-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  flex: 1 1 auto;
}
.cat-filters::-webkit-scrollbar { display: none; }
.cat-btn {
  white-space: nowrap;
  padding: 0.5rem 1rem;
  border: 1px solid #d0d0d0;
  border-radius: 20px;
  background: #fff;
  font-size: 0.85rem;
  cursor: pointer;
  color: #555;
  transition: all 0.2s;
  flex-shrink: 0;
}
.cat-btn:hover { border-color: var(--gold, #b8860b); color: #333; }
.cat-btn.active {
  background: var(--gold, #b8860b);
  color: #fff;
  border-color: var(--gold, #b8860b);
}
.cat-count {
  font-size: 0.75rem;
  opacity: 0.8;
  margin-left: 2px;
}

/* Filter Status */
.filter-status {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  margin-top: 0.5rem;
}
.showing-count {
  font-size: 0.85rem;
  color: #888;
}
.clear-filters {
  font-size: 0.85rem;
  color: var(--gold, #b8860b);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}

/* Products Grid — uses unique pp- prefix */
.pp-products-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 1.5rem;
  padding: 2rem 0 4rem;
}

/* Product Card */
.pp-product-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s, transform 0.2s;
  cursor: pointer;
  min-height: unset !important;
  box-shadow: none !important;
}
.pp-product-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.1) !important;
  transform: translateY(-2px);
}

/* Card image wrapper */
.pp-card-img {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #f0f0f0;
}
.pp-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pp-card-img.placeholder-img img {
  object-fit: contain;
  padding: 1.5rem;
}
.ph-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 0.72rem;
  text-align: center;
  padding: 3px 6px;
}

/* Card body */
.pp-card-body {
  padding: 1rem 1.2rem 1.2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.card-cat-tag {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gold, #b8860b);
  margin-bottom: 0.4rem;
}
.pp-card-body h3 {
  font-family: inherit !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  margin: 0 0 0.5rem !important;
  color: #1a1a1a !important;
  line-height: 1.3;
}
.pp-card-body p {
  font-size: 0.88rem !important;
  color: #666 !important;
  line-height: 1.5;
  margin: 0 0 1rem !important;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pp-card-body .btn,
.pp-card-body .btn-outline {
  align-self: flex-start;
  font-size: 0.82rem;
  padding: 0.4rem 1rem;
  border: 1px solid var(--gold, #b8860b);
  color: var(--gold, #b8860b);
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.2s;
  background: transparent;
  font-weight: 500;
  margin-top: auto !important;
}
.pp-product-card:hover .btn-outline {
  background: var(--gold, #b8860b);
  color: #fff;
}

/* Override inherited product-card>img rule from site.css that targets .product-card > img */
.pp-product-card > img {
  height: auto !important;
}

/* No Results */
.no-results {
  text-align: center;
  padding: 3rem;
  color: #888;
  font-size: 1.1rem;
}

/* Back to Top */
#backToTop {
  display: none;
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gold, #b8860b);
  color: #fff;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
  z-index: 999;
  transition: opacity 0.2s;
}

/* Responsive: 3 columns below 1100px */
@media (max-width: 1100px) {
  .pp-products-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}
/* Responsive: 2 columns tablet */
@media (max-width: 768px) {
  .pp-products-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem;
  }
  .products-hero h1 { font-size: 1.8rem; }
  .products-hero { padding: 2rem 0 1.5rem; }
  .toolbar-inner { flex-direction: column; align-items: stretch; }
  .search-box { max-width: none; min-width: 0; width: 100%; }
  .cat-filters { min-width: 0; max-width: 100%; width: 100%; }
  .toolbar-inner { min-width: 0; max-width: 100%; }
}
/* Responsive: 1 column phone */
@media (max-width: 480px) {
  .pp-products-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem;
  }
  .products-hero h1 { font-size: 1.5rem; }
  .products-hero .hero-desc { font-size: 0.95rem; }
  .pp-card-body h3 { font-size: 0.95rem !important; }
  .pp-card-body p { font-size: 0.85rem !important; }
  .cat-btn { font-size: 0.78rem; padding: 0.4rem 0.8rem; }
  #backToTop { bottom: 1rem; right: 1rem; }
}

/* Mobile overflow prevention */
@media (max-width: 480px) {
  .products-grid-section {
    overflow-x: hidden;
    width: 100%;
  }
  .products-toolbar {
    position: sticky;
    top: 24px;
  }
  .cat-filters {
    -webkit-overflow-scrolling: touch;
  }
}

/* Fix: constrain toolbar overflow on mobile (2026-08-04) */
@media (max-width: 768px) {
  .products-toolbar { overflow: hidden; max-width: 100%; }
  .toolbar-inner { overflow: hidden; max-width: 100%; }
  .search-box { overflow: hidden; }
}
