.ks-bf-banner,
  .ks-bf-banner * {
    box-sizing: border-box;
    font-family: inherit;
  }

  .ks-bf-banner {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    background: linear-gradient(105deg, #09090b 0%, #260103 45%, #aa0003 100%);
    border: 1px solid rgba(255, 60, 65, 0.35);
    border-radius: 16px;
    padding: 18px 28px;
    color: #ffffff;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55);
  }

  /* پترن مربعی کم‌رنگ */
  .ks-bf-banner-grid {
    position: absolute;
    inset: 0;
    background-image:
      linear-gradient(to right, rgba(255, 255, 255, 0.07) 1px, transparent 1px),
      linear-gradient(to bottom, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
    z-index: 0;
  }

  /* افکت برق‌زدن متحرک روی پس‌زمینه */
  .ks-bf-banner-shimmer {
    position: absolute;
    inset: -50%;
    background: linear-gradient(
      115deg,
      transparent 40%,
      rgba(255, 255, 255, 0.05) 46%,
      rgba(255, 190, 190, 0.16) 50%,
      rgba(255, 255, 255, 0.05) 54%,
      transparent 60%
    );
    animation: ks-b-shine 6s infinite linear;
    pointer-events: none;
    z-index: 0;
  }

  @keyframes ks-b-shine {
    0% { transform: translateX(-45%); }
    100% { transform: translateX(45%); }
  }

  /* هاله نور قرمز پشت تیتر */
  .ks-bf-banner-glow {
    position: absolute;
    width: 260px;
    height: 260px;
    background: rgba(170, 0, 3, 0.45);
    filter: blur(75px);
    top: -110px;
    right: -40px;
    pointer-events: none;
    z-index: 0;
  }

  .ks-bf-banner-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: 100%;
  }

  /* بخش راست (متن و لینک) */
  .ks-bf-banner-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    text-align: right;
  }

  .ks-bf-banner-heading {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .ks-bf-banner-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: rgba(170, 0, 3, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.22);
    width: 38px;
    height: 38px;
    border-radius: 10px;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  }

  .ks-bf-banner-title {
    font-size: 20px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.4;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  }

  .ks-bf-banner-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: #ffffff !important;
    background: rgba(0, 0, 0, 0.32);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 5px 14px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 700;
    transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
  }

  .ks-bf-banner-link:hover {
    background: #aa0003;
    border-color: rgba(255, 255, 255, 0.55);
    transform: translateX(-4px);
  }

  /* بخش چپ (شمارنده HTC) */
  .ks-bf-banner-clock {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-start;
    justify-content: center;
    gap: 10px;
    flex-shrink: 0;
  }

  .ks-bf-b-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }

  .ks-bf-b-card {
    position: relative;
    width: 62px;
    height: 64px;
    perspective: 400px;
    border-radius: 12px;
    background: #dcdcdc;
    box-shadow:
      0 8px 20px rgba(0, 0, 0, 0.55),
      0 2px 0 #b8bcc4,
      0 -1px 0 rgba(255, 255, 255, 0.95);
  }

  .ks-bf-b-half {
    position: absolute;
    left: 0;
    width: 100%;
    height: 50%;
    overflow: hidden;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
  }

  .ks-bf-b-half span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 200%;
    font-size: 32px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: #aa0003;
    user-select: none;
  }

  .ks-bf-b-top,
  .ks-bf-b-flap-top {
    top: 0;
    border-radius: 12px 12px 0 0;
    background: linear-gradient(180deg, #ffffff 0%, #f5f5f5 65%, #e8e8e8 100%);
  }

  .ks-bf-b-bottom,
  .ks-bf-b-flap-bottom {
    bottom: 0;
    border-radius: 0 0 12px 12px;
    background: linear-gradient(180deg, #fafafa 0%, #ebebeb 65%, #d9d9d9 100%);
  }

  .ks-bf-b-bottom span,
  .ks-bf-b-flap-bottom span {
    transform: translateY(-50%);
  }

  .ks-bf-b-flap-top {
    z-index: 3;
    transform-origin: center bottom;
    visibility: hidden;
  }

  .ks-bf-b-flap-bottom {
    z-index: 4;
    transform-origin: center top;
    transform: rotateX(90deg);
    visibility: hidden;
  }

  .ks-bf-b-card.is-flipping .ks-bf-b-flap-top {
    visibility: visible;
    animation: ks-b-flip-top 0.25s ease-in forwards;
  }

  .ks-bf-b-card.is-flipping .ks-bf-b-flap-bottom {
    visibility: visible;
    animation: ks-b-flip-bottom 0.25s ease-out 0.25s forwards;
  }

  @keyframes ks-b-flip-top {
    0% { transform: rotateX(0deg); filter: brightness(1); }
    100% { transform: rotateX(-90deg); filter: brightness(0.75); }
  }

  @keyframes ks-b-flip-bottom {
    0% { transform: rotateX(90deg); filter: brightness(0.8); }
    100% { transform: rotateX(0deg); filter: brightness(1); }
  }

  .ks-bf-b-crease {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1.5px;
    background: rgba(170, 0, 3, 0.22);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9);
    transform: translateY(-50%);
    z-index: 5;
    pointer-events: none;
  }

  .ks-bf-b-label {
    font-size: 13px;
    font-weight: 600;
    color: #f3f4f6;
    line-height: 1;
  }

  .ks-bf-banner-expired {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 8px 16px;
    border-radius: 10px;
  }

  /* نسخه موبایل: چیدمان عمودی (زیر هم) و جمع‌وجور */
  @media (max-width: 768px) {
    .ks-bf-banner {
      background: linear-gradient(180deg, #aa0003 0%, #2b0103 55%, #09090b 100%);
      padding: 14px 12px;
      border-radius: 12px;
    }

    .ks-bf-banner-inner {
      flex-direction: column !important;
      align-items: center !important;
      justify-content: center !important;
      gap: 12px !important;
    }

    .ks-bf-banner-info {
      width: 100%;
      align-items: center !important;
      text-align: center !important;
      gap: 7px;
    }

    .ks-bf-banner-heading {
      justify-content: center;
      gap: 7px;
    }

    .ks-bf-banner-icon {
      width: 28px;
      height: 28px;
      border-radius: 7px;
    }

    .ks-bf-banner-icon svg {
      width: 17px;
      height: 17px;
    }

    .ks-bf-banner-title {
      font-size: 13.5px;
    }

    .ks-bf-banner-link {
      font-size: 12px;
      padding: 4px 12px;
    }

    .ks-bf-banner-clock {
      width: 100%;
      justify-content: center;
      gap: 8px;
    }

    .ks-bf-b-card {
      width: 52px;
      height: 52px;
      border-radius: 9px;
    }

    .ks-bf-b-top,
    .ks-bf-b-flap-top {
      border-radius: 9px 9px 0 0;
    }

    .ks-bf-b-bottom,
    .ks-bf-b-flap-bottom {
      border-radius: 0 0 9px 9px;
    }

    .ks-bf-b-half span {
      font-size: 26px;
    }

    .ks-bf-b-label {
      font-size: 11px;
    }
  }
/* Compact single-product layout, including narrow desktop columns. */
.ks-bf-banner[hidden] { display: none !important; }
.ks-bf-banner { margin: 12px 0; padding: 12px; border-radius: 10px; box-shadow: none; }
.ks-bf-banner-inner { gap: 12px; flex-wrap: wrap; }
.ks-bf-banner-info { flex: 1 1 180px; min-width: 0; gap: 5px; }
.ks-bf-banner-heading { gap: 5px; }
.ks-bf-banner-title { font-size: 13px; line-height: 1.6; font-weight: 700; }
.ks-bf-banner-icon { width: 24px; height: 24px; border-radius: 6px; }
.ks-bf-banner-icon svg { width: 17px; height: 17px; }
.ks-bf-banner-link { font-size: 12px; padding: 0; background: transparent; border: 0; }
.ks-bf-banner-clock { gap: 5px; }
.ks-bf-b-unit { gap: 4px; }
.ks-bf-b-card { width: 36px; height: 34px; border-radius: 6px; box-shadow: none; }
.ks-bf-b-top, .ks-bf-b-flap-top { border-radius: 6px 6px 0 0; }
.ks-bf-b-bottom, .ks-bf-b-flap-bottom { border-radius: 0 0 6px 6px; }
.ks-bf-b-half span { font-size: 17px; }
.ks-bf-b-label { font-size: 10px; }
@media (max-width: 768px) {
  .ks-bf-banner-info { flex: auto; }
  .ks-bf-banner-clock { gap: 8px; }
  .ks-bf-b-card { width: 40px; height: 38px; }
}
@media (prefers-reduced-motion: reduce) {
  .ks-bf-banner-shimmer, .ks-bf-b-card.is-flipping .ks-bf-b-half { animation: none; }
  .ks-bf-b-card.is-flipping .ks-bf-b-flap-top, .ks-bf-b-card.is-flipping .ks-bf-b-flap-bottom { visibility: hidden; }
}

