.p247-bg-best-sellers,
.p247-bg-best-sellers-entry,
.p247-bg-best-sellers-admin {
    --p247-bs-ink: #132735;
    --p247-bs-muted: #607381;
    --p247-bs-brand: #133f5c;
    --p247-bs-accent: #0b7b72;
    --p247-bs-border: #d9e3e8;
    --p247-bs-soft: #f4f8f9;
    --p247-bs-success: #17724b;
    --p247-bs-warning: #9a6800;
    color: var(--p247-bs-ink);
}

.p247-bg-best-sellers-entry { display: flex; align-items: center; justify-content: space-between; gap: 28px; margin: 0 0 28px; padding: 25px 28px; border: 1px solid #bfd4d7; border-radius: 13px; background: linear-gradient(125deg, #f8fcfc 0%, #e9f5f3 100%); box-shadow: 0 9px 26px rgba(19, 63, 92, .075); }
.p247-bg-best-sellers-entry h2 { margin: 2px 0 6px; color: var(--p247-bs-brand); font-size: clamp(21px, 2.4vw, 28px); line-height: 1.2; }
.p247-bg-best-sellers-entry p { margin: 0; color: var(--p247-bs-muted); }
.p247-bg-best-sellers-entry .p247-bg-best-sellers-entry__button { flex: 0 0 auto; min-height: 46px; padding: 11px 18px; border-color: var(--p247-bs-brand) !important; border-radius: 7px; background: var(--p247-bs-brand) !important; color: #fff !important; font-weight: 700; white-space: nowrap; }
.p247-bg-best-sellers-kicker { margin: 0 0 5px !important; color: var(--p247-bs-accent) !important; font-size: 11px !important; font-weight: 750; letter-spacing: .085em; text-transform: uppercase; }

.p247-bg-best-sellers { max-width: 1260px; margin: 0 auto; padding: 4px 0 32px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
.p247-bg-best-sellers * { box-sizing: border-box; }
.p247-bg-best-sellers-hero { margin: 0 0 26px; padding: 30px 32px; border: 1px solid #c8dce0; border-radius: 15px; background: linear-gradient(130deg, #f9fcfd 0%, #e9f5f2 100%); }
.p247-bg-best-sellers-hero h1 { max-width: 800px; margin: 0 0 9px; color: var(--p247-bs-ink); font-size: clamp(30px, 5vw, 47px); line-height: 1.08; letter-spacing: -.035em; }
.p247-bg-best-sellers-hero p:last-child { max-width: 760px; margin: 0; color: var(--p247-bs-muted); font-size: 16px; }
.p247-bg-best-sellers-podium { display: grid; grid-template-columns: 1.18fr 1fr 1fr; gap: 18px; align-items: stretch; margin-bottom: 34px; }
.p247-bg-best-seller { position: relative; overflow: hidden; border: 1px solid var(--p247-bs-border); border-radius: 13px; background: #fff; box-shadow: 0 10px 27px rgba(18, 47, 65, .075); }
.p247-bg-best-seller.is-featured { display: grid; grid-template-rows: minmax(180px, 1fr) auto; min-width: 0; }
.p247-bg-best-seller.rank-1 { border-color: #d3bd72; box-shadow: 0 15px 36px rgba(87, 69, 12, .13); }
.p247-bg-best-seller__rank { position: absolute; z-index: 2; top: 14px; left: 14px; display: inline-flex; align-items: baseline; justify-content: center; min-width: 49px; min-height: 49px; padding: 8px; border: 1px solid rgba(255,255,255,.5); border-radius: 999px; background: var(--p247-bs-brand); color: #fff; font-size: 22px; font-weight: 800; line-height: 1; box-shadow: 0 4px 14px rgba(0,0,0,.16); }
.p247-bg-best-seller.rank-1 .p247-bg-best-seller__rank { background: #84690e; }
.p247-bg-best-seller__rank span { font-size: 12px; }
.p247-bg-best-seller__image { display: grid; min-height: 190px; place-items: center; padding: 22px; background: linear-gradient(#f7fafb, #fff); }
.p247-bg-best-seller__image img { width: 100%; max-width: 235px; height: 210px; object-fit: contain; transition: transform .18s ease; }
.p247-bg-best-seller:hover .p247-bg-best-seller__image img { transform: translateY(-2px); }
.p247-bg-best-seller__content { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; padding: 20px; border-top: 1px solid #edf1f3; }
.p247-bg-best-seller__sold { margin: 0 0 5px; color: var(--p247-bs-accent); font-size: 12px; font-weight: 750; letter-spacing: .02em; }
.p247-bg-best-seller__content h2 { margin: 0 0 17px; font-size: 18px; line-height: 1.3; }
.p247-bg-best-seller__content h2 a { color: var(--p247-bs-ink); text-decoration: none; }
.p247-bg-best-seller__commercial { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 10px; margin: auto 0 17px; }
.p247-bg-best-seller__price { color: var(--p247-bs-brand); font-size: 19px; font-variant-numeric: tabular-nums; }
.p247-bg-best-seller__stock { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.p247-bg-best-seller__stock > span { width: 8px; height: 8px; border-radius: 99px; background: currentColor; }
.p247-bg-best-seller__stock.is-in-stock { color: var(--p247-bs-success); }
.p247-bg-best-seller__stock.is-out-of-stock { color: var(--p247-bs-warning); }
.p247-bg-best-seller__link { min-height: 39px; padding: 8px 15px !important; border-color: var(--p247-bs-brand) !important; border-radius: 6px !important; color: var(--p247-bs-brand) !important; font-weight: 700 !important; }
.p247-bg-best-sellers-section-heading { margin: 0 0 15px; }
.p247-bg-best-sellers-section-heading h2 { margin: 0; font-size: 23px; }
.p247-bg-best-sellers-list { display: grid; gap: 12px; }
.p247-bg-best-seller.is-standard { display: grid; grid-template-columns: 92px 120px minmax(0, 1fr); align-items: stretch; min-height: 132px; box-shadow: 0 4px 16px rgba(18, 47, 65, .055); }
.p247-bg-best-seller.is-standard .p247-bg-best-seller__rank { position: static; align-self: center; justify-self: center; }
.p247-bg-best-seller.is-standard .p247-bg-best-seller__image { min-height: 130px; padding: 12px; }
.p247-bg-best-seller.is-standard .p247-bg-best-seller__image img { height: 105px; }
.p247-bg-best-seller.is-standard .p247-bg-best-seller__content { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; grid-template-rows: auto auto; column-gap: 22px; align-items: center; border-top: 0; border-left: 1px solid #edf1f3; }
.p247-bg-best-seller.is-standard .p247-bg-best-seller__sold { grid-column: 1; }
.p247-bg-best-seller.is-standard h2 { grid-column: 1; grid-row: 2; margin: 0; }
.p247-bg-best-seller.is-standard .p247-bg-best-seller__commercial { grid-column: 2; grid-row: 1 / span 2; min-width: 220px; margin: 0; }
.p247-bg-best-seller.is-standard .p247-bg-best-seller__link { grid-column: 3; grid-row: 1 / span 2; }
.p247-bg-best-sellers-footnote { margin-top: 22px; color: var(--p247-bs-muted); font-size: 12px; text-align: center; }
.p247-bg-best-sellers-empty { padding: 58px 28px; border: 1px dashed #bfcfd7; border-radius: 14px; background: var(--p247-bs-soft); text-align: center; }
.p247-bg-best-sellers-empty h1, .p247-bg-best-sellers-empty h2 { margin: 5px 0 8px; color: var(--p247-bs-brand); }
.p247-bg-best-sellers-empty p { margin: 0 auto; max-width: 610px; color: var(--p247-bs-muted); }
.p247-bg-best-sellers-empty__icon { width: 48px; height: 48px; margin: 0 auto 8px; border-radius: 99px; background: #e2eeef; color: var(--p247-bs-accent); font-size: 27px; line-height: 48px; }

.p247-bg-best-sellers-admin .p247-bg-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.p247-bg-best-sellers-provider { display: inline-flex; padding: 5px 10px; border-radius: 999px; background: #e7eef2; color: var(--p247-bs-brand); font-size: 12px; font-weight: 700; white-space: nowrap; }
.p247-bg-best-sellers-provider.is-development { background: #fff3cd; color: #765600; }
.p247-bg-best-sellers-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 18px 0; }
.p247-bg-best-sellers-metrics > div { min-width: 0; padding: 13px 14px; border: 1px solid var(--p247-bs-border); border-radius: 7px; background: var(--p247-bs-soft); }
.p247-bg-best-sellers-metrics span { display: block; margin-bottom: 4px; color: var(--p247-bs-muted); font-size: 10px; font-weight: 700; letter-spacing: .045em; text-transform: uppercase; }
.p247-bg-best-sellers-metrics strong { overflow-wrap: anywhere; font-size: 15px; }
.p247-bg-best-sellers-refresh { margin: 0 0 22px; }
.p247-bg-best-sellers-mapping { padding-top: 19px; border-top: 1px solid var(--p247-bs-border); }
.p247-bg-best-sellers-mapping h3 { margin: 0 0 4px; }
.p247-bg-best-sellers-map-form { display: flex; gap: 7px; }
.p247-bg-best-sellers-map-form input { width: 125px; }
.p247-bg-best-sellers-admin-empty { margin: 12px 0 0; padding: 14px; border-radius: 6px; background: #edf7f2; color: var(--p247-bs-success); }

@media (max-width: 980px) {
    .p247-bg-best-sellers-podium { grid-template-columns: 1fr 1fr; }
    .p247-bg-best-seller.rank-1 { grid-column: 1 / -1; }
    .p247-bg-best-sellers-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .p247-bg-best-seller.is-standard { grid-template-columns: 80px 105px minmax(0, 1fr); }
    .p247-bg-best-seller.is-standard .p247-bg-best-seller__content { grid-template-columns: minmax(0, 1fr) auto; }
    .p247-bg-best-seller.is-standard .p247-bg-best-seller__commercial { grid-column: 2; }
    .p247-bg-best-seller.is-standard .p247-bg-best-seller__link { grid-column: 1 / -1; grid-row: 3; margin-top: 12px; }
}

@media (max-width: 700px) {
    .p247-bg-best-sellers-entry { align-items: stretch; flex-direction: column; padding: 21px; }
    .p247-bg-best-sellers-entry .p247-bg-best-sellers-entry__button { align-self: flex-start; white-space: normal; }
    .p247-bg-best-sellers-hero { padding: 24px 21px; }
    .p247-bg-best-sellers-podium { grid-template-columns: minmax(0, 1fr); }
    .p247-bg-best-seller.rank-1 { grid-column: auto; }
    .p247-bg-best-seller.is-standard { grid-template-columns: 68px 88px minmax(0, 1fr); min-height: 118px; }
    .p247-bg-best-seller.is-standard .p247-bg-best-seller__content { display: flex; align-items: flex-start; padding: 15px; }
    .p247-bg-best-seller.is-standard .p247-bg-best-seller__commercial { min-width: 0; flex-wrap: wrap; }
    .p247-bg-best-seller.is-standard .p247-bg-best-seller__link { margin-top: 0; }
    .p247-bg-best-seller.is-standard .p247-bg-best-seller__image img { height: 80px; }
    .p247-bg-best-seller__rank { min-width: 43px; min-height: 43px; font-size: 19px; }
    .p247-bg-best-sellers-metrics { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .p247-bg-best-seller.is-standard { grid-template-columns: 58px minmax(0, 1fr); }
    .p247-bg-best-seller.is-standard .p247-bg-best-seller__image { display: none; }
    .p247-bg-best-sellers-map-form { align-items: stretch; flex-direction: column; }
}
