/* Storefront product cards. Keep these rules separate from layout and admin. */
.product-card {
  min-width: 0;
  border: 1px solid #e0e8e6;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 3px 12px #18372d04;
  overflow: hidden;
  isolation: isolate;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.product-card:hover {
  transform: translateY(-3px);
  border-color: #a8c9bf;
  box-shadow: 0 12px 28px #18372d0d;
}

.product-card .product-image {
  margin: 0;
  border-radius: 0;
  border-bottom: 1px solid #edf1f0;
  background: #f7f9f9;
  aspect-ratio: 1.06;
}

.product-card .product-image img {
  padding: 25px;
  object-fit: contain;
  transition: transform .3s ease;
}

.product-card .product-image .pc-photo { padding: 19px; }
.product-card:hover .product-image img { transform: scale(1.025); }

.product-card .favorite-button {
  top: 13px;
  left: 13px;
  width: 40px;
  height: 40px;
  border: 1px solid #e2e9e7;
  background: #ffffffed;
  box-shadow: 0 2px 7px #18372d06;
}

.product-card .favorite-button svg { width: 18px; height: 18px; }
.product-card .favorite-button.saved { background: #fff1f4; border-color: #f1d5df; }

.product-card .condition-badge {
  top: 17px;
  right: 14px;
  max-width: calc(100% - 78px);
  border: 1px solid #cde5d8;
  border-radius: 8px;
  padding: 5px 9px;
  background: #edf8f1f2;
  color: #2e6546;
  font-size: .75rem;
  line-height: 1.55;
}

.product-card .condition-badge.sold {
  background: #fff2eef5;
  border-color: #edcec7;
  color: #9c4437;
}

.product-card .product-info { padding: 19px 20px 20px; }

.product-card .product-meta {
  gap: 9px;
  margin-bottom: 8px;
  color: #63756f;
  font-size: .75rem;
  line-height: 1.65;
}

.product-card .product-meta .brand-label {
  font-size: .75rem;
  letter-spacing: .35px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-card .product-name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  min-height: 49px;
  color: var(--text, #15262e);
  font: 700 1rem/1.55 Arial, K24, sans-serif;
  letter-spacing: -.15px;
  direction: ltr;
  text-align: right;
  overflow-wrap: anywhere;
}

.product-card .product-name:hover { color: var(--accent, #08766a); }

.product-card .spec-chips {
  display: grid;
  gap: 5px;
  min-height: 0;
  margin: 12px 0 0;
}

.product-card .spec-chip {
  display: grid;
  grid-template-columns: 35px minmax(0, 1fr);
  align-items: baseline;
  gap: 8px;
  max-width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #566960;
  font: 400 .8125rem/1.6 Arial, K24, sans-serif;
  direction: ltr;
  text-align: left;
  white-space: normal;
}

.product-card .spec-label {
  color: #64766c;
  font: 700 .75rem/1.6 Arial, sans-serif;
  letter-spacing: .2px;
}

.product-card .spec-chip > span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-card .product-description {
  min-height: 23px;
  margin: 12px 0 0;
  color: #63756f;
  font-size: .8125rem;
  line-height: 1.8;
}

.product-card .product-price-line {
  align-items: center;
  gap: 8px;
  padding-top: 19px;
  margin-top: auto;
  margin-bottom: 15px;
}

.product-card .price {
  color: var(--accent, #08766a);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.65px;
}

.product-card .price del {
  margin-left: 7px;
  color: #68776f;
  font-size: .75rem;
  letter-spacing: 0;
}

.product-card .stock-label,
.product-card .demo-label { font-size: .75rem; line-height: 1.6; white-space: nowrap; }
.product-card .stock-label { color: #416955; }
.product-card .demo-label { color: #8a671d; }

.product-card .product-buttons {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px;
  align-items: stretch;
  gap: 8px;
}

.product-card .product-buttons .btn {
  min-width: 0;
  min-height: 46px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: .875rem;
  line-height: 1.55;
  gap: 7px;
}

.product-card .btn-whatsapp svg { width: 19px; height: 19px; }

.product-card .add-cart {
  min-width: 44px;
  min-height: 46px;
  border: 1px solid #d4e4dd;
  border-radius: 10px;
  background: #f0f7f3;
  color: var(--accent, #08766a);
}

.product-card .add-cart:hover { background: #e4f1e9; border-color: #a8cfbb; }
.product-card .add-cart svg { width: 20px; height: 20px; }

/* Never silently drop a product from a collection at the tablet breakpoint. */
.home-grid > .product-card:last-child { display: flex; }

@media (min-width: 1000px) {
  .product-section.compact-collection .home-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    align-items: stretch;
  }

  .product-section.compact-collection[data-count="1"] .home-grid {
    grid-template-columns: minmax(0, 690px);
  }

  .product-section.compact-collection .home-grid > .product-card {
    display: grid;
    grid-template-columns: minmax(0, .44fr) minmax(0, .56fr);
    min-height: 296px;
  }

  .product-section.compact-collection .product-card .product-image {
    position: relative;
    height: 100%;
    min-height: 296px;
    aspect-ratio: auto;
    border-bottom: 0;
    border-left: 1px solid #edf1f0;
  }

  .product-section.compact-collection .product-card .product-image img { position: absolute; inset: 0; width: 100%; height: 100%; padding: 20px; }
  .product-section.compact-collection .product-card .product-image .pc-photo { padding: 15px; }
  .product-section.compact-collection .product-card .product-info { padding: 23px 22px; }
  .product-section.compact-collection .product-card .product-name { font-size: 1.0625rem; min-height: 53px; }
  .product-section.compact-collection .product-card .favorite-button { left: auto; right: calc(44% - 53px); }
  .product-section.compact-collection .product-card .condition-badge { max-width: calc(44% - 73px); font-size: .75rem; }
}

@media (max-width: 999px) {
  .product-section.compact-collection .home-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .product-card .product-info { padding: 17px 17px 18px; }
  .product-card .product-name { font-size: .9375rem; min-height: 47px; }
  .product-card .price { font-size: 1.4375rem; }
  .product-card .favorite-button { width: 44px; height: 44px; }
}

@media (max-width: 600px) {
  .product-card { border-radius: 14px; }
  .product-card:hover { transform: none; }
  .product-card .product-image { aspect-ratio: 1; }
  .product-card .product-image img { padding: 14px; }
  .product-card .product-image .pc-photo { padding: 11px; }
  .product-card .favorite-button { top: 8px; left: 8px; width: 44px; height: 44px; }
  .product-card .favorite-button svg { width: 18px; height: 18px; }
  .product-card .condition-badge { top: 14px; right: 9px; max-width: calc(100% - 65px); padding: 4px 6px; font-size: .75rem; line-height: 1.45; }
  .product-card .product-info { padding: 14px 12px; }
  .product-card .product-meta { gap: 5px; margin-bottom: 7px; font-size: .75rem; }
  .product-card .product-meta .brand-label { font-size: .75rem; }
  .product-card .product-name { min-height: 44px; font-size: .875rem; line-height: 1.6; letter-spacing: -.1px; }
  .product-card .spec-chips { margin-top: 11px; gap: 5px; }
  .product-card .spec-chip { grid-template-columns: 27px minmax(0, 1fr); gap: 5px; font-size: .75rem; line-height: 1.6; }
  .product-card .spec-label { font-size: .75rem; }
  .product-card .product-description { font-size: .75rem; line-height: 1.8; min-height: 23px; margin-top: 10px; }
  .product-card .product-price-line { flex-wrap: wrap; row-gap: 5px; padding-top: 16px; margin-bottom: 12px; }
  .product-card .price { font-size: 1.3125rem; line-height: 1.3; letter-spacing: -.6px; }
  .product-card .price del { font-size: .75rem; margin-left: 5px; }
  .product-card .stock-label,
  .product-card .demo-label { font-size: .75rem; }
  .product-card .product-buttons { grid-template-columns: minmax(0, 1fr) 44px; gap: 6px; }
  .product-card .product-buttons .btn { min-height: 44px; padding: 8px 5px; gap: 5px; border-radius: 8px; font-size: .8125rem; line-height: 1.5; flex-wrap: wrap; }
  .product-card .btn-whatsapp svg { width: 17px; height: 17px; }
  .product-card .add-cart { min-width: 44px; min-height: 44px; border-radius: 8px; }
  .product-card .add-cart svg { width: 19px; height: 19px; }
  .product-section.compact-collection .home-grid { gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .product-card,
  .product-card .product-image img { transition: none; }
  .product-card:hover,
  .product-card:hover .product-image img { transform: none; }
}

@media(max-width:600px){.product-card .product-meta .brand-label{display:none}.product-card .spec-chip>span:last-child{white-space:normal;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}.product-card .spec-chip{min-height:43px}}
