/* PRICEHACK_V135H2_NATIVE_COUPONS */

.ph-public-cpa-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 14px;
  align-items: start;
}
.ph-public-cpa-grid .cpa-v15-unit {
  min-width: 0;
}
.ph-public-cpa-grid .coupon {
  width: 100%;
  max-width: 100%;
}
@media(max-width:900px) {
  .ph-public-cpa-grid {
    grid-template-columns: 1fr;
  }
}

/* PRICEHACK_CPA_CARD_DETAIL_CLICK_V1 */

.ph-public-cpa-grid .ph-cpa-detail-card {
  position: relative;
}

.ph-public-cpa-grid .ph-cpa-card-detail-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  cursor: pointer;
}

.ph-public-cpa-grid .ph-cpa-detail-card:hover {
  border-color: #a8b4c5;
}

.ph-public-cpa-grid .ph-cpa-detail-card
:is(a:not(.ph-cpa-card-detail-link), button,
    input, select, textarea, [role="button"],
    [data-cpa-vote], [data-copy-promo]) {
  position: relative;
  z-index: 2;
}

.ph-public-cpa-grid .ph-cpa-card-detail-link:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: -3px;
}


/* PRICEHACK_CPA_PRODUCT_CLICK_CSS_V1 */

.ph-cpa-product-click {
  position: relative;
  min-width: 0;
  height: 100%;
}

.ph-cpa-product-click .ph-cpa-product-detail-link {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  cursor: pointer;
}

.ph-cpa-product-click :is(
  a:not(.ph-cpa-product-detail-link),
  button,
  input,
  select,
  textarea,
  [role="button"],
  [data-copy-promo],
  [data-cpa-vote]
) {
  position: relative;
  z-index: 3;
}

.ph-cpa-product-click .ph-cpa-product-detail-link:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: -3px;
}


/* PRICEHACK_LARGE_MERCHANT_FILTERS_V1 */

.ph-merchant-filters {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px !important;
  margin: 18px 0 26px !important;
}

.ph-merchant-filters .sort-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 20px !important;
  border: 1px solid #d8dee8;
  border-radius: 12px !important;
  background: #fff;
  color: #202733;
  font-size: 16px !important;
  font-weight: 700 !important;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s, border-color .15s;
}

.ph-merchant-filters .sort-btn:hover {
  background: #fff8df;
  border-color: #e2bb37;
}

.ph-merchant-filters .sort-btn.active {
  background: #ffcc00 !important;
  border-color: #e6b800 !important;
  color: #171717 !important;
  font-weight: 800 !important;
}

.ph-merchant-filters .sort-btn:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 3px;
}

@media (max-width: 650px) {
  .ph-merchant-filters {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    gap: 9px !important;
    margin: 14px 0 20px !important;
    padding: 3px 2px 10px;
    scrollbar-width: thin;
  }

  .ph-merchant-filters .sort-btn {
    flex: 0 0 auto;
    min-height: 46px;
    padding: 11px 16px !important;
    font-size: 15px !important;
  }
}



/* PRICEHACK_FILTER_STRIP_CSS_V5 */
.ph-filters-strip-wrap{
  margin: 14px 0 22px;
  position: relative;
}
.ph-filters-strip{
  display:flex;
  align-items:center;
  gap:10px;
  overflow-x:auto;
  overflow-y:hidden;
  flex-wrap:nowrap;
  white-space:nowrap;
  padding:4px 2px 8px;
  scroll-behavior:smooth;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:none;
  -ms-overflow-style:none;
}
.ph-filters-strip::-webkit-scrollbar{
  display:none;
}
.ph-filters-strip .ph-shop-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  flex:0 0 auto;
  min-height:38px;
  padding:8px 14px;
  border:1px solid #d9e0e7;
  border-radius:999px;
  background:#fff;
  color:#1f2937;
  text-decoration:none;
  font-size:13px;
  font-weight:700;
  line-height:1;
  box-sizing:border-box;
  transition:background .15s ease,border-color .15s ease,color .15s ease;
}
.ph-filters-strip .ph-shop-chip:hover{
  background:#f8fafc;
  border-color:#c5d0dc;
}
.ph-filters-strip .ph-shop-chip.active{
  background:#ffcc00;
  border-color:#e0b800;
  color:#111827;
}
.ph-shop-chip-count{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:20px;
  height:20px;
  padding:0 6px;
  border-radius:999px;
  background:rgba(17,24,39,.08);
  font-size:11px;
  font-weight:800;
}
.ph-filters-strip .ph-shop-chip.active .ph-shop-chip-count{
  background:rgba(17,24,39,.14);
}
@media (max-width: 768px){
  .ph-filters-strip{
    gap:8px;
    padding-bottom:6px;
  }
  .ph-filters-strip .ph-shop-chip{
    min-height:36px;
    padding:7px 12px;
    font-size:12px;
  }
  .ph-shop-chip-count{
    min-width:18px;
    height:18px;
    font-size:10px;
  }
}


/* PRICEHACK_QUICK_MERCHANT_FILTERS_CSS_V1 */
.ph-qf{margin:14px 0 22px;min-width:0}
.ph-qf-bar{display:flex;flex-wrap:nowrap;align-items:center;
  gap:8px;min-width:0;overflow-x:auto;padding:3px 2px 8px;
  scrollbar-width:none;-webkit-overflow-scrolling:touch}
.ph-qf-bar::-webkit-scrollbar{display:none}
.ph-qf-chip,.ph-qf-all{display:inline-flex;flex:0 0 auto;
  align-items:center;justify-content:center;gap:7px;
  min-height:38px;padding:8px 13px;border:1px solid #dce1e8;
  border-radius:10px;background:#fff;color:#252c38;
  font-size:13px;font-weight:700;text-decoration:none;
  box-sizing:border-box;white-space:nowrap;cursor:pointer}
.ph-qf-chip.active{background:#ffcc00;border-color:#e4b900;
  color:#171717}
.ph-qf-all{margin-left:auto;background:#f4f6f9}
.ph-qf-overlay[hidden],.ph-qf-option[hidden],
.ph-qf-empty[hidden]{display:none!important}
.ph-qf-overlay{position:fixed;inset:0;z-index:99999;
  display:flex;align-items:center;justify-content:center}
.ph-qf-backdrop{position:absolute;inset:0;
  background:rgba(17,24,39,.42)}
.ph-qf-dialog{position:relative;display:flex;flex-direction:column;
  width:min(590px,calc(100vw - 32px));max-height:76vh;
  padding:22px;box-sizing:border-box;background:#fff;
  border-radius:18px;box-shadow:0 22px 65px rgba(0,0,0,.2);
  outline:none}
.ph-qf-head{display:flex;justify-content:space-between;gap:12px;
  margin-bottom:16px}
.ph-qf-head h2{margin:0 0 5px;font-size:20px;font-weight:800}
.ph-qf-head p{margin:0;font-size:12px;color:#64748b}
.ph-qf-close{width:34px;height:34px;flex:0 0 34px;
  background:#f1f5f9;border:0;border-radius:9px;
  font-size:27px;cursor:pointer}
.ph-qf-search{width:100%;min-height:46px;box-sizing:border-box;
  border:1px solid #d9e0e8;border-radius:11px;
  padding:0 14px;font-size:14px;margin-bottom:14px}
.ph-qf-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;overflow-y:auto;min-height:0}
.ph-qf-option{display:flex;justify-content:space-between;gap:8px;
  align-items:center;padding:12px 13px;border:1px solid #edf0f4;
  border-radius:10px;background:#f8f9fb;color:#252c38;
  font-size:13px;font-weight:650;text-decoration:none;min-width:0}
.ph-qf-option span{overflow:hidden;text-overflow:ellipsis;
  white-space:nowrap}
.ph-qf-option small{color:#64748b}
.ph-qf-option:hover,.ph-qf-option.active{
  background:#fff3c1;border-color:#e4b900}
.ph-qf-empty{text-align:center;color:#64748b}
.ph-qf-handle{display:none}
.ph-qf :is(a,button,input):focus-visible{
  outline:3px solid #2563eb;outline-offset:2px}
@media(max-width:650px){
  .ph-qf-bar{gap:7px}
  .ph-qf-chip,.ph-qf-all{min-height:35px;padding:7px 10px;
    font-size:12px}
  .ph-qf-overlay{align-items:flex-end}
  .ph-qf-dialog{width:100%;max-height:78dvh;
    border-radius:20px 20px 0 0;padding:16px}
  .ph-qf-handle{display:block;width:40px;height:4px;
    background:#cbd5e1;border-radius:5px;margin:0 auto 16px}
  .ph-qf-list{grid-template-columns:1fr}
}


/* PRICEHACK_ALL_SHOPS_POSITION_V2 */

/* Keep all filter controls together. */
.ph-qf .ph-qf-bar {
  justify-content: flex-start !important;
  gap: 8px !important;
}

.ph-qf .ph-qf-bar .ph-qf-all {
  margin-left: 0 !important;
  margin-right: 0 !important;
  order: 999 !important;
  flex: 0 0 auto !important;

  background: #fff2b8 !important;
  border: 1px solid #dfb328 !important;
  color: #332600 !important;
  font-weight: 800 !important;

  box-shadow: 0 2px 7px rgba(170,130,0,.13);
}

.ph-qf .ph-qf-bar .ph-qf-all:hover {
  background: #ffe58a !important;
  border-color: #c99b00 !important;
}

.ph-qf .ph-qf-bar .ph-qf-chip {
  order: 0 !important;
}


/* PRICEHACK_V20_ACCESSIBLE_ROOT_H1 */
.ph-v20-visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: 0 !important;
}



/* PRICEHACK_V20_MERCHANT_LOGOS_V1 */

.ph-parent-merchants .ph-merchant-tile {
    min-height: 165px !important;
    padding: 10px 8px !important;
    gap: 5px !important;
    box-sizing: border-box !important;
}

.ph-parent-merchants .ph-merchant-logo {
    width: 100% !important;
    height: 90px !important;
    min-height: 90px !important;
    max-width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    padding: 2px !important;
    box-sizing: border-box !important;
    flex: 0 0 auto !important;
}

.ph-parent-merchants .ph-merchant-logo img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: center center !important;
    transform: none !important;
    border-radius: 12px !important;
}

.ph-parent-merchants .ph-merchant-name {
    display: block !important;
    max-width: 100% !important;
    overflow-wrap: anywhere !important;
    line-height: 1.2 !important;
    text-align: center !important;
}

.ph-parent-merchants .ph-merchant-count {
    text-align: center !important;
    line-height: 1.2 !important;
}

@media (max-width: 600px) {
    .ph-parent-merchants .ph-merchant-tile {
        min-height: 150px !important;
    }

    .ph-parent-merchants .ph-merchant-logo {
        height: 78px !important;
        min-height: 78px !important;
    }
}



/* PRICEHACK_V22_GLOBAL_CPA_LOGO_ROUNDING_V1 */

/* All CPA merchant tiles, including Travel */
.ph-merchant-directory .ph-merchant-tile .ph-merchant-logo,
.ph-parent-merchants .ph-merchant-tile .ph-merchant-logo {
    border-radius: 12px !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    background: transparent !important;
}

/* Full image, with naturally rounded visible corners */
.ph-merchant-directory .ph-merchant-tile .ph-merchant-logo img,
.ph-parent-merchants .ph-merchant-tile .ph-merchant-logo img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
    border-radius: 12px !important;
    clip-path: inset(0 round 12px) !important;
    transform: none !important;
    box-sizing: border-box !important;
}

/* Preserve the fallback when an image fails to load */
.ph-merchant-directory .ph-merchant-logo img[hidden],
.ph-parent-merchants .ph-merchant-logo img[hidden] {
    display: none !important;
}

/* Keep captions outside the logo area */
.ph-merchant-directory .ph-merchant-tile .ph-merchant-name,
.ph-parent-merchants .ph-merchant-tile .ph-merchant-name {
    position: relative !important;
    flex-shrink: 0 !important;
    overflow-wrap: anywhere !important;
}


/* Only controls the existing CMS mobile recommendation limit. */
@media(max-width:720px) {
  .ph-recommendations-v134
  .cpa-v15-unit.ph-rec-hide-mobile-v134 {
    display:none !important;
  }
}
