/* ============================================================
   brands.css — Partner brands section
   Jersey Shore Construction Supply Co.
   ============================================================ */

#brands {
  background: var(--charcoal);
  padding: var(--section-padding);
}

.brands-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 3.5rem;
}

.brands-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background: var(--steel);
  border: 1px solid var(--steel);
  position: relative;
}

/* ── Brand card ── */
.brand-card {
  background: var(--charcoal);
  padding: 2.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
  transition: background 0.25s;
  position: relative;
  overflow: hidden;
}

.brand-card::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--red);
  transition: width 0.35s ease;
}

.brand-card:hover {
  background: var(--steel);
}

.brand-card:hover::before {
  width: 100%;
}

.brand-icon {
  width: 120px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-icon img{
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
 
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--white);
}

.brand-tag {
  font-size: 0.78rem;
  color: var(--silver);
  line-height: 1.4;
}

/* ── Back button ── */
.brand-back-btn {
  display: none;
  position: absolute;
  top: -3rem;
  left: 0;
  background: none;
  border: none;
  color: var(--silver);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  align-items: center;
  gap: 8px;
  transition: color 0.2s;
  padding: 0;
}
.brand-back-btn.visible { display: flex; }
.brand-back-btn:hover { color: var(--red); }

/* ── Hide inactive cards ── */
.brands-grid.brand-detail-active .brand-card:not(.brand-card--active) {
  display: none;
}

/* ── Active card: full width ── */
.brand-card--active {
  grid-column: 1 / -1;
  cursor: default !important;
  background: var(--charcoal);
  padding: 3rem 2rem;
  animation: cardExpand 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.brand-card--active::before { width: 100%; }

@keyframes cardExpand {
  from { opacity: 0; transform: scale(0.97); }
  to   { opacity: 1; transform: scale(1); }
}

.brand-detail-inner {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.25rem;
}

.brand-icon--large {
  width: 200px;
  height: 100px;
  clip-path: none;
  background: none;
}
.brand-icon--large img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.brand-detail-name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 2rem;
  text-transform: uppercase;
  color: var(--white);
  letter-spacing: 0.05em;
}

.brand-detail-desc {
  font-size: 1rem;
  color: var(--silver);
  line-height: 1.65;
  max-width: 520px;
}

.brand-materials {
  width: 100%;
  margin-top: 0.5rem;
  border-top: 1px solid var(--steel);
  padding-top: 1.5rem;
}

.brand-materials-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 1rem;
}

.brand-material-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.6rem 2rem;
  text-align: left;
}

.brand-material-item {
  font-size: 0.95rem;
  color: var(--light);
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--steel);
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand-material-item::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--red);
  flex-shrink: 0;
  clip-path: polygon(2px 0%, 100% 0%, calc(100% - 2px) 100%, 0% 100%);
}

.brand-materials-note {
  font-size: 0.75rem;
  color: var(--silver);
  margin-top: 1.25rem;
  font-style: italic;
  opacity: 0.7;
}