/* Beranda reseller — clean, tenang, premium */
.portal-home {
  --ph-radius: 18px;
  --ph-radius-sm: 14px;
  --ph-ink: #141414;
  --ph-muted: #6b7280;
  --ph-line: rgba(15, 23, 42, 0.07);
  --ph-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 28px rgba(15, 23, 42, 0.05);
  background:
    radial-gradient(1200px 420px at 12% -10%, rgba(217, 43, 43, 0.07), transparent 55%),
    linear-gradient(180deg, #f6f4f2 0%, #f3f1ee 48%, #efeeeb 100%);
  min-height: calc(100vh - 105px);
  padding: 22px 0 64px;
}
.portal-home-inner {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 32px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ph-welcome {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 2px 2px 0;
}
.ph-welcome p {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.035em;
  color: var(--ph-ink);
  line-height: 1.2;
}
.ph-welcome p span {
  font-weight: 500;
  color: var(--ph-muted);
}
.ph-welcome strong {
  font-weight: 700;
  color: var(--ph-ink);
}
.ph-welcome-note {
  font-size: 12.5px;
  color: var(--ph-muted);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.ph-hero {
  display: grid;
  grid-template-columns: 1.72fr 1fr;
  gap: 12px;
  height: 380px;
}
.ph-hero:not(:has(.ph-sides)) {
  grid-template-columns: 1fr;
}
.ph-slider {
  position: relative;
  border-radius: var(--ph-radius);
  overflow: hidden;
  background: #161616;
  height: 100%;
  min-height: 0;
  box-shadow: var(--ph-shadow);
}
.ph-slider::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  z-index: 3;
}
.ph-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity .55s ease;
}
.ph-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}
.ph-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.02);
  transition: transform 6s ease;
}
.ph-slide.is-active img {
  transform: scale(1);
}
.ph-slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, rgba(10, 10, 10, 0.78) 0%, rgba(10, 10, 10, 0.28) 46%, transparent 72%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 32px 36px;
  color: #fff;
}
.ph-slide-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 10px;
}
.ph-slide-kicker::before {
  content: "";
  width: 18px;
  height: 1.5px;
  background: var(--red);
}
.ph-slide-overlay h2 {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.038em;
  line-height: 1.12;
  margin: 0 0 8px;
  max-width: 16ch;
}
.ph-slide-overlay p {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.82);
  max-width: 36ch;
}
.ph-slide-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 8px 14px;
  border-radius: 999px;
  background: #fff;
  color: #161616;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.ph-slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  z-index: 4;
  transition: background .2s ease, transform .2s ease;
}
.ph-slider-nav:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-50%) scale(1.04);
}
.ph-slider-nav.prev { left: 14px; }
.ph-slider-nav.next { right: 14px; }
.ph-slider-dots {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 4;
}
.ph-slider-dot {
  width: 7px;
  height: 7px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
  padding: 0;
  transition: width .25s ease, background .2s ease;
}
.ph-slider-dot.is-active {
  background: #fff;
  width: 22px;
}

.ph-sides {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 12px;
  height: 100%;
  min-height: 0;
}
.ph-sides:has(.ph-side:only-child) {
  grid-template-rows: 1fr;
}
.ph-side {
  position: relative;
  border-radius: var(--ph-radius-sm);
  overflow: hidden;
  display: block;
  min-height: 0;
  color: #fff;
  text-decoration: none;
  box-shadow: var(--ph-shadow);
}
.ph-side img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .55s ease;
}
.ph-side:hover img {
  transform: scale(1.05);
}
.ph-side-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 18%, rgba(10, 10, 10, 0.78) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px 18px;
}
.ph-side-overlay strong {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.ph-side-overlay span {
  font-size: 12px;
  opacity: .82;
  margin-top: 2px;
}

.ph-highlights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  background: transparent;
  border: 0;
  overflow: visible;
}
.ph-highlight {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  font-size: 13px;
  color: var(--ph-ink);
  background: #fff;
  border: 0;
  border-radius: var(--ph-radius-sm);
  box-shadow: var(--ph-shadow);
}
.ph-highlight-ico {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #f8f1f1;
  color: var(--red);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.ph-highlight svg { color: inherit; }
.ph-highlight strong {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.ph-highlight span {
  display: block;
  font-size: 12px;
  color: var(--ph-muted);
  margin-top: 1px;
}

.ph-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 2px 2px;
}
.ph-section-head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ph-ink);
  text-transform: none;
}
.ph-section-head a {
  font-size: 13px;
  color: var(--red);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.ph-section-head a:hover { opacity: 0.78; }

.ph-panel {
  background: transparent;
  border: 0;
  border-radius: 0;
  overflow: visible;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ph-panel--card {
  background: #fff;
  border-radius: var(--ph-radius);
  box-shadow: var(--ph-shadow);
  overflow: hidden;
  gap: 0;
}
.ph-panel--card .ph-section-head {
  padding: 16px 20px 12px;
}
.ph-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0;
  border: 0;
}

.ph-cat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  padding: 0;
  border-top: 1px solid var(--ph-line);
}
.ph-cat {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 0 0 14px;
  text-decoration: none;
  color: var(--ph-ink);
  border: 0;
  border-right: 1px solid var(--ph-line);
  min-height: 0;
  text-align: center;
  border-radius: 0;
  overflow: hidden;
  background: #fff;
  transition: background .2s ease;
}
.ph-cat:nth-child(4n) {
  border-right: 0;
}
.ph-cat:hover {
  background: #faf7f6;
  color: var(--red);
  transform: none;
  box-shadow: none;
}
.ph-cat-img {
  width: 100%;
  aspect-ratio: 1;
  height: auto;
  border-radius: 0;
  overflow: hidden;
  background: #efece8;
  display: grid;
  place-items: center;
  box-shadow: none;
}
.ph-cat-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ph-cat-img.is-empty {
  color: #9ca3af;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.ph-cat > span:last-child {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  padding: 0 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ph-featured-grid {
  padding: 16px 16px 18px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  border-top: 1px solid var(--ph-line);
}
.ph-featured-grid .product-card {
  animation: none;
  height: 100%;
  width: 100%;
  min-width: 0;
  padding: 0 0 12px;
  border: 1px solid var(--ph-line);
  border-radius: 14px;
  box-shadow: none;
  background: #fff;
}
.ph-featured-grid .product-card:hover {
  border-color: #ecd9d6;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}
.ph-featured-grid .card-img-wrap {
  width: 100%;
}
.ph-featured-grid .card-img {
  width: 100%;
  border: 0;
  border-radius: 16px 16px 0 0;
  box-shadow: none;
  background: #f4f1ee;
}
.ph-featured-grid .card-img img {
  object-fit: cover;
}
.ph-featured-grid .card-body {
  padding: 10px 12px 0;
}

.ph-empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--ph-muted);
  font-size: 13px;
}

@media (max-width: 840px) {
  .ph-hero { grid-template-columns: 1fr; height: auto; }
  .ph-slider { height: 240px; }
  .ph-sides { grid-template-columns: 1fr 1fr; grid-template-rows: auto; height: 148px; }
  .ph-sides:has(.ph-side:only-child) { grid-template-columns: 1fr; }
  .ph-cat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ph-featured-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ph-welcome { flex-direction: column; align-items: flex-start; gap: 4px; }
  .ph-welcome-note { white-space: normal; }
}
@media (max-width: 640px) {
  .portal-home { padding-top: 14px; }
  .portal-home-inner { padding: 0 16px; gap: 16px; }
  .ph-welcome p { font-size: 18px; }
  .ph-slider { height: 200px; }
  .ph-slide-overlay { padding: 18px; }
  .ph-slide-overlay h2 { font-size: 22px; }
  .ph-highlights { grid-template-columns: 1fr; }
  .ph-highlight { box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04); }
  .ph-cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ph-featured-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ph-sides { grid-template-columns: 1fr; height: auto; }
  .ph-side { min-height: 120px; }
}
