/* Unified product-card presentation for catalog and wreath category pages. */
.catalog-grid > .product-card,
.wreaths-grid > .wreath-card,
.frame-forms-grid > .frame-form-card {
  box-sizing: border-box;
  background: var(--cream, #f7f2e8) !important;
  border: 1px solid rgba(44, 74, 53, 0.10) !important;
  border-radius: 17px !important;
  box-shadow: 0 8px 26px rgba(44, 74, 53, 0.07) !important;
  padding: 10px !important;
  overflow: visible !important;
}

.catalog-grid > .product-card > .product-img,
.wreaths-grid > .wreath-card > .wreath-photo,
.frame-forms-grid > .frame-form-card > .karkas-card__photo {
  box-sizing: border-box;
  width: 100%;
  margin: 0 !important;
  padding: 6px !important;
  border-radius: 16px !important;
  background: var(--cream-dark, #eee5d5) !important;
  overflow: hidden !important;
}

/* Wreath photos already have a calm background, so keep the frame nearly invisible. */
.wreaths-grid > .wreath-card > .wreath-photo {
  padding: 3px !important;
  background: var(--cream, #f7f2e8) !important;
}

.catalog-grid > .product-card > .product-img > picture,
.wreaths-grid > .wreath-card > .wreath-photo > picture,
.frame-forms-grid > .frame-form-card > .karkas-card__photo > picture {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
}

.catalog-grid > .product-card > .product-img img,
.wreaths-grid > .wreath-card > .wreath-photo img,
.frame-forms-grid > .frame-form-card > .karkas-card__photo img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 12px !important;
  background: transparent !important;
  object-fit: contain !important;
  object-position: center !important;
  display: block !important;
}

/* Floristry cards present colour and texture samples, so a fuller crop is intentional. */
.floristika-grid > .floristika-card > .wreath-photo img {
  object-fit: cover !important;
  object-position: center !important;
}

.catalog-grid > .product-card > .product-img-placeholder > picture {
  inset: 6px !important;
  width: auto !important;
  height: auto !important;
  border-radius: 12px;
  overflow: hidden;
}

.frame-forms-grid > .frame-form-card > .karkas-card__photo {
  height: 236px;
  flex: 0 0 236px;
}

.catalog-grid > .product-card > .product-body,
.wreaths-grid > .wreath-card > .wreath-body {
  padding: 16px 6px 6px !important;
}

.catalog-grid > .product-card .product-name,
.wreaths-grid > .wreath-card .wreath-body h3,
.frame-forms-grid > .frame-form-card > h3 {
  margin: 0 0 8px !important;
  color: var(--green, #243d2c) !important;
  font-family: var(--ui-font, Manrope, sans-serif) !important;
  font-size: 19px !important;
  font-weight: 600 !important;
  line-height: 1.35 !important;
  letter-spacing: 0 !important;
}

.catalog-grid > .product-card .product-desc,
.wreaths-grid > .wreath-card .wreath-body p,
.frame-forms-grid > .frame-form-card > p {
  margin: 0 0 12px !important;
  color: var(--text-soft, #6f746f) !important;
  font-family: var(--ui-font, Manrope, sans-serif) !important;
  font-size: 14px !important;
  line-height: 1.55 !important;
}

.catalog-grid > .product-card .product-specs,
.frame-forms-grid > .frame-form-card > p + div {
  color: var(--text-mid, #4f5d53) !important;
  font-family: var(--ui-font, Manrope, sans-serif) !important;
  font-size: 13px !important;
  line-height: 1.55 !important;
}

.catalog-grid > .product-card .product-specs strong,
.wreaths-grid > .wreath-card .wreath-body p strong,
.frame-forms-grid > .frame-form-card strong {
  color: var(--green, #243d2c);
  font-weight: 600;
}

.catalog-grid > .product-card .product-price,
.wreaths-grid > .wreath-card .wreath-price {
  color: var(--green, #243d2c) !important;
  font-family: var(--ui-font, Manrope, sans-serif) !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
  white-space: nowrap;
}

.wreaths-grid > .wreath-card .wreath-price,
.catalog-grid > .product-card .product-footer > .product-price {
  width: 100%;
  margin: auto 0 12px !important;
  font-size: 20px !important;
}

.wreaths-grid > .wreath-card[data-price]:not([data-price="request"]) .wreath-price,
.catalog-grid > .product-card .product-footer:has(> .btn:only-of-type) > .product-price {
  font-size: 24px !important;
}

.wreaths-grid > .wreath-card .wreath-body > .btn {
  width: 100%;
  min-height: 46px;
  justify-content: center;
  text-align: center;
}

/* Only cards with one standalone price use this layout; ogradki cards are untouched. */
.catalog-grid > .product-card .product-footer:has(> .product-price) {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: flex-start;
  gap: 10px;
  margin-top: auto;
}

.catalog-grid > .product-card .product-footer:has(> .product-price) > .product-price {
  flex: 1 0 100%;
}

.catalog-grid > .product-card .product-footer:has(> .product-price) > .btn {
  flex: 1 1 140px;
  min-width: 0;
  min-height: 46px;
  justify-content: center;
  text-align: center;
}

.catalog-grid > .product-card .product-footer > .btn:only-of-type {
  width: 100%;
  flex-basis: 100%;
}

.frame-forms-grid > .frame-form-card > span {
  margin-top: 14px !important;
}

.frame-forms-grid > .frame-form-card > p + div {
  margin-bottom: 14px !important;
}

/* Shared card typography. Keep this after the page-level card rules so that
   catalog cards use one readable rhythm without changing their content. */
.catalog-grid > .product-card .product-name,
.wreaths-grid > .wreath-card .wreath-body h3,
.frame-forms-grid > .frame-form-card > h3 {
  margin: 0 0 10px !important;
  color: var(--green, #243d2c) !important;
  font-family: var(--ui-font, Manrope, sans-serif) !important;
  font-size: 19px !important;
  font-weight: 600 !important;
  line-height: 1.25 !important;
  letter-spacing: 0 !important;
}

.catalog-grid > .product-card .product-desc,
.wreaths-grid > .wreath-card .wreath-body p,
.frame-forms-grid > .frame-form-card > p {
  margin: 0 0 14px !important;
  color: var(--text-soft, #6f746f) !important;
  font-family: var(--ui-font, Manrope, sans-serif) !important;
  font-size: 15px !important;
  font-weight: 400 !important;
  line-height: 1.55 !important;
  letter-spacing: 0 !important;
}

.catalog-grid > .product-card .product-specs,
.frame-forms-grid > .frame-form-card > p + div {
  color: var(--text-mid, #4f5d53) !important;
  font-family: var(--ui-font, Manrope, sans-serif) !important;
  font-size: 15px !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;
}

.catalog-grid > .product-card .product-specs strong,
.wreaths-grid > .wreath-card .wreath-body p strong,
.frame-forms-grid > .frame-form-card strong {
  color: var(--green, #243d2c) !important;
  font-weight: 700 !important;
}

.catalog-grid > .product-card .product-price,
.wreaths-grid > .wreath-card .wreath-price,
.catalog-grid > .product-card .product-cost > li:last-child {
  color: var(--green, #243d2c) !important;
  font-family: var(--ui-font, Manrope, sans-serif) !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  letter-spacing: 0 !important;
  white-space: nowrap;
}

.wreaths-grid > .wreath-card .wreath-price,
.catalog-grid > .product-card .product-price {
  margin-top: auto !important;
  margin-bottom: 12px !important;
  font-size: 20px !important;
}

.wreaths-grid > .wreath-card[data-price]:not([data-price="request"]) .wreath-price,
.catalog-grid > .product-card .product-footer:has(> .btn:only-of-type) > .product-price,
.catalog-grid > .product-card .product-cost > li:last-child {
  font-size: 24px !important;
}

.catalog-grid > .product-card .product-cost {
  margin-bottom: 12px !important;
}

.catalog-grid > .product-card .product-footer {
  gap: 10px !important;
  margin-top: 14px !important;
}

.catalog-grid > .product-card .btn,
.wreaths-grid > .wreath-card .btn,
.frame-forms-grid > .frame-form-card .btn {
  min-height: 48px !important;
  border-radius: 8px !important;
  font-family: var(--ui-font, Manrope, sans-serif) !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  letter-spacing: 0 !important;
  text-align: center !important;
  align-items: center !important;
  justify-content: center !important;
}

.wreaths-grid > .wreath-card .btn,
.catalog-grid > .product-card .product-footer > .btn:only-of-type {
  width: 100% !important;
}

@media (max-width: 560px) {
  .catalog-grid > .product-card,
  .wreaths-grid > .wreath-card,
  .frame-forms-grid > .frame-form-card {
    padding: 8px !important;
  }

  .catalog-grid > .product-card > .product-img,
  .wreaths-grid > .wreath-card > .wreath-photo,
  .frame-forms-grid > .frame-form-card > .karkas-card__photo {
    padding: 4px !important;
  }

  .wreaths-grid > .wreath-card > .wreath-photo {
    padding: 2px !important;
  }

  .catalog-grid > .product-card > .product-img-placeholder > picture {
    inset: 4px !important;
  }

  .catalog-grid > .product-card > .product-body,
  .wreaths-grid > .wreath-card > .wreath-body {
    padding: 15px 7px 7px !important;
  }

  .catalog-grid > .product-card .product-name,
  .wreaths-grid > .wreath-card .wreath-body h3,
  .frame-forms-grid > .frame-form-card > h3 {
    font-size: 18px !important;
    line-height: 1.25 !important;
  }

  .frame-forms-grid > .frame-form-card > .karkas-card__photo {
    height: 230px;
    flex-basis: 230px;
  }
}

/* Final catalog alignment: keep product content and controls on one visual system. */
.catalog-grid > .product-card,
.wreaths-grid > .wreath-card,
.frame-forms-grid > .frame-form-card {
  display: flex !important;
  flex-direction: column !important;
}

.catalog-grid > .product-card > .product-body,
.wreaths-grid > .wreath-card > .wreath-body {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
}

.catalog-grid > .product-card .product-name,
.wreaths-grid > .wreath-card .wreath-body h3,
.frame-forms-grid > .frame-form-card > h3 {
  font-size: 19px !important;
  font-weight: 600 !important;
  line-height: 1.25 !important;
}

.catalog-grid > .product-card .product-desc,
.wreaths-grid > .wreath-card .wreath-body p,
.frame-forms-grid > .frame-form-card > p {
  font-size: 15px !important;
  line-height: 1.55 !important;
}

.catalog-grid > .product-card .product-specs,
.frame-forms-grid > .frame-form-card > p + div {
  font-size: 15px !important;
  line-height: 1.5 !important;
}

.catalog-grid > .product-card .product-footer:has(> .product-price) {
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  gap: 10px !important;
  margin-top: auto !important;
}

.catalog-grid > .product-card .product-footer:has(> .product-price) > .product-price {
  width: 100% !important;
  margin: 0 0 2px !important;
  flex: 0 0 auto !important;
  color: var(--green, #243d2c) !important;
  font-size: 20px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
}

.catalog-grid > .product-card .product-footer:has(> .product-price) > .product-price--numeric {
  font-size: 24px !important;
}

.catalog-grid > .product-card .product-footer:has(> .product-price) > .product-price:not(.product-price--numeric) {
  white-space: normal !important;
}

.catalog-grid > .product-card .product-footer:has(> .product-price) > .btn,
.catalog-grid > .product-card .product-footer:has(> .product-price) > .product-price-request {
  width: 100% !important;
  min-height: 48px !important;
  flex: 0 0 auto !important;
}

.catalog-grid > .product-card .product-cost {
  margin-top: auto !important;
  margin-bottom: 12px !important;
}

.catalog-grid > .product-card .product-cost > li:last-child {
  display: block !important;
  margin-top: 8px !important;
  color: var(--green, #243d2c) !important;
  font-size: 24px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
}

.catalog-grid > .product-card .product-cost + .product-footer {
  margin-top: 0 !important;
}

.catalog-grid > .product-card .product-cost + .product-footer > .btn:only-child {
  width: 100% !important;
}

/* Ogradki have several cost variants, so only align their control block. */
.catalog-grid > .product-card .product-specs:not(.product-cost) + .product-specs:not(.product-cost) + .product-footer {
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  gap: 10px !important;
  margin-top: auto !important;
}

.catalog-grid > .product-card .product-specs:not(.product-cost) + .product-specs:not(.product-cost) + .product-footer > .btn {
  width: 100% !important;
  min-height: 48px !important;
  flex: 0 0 auto !important;
}

.frame-forms-grid > .frame-form-card > div:last-child {
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  gap: 10px !important;
  margin-top: auto !important;
}

.frame-forms-grid > .frame-form-card > div:last-child > .btn {
  width: 100% !important;
  min-height: 48px !important;
  flex: 0 0 auto !important;
}

/* Match catalog pagination to venki.html and keep it in one row with scroll on narrow screens. */
.catalog-products .pagination,
.wreaths-section .pagination {
  grid-column: 1 / -1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-wrap: nowrap !important;
  gap: 8px !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 36px 0 18px !important;
  padding: 12px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  border: 1px solid rgba(44, 74, 53, 0.10) !important;
  border-radius: 6px !important;
  background: var(--cream, #f7f2e8) !important;
  box-shadow: 0 8px 26px rgba(44, 74, 53, 0.05) !important;
  -webkit-overflow-scrolling: touch;
}

.catalog-pagination-top .pagination {
  margin: 0 !important;
  padding: 0 !important;
  overflow-x: auto !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.catalog-products .pagination-pages,
.wreaths-section .pagination-pages {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-wrap: nowrap !important;
  gap: 8px !important;
  flex: 0 0 auto !important;
}

.catalog-products .pagination button,
.wreaths-section .pagination button,
.catalog-products .pagination-ellipsis,
.wreaths-section .pagination-ellipsis {
  flex: 0 0 auto !important;
}

.catalog-products .pagination button,
.wreaths-section .pagination button {
  min-width: 44px !important;
  min-height: 40px !important;
  height: auto !important;
  padding: 0 14px !important;
  border: 1px solid rgba(44, 74, 53, 0.18) !important;
  border-radius: 7px !important;
  background: var(--white, #fff) !important;
  color: var(--green, #243d2c) !important;
  font-family: var(--ui-font, Manrope, sans-serif) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

.catalog-products .pagination-page.is-active,
.wreaths-section .pagination-page.is-active {
  background: var(--green, #243d2c) !important;
  color: var(--cream, #f7f2e8) !important;
  border-color: var(--green, #243d2c) !important;
  box-shadow: 0 8px 18px rgba(44, 74, 53, 0.12) !important;
}

.catalog-products .pagination-prev,
.catalog-products .pagination-next,
.wreaths-section .pagination-prev,
.wreaths-section .pagination-next {
  min-width: 86px !important;
}

/* JS pagination hides cards with the hidden attribute; this must override
   the flex display rules above. */
.catalog-grid > .product-card[hidden],
.wreaths-grid > .wreath-card[hidden],
.frame-forms-grid > .frame-form-card[hidden],
.catalog-products .pagination[hidden],
.wreaths-section .pagination[hidden] {
  display: none !important;
}

@media (max-width: 560px) {
  .catalog-products .pagination,
  .wreaths-section .pagination {
    justify-content: flex-start !important;
    gap: 6px !important;
    margin: 28px 0 20px !important;
    padding: 10px !important;
  }

  .catalog-products .pagination-pages,
  .wreaths-section .pagination-pages {
    gap: 6px !important;
  }

  .catalog-products .pagination button,
  .wreaths-section .pagination button {
    min-width: 42px !important;
    min-height: 40px !important;
    padding: 0 10px !important;
    font-size: 14px !important;
  }

  .catalog-products .pagination-prev,
  .catalog-products .pagination-next,
  .wreaths-section .pagination-prev,
  .wreaths-section .pagination-next {
    min-width: 82px !important;
  }
}

/* Safe anchor offset for sticky header jumps. Does not affect normal layout. */
#catalog,
.catalog-products,
.wreaths-section {
  scroll-margin-top: 96px;
}

@media (max-width: 768px) {
  #catalog,
  .catalog-products,
  .wreaths-section {
    scroll-margin-top: 116px;
  }
}

/* Mobile pagination polish: keep prev/next visible, scroll only page numbers. */
.catalog-products .pagination,
.wreaths-section .pagination,
.catalog-products .pagination-pages,
.wreaths-section .pagination-pages,
.wreaths-section .catalog-pagination-copy {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

.catalog-products .pagination::-webkit-scrollbar,
.wreaths-section .pagination::-webkit-scrollbar,
.catalog-products .pagination-pages::-webkit-scrollbar,
.wreaths-section .pagination-pages::-webkit-scrollbar,
.wreaths-section .catalog-pagination-copy::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
}

@media (max-width: 560px) {
  .catalog-products .pagination,
  .wreaths-section .pagination {
    overflow-x: hidden !important;
    padding-inline: 12px !important;
    scroll-padding-inline: 12px !important;
  }

  .catalog-products .pagination-pages,
  .wreaths-section .pagination-pages {
    flex: 1 1 auto !important;
    justify-content: flex-start !important;
    min-width: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding-inline: 2px !important;
    scroll-padding-inline: 8px !important;
    -webkit-overflow-scrolling: touch;
  }

  .catalog-products .pagination-prev,
  .catalog-products .pagination-next,
  .wreaths-section .pagination-prev,
  .wreaths-section .pagination-next {
    min-width: 74px !important;
    padding-inline: 9px !important;
  }
}

@media (max-width: 360px) {
  .catalog-products .pagination,
  .wreaths-section .pagination {
    gap: 5px !important;
    padding-inline: 10px !important;
  }

  .catalog-products .pagination-prev,
  .catalog-products .pagination-next,
  .wreaths-section .pagination-prev,
  .wreaths-section .pagination-next {
    min-width: 68px !important;
    padding-inline: 8px !important;
    font-size: 13.5px !important;
  }

  .wreaths-section .catalog-pagination-top .catalog-pagination-copy {
    flex-wrap: wrap !important;
    overflow: visible !important;
    white-space: normal !important;
  }
}
