/* Platecraft Addons – Product Grid. Defaults only; the widget's controls use a
   more specific selector. */

/* Columns may be a decimal (for the carousel): the grid rounds down. */
.ppg .ppg__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(calc((100% - (var(--ppg-cols, 3) - 1) * var(--ppg-gap, 24px)) / var(--ppg-cols, 3) - 0.1px), 1fr));
  gap: var(--ppg-gap, 24px);
}

/* ---------- Card ---------- */
.ppg .ppg__card {
  position: relative;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  min-width: 0;
  overflow: hidden;
  border: 0 solid transparent;
  box-shadow: var(--ppg-card-shadow, none);
  text-align: var(--ppg-align, left);
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}
.ppg .ppg__card:hover {
  box-shadow: var(--ppg-card-shadow-h, var(--ppg-card-shadow, none));
}

/* ---------- Image ---------- */
.ppg .ppg__media {
  position: relative;
  box-sizing: border-box;
  height: var(--ppg-media-h, auto);
  /* A chosen shape, else the image height (fit), else square. */
  aspect-ratio: var(--ppg-ratio, var(--ppg-ratio-fit, 1 / 1));
  overflow: hidden;
  border: 0 solid transparent;
  border-radius: 10px;
  background-color: rgba(0, 0, 0, 0.04);
  box-shadow: var(--ppg-media-shadow, none);
}
/* The image sits above an optional background layer (.ppg__media-bg). */
.ppg .ppg__media-link {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: var(--ppg-img-valign, center);
  justify-content: center;
  width: 100%;
  height: 100%;
}
.ppg .ppg__img {
  display: block;
  flex: 0 0 auto;
  width: var(--ppg-img-w, 100%);
  height: var(--ppg-img-h, var(--ppg-img-w, 100%));
  /* A size in px stays as set when the area has padding: the image may
     reach into the padding, but never beyond the area itself. */
  max-width: calc(100% + var(--ppg-media-px, 0px));
  max-height: calc(100% + var(--ppg-media-py, 0px));
  margin: 0;
  border-radius: 0;
  object-fit: var(--ppg-fit, cover);
  transition: transform var(--ppg-img-speed, 500ms) ease, opacity 0.4s ease;
}
.ppg .ppg__card:hover .ppg__img {
  transform: translateY(calc(var(--ppg-img-lift, 0px) * -1)) rotate(var(--ppg-rotate, 0deg)) scale(var(--ppg-zoom, 1));
}
.ppg .ppg__img--hover {
  position: absolute;
  inset: 0;
  margin: auto;
  opacity: 0;
}
.ppg .ppg__card:hover .ppg__img--hover {
  opacity: 1;
}
.ppg .ppg__card.is-out .ppg__img {
  opacity: 0.6;
}

.ppg .ppg__badges {
  position: absolute;
  top: var(--ppg-badge-y, 12px);
  left: var(--ppg-badge-left, var(--ppg-badge-x, 12px));
  right: var(--ppg-badge-right, auto);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: var(--ppg-badge-align, flex-start);
  gap: var(--ppg-badge-gap, 6px);
  pointer-events: none;
}
.ppg .ppg__badge {
  display: inline-block;
  padding: 4px 10px;
  border: 0 solid transparent;
  border-radius: 999px;
  background-color: #222;
  box-shadow: var(--ppg-badge-shadow, none);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}
.ppg .ppg__badge--sale { background-color: #d6402a; }
.ppg .ppg__badge--featured { background-color: #c4891b; }
.ppg .ppg__badge--new { background-color: #2e9d4c; }
.ppg .ppg__badge--stock { background-color: #6b6f76; }

/* ---------- Text ---------- */
.ppg .ppg__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: var(--ppg-body-gap, 6px);
  padding: 14px 4px 4px;
}
.ppg .ppg__cat {
  font-size: 0.78em;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.ppg .ppg__title {
  margin: 0;
  font-size: 1.05em;
  line-height: 1.3;
  overflow-wrap: break-word;
}
.ppg .ppg__title a {
  color: inherit;
  text-decoration: none;
}
.ppg .ppg__rating {
  line-height: 1;
}
.ppg .ppg__stars {
  --ppg-star-shape: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01z'/%3E%3C/svg%3E");
  display: inline-block;
  width: calc(var(--ppg-star, 14px) * 5);
  height: var(--ppg-star, 14px);
  background: linear-gradient(90deg, var(--ppg-star-c, #f5a623) var(--ppg-rate, 0%), var(--ppg-star-empty, #d9d9d9) var(--ppg-rate, 0%));
  -webkit-mask: var(--ppg-star-shape) left center / var(--ppg-star, 14px) var(--ppg-star, 14px) repeat-x;
  mask: var(--ppg-star-shape) left center / var(--ppg-star, 14px) var(--ppg-star, 14px) repeat-x;
}
.ppg .ppg__excerpt {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 0.9em;
  line-height: 1.5;
}
.ppg .ppg__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: var(--ppg-footer, space-between);
  gap: 10px;
  margin-top: auto;
  padding-top: 6px;
}
.ppg .ppg__price {
  font-weight: 700;
}
.ppg .ppg__price del {
  margin-right: 4px;
  font-weight: 400;
  color: color-mix(in srgb, currentColor 60%, transparent);
}
.ppg .ppg__price ins {
  text-decoration: none;
}

/* ---------- Button and quantity (stronger than theme button styles) ---------- */
.ppg .ppg__actions {
  display: flex;
  flex: var(--ppg-btn-grow, 0) 1 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.ppg .ppg__actions .ppg__btn {
  display: inline-flex;
  flex: var(--ppg-btn-grow, 0) 1 auto;
  align-items: center;
  justify-content: center;
  gap: var(--ppg-btn-icon-gap, 8px);
  margin: 0;
  padding: 10px 18px;
  border: 0 solid transparent;
  border-radius: 999px;
  background-color: #222;
  box-shadow: var(--ppg-button-shadow, none);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
}
.ppg .ppg__actions .ppg__btn:hover,
.ppg .ppg__actions .ppg__btn:focus {
  background-color: #000;
  box-shadow: var(--ppg-button-shadow-h, var(--ppg-button-shadow, none));
  color: #fff;
}
.ppg .ppg__actions .ppg__btn.loading {
  opacity: 0.6;
  pointer-events: none;
}
.ppg .ppg__actions .ppg__btn.added .ppg__btn-text::after {
  content: " \2713";
}
.ppg .ppg__btn-icon {
  display: inline-flex;
  font-size: var(--ppg-btn-icon, 1em);
  line-height: 1;
}
.ppg .ppg__btn-icon svg {
  width: 1em;
  height: 1em;
  fill: currentColor;
}
.ppg .added_to_cart {
  color: inherit;
  font-size: 0.85em;
  text-decoration: underline;
}
.ppg .ppg__qty {
  display: inline-flex;
  align-items: stretch;
  box-sizing: border-box;
  width: var(--ppg-qty-w, 104px);
  height: 38px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 999px;
}
.ppg .ppg__qty .ppg__qty-btn {
  flex: 0 0 32px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background-color: transparent;
  color: inherit;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.ppg .ppg__qty .ppg__qty-btn:hover,
.ppg .ppg__qty .ppg__qty-btn:focus {
  background-color: rgba(0, 0, 0, 0.06);
  color: inherit;
}
.ppg .ppg__qty .ppg__qty-input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: center;
  -moz-appearance: textfield;
  appearance: textfield;
}
.ppg .ppg__qty .ppg__qty-input::-webkit-outer-spin-button,
.ppg .ppg__qty .ppg__qty-input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

/* ---------- Card layouts ---------- */
.ppg--side .ppg__card {
  flex-direction: row;
  align-items: stretch;
}
.ppg--side .ppg__media {
  flex: 0 0 var(--ppg-side-w, 40%);
  min-height: 120px;
  aspect-ratio: auto;
}
.ppg--side .ppg__img {
  position: absolute;
  inset: 0;
}
.ppg--side .ppg__body {
  padding: 8px 4px 8px 16px;
}
.ppg--overlay .ppg__media {
  aspect-ratio: var(--ppg-ratio, var(--ppg-ratio-fit, 3 / 4));
}
.ppg--overlay .ppg__body {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  padding: 48px 16px 16px;
  background: linear-gradient(to top, var(--ppg-overlay, rgba(0, 0, 0, 0.7)), transparent);
  color: #fff;
}

/* Without an image (Card Content → Image off): badges in the text, no overlay. */
.ppg .ppg__badges.ppg__badges--inline {
  position: static;
  flex-direction: row;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.ppg--overlay .ppg__card--no-image .ppg__body {
  position: relative;
}
.ppg--side .ppg__card--no-image .ppg__body {
  padding-left: 4px;
}

/* ---------- Background layers (a pattern behind the image or the card) ---------- */
.ppg .ppg__card-bg,
.ppg .ppg__media-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.ppg .ppg__card > .ppg__body {
  position: relative;
  z-index: 1;
}

/* ---------- Name and price on one row ---------- */
.ppg .ppg__title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.ppg .ppg__title-row .ppg__title {
  flex: 1 1 auto;
  min-width: 0;
}
.ppg .ppg__title-row .ppg__price {
  flex: 0 0 auto;
  white-space: nowrap;
}

/* Category shown on the image. */
.ppg .ppg__cat--image {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background-color: rgba(255, 255, 255, 0.92);
  color: #222;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
}

/* Button on the image: appears on hover (always shown on touch screens). */
.ppg .ppg__actions--image {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 3;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.ppg .ppg__card:hover .ppg__actions--image,
.ppg .ppg__card:focus-within .ppg__actions--image {
  opacity: 1;
  transform: none;
}
@media (hover: none) {
  .ppg .ppg__actions--image {
    opacity: 1;
    transform: none;
  }
}
.ppg .ppg__actions .ppg__btn.ppg__btn--icon {
  flex: 0 0 auto;
  width: var(--ppg-btn-size, 42px);
  height: var(--ppg-btn-size, 42px);
  padding: 0;
  border-radius: 50%;
}
.ppg .ppg__btn--icon .ppg__btn-icon {
  font-size: var(--ppg-btn-icon, 18px);
  font-weight: 700;
}
.ppg .ppg__btn--icon + .added_to_cart {
  display: none;
}

/* ---------- Tabs and the "See all" button ---------- */
.ppg .ppg__head {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: var(--ppg-head-justify, space-between);
  gap: 12px 24px;
  margin-bottom: var(--ppg-head-space, 24px);
}
.ppg .ppg__tabs {
  position: relative;
  box-sizing: border-box;
  border: 0 solid transparent;
  box-shadow: var(--ppg-tabs-bar-shadow, none);
  display: flex;
  flex-wrap: var(--ppg-tabs-wrap, wrap);
  gap: var(--ppg-tabs-gap, 8px);
  max-width: 100%;
  overflow-x: var(--ppg-tabs-overflow, visible);
  /* "Scroll sideways" shows no scrollbar: swipe, trackpad or mouse wheel move the tabs. */
  scrollbar-width: none;
}
.ppg .ppg__tabs::-webkit-scrollbar {
  display: none;
}
/* Stronger than theme button styles. */
.ppg .ppg__tabs .ppg__tab {
  flex: var(--ppg-tab-grow, 0) 0 auto;
  margin: 0;
  padding: 6px 14px;
  border: 0 solid transparent;
  border-radius: 8px;
  background-color: transparent;
  box-shadow: var(--ppg-tab-shadow, none);
  color: inherit;
  font: inherit;
  font-weight: 600;
  line-height: 1.3;
  text-transform: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.ppg .ppg__tabs .ppg__tab:hover,
.ppg .ppg__tabs .ppg__tab:focus {
  background-color: rgba(0, 0, 0, 0.05);
  box-shadow: var(--ppg-tab-shadow-h, var(--ppg-tab-shadow, none));
  color: inherit;
}
.ppg .ppg__tabs .ppg__tab.is-active {
  background-color: #222;
  box-shadow: var(--ppg-tab-active-shadow, var(--ppg-tab-shadow, none));
  color: #fff;
}
.ppg .ppg__tabs .ppg__tab:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* Tab bar: the tabs plus the line under them. */
.ppg .ppg__tabbar {
  display: flex;
  flex: var(--ppg-tabs-grow, 0) 1 auto;
  flex-direction: column;
  width: var(--ppg-tabs-w, auto);
  min-width: 0;
  max-width: 100%;
}

/* Line under the tabs: wave / zigzag (a mask in the line color), straight
   lines, or the user's own image. */
.ppg .ppg__line {
  display: block;
  flex: 0 0 auto;
  width: 100%;
  height: var(--ppg-line-h, 6px);
  margin-top: var(--ppg-line-space, 8px);
  pointer-events: none;
}
.ppg .ppg__line--row {
  flex: 0 0 100%;
  margin-top: calc(var(--ppg-line-space, 8px) - 12px);
}
.ppg .ppg__line--custom {
  flex-basis: var(--ppg-line-w, 100%);
  width: var(--ppg-line-w, 100%);
  max-width: 100%;
  margin-left: var(--ppg-line-x, 0px);
}
.ppg .ppg__line--wave,
.ppg .ppg__line--zigzag {
  background-color: var(--ppg-line-c, currentColor);
  -webkit-mask: var(--ppg-line-shape) left center / var(--ppg-line-len, 16px) 100% repeat-x;
  mask: var(--ppg-line-shape) left center / var(--ppg-line-len, 16px) 100% repeat-x;
}
.ppg .ppg__line--solid,
.ppg .ppg__line--dashed,
.ppg .ppg__line--dotted,
.ppg .ppg__line--double {
  height: 0;
  border-top: var(--ppg-line-h, 2px) solid var(--ppg-line-c, currentColor);
}
.ppg .ppg__line--dashed { border-top-style: dashed; }
.ppg .ppg__line--dotted { border-top-style: dotted; }
.ppg .ppg__line--double { border-top-style: double; border-top-width: max(3px, var(--ppg-line-h, 4px)); }
.ppg .ppg__line--image {
  height: var(--ppg-line-h, 10px);
  background-image: var(--ppg-line-img, none);
  background-position: var(--ppg-line-bgpos, left) center;
  background-repeat: var(--ppg-line-repeat, repeat-x);
  background-size: var(--ppg-line-bgsize, auto 100%);
}

@keyframes ppg-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.ppg .ppg__panel.ppg-in {
  animation: ppg-in 0.35s ease backwards;
}

/* "See all" place per device (Position control). */
.ppg .ppg__head .ppg__more {
  display: var(--ppg-more-top, inline-flex);
}
.ppg .ppg__head--more-only {
  display: var(--ppg-more-head, flex);
}
.ppg .ppg__more-row {
  display: var(--ppg-more-bottom, block);
  margin-top: var(--ppg-more-space, 32px);
  text-align: center;
}
.ppg .ppg__more {
  display: inline-flex;
  align-items: center;
  gap: var(--ppg-more-icon-gap, 8px);
  padding: 10px 20px;
  border: 0 solid transparent;
  border-radius: 8px;
  background-color: #222;
  box-shadow: var(--ppg-more-shadow, none);
  color: #fff;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: color 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.ppg .ppg__more:hover {
  background-color: #000;
  box-shadow: var(--ppg-more-shadow-h, var(--ppg-more-shadow, none));
  color: #fff;
}
.ppg .ppg__more-icon {
  display: inline-flex;
  line-height: 1;
}
.ppg .ppg__more-icon svg {
  width: 1em;
  height: 1em;
  fill: currentColor;
}

.ppg__notice {
  margin: 0;
  padding: 12px 16px;
  background: #fff8e5;
  color: #1d2327;
  font-size: 13px;
}

@media (prefers-reduced-motion: reduce) {
  .ppg .ppg__card,
  .ppg .ppg__img {
    transition: none;
  }
}
