/* PPS 10.23 — Top Phones catalog popularity + price-change badge stacking. 10.1 legacy styles preserved.
 * MobileDokan-inspired placement/stacking, with Phoneticz rank colors.
 */
/* PPS 10.24 — Top Phones rank + percentage badges, matched to the supplied reference. */
.pps-catalog-thumb{position:relative;}
.pps-product-thumb.pps-price-change-thumb .pps-top-catalog-badges{
    position:absolute !important;
    top:0 !important;
    left:0 !important;
    right:auto !important;
    bottom:auto !important;
    z-index:999 !important;
    display:flex !important;
    flex-direction:column !important;
    align-items:flex-start !important;
    width:46px !important;
    margin:0 !important;
    padding:0 !important;
    line-height:0 !important;
    border-radius:10px 0 10px 0 !important;
    overflow:hidden !important;
    pointer-events:none !important;
}
.pps-product-thumb.pps-price-change-thumb .pps-top-catalog-badge{
    position:relative !important;
    top:auto !important;
    left:auto !important;
    right:auto !important;
    bottom:auto !important;
    width:46px !important;
    min-width:46px !important;
    min-height:68px !important;
    height:68px !important;
    box-sizing:border-box !important;
    display:flex !important;
    flex-direction:column !important;
    align-items:center !important;
    justify-content:center !important;
    margin:0 !important;
    padding:5px 4px 6px !important;
    border:0 !important;
    border-radius:10px 0 10px 0 !important;
    color:#fff !important;
    text-align:center !important;
    box-shadow:none !important;
    font-family:inherit !important;
    line-height:1 !important;
    white-space:nowrap !important;
    pointer-events:none !important;
}
.pps-product-thumb.pps-price-change-thumb .pps-top-catalog-badge b{display:block;font-size:14px;line-height:1.05;font-weight:900;letter-spacing:-.02em;}
.pps-product-thumb.pps-price-change-thumb .pps-top-catalog-badge strong{display:block;margin-top:3px;font-size:11px;line-height:1.05;font-weight:900;}
.pps-product-thumb.pps-price-change-thumb .pps-top-catalog-badge em{display:block;margin-top:2px;font-size:10px;line-height:1;font-style:normal;font-weight:700;}
.pps-product-thumb.pps-price-change-thumb .pps-top-catalog-badges .pps-top-catalog-price-change-badge{
    position:relative !important;
    inset:auto !important;
    float:none !important;
    display:flex !important;
    flex:0 0 22px !important;
    align-items:center !important;
    justify-content:center !important;
    width:46px !important;
    min-width:46px !important;
    height:22px !important;
    min-height:22px !important;
    box-sizing:border-box !important;
    margin:0 !important;
    padding:0 5px !important;
    border:0 !important;
    border-radius:0 0 10px 0 !important;
    font-size:10px !important;
    line-height:22px !important;
    font-weight:700 !important;
    box-shadow:none !important;
    transform:translateY(-5px) !important;
}
.pps-product-thumb.pps-price-change-thumb .pps-top-catalog-badges .pps-top-catalog-price-change-badge.pps-price-change-save,
.pps-product-thumb.pps-price-change-thumb .pps-top-catalog-badges .pps-top-catalog-price-change-badge.pps-price-change-pay{background:#0879ee !important;color:#fff !important;}
/* Distinct colors by rank. */
.pps-top-catalog-rank-1{background:#f97316;}
.pps-top-catalog-rank-2{background:#1683f4;}
.pps-top-catalog-rank-3{background:#7c3aed;}
.pps-top-catalog-rank-4{background:#ec4899;}
.pps-top-catalog-rank-5{background:#eab308;}
.pps-top-catalog-rank-6{background:#14b8a6;}
.pps-top-catalog-rank-7{background:#6366f1;}
.pps-top-catalog-rank-8{background:#ef4444;}
.pps-top-catalog-rank-9{background:#0ea5e9;}
.pps-top-catalog-rank-10{background:#8b5cf6;}

/* PPS Top Phones widget — uses the standard catalog renderer. */
.pps-top-widget-catalog{width:100%;overflow:hidden;}
.pps-top-widget-catalog .pps-products{margin:0 -4px;}
.pps-top-widget-catalog .pps-products-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:0;padding:0;}
.pps-top-widget-catalog .pps-products-grid>li{width:auto!important;float:none;margin:0;padding:0;min-width:0;}
.pps-top-widget-catalog .pps-product-box{width:100%;min-width:0;}
.pps-top-widget-catalog .pps-product-thumb{min-height:120px;}
.pps-top-widget-catalog .pps-product-title{font-size:12px;line-height:1.25;}
.pps-top-widget-catalog .pps-product-price{font-size:12px;}
.pps-top-widget-catalog .pps-item-buttons{font-size:10px;}
.pps-top-widget-catalog .pps-top-catalog-badges{top:0;left:0;}
.pps-top-widget-catalog .pps-product-details{font-size:10px;}

/* Theme-dark / PPS dark-mode compatibility */
html.pps-dark-mode .pps-top-widget-item,
html.dark-skin .pps-top-widget-item,
body.dark-skin .pps-top-widget-item{background:#151922;border-color:#2a3040;}
html.pps-dark-mode .pps-top-widget-thumb,
html.dark-skin .pps-top-widget-thumb,
body.dark-skin .pps-top-widget-thumb{background:#1d2330;}
html.pps-dark-mode .pps-top-widget-view-all,
html.dark-skin .pps-top-widget-view-all,
body.dark-skin .pps-top-widget-view-all{border-color:#2a3040;}

@media (max-width:767px){
    .pps-top-catalog-badge{width:42px;min-width:42px;min-height:62px;padding:4px 3px 5px;}
    .pps-top-catalog-badge b{font-size:12px;}
    .pps-top-catalog-badge strong{font-size:10px;}
    .pps-top-catalog-badge em{font-size:9px;}
    .pps-top-catalog-badges .pps-top-catalog-price-change-badge{width:42px !important;min-width:42px !important;height:20px !important;min-height:20px !important;line-height:20px !important;transform:translateY(-5px) !important;}
    .pps-top-widget-thumb{flex-basis:62px;width:62px;height:76px;}
}


/* PPS 10.1 — Top Phones landing page, modeled after the MobileDokan-style
 * multi-period catalog while keeping PPS's own card renderer and skin. */
.pps-top-catalog-sections{display:block;width:100%;}
.pps-top-catalog-section{margin:0 0 30px;padding:0;}
.pps-top-catalog-section-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin:0 0 12px;padding-bottom:8px;border-bottom:1px solid rgba(0,0,0,.08);}
.pps-top-catalog-section-head h2{margin:0;font-size:22px;line-height:1.25;font-weight:800;}
.pps-top-catalog-section-head h2:after{content:"";display:block;width:70px;height:3px;margin-top:7px;background:#1683f4;border-radius:3px;}
.pps-top-catalog-section-head a{font-size:13px;font-weight:700;text-decoration:none;white-space:nowrap;}
.pps-top-catalog-section-products .pps-products{margin:0 -5px;}
.pps-top-catalog-section-products .pps-products-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:0;padding:0;}
.pps-top-catalog-section-products .pps-products-grid>li{width:auto!important;float:none;margin:0;padding:0;min-width:0;}
.pps-top-catalog-section-products .pps-product-box{width:100%;height:100%;}
.pps-top-catalog-section-products .pps-product-thumb{min-height:170px;}
.pps-top-catalog-section-products .pps-product-title{font-size:14px;line-height:1.3;}
.pps-top-catalog-section-products .pps-product-price{font-size:13px;}
.pps-top-catalog-section-products .pps-item-buttons{font-size:10px;}
.pps-top-phones-catalog-page .pps-top-toolbar{margin-bottom:22px;}
@media (max-width:1100px){
    .pps-top-catalog-section-products .pps-products-grid{grid-template-columns:repeat(3,minmax(0,1fr));}
}
@media (max-width:767px){
    .pps-top-catalog-section{margin-bottom:24px;}
    .pps-top-catalog-section-head h2{font-size:19px;}
    .pps-top-catalog-section-products .pps-products-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;}
    .pps-top-catalog-section-products .pps-product-thumb{min-height:125px;}
    .pps-top-catalog-section-products .pps-product-title{font-size:12px;}
    .pps-top-catalog-section-products .pps-product-price{font-size:12px;}
}
html.pps-dark-mode .pps-top-catalog-section-head,
html.dark-skin .pps-top-catalog-section-head,
body.dark-skin .pps-top-catalog-section-head{border-color:rgba(255,255,255,.12);}
