/*
 * Silver Star — branch-detail.css
 */

/* =========================================
   BRANCH DETAIL PAGE
   ========================================= */

/* ---- Hero ---- */
.branch-hero {
  position: relative;
  height: 60vh;
  min-height: 380px;
  background: var(--color-primary);
  display: flex;
  align-items: flex-end;
  padding-bottom: var(--space-3xl);
  overflow: hidden;
  padding-top: var(--header-height-mobile);
}

.branch-hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
}

.branch-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(56,55,20,0.2) 0%, rgba(56,55,20,0.88) 100%);
  z-index: 0;
}

.branch-hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
}

.branch-hero__district {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(201,157,102,0.18);
  border: 0.3px solid rgba(201,157,102,0.35);
  border-radius: var(--radius-full);
  padding: 5px 14px 5px 10px;
  font-size: 0.6875rem;
  font-weight: var(--fw-bold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-md);
  opacity: 0;
  animation: bdFadeUp 0.5s ease 0.1s forwards;
}

.branch-hero__district-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
}

.branch-hero__title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 6vw, 4.5rem);
  font-weight: var(--fw-bold);
  color: var(--color-white);
  line-height: 1.1;
  margin-bottom: var(--space-md);
  opacity: 0;
  animation: bdFadeUp 0.5s ease 0.2s forwards;
}

.branch-hero__breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.5);
  opacity: 0;
  animation: bdFadeUp 0.5s ease 0.3s forwards;
}

.branch-hero__breadcrumb a { color: rgba(255,255,255,0.5); transition: color var(--transition-fast); }
.branch-hero__breadcrumb a:hover { color: var(--color-accent); }
.branch-hero__breadcrumb svg { width: 12px; height: 12px; stroke: currentColor; fill: none; }
.branch-hero__breadcrumb span { color: var(--color-white); }

@keyframes bdFadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Branch Info ---- */
.branch-info {
  background: #dddddd;
  padding-block: var(--space-3xl);
}

.branch-info__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2xl);
  align-items: start;
}

/* Left: details */
/* Silver Coffee logo — header & footer override */
.branch-page .header-logo__img,
.branch-page .footer__logo img {
  height: 52px;
}

@media (min-width: 768px) {
  .branch-page .header-logo__img,
  .branch-page .footer__logo img {
    height: 64px;
  }
}

/* Silver Coffee logo — info section */
.branch-logo {
  height: 80px;
  width: auto;
  display: block;
  margin-bottom: var(--space-md);
}

.branch-info__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.6875rem;
  font-weight: var(--fw-bold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-md);
}

.branch-info__title {
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: var(--fw-bold);
  color: var(--color-primary);
  line-height: 1.15;
  margin-bottom: var(--space-md);
}

.branch-info__desc {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.8;
  margin-bottom: var(--space-xl);
}

.branch-info__cards {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
}

.branch-info__card {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  background: var(--color-gray-light);
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-lg);
}

.branch-info__card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.branch-info__card-icon svg { width: 16px; height: 16px; fill: var(--color-accent); }

.branch-info__card-label {
  font-size: 0.625rem;
  font-weight: var(--fw-bold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  display: block;
  margin-bottom: 2px;
}

.branch-info__card-value {
  font-size: 0.9375rem;
  font-weight: var(--fw-semibold);
  color: var(--color-primary);
  display: block;
}

.branch-info__card-value a { color: inherit; transition: color var(--transition-fast); }
.branch-info__card-value a:hover { color: var(--color-accent); }

.branch-info__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: var(--space-xl);
}

.branch-info__tag {
  font-size: 0.8125rem;
  font-weight: var(--fw-medium);
  color: var(--color-text-muted);
  background: var(--color-gray-light);
  border: 0.3px solid rgba(56,55,20,0.1);
  padding: 6px 14px;
  border-radius: var(--radius-full);
}

.branch-info__actions {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.branch-info__actions .btn {
  border-radius: 6px;
  font-size: 0.9375rem;
  padding: 0.8125rem 1.875rem;
}

/* Get Directions — gold border normal, dark bg on hover/active */
.branch-info__actions .btn--outline-dark {
  border-width: 0.3px;
  border-color: #c99d66;
  color: #c99d66;
}

.branch-info__actions .btn--outline-dark:hover,
.branch-info__actions .btn--outline-dark:active {
  background: #383710;
  border-color: transparent;
  color: var(--color-white);
}

/* Right: image — fixed height, no overflow */
.branch-info__img-wrap {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(56,55,20,0.12);
}

.branch-info__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  transition: transform 0.5s ease;
}

.branch-info__img-wrap:hover .branch-info__img { transform: scale(1.03); }

/* ---- Gallery ---- */
.branch-gallery {
  background: var(--color-cream);
  padding-block: var(--space-3xl);
}

.branch-gallery__header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.branch-gallery__title {
  font-family: var(--font-heading);
  font-size: clamp(1.625rem, 3.5vw, 2.5rem);
  font-weight: var(--fw-bold);
  color: var(--color-primary);
  margin-top: var(--space-sm);
}

.branch-gallery__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.branch-gallery__img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  object-position: center center;
  display: block;
  transition: transform 0.4s ease;
}

.branch-gallery__img:hover { transform: scale(1.04); }

.branch-gallery__img:first-child {
  grid-column: 1 / -1;
  height: 380px;
  object-position: center center;
}

/* ---- Other Branches ---- */
.other-branches {
  background: var(--color-primary);
  padding-block: var(--space-3xl);
  position: relative;
  overflow: hidden;
}

.other-branches::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(201,157,102,0.07) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.other-branches__header {
  text-align: center;
  margin-bottom: var(--space-xl);
  position: relative;
  z-index: 1;
}

.other-branches__label {
  font-size: 0.6875rem;
  font-weight: var(--fw-bold);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent);
  display: block;
  margin-bottom: var(--space-sm);
}

.other-branches__title {
  font-family: var(--font-heading);
  font-size: clamp(1.625rem, 3.5vw, 2.5rem);
  font-weight: var(--fw-bold);
  color: var(--color-white);
}

.other-branches__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  position: relative;
  z-index: 1;
}

.other-branch-card {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  background: rgba(255,255,255,0.06);
  border: 0.3px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  padding: var(--space-md) var(--space-lg);
  text-decoration: none;
  transition: background var(--transition-base), border-color var(--transition-base);
}

.other-branch-card:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(201,157,102,0.3);
}

.other-branch-card__img {
  width: 60px;
  height: 60px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}

.other-branch-card__info {
  flex: 1;
  min-width: 0;
}

.other-branch-card__name {
  font-size: 1rem;
  font-weight: var(--fw-bold);
  color: var(--color-white);
  display: block;
  margin-bottom: 3px;
}

.other-branch-card__district {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.5);
}

.other-branch-card__arrow {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: rgba(255,255,255,0.35);
  transition: color var(--transition-fast), transform var(--transition-base);
}

.other-branch-card:hover .other-branch-card__arrow {
  color: var(--color-accent);
  transform: translateX(3px);
}

.other-branch-card__arrow svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

@media (min-width: 640px) {
  .other-branches__grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---- CTA ---- */
.branch-cta {
  background: var(--color-primary);
  padding-block: var(--space-4xl);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.branch-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(201,157,102,0.08) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.branch-cta__inner { position: relative; z-index: 1; }

.branch-cta__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(201,157,102,0.14);
  border: 0.3px solid rgba(201,157,102,0.3);
  border-radius: var(--radius-full);
  padding: 5px 14px 5px 10px;
  font-size: 0.6875rem;
  font-weight: var(--fw-bold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-lg);
}

.branch-cta__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
}

.branch-cta__title {
  font-family: var(--font-heading);
  font-size: clamp(1.875rem, 4vw, 3rem);
  font-weight: var(--fw-bold);
  color: var(--color-white);
  margin-bottom: var(--space-md);
}

.branch-cta__desc {
  font-size: 0.9375rem;
  color: rgba(255,255,255,0.6);
  max-width: 380px;
  margin-inline: auto;
  line-height: 1.75;
  margin-bottom: var(--space-xl);
}

.branch-cta__actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

.branch-cta__actions .btn--primary {
  background: var(--color-accent);
  border: 0.3px solid var(--color-accent);
  color: var(--color-white);
  border-radius: 6px;
  font-size: 0.9375rem;
  padding: 0.8125rem 2rem;
}

.branch-cta__actions .btn--primary:hover {
  background: var(--color-accent-light);
  border-color: var(--color-accent-light);
}

.branch-cta__actions .btn--outline {
  border: 0.3px solid rgba(255,255,255,0.3);
  color: var(--color-white);
  border-radius: 6px;
  font-size: 0.9375rem;
  padding: 0.8125rem 2rem;
}

.branch-cta__actions .btn--outline:hover { border-color: var(--color-white); }

/* ---- Responsive ---- */
@media (min-width: 768px) {
  .branch-hero { padding-top: var(--header-height); height: 62vh; }
  .branch-info, .branch-gallery, .branch-cta { padding-block: var(--space-4xl); }
  .branch-info__grid { grid-template-columns: 1fr 1fr; align-items: start; }
  .branch-gallery__grid { grid-template-columns: repeat(4, 1fr); }
  .branch-gallery__img { height: 240px; }
  .branch-gallery__img:first-child { grid-column: 1; height: 240px; }

  /* Always make the last two images share the final row at 2 columns wide each,
     filling the 4-column width regardless of the total image count */
  .branch-gallery__img:nth-last-child(-n+2) {
    grid-column: span 2;
  }
}

@media (min-width: 1024px) {
  .branch-hero { height: 65vh; }
}

@media (min-width: 1024px) and (max-height: 650px) {
  .branch-hero { height: 55vh; }
  .branch-info, .branch-gallery, .branch-cta { padding-block: var(--space-2xl); }
}

/* Phone landscape */
@media (orientation: landscape) and (max-height: 500px) {
  .branch-hero {
    height: auto;
    min-height: 100svh;
    padding-top: var(--header-height-mobile);
    padding-bottom: var(--space-xl);
  }

  .branch-info,
  .branch-gallery,
  .branch-cta {
    padding-block: var(--space-2xl);
  }

  .branch-info__grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .branch-gallery__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .branch-gallery__img {
    height: 140px;
  }
}
