/* Page Header */
.page-header {
  background-color: #FAFAF8;
  padding: 4rem 0;
  text-align: center;
  border-bottom: 1px solid #E5DDD4;
  margin-top: 60px; /* accommodate fixed navbar */
}

.page-header h1 {
  font-family: var(--font-heading, 'Lora', serif);
  font-size: 2.6rem;
  color: #1A3C24;
  margin-bottom: 1rem;
  font-weight: 700;
}

.page-header p {
  color: #374151;
  max-width: 650px;
  margin: 0 auto;
  font-size: 1.15rem;
  line-height: 1.6;
  font-weight: 500;
}

/* ─── Rayon Tabs ─── */
.rayon-tabs {
  display: flex;
  gap: var(--space-3, 1rem);
  overflow-x: auto;
  padding-bottom: var(--space-3, 1rem);
  margin-bottom: var(--space-6, 2rem);
  border-bottom: 2px solid #E5E7EB;
  scrollbar-width: none;
  -ms-overflow-style: none;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.rayon-tabs::-webkit-scrollbar { display: none; }

.rayon-tab {
  display: flex;
  align-items: center;
  gap: var(--space-2, 0.5rem);
  padding: var(--space-3, 1rem) var(--space-5, 1.5rem);
  font-size: 0.95rem;
  font-weight: 600;
  color: #4B5563;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 44px;
}

.rayon-tab:hover {
  color: #1A3C24;
}

.rayon-tab.active {
  color: #1A3C24;
  border-bottom-color: #1E3F27;
  font-weight: 700;
}

.rayon-tab svg {
  flex-shrink: 0;
}

/* Filter Bar */
.filter-bar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 3rem;
  background-color: #fff;
  padding: 1.5rem;
  border-radius: var(--radius-lg, 0.5rem);
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
  max-width: 100%;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .filter-bar {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
  }
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .filter-group {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
  }
}

.filter-label {
  font-weight: 700;
  color: #111827;
  white-space: nowrap;
}

.filter-buttons {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.filter-buttons::-webkit-scrollbar {
  display: none;
}

.filter-btn {
  padding: 0.5rem 1.1rem;
  border: 1.5px solid #D1D5DB;
  background-color: #FFFFFF;
  color: #1F2937;
  border-radius: 99px;
  font-family: var(--font-body, 'Raleway', sans-serif);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  min-height: 44px;
}

.filter-btn:hover {
  border-color: #1E3F27;
  color: #1E3F27;
  background-color: #F0FDF4;
}

.filter-btn.active {
  background-color: #1E3F27;
  color: #FFFFFF;
  border-color: #1E3F27;
  font-weight: 700;
}

.filter-sort {
  margin-top: 1rem;
}

@media (min-width: 768px) {
  .filter-sort {
    margin-top: 0;
    margin-left: auto;
  }
}

.sort-select {
  padding: 0.5rem 2.5rem 0.5rem 1rem;
  border: 1.5px solid #D1D5DB;
  border-radius: var(--radius-md, 0.375rem);
  font-family: var(--font-body, 'Raleway', sans-serif);
  color: #111827;
  font-weight: 600;
  background-color: #FFFFFF;
  cursor: pointer;
  min-height: 44px;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23111111%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem top 50%;
  background-size: 0.65rem auto;
}

.sort-select:focus {
  outline: none;
  border-color: #1E3F27;
  box-shadow: 0 0 0 2px rgba(30, 63, 39, 0.2);
}

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.product-card {
  background-color: #fff;
  border-radius: var(--radius-lg, 0.5rem);
  overflow: hidden;
  border: 1px solid #E5DDD4;
  box-shadow: 0 4px 15px rgba(0,0,0,0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  position: relative;
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 25px rgba(0,0,0,0.12);
}

.product-img-wrapper {
  position: relative;
  height: 240px;
  overflow: hidden;
  background-color: #E8E0D8;
}

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

.product-card:hover .product-img {
  transform: scale(1.05);
}

.product-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background-color: var(--color-accent, #D4722A);
  color: #fff;
  padding: 0.3rem 0.8rem;
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  z-index: 1;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.product-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-title {
  font-family: var(--font-heading, 'Lora', serif);
  font-size: 1.25rem;
  color: #111827;
  font-weight: 700;
  margin-bottom: 1rem;
}

.product-specs {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
  flex-grow: 1;
}

.product-specs li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.92rem;
  color: #374151;
  font-weight: 500;
}

.product-specs li svg {
  color: #1E3F27;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 1.5rem;
  border-top: 1px solid #E5E7EB;
}

.product-price {
  font-size: 1.5rem;
  font-weight: 800;
  color: #1A3C24;
}
  font-weight: 700;
  color: var(--color-primary, #2C5E3A);
}

.btn-add-cart {
  background-color: var(--color-primary, #2C5E3A);
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md, 0.375rem);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
  min-height: 44px;
}

.btn-add-cart:hover {
  background-color: #20452a;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background-color: #fff;
  border-radius: var(--radius-lg, 0.5rem);
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

.empty-state svg {
  color: var(--color-text-light, #6b7280);
  margin-bottom: 1rem;
}

.empty-state h3 {
  font-family: var(--font-heading, 'Lora', serif);
  font-size: 1.5rem;
  color: var(--color-text, #1f2937);
  margin-bottom: 0.5rem;
}

.empty-state p {
  color: var(--color-text-light, #6b7280);
  margin-bottom: 1.5rem;
}

.hidden {
  display: none !important;
}

.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background-color: var(--color-primary, #2C5E3A);
  color: white;
  padding: 1rem 2rem;
  border-radius: 99px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  font-weight: 500;
  z-index: 1000;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background-color: var(--color-primary, #2C5E3A);
  color: white;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 99;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: var(--color-accent, #D4722A);
  transform: translateY(-3px);
}
