/* ---------- Product grid ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.5rem;
}

.product-card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.15s;
}

.product-card:hover {
  transform: translateY(-3px);
}

/* Centered heading + "view all" action for the home page featured block. */
.featured__head {
  margin-bottom: 2.8rem;
  text-align: center;
}

.featured__actions {
  margin-top: 2.5rem;
  text-align: center;
}

.product-card__media,
.product-card__placeholder {
  aspect-ratio: 4 / 3;
  background: var(--color-accent);
  object-fit: cover;
  width: 100%;
}

.product-card__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-muted);
  font-size: 0.85rem;
}

.product-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem;
}

.product-card__title {
  font-weight: 600;
  color: var(--color-text);
}

.price {
  font-weight: 700;
  color: var(--color-text);
}

.price__compare {
  margin-left: 0.5rem;
  font-weight: 400;
  color: var(--color-muted);
  text-decoration: line-through;
}

/* ---------- Shop toolbar ---------- */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

/* ---------- Product detail ---------- */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

.product-gallery img,
.product-gallery__placeholder {
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  aspect-ratio: 1 / 1;
  background: var(--color-accent);
  width: 100%;
  object-fit: cover;
}

.option-group {
  margin: 1.25rem 0;
}

.option-group__label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.variant-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin: 0.5rem 0 0;
}

.variant {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  cursor: pointer;
}

.variant:has(input:checked) {
  border-color: var(--color-primary);
  background: var(--color-accent);
}

.variant input {
  margin-right: 0.6rem;
}

.qty-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0 1.5rem;
}

.qty-row input {
  width: 5rem;
}

/* ---------- Cart ---------- */
.cart-table {
  width: 100%;
  border-collapse: collapse;
}

.cart-table th,
.cart-table td {
  padding: 0.85rem 0.75rem;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
  vertical-align: middle;
}

.cart-table td.num,
.cart-table th.num {
  text-align: right;
}

.cart-total {
  display: flex;
  justify-content: flex-end;
  gap: 1.5rem;
  align-items: baseline;
  margin-top: 1.5rem;
  font-size: 1.25rem;
  font-weight: 700;
}

/* ---------- Pager ---------- */
.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 2.5rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .product-detail {
    grid-template-columns: 1fr;
  }
}
