/* ===========================================================
   BisaUntung.com — beranda versi HP (tata letak gaya toko online).
   Dimuat SETELAH mobile.css & promo.css. Semua aturan di dalam
   @media (max-width: 820px); desktop tetap memakai .d-home.
   =========================================================== */

.sb-home { display: none; }

@media (max-width: 820px) {

  /* desktop home disembunyikan, versi HP ditampilkan */
  .d-home { display: none !important; }
  .sb-home { display: block; padding: 0 0 8px; }

  /* header HP: tanpa baris tautan cepat di beranda (mengikuti referensi) */
  body.p-beranda .m-quick { display: none; }

  /* ---------------- strip layanan ---------------- */

  .sb-svc {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    background: #fff;
    border-radius: 10px;
    margin: 8px 10px 0;
    padding: 9px 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
  }
  .sb-svc-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 5px;
    min-width: 0;
    color: var(--m-ink);
    position: relative;
  }
  .sb-svc-item + .sb-svc-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 12%;
    height: 76%;
    width: 1px;
    background: #F0F0F0;
  }
  .sb-svc-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    border-radius: 7px;
    background: var(--m-orange-l);
    color: var(--m-orange);
  }
  .sb-svc-ico.is-gold { background: #FFF6E3; color: #C98A16; }
  .sb-svc-ico.is-green { background: #EAF7EE; color: #13803A; }
  .sb-svc-txt { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
  .sb-svc-txt strong {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--m-orange);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .sb-svc-txt small {
    font-size: 9px;
    color: var(--m-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* ---------------- menu ikon ---------------- */

  .sb-menu {
    display: flex;
    gap: 4px;
    background: #fff;
    border-radius: 10px;
    margin: 8px 10px 0;
    padding: 12px 6px 10px;
    overflow-x: auto;
    scrollbar-width: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
  }
  .sb-menu::-webkit-scrollbar { display: none; }
  .sb-menu-item {
    flex: 0 0 62px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    color: var(--m-ink-2);
    text-align: center;
  }
  .sb-menu-ico {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #FFF7F4;
    border: 1px solid #FFE2D8;
    color: var(--m-orange);
  }
  .sb-menu-ico .i { width: 22px; height: 22px; }
  .sb-menu-ribbon {
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    padding: 1px 4px;
    border-radius: 3px;
    background: var(--m-orange);
    color: #fff;
    font-size: 7.5px;
    font-weight: 700;
    letter-spacing: .02em;
    white-space: nowrap;
  }
  .sb-menu-ribbon.is-gold { background: #E0A32B; }
  .sb-menu-ribbon.is-red { background: #D7261A; }
  .sb-menu-label {
    font-size: 9.5px;
    line-height: 1.25;
    color: var(--m-ink-2);
    margin-top: 2px;
  }

  /* ---------------- banner geser ---------------- */

  .sb-slider {
    position: relative;
    overflow: hidden;
    margin: 8px 10px 0;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
  }
  .sb-slides { display: flex; width: 100%; transition: transform .4s cubic-bezier(.4, 0, .2, 1); will-change: transform; }
  .sb-slide { flex: 0 0 100%; min-width: 0; }

  .sb-banner {
    display: flex;
    align-items: stretch;
    gap: 8px;
    min-height: 118px;
    padding: 12px 12px 12px 14px;
    color: #fff;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(115deg, #F53D2D 0%, #F0412A 46%, #FF7A3C 100%);
  }
  .sb-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .16) 1px, transparent 1px);
    background-size: 14px 14px;
    opacity: .5;
    pointer-events: none;
  }
  .sb-banner-2 { background: linear-gradient(115deg, #7A3E12 0%, #B4560F 44%, #E99512 100%); }
  .sb-banner-3 { background: linear-gradient(115deg, #0E5E33 0%, #12784A 46%, #25A368 100%); }

  .sb-banner-txt { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1 1 auto; }
  .sb-banner-kicker {
    font-size: 9px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .88);
  }
  .sb-banner-title {
    font-size: 16px;
    line-height: 1.25;
    font-weight: 700;
    color: #fff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .sb-banner-sub { font-size: 10.5px; color: rgba(255, 255, 255, .92); }
  .sb-banner-btn {
    align-self: flex-start;
    margin-top: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #fff;
    color: var(--m-orange-d);
    font-size: 10.5px;
    font-weight: 700;
    white-space: nowrap;
  }

  .sb-banner-art { position: relative; z-index: 1; flex: 0 0 92px; display: flex; align-items: center; justify-content: center; }
  .sb-banner-art img {
    width: 92px;
    height: 92px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, .55);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .22);
    background: #fff;
  }
  .sb-banner-art .i { color: rgba(255, 255, 255, .75); }
  .sb-banner-tag {
    position: absolute;
    right: -4px;
    bottom: -2px;
    padding: 2px 7px;
    border-radius: 4px;
    background: #FFE9A8;
    color: #7A4B04;
    font-size: 8.5px;
    font-weight: 700;
    white-space: nowrap;
  }

  .sb-dots { display: flex; justify-content: center; gap: 5px; padding: 8px 0 9px; }
  .sb-dots button {
    width: 5px;
    height: 5px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: #DEDEDE;
    cursor: pointer;
  }
  .sb-dots button.is-on { width: 15px; background: var(--m-orange); }

  /* ---------------- dua kolom ---------------- */

  .sb-twocol {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 8px 10px 0;
  }
  .sb-panel { background: #fff; border-radius: 10px; padding: 9px 9px 10px; box-shadow: 0 1px 3px rgba(0, 0, 0, .06); min-width: 0; }
  .sb-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 7px;
    color: var(--m-ink);
  }
  .sb-panel-head strong { font-size: 12px; font-weight: 700; color: var(--m-orange); }
  .sb-panel-head .i { color: var(--m-muted); }

  .sb-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
  .sb-tile {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    border-radius: 7px;
    overflow: hidden;
    background: #F6F6F6;
    color: #fff;
  }
  .sb-tile img { width: 100%; height: 100%; object-fit: cover; }
  .sb-tile-none { position: absolute; inset: 0; display: grid; place-items: center; color: #CFCFCF; }
  .sb-tile-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px 5px;
    border-radius: 3px;
    background: var(--m-orange);
    color: #fff;
    font-size: 7.5px;
    font-weight: 700;
    white-space: nowrap;
  }
  .sb-tile-badge.is-dark { background: rgba(34, 34, 34, .82); }
  .sb-tile-badge .i { width: 9px; height: 9px; }
  .sb-tile-cap {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 12px 5px 4px;
    font-size: 9px;
    line-height: 1.25;
    background: linear-gradient(transparent, rgba(0, 0, 0, .72));
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .sb-tile.is-info { display: grid; place-items: center; background: #FFF7F4; color: var(--m-orange); }
  .sb-tile-info { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; padding: 6px; }
  .sb-tile-info b { font-size: 9.5px; color: var(--m-ink); line-height: 1.3; }
  .sb-tile-info small { font-size: 8px; color: var(--m-muted); line-height: 1.3; }

  /* ---------------- feed produk ---------------- */

  .sb-feed { margin: 12px 10px 0; }
  .sb-feed-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
  .sb-feed-head h2 { font-size: 14px; margin: 0; color: var(--m-ink); }
  .sb-feed-head a { font-size: 10.5px; color: var(--m-orange); display: inline-flex; align-items: center; gap: 3px; }

  .sb-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .sb-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    color: inherit;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .07);
  }
  .sb-card-media { position: relative; display: block; aspect-ratio: 1 / 1; background: #fff; overflow: hidden; }
  .sb-card-media img { width: 100%; height: 100%; object-fit: cover; }
  .sb-card-none { position: absolute; inset: 0; display: grid; place-items: center; color: #E3DCD6; }
  .sb-card-corner {
    position: absolute;
    top: 0;
    right: 0;
    padding: 3px 6px;
    border-radius: 0 0 0 6px;
    background: linear-gradient(120deg, #F53D2D, #FF7337);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .01em;
  }
  .sb-card-corner.is-soft { background: rgba(255, 255, 255, .92); color: var(--m-orange-d); }
  .sb-card-corner.is-dark { background: rgba(34, 34, 34, .86); }
  .sb-card-promo {
    position: absolute;
    left: 6px;
    bottom: 6px;
    padding: 2px 6px;
    border-radius: 3px;
    background: #FFE9A8;
    color: #7A4B04;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: .02em;
  }
  .sb-card-body { padding: 7px 8px 9px; display: flex; flex-direction: column; gap: 3px; }
  .sb-card-name {
    font-size: 11.5px;
    color: var(--m-ink);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.7em;
  }
  .sb-card-price { font-size: 14px; font-weight: 700; color: var(--m-orange); font-variant-numeric: tabular-nums; }
  .sb-card-price small { font-size: 9px; font-weight: 400; color: var(--m-muted); }
  .sb-card-meta { font-size: 9px; color: var(--m-muted); }

  .sb-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
    padding: 10px;
    border-radius: 8px;
    background: #fff;
    color: var(--m-orange);
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
  }
}

/* layar sangat kecil */
@media (max-width: 360px) {
  .sb-menu-item { flex: 0 0 57px; }
  .sb-menu-ico { width: 36px; height: 36px; }
  .sb-svc-txt strong { font-size: 10.5px; }
  .sb-svc-txt small { font-size: 8px; }
  .sb-banner-art { flex: 0 0 78px; }
  .sb-banner-art img { width: 78px; height: 78px; }
  .sb-banner-title { font-size: 14.5px; }
}
