:root {
  --shop-gold: #cea860;
  --shop-color: #2a2a28;
  --shop-muted: #575757;
  --shop-border: #EFE7DA;
  --shop-hover-bg: #eeecf3;
}

.shop-page {
  padding-block: 48px 0
}

/* ==========================================================================
   Toolbar
   ========================================================================== */

.shop-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.shop-toolbar__dropdowns {
  display: flex;
  gap: 16px;
}

.shop-dropdown {
  position: relative;
}

.shop-dropdown summary {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  padding: 16px 24px;
  border: 1px solid var(--shop-color);
  border-radius: 12px;
  font-size: 18px;
  line-height: 1.2;
  color: var(--shop-color);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.shop-dropdown summary::-webkit-details-marker {
  display: none;
}

.shop-dropdown summary svg {
  transition: transform 0.2s;
}

.shop-dropdown[open] summary svg {
  transform: rotate(180deg);
}

.shop-dropdown__panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 30;
  min-width: 230px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--shop-border);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(42, 42, 40, 0.1);
  list-style: none;
  display: grid;
  gap: 2px;
}

.shop-dropdown__panel a {
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 16px;
  line-height: 1.3;
  color: var(--shop-color);
  text-decoration: none;
  white-space: nowrap;
}

.shop-dropdown__panel a:hover {
  background: #f7f3ee;
}

.shop-dropdown__panel a.is-current {
  color: var(--shop-gold);
  font-weight: 600;
}

.shop-toolbar__count {
  font-size: 18px;
  color: var(--shop-color);
}

/* ==========================================================================
   Product grid
   ========================================================================== */

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(0, 307px));
  gap: 30px;
  margin-top: 40px;
  padding: 0;
  list-style: none;
}

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--shop-border);
  border-radius: 24px;
  padding: 30px 24px 24px 24px;
  transition: background 0.25s;
}

.product-card:hover {
  background: var(--shop-hover-bg);
}

.product-card__link {
  display: flex;
  flex-direction: column;
  flex: 1;
  color: inherit;
  text-decoration: none;
}

.product-card__media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  overflow: hidden;
}

.product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-width: calc(100% - 32px); /*202px*/
}

/* --- Hover "Buy Now" circle --- */

.product-card__hover {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 124px;
  height: 124px;
  border-radius: 50%;
  background: var(--shop-gold);
  color: #fff;
  font-weight: 600;
  font-size: 18px;
  line-height: 1.2;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.7);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}

.product-card__hover-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  color: var(--shop-gold);
}

@media (hover: hover) {
  .product-card:hover .product-card__hover {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* --- Card text --- */

.product-card__title {
  margin-top: 20px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 24px;
  line-height: 1.3;
  text-wrap: normal;
  color: #2A2A28;
}

.product-card__excerpt {
  margin-top: 6px;
  font-size: 18px;
  line-height: 1.5;
  color: var(--shop-muted);
}

/* Mobile-only button */
.product-card__btn {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
  padding: 17px 34px;
  border-radius: 999px;
  background: var(--shop-gold);
  color: #fff;
  font-weight: 600;
  font-size: 18px;
  line-height: 1.2;
  text-decoration: none;
}

/* ==========================================================================
   Pagination / empty
   ========================================================================== */

.shop-page .woocommerce-pagination {
  margin-top: 48px;
  text-align: center;
}

.shop-page .woocommerce-pagination ul {
  display: inline-flex;
  gap: 8px;
  list-style: none;
  padding: 0;
}

.shop-page .woocommerce-pagination a,
.shop-page .woocommerce-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding-inline: 12px;
  border: 1px solid var(--shop-border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--shop-color);
}

.shop-page .woocommerce-pagination span.current {
  background: var(--shop-gold);
  border-color: var(--shop-gold);
  color: #fff;
}

.shop-empty {
  margin-top: 48px;
  font-size: 18px;
  color: var(--shop-muted);
}

/* ==========================================================================
   Tablet & mobile
   ========================================================================== */

@media (max-width: 1023px) {
  .shop-page {
    padding-block: 40px 0;
  }

  .shop-toolbar {
    flex-wrap: wrap;
    justify-content: center;
  }

  .shop-toolbar__count {
    width: 100%;
    text-align: right;
  }

  .shop-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    margin-top: 24px;
  }

  .product-card {
    padding: 24px 20px;
  }

  .product-card__media {
    aspect-ratio: auto;
    height: 255px;
  }

  .product-card__media img{
    max-width: 202px;
  }

  .product-card__hover {
    display: none;
  }

  .product-card__title {
    font-size: 24px;
  }

  .product-card__excerpt {
    font-size: 16px;
  }

  .product-card__btn {
    display: inline-flex;
  }
}
