/* ============================================================
   PORTFOLIO SECTION
   ============================================================ */

/* Hero header */
.portfolio-hero {
  background: var(--clr-red);
  padding: 40px 0 60px;
}
.portfolio-hero .container { position: relative; }
.portfolio-hero .logo-main { color: var(--clr-white); }
.portfolio-hero .logo-sub  { color: rgba(255,255,255,.6); border-bottom: 1.5px solid rgba(255,255,255,.4); padding-bottom: 2px; }

.portfolio-hero-desc {
  margin-top: 32px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
.portfolio-divider-left  { width: 100%; height: 1px; background: rgba(255,255,255,0.25); }
.portfolio-desc { font-family: var(--ff-body); font-size: clamp(14px,1.6vw,16px); color: rgba(255,255,255,.88); line-height: 1.75; max-width: 640px; justify-self: end; }
.portfolio-divider-right { width: 60%; height: 1px; background: rgba(255,255,255,0.25); justify-self: end; }

@media(min-width:768px) {
  .portfolio-hero-desc { grid-template-columns: 1fr 1fr; gap: 20px 60px; }
  .portfolio-divider-left  { align-self: center; }
  .portfolio-desc          { grid-column: 2/3; justify-self: start; }
  .portfolio-divider-right { grid-column: 2/3; width: 80%; justify-self: end; }
}

/* App wrapper */
.portfolio-app-wrap {
  background: #f7f4f0;
  padding: 0;
  overflow: hidden;
}

.portfolio-app {
  display: flex;
  height: 940px;
  max-height: 94vh;
  min-height: 640px;
}

/* ── SIDEBAR ── */
.pf-sidebar {
  width: 220px;
  min-width: 220px;
  background: #0a0a0a;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 10;
}

.pf-sidebar-search { padding: 20px 16px 10px; }
.pf-search-wrap { position: relative; }
.pf-search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); opacity: .35; pointer-events: none; }
.pf-search-box {
  width: 100%;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  padding: 8px 12px 8px 32px;
  color: rgba(255,255,255,.7);
  font-size: 12px;
  font-family: var(--ff-body);
  outline: none;
}
.pf-search-box::placeholder { color: rgba(255,255,255,.3); }

.pf-sidebar-title {
  padding: 14px 20px 8px;
  font-size: 9px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(255,255,255,.25);
  font-weight: 500;
  font-family: var(--ff-display);
}

.pf-sectors-list {
  flex: 1;
  overflow-y: auto;
  padding: 0 10px;
  scrollbar-width: none;
}
.pf-sectors-list::-webkit-scrollbar { display: none; }

.pf-sector-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border: none;
  background: transparent;
  color: rgba(255,255,255,.45);
  font-family: var(--ff-body);
  font-size: 12.5px;
  font-weight: 400;
  text-align: left;
  cursor: pointer;
  border-radius: 7px;
  transition: all .2s ease;
  position: relative;
  margin-bottom: 1px;
}
.pf-sector-btn:hover { color: rgba(255,255,255,.85); background: rgba(255,255,255,.05); }
.pf-sector-btn.active { color: #fff; background: rgba(200,16,46,.18); font-weight: 500; }
.pf-sector-btn.active::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 60%;
  background: var(--clr-red);
  border-radius: 0 3px 3px 0;
}
.pf-sector-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; opacity: .7; }
.pf-sector-btn.active .pf-sector-dot { opacity: 1; }

.pf-sidebar-nav {
  padding: 12px 16px 20px;
  border-top: 1px solid rgba(255,255,255,.06);
  display: flex;
  justify-content: center;
  gap: 8px;
}
.pf-nav-arrow {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.12);
  background: transparent;
  color: rgba(255,255,255,.5);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.pf-nav-arrow:hover { border-color: var(--clr-red); color: var(--clr-red); }

/* ── MAIN AREA ── */
.pf-main {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.pf-slides-container {
  width: 100%;
  height: 100%;
  position: relative;
}

.pf-slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transform: translateY(30px);
  transition: opacity .5s ease, transform .5s ease;
}
.pf-slide.active {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0);
}

/* Slide hero — 65% height */
.pf-slide-hero {
  position: relative;
  flex: 0 0 65%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 36px 48px 40px;
}

/* Products section — 35% height, white panel */
.pf-products-section {
  flex: 0 0 35%;
  background: #fff;
  padding: 20px 40px 24px;
  border-top: 3px solid var(--clr-red);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 10;
}
.pf-hero-bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(.6) saturate(.85);
  transition: transform 8s ease, background-image .3s ease;
}
.pf-slide.active .pf-hero-bg { transform: scale(1.04); }
.pf-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,.85) 0%,
    rgba(0,0,0,.45) 40%,
    rgba(0,0,0,.15) 70%,
    transparent 100%
  );
}
.pf-hero-accent  { position: absolute; bottom: 0; left: 0; height: 3px; width: 0; transition: width .8s ease .3s; }
.pf-slide.active .pf-hero-accent { width: 100%; }
.pf-hero-content { position: relative; z-index: 2; }

.pf-sector-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10px; font-weight: 500; letter-spacing: .18em;
  text-transform: uppercase; color: rgba(255,255,255,.6); margin-bottom: 10px;
  font-family: var(--ff-display);
}
.pf-badge-dot { width: 6px; height: 6px; border-radius: 50%; }

.pf-brand-name {
  font-family: var(--ff-display);
  font-weight: 900;
  font-size: clamp(36px, 4.5vw, 62px);
  letter-spacing: -.02em;
  color: #fff;
  line-height: .95;
  margin-bottom: 10px;
  overflow: hidden;
}
.pf-brand-name-inner {
  display: block;
  transform: translateY(100%);
  transition: transform .6s cubic-bezier(.22,1,.36,1) .1s;
}
.pf-slide.active .pf-brand-name-inner { transform: translateY(0); }

.pf-brand-desc {
  font-size: 13px; color: rgba(255,255,255,.55); line-height: 1.65;
  max-width: 500px; font-weight: 300;
  opacity: 0; transform: translateY(10px);
  transition: opacity .5s ease .35s, transform .5s ease .35s;
}
.pf-slide.active .pf-brand-desc { opacity: 1; transform: translateY(0); }

.pf-slide-number {
  position: absolute; top: 24px; right: 40px;
  font-family: var(--ff-display); font-size: 13px;
  letter-spacing: .15em; color: rgba(255,255,255,.25); z-index: 2;
}

/* Products grid */
.pf-products-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
  flex-shrink: 0;
}
.pf-products-label { font-size: 10px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: #999; font-family: var(--ff-display); }
.pf-products-count { font-size: 11px; color: #bbb; font-family: var(--ff-display); }

.pf-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
  overflow-y: auto;
  flex: 1;
  scrollbar-width: none;
  align-content: start;
}
.pf-products-grid::-webkit-scrollbar { display: none; }

.pf-product-card {
  border: 1px solid #ececec;
  border-radius: 12px;
  overflow: hidden;
  display: flex; flex-direction: column;
  align-items: stretch;
  background: #f9f9f9;
  aspect-ratio: 1;
  cursor: default;
  transition: border-color .2s, transform .25s var(--ease-out-expo), box-shadow .2s;
  opacity: 0;
  transform: translateY(16px) scale(.96);
  position: relative;
}
.pf-slide.active .pf-product-card { opacity: 1; transform: translateY(0) scale(1); }
.pf-product-card:hover { border-color: var(--clr-red); transform: translateY(-3px) scale(1.04); box-shadow: 0 8px 24px rgba(204,31,43,.12); z-index: 2; }

.pf-product-img-wrap {
  width: 100%;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 10px;
  min-height: 0;
}
.pf-product-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: transform .35s ease;
}
.pf-product-card:hover .pf-product-img { transform: scale(1.1); }
.pf-product-img-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #bbb;
  opacity: 0.6;
}
.pf-product-label {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(0,0,0,.65), transparent);
  color: #fff;
  font-size: 9px;
  padding: 16px 6px 5px;
  text-align: center;
  opacity: 0;
  transition: opacity .2s;
  border-radius: 0 0 11px 11px;
  line-height: 1.3;
  font-family: var(--ff-body);
}
.pf-product-card:hover .pf-product-label { opacity: 1; }

/* Progress + dots */
.pf-progress-bar { position: absolute; bottom: 0; left: 0; height: 3px; background: rgba(0,0,0,.06); width: 100%; z-index: 5; }
.pf-progress-fill { height: 100%; background: var(--clr-red); transition: width .4s ease; }
.pf-scroll-hint {
  position: absolute;
  right: 20px;
  top: 30%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  z-index: 20;
}
.pf-scroll-dot { width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,.3); cursor: pointer; transition: all .25s; }
.pf-scroll-dot.active { height: 18px; border-radius: 3px; background: #fff; }

/* Responsive */
@media(max-width:900px){
  .pf-sidebar { width: 180px; min-width: 180px; }
  .pf-products-section { padding: 14px 20px 16px; }
  .pf-products-grid { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); }
  .pf-slide-hero { flex: 0 0 60%; }
  .pf-products-section { flex: 0 0 40%; }
}
@media(max-width:600px){
  .portfolio-app { flex-direction: column; height: auto; }
  .pf-sidebar { width: 100%; min-width: unset; height: auto; flex-direction: row; overflow-x: auto; padding: 8px; }
  .pf-sidebar-search, .pf-sidebar-title { display: none; }
  .pf-sectors-list { display: flex; flex-direction: row; padding: 0; overflow-x: auto; }
  .pf-sector-btn { white-space: nowrap; padding: 6px 14px; }
  .pf-slides-container { height: 680px; }
  .pf-slide-hero { flex: 0 0 55%; }
  .pf-products-section { flex: 0 0 45%; padding: 12px 16px 14px; }
  .pf-products-grid { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 8px; }
}
