/**
 * Petshop store-product-grid: Featured Collections (Alfies index § “Featured promo tiles”)
 * + shared .t1-pg-* rules for non-promo grid layouts.
 */

/* ── Tokens (Alfies v6 → theme) ───────────────────────────────────────── */
.t1-product-grid--featured {
  --pg-surface: var(--theme-surface, #ffffff);
  --pg-border: var(--theme-border, #e8e8e4);
  --pg-shdw-xs: 0 1px 3px rgba(26, 43, 75, 0.08);
  --pg-shdw-lg: 0 18px 40px rgba(26, 43, 75, 0.18);
  --pg-ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --pg-ink: var(--theme-text, #0f2f2c);
  --pg-ink-2: var(--theme-text-secondary, #1f3f3a);
  --pg-muted: var(--theme-muted, #5f6f69);
  --pg-border-md: var(--theme-border, #c5cfc9);
}

.t1-product-grid {
  width: 100%;
  /* padding: 30px 20px; */
  background: #ffffff;
}

/* ========== Featured Collections (Alfies styles.css §10, scoped) ========== */

.t1-product-grid--featured.block {
  padding: 48px 0 56px;
  background: #ffff !important;
}

.t1-product-grid--featured .container {
  width: 100%;
  max-width: min(1180px, 100% - 40px);
  margin-inline: auto;
  padding-inline: 0;
}

.t1-product-grid--petshop-block .more.t1-pgb-more{
  font-size: 13.5px !important;
  font-weight: 700;
  color: var(--theme-primary, #16a34a);
  text-decoration: none;
  white-space: nowrap;
  display: block !important;
  text-decoration: none;
  transition: color 150ms !important;
  border-bottom: 1px solid currentColor;
  padding: 2px 0px;
}
.t1-product-grid--petshop-block .more.t1-pgb-more:hover{
  color: var(--theme-accent-dark, #15803d) !important;
}
.t1-product-grid--featured .section-title {
  font-family: var(--theme-font-serif, Georgia, "Times New Roman", serif) !important;
  font-size: clamp(1.5rem, 3.2vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--theme-hero-heading, var(--theme-header-bg, #1a2b4b));
  line-height: 1.1;
  margin: 0;
  text-align: left;
}

.t1-product-grid--featured .section-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 28px;
}

.t1-product-grid--featured .section-head-row .more {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--theme-primary, #16a34a);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 1px solid currentColor;
  padding: 2px 0;
}

.t1-product-grid--featured .section-head-row .more:hover {
  color: var(--theme-accent-dark, #15803d);
}

.t1-product-grid--featured .promo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 1024px) {
  .t1-product-grid--featured .promo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 580px) {
  .t1-product-grid--featured .promo-grid {
    grid-template-columns: 1fr;
  }

  .t1-product-grid--featured .section-head-row .more {
    display: none;
  }
}

.t1-product-grid--featured .promo-tile .t1-pg-price {
  font-size: 15px;
  font-weight: 700;
  color: var(--theme-primary, #00b72f);
  margin-top: 2px;
}

/* JS clone source — .promo-tile { display:flex } otherwise overrides HTML [hidden] */
.t1-product-grid--featured .promo-tile[data-pg-item-template],
.t1-product-grid--featured .promo-tile[data-pg-item-template][hidden],
.t1-product-grid [data-pg-item-template][hidden] {
  display: none !important;
}

.t1-product-grid--featured .promo-tile.t1-pg-item {
  background: var(--pg-surface);
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--pg-border);
  box-shadow: var(--pg-shdw-xs);
  transition: transform 200ms var(--pg-ease), box-shadow 200ms var(--pg-ease);
  display: flex;
  flex-direction: column;
  cursor: pointer;
  padding: 0;
  margin: 0;
  gap: 0;
  position: relative;
}

.t1-product-grid--featured .promo-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--pg-shdw-lg);
}

.t1-product-grid--featured .promo-tile-photolink.t1-pg-link {
  display: block;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

.t1-product-grid--featured .promo-tile-photolink.t1-pg-link:hover,
.t1-product-grid--featured .promo-tile-photolink.t1-pg-link:focus {
  text-decoration: none;
}

.t1-product-grid--featured .promo-tile .photo {
  height: 170px;
  background-size: cover;
  background-position: center;
  position: relative;
  flex-shrink: 0;
  overflow: hidden;
  background-color: var(--theme-bg-muted, #f2f2ef);
}

.t1-product-grid--featured .promo-tile .photo::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(160deg, rgba(0, 0, 0, 0.04) 0%, rgba(0, 0, 0, 0.32) 100%);
}

.t1-product-grid--featured .promo-tile .photo img[data-pg-img] {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.t1-product-grid--featured .promo-tile .tile-icon {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.t1-product-grid--featured .promo-tile .tile-icon svg {
  width: 19px;
  height: 19px;
}

.t1-product-grid--featured .promo-tile .body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.t1-product-grid--featured .promo-tile .body h3,
.t1-product-grid--featured .promo-tile .promo-tile__title {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  line-height: 1.3;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.t1-product-grid--featured .promo-tile .promo-tile__namelink,
.t1-product-grid--featured .promo-tile .promo-tile__title a {
  color: var(--pg-ink);
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.t1-product-grid--featured .promo-tile .promo-tile__namelink:hover,
.t1-product-grid--featured .promo-tile .promo-tile__title a:hover {
  color: var(--theme-primary, #00b72f);
}

.t1-product-grid--featured .promo-tile .body p,
.t1-product-grid--featured .promo-tile .body [data-pg-description] {
  font-size: 13px;
  color: var(--pg-muted);
  margin: 0;
  line-height: 1.5;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  word-break: break-word;
}

.t1-product-grid--featured .promo-tile .body .btn,
.t1-product-grid--featured .promo-tile .body .btn.t1-pg-btn-view {
  background: transparent;
  border: 1.5px solid var(--pg-border-md);
  border-radius: 18px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--pg-ink-2);
  padding: 6px 15px;
  cursor: pointer;
  width: fit-content;
  margin-top: 6px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  box-sizing: border-box;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.t1-product-grid--featured .promo-tile .body .btn:hover,
.t1-product-grid--featured .promo-tile .body .btn.t1-pg-btn-view:hover {
  background: var(--pg-ink);
  border-color: var(--pg-ink);
  color: #fff;
}

.t1-product-grid--featured .promo-tile .t1-pg-price[hidden] {
  display: none !important;
}

.t1-product-grid--featured .t1-pg-btn-add {
  display: none !important;
}

.t1-product-grid--featured .t1-pg-details-hook {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  pointer-events: none;
}

@media (max-width: 580px) {
  .t1-product-grid--featured .promo-grid {
    grid-template-columns: repeat(var(--cols-mobile, 1), 1fr) !important;
  }
}

/* ========== Default product grid (non-featured / builder) ========== */

.t1-pg-title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--theme-text, #111);
}

.t1-pg-wrapper:not(.t1-pgb-grid):not(.promo-grid) {
  --cols-desktop: 4;
  --cols-tablet: 2;
  --cols-mobile: 1;
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(var(--cols-desktop), 1fr);
}

.t1-pg-item {
  background: var(--theme-surface, #fff);
  border: 1px solid var(--theme-border, #e7e7e7);
  border-radius: var(--theme-radius, 8px);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.t1-pg-link,
a[data-pg-link],
.t1-pg-link:hover,
.t1-pg-link:focus,
.t1-pg-link:visited,
.t1-pg-link:active,
a[data-pg-link]:hover,
a[data-pg-link]:focus,
a[data-pg-link]:visited,
a[data-pg-link]:active {
  text-decoration: none;
}

.t1-pg-item:not(.promo-tile) .t1-pg-link,
.t1-pg-item:not(.promo-tile) a[data-pg-link] {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: inherit;
  min-width: 0;
}

.t1-pg-item:not(.promo-tile) .t1-pg-link:hover .t1-pg-name,
.t1-pg-item:not(.promo-tile) a[data-pg-link]:hover .t1-pg-name {
  color: var(--theme-primary, #2563eb);
}

.t1-pg-item:not(.promo-tile) .t1-pg-img {
  width: 100%;
  height: 180px;
  background: var(--theme-bg-muted, #f7f7f7);
  overflow: hidden;
  border-radius: var(--theme-radius, 8px);
}

.t1-pg-item:not(.promo-tile) .t1-pg-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.t1-pg-name,
.t1-pg-price,
.t1-pg-link .t1-pg-name,
.t1-pg-link .t1-pg-price,
a[data-pg-link] .t1-pg-name,
a[data-pg-link] .t1-pg-price {
  text-decoration: none;
}

.t1-pg-item:not(.promo-tile) .t1-pg-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--theme-text, #111);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  width: 100%;
}

.t1-pg-description {
  font-size: 13px;
  color: var(--theme-muted, #666);
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  word-break: break-word;
}

.t1-pg-description:empty {
  display: none;
}

.t1-pg-item:not(.promo-tile) .t1-pg-price {
  font-size: 16px;
  font-weight: 600;
  color: var(--theme-secondary, #0f172a);
}

.t1-pg-item [hidden] {
  display: none !important;
}

.t1-pg-btn {
  display: inline-block;
  padding: 10px 18px;
  border-radius: var(--theme-radius, 6px);
  font-weight: 600;
  font-size: 14px;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  border: none;
  width: 100%;
  box-sizing: border-box;
}

.t1-pg-item:not(.promo-tile) .t1-pg-btn-view {
  background: transparent;
  color: var(--theme-primary, #2563eb);
  border: 2px solid var(--theme-primary, #2563eb);
}

.t1-pg-item:not(.promo-tile) .t1-pg-btn-view:hover {
  background: var(--theme-primary, #2563eb);
  color: var(--theme-text-inverse, #fff);
}

.t1-pg-btn-add {
  background: var(--theme-primary, #4caf50);
  color: var(--theme-text-inverse, #fff);
}

.t1-pg-btn-add:hover {
  opacity: 0.9;
}

@media (max-width: 992px) {
  .t1-pg-wrapper:not(.promo-grid):not(.t1-pgb-grid) {
    grid-template-columns: repeat(var(--cols-tablet), 1fr);
  }
}

@media (max-width: 768px) {
  .t1-pg-wrapper:not(.promo-grid):not(.t1-pgb-grid) {
    grid-template-columns: repeat(var(--cols-mobile), 1fr);
  }
}

/* Petshop product cards (Popular / Featured row) — same markup as former product-grid-block */
@import './product-grid-block.css';