.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.category-pill {
  padding: 0.48rem 1rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: #ffffff;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
}
.category-pill:hover, .category-pill.is-active {
  background-color: var(--brand-pink);
  border-color: var(--brand-pink);
  color: #ffffff;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
  gap: 1.25rem;
}

.product-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.1rem;
}
@media (max-width: 900px) {
  .product-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 480px) {
  .product-grid-4 {
    grid-template-columns: 1fr;
  }
}

.product-card {
  position: relative;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.product-card:hover:not(.is-dropdown-open) {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(45, 25, 60, 0.09);
}
.product-card.is-dropdown-open {
  z-index: 40;
  transform: none;
  box-shadow: 0 12px 28px rgba(45, 25, 60, 0.11);
}

.product-card-media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: #f8f2f7;
  margin-bottom: 0.8rem;
}
.product-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}
.product-card-title a:hover {
  color: var(--brand-pink);
}

.product-card-price {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.8rem;
}

.product-card-form {
  width: 100%;
  margin-top: auto;
}
.product-card-form .btn {
  width: 100%;
  padding: 0.62rem 1rem;
  font-size: 0.9rem;
}
.product-card-form svg {
  width: 16px;
  height: 16px;
}

.sidebar-card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.sidebar-card-header h2 {
  font-size: 1.3rem;
  font-weight: 700;
}

.product-detail-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-card);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 2.25rem;
  align-items: center;
}
@media (max-width: 820px) {
  .product-detail-card {
    grid-template-columns: 1fr;
    padding: 1.35rem;
  }
}

.product-detail-media-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.product-detail-media {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background-color: #f8f2f7;
  aspect-ratio: 1/1;
}
.product-detail-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.about-detail-card {
  align-items: start;
}

.product-detail-media.about-portrait-media {
  aspect-ratio: 3/4;
  max-width: 420px;
  width: 100%;
  justify-self: center;
}
.product-detail-media.about-portrait-media img {
  object-position: top center;
}

.product-thumb-row {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.product-thumb-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem 0.35rem 0.35rem;
  border-radius: 12px;
  border: 2px solid var(--border-subtle);
  background: #ffffff;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.product-thumb-btn img {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
}
.product-thumb-btn.is-active, .product-thumb-btn[aria-pressed=true] {
  border-color: var(--brand-pink);
  box-shadow: 0 4px 12px rgba(222, 49, 99, 0.14);
}

.product-detail-info {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.product-detail-info .badge-category {
  align-self: flex-start;
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-pill);
  background: var(--bg-soft-pink);
  color: var(--brand-pink-soft-text);
  font-size: 0.82rem;
  font-weight: 600;
}
.product-detail-info h1 {
  font-size: clamp(1.7rem, 2.6vw, 2.25rem);
}
.product-detail-info .detail-price {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--brand-pink);
}
.product-detail-info p {
  color: var(--text-secondary);
}
.product-detail-info .product-maker-note {
  display: inline-block;
  align-self: flex-start;
  padding: 0.35rem 0.8rem;
  border-radius: 10px;
  background: #f6f1fa;
  border: 1px solid var(--border-subtle);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}
.product-detail-info .product-safety-note {
  font-size: 0.83rem;
  line-height: 1.5;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  background: #faf6fc;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.product-card-variant-note {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin: -0.2rem 0 0.25rem;
}

.product-card-form .color-dropdown {
  margin-bottom: 0.5rem;
}

.card-color-select {
  width: 100%;
  height: 38px;
  padding: 0 0.75rem;
  margin-bottom: 0.5rem;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background-color: #ffffff;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
}
.card-color-select:focus {
  outline: 2px solid var(--brand-pink);
  outline-offset: 1px;
}

.add-detail-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  align-items: flex-start;
  margin-top: 0.5rem;
}

.product-option-box {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: 100%;
  max-width: 310px;
  padding: 0.75rem 0.9rem;
  border-radius: 14px;
  background-color: #fdf6f9;
  border: 1px solid #f5d5e3;
}
.product-option-box label {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
}
.product-option-box .option-note {
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.product-option-box .color-dropdown-trigger {
  height: 42px;
  font-size: 0.92rem;
}
.product-option-box select {
  width: 100%;
  height: 42px;
  padding: 0 0.8rem;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background-color: #ffffff;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
}
.product-option-box select:focus {
  outline: 2px solid var(--brand-pink);
  outline-offset: 1px;
}

.add-detail-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}
.add-detail-controls input[type=number] {
  width: 84px;
  height: 46px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  text-align: center;
  font-weight: 600;
}

.hook-banner-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid #f7d6e5;
}
.hook-banner-card img {
  width: 100%;
  height: auto;
}

.product-card.is-sold .product-card-title a {
  text-decoration: line-through;
  text-decoration-color: var(--brand-pink);
  text-decoration-thickness: 2px;
}

.product-card-media.is-sold::before,
.product-detail-media.is-sold::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: 50%;
  left: -8%;
  width: 116%;
  height: 3px;
  background: rgba(255, 255, 255, 0.96);
  transform: rotate(-14deg);
  pointer-events: none;
}

.product-sold-stamp {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  padding: 0.45rem 1.65rem;
  border: 2px solid #ffffff;
  border-radius: var(--radius-pill);
  background: rgba(204, 38, 92, 0.96);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  line-height: 1;
  text-transform: uppercase;
  transform: translate(-50%, -50%) rotate(-14deg);
  white-space: nowrap;
  pointer-events: none;
}

.product-sold-note {
  width: 100%;
  margin-top: auto;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: #faf6fc;
  color: var(--text-secondary);
  font-size: 0.84rem;
  line-height: 1.45;
}

.product-sold-inline {
  display: inline-block;
  color: var(--brand-pink);
  font-size: 0.48em;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  vertical-align: middle;
}

.previously-sold-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
}

.previously-sold-heading {
  margin-bottom: 1.15rem;
}
.previously-sold-heading h2 {
  margin-bottom: 0.2rem;
  font-size: 1.45rem;
}
.previously-sold-heading p {
  color: var(--text-secondary);
}

.previously-sold-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.1rem;
}

.previously-sold-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  box-shadow: var(--shadow-card);
  text-align: center;
}
.previously-sold-card h3 {
  margin-top: 0.15rem;
  font-size: 0.98rem;
}

.previously-sold-media {
  width: 100%;
  aspect-ratio: 3/4;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: #f8f2f7;
}
.previously-sold-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.previously-sold-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.7rem;
  border-radius: var(--radius-pill);
  background: var(--bg-soft-pink);
  color: var(--brand-pink-soft-text);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
