/**
 * Clics Modernos
 * Page: Locales (Sucursales)
 */

.page-locales {
  padding-block: clamp(2.5rem, 5vw, 5rem);
}

.locales-container {
  width: min(calc(100% - (var(--container-padding) * 2)),
      var(--container-width));
  margin-inline: auto;
}

/* ============================================================
   GRID LAYOUT
   ============================================================ */
.locales-layout {
  display: flex;
  flex-direction: column;
  gap: var(--space-10);
}

@media (min-width: 992px) {
  .locales-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: clamp(2.5rem, 5.5vw, 5rem);
    align-items: start;
  }
}

/* ============================================================
   LEFT COLUMN: HEADER & STORE INFO
   ============================================================ */
.locales-info {
  display: flex;
  flex-direction: column;
}

/* Header */
.locales-header {
  margin-bottom: 0;
}

.locales-title {
  font-family: var(--font-display);
  font-size: clamp(2.15rem, 3.8vw, 2.75rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
  color: var(--color-foreground);
  margin-bottom: var(--space-4);
}

.locales-subtitle {
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--color-muted-foreground);
  max-width: 500px;
}

@media (max-width: 640px) {
  .locales-subtitle-br {
    display: none;
  }
}

/* Dividers */
.locales-divider {
  border: none;
  height: 1px;
  background-color: var(--color-border);
  margin-block: clamp(1.25rem, 2vw, 1.5rem);
  width: 100%;
}

.locales-divider--header {
  margin-block: clamp(1.75rem, 3vw, 2.25rem);
}

/* Store details */
.locales-store-details {
  display: flex;
  flex-direction: column;
}

.store-region-tag {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-muted-foreground);
  margin-bottom: var(--space-2);
}

.store-heading {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.2vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--color-foreground);
  margin-bottom: clamp(1.25rem, 2vw, 1.6rem);
}

/* Store Info Items (Address & Horarios) */
.store-info-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
}

.store-info-icon-badge {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background-color: var(--color-surface);
  color: var(--color-foreground);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.02);
}

.store-info-text {
  display: flex;
  flex-direction: column;
  padding-top: 2px;
}

.store-info-title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.35;
  color: var(--color-foreground);
  margin-bottom: 4px;
}

.store-info-line {
  font-size: 0.925rem;
  line-height: 1.55;
  color: var(--color-muted-foreground);
  margin: 0;
}

.store-info-line--primary {
  font-weight: 500;
  color: var(--color-foreground);
  font-size: 0.95rem;
  margin-bottom: 2px;
}

/* Actions Row */
.locales-actions {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 1.75rem);
  flex-wrap: wrap;
}

.locales-action-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-foreground);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.locales-action-link:hover {
  color: var(--color-primary);
}

.locales-action-icon {
  width: 18px;
  height: 18px;
  color: var(--color-foreground);
  flex-shrink: 0;
}

.locales-action-arrow {
  width: 16px;
  height: 16px;
  color: currentColor;
  transition: transform var(--transition-fast);
  flex-shrink: 0;
}

.locales-action-link:hover .locales-action-arrow {
  transform: translateX(4px);
}

.locales-actions-separator {
  width: 1px;
  height: 20px;
  background-color: var(--color-border);
  display: inline-block;
}

@media (max-width: 420px) {
  .locales-actions-separator {
    display: none;
  }
}

/* ============================================================
   RIGHT COLUMN: GALLERY & THUMBNAILS
   ============================================================ */
.locales-gallery {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.locales-main-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background-color: var(--color-surface);
}

@media (min-width: 992px) {
  .locales-main-image-wrap {
    border-radius: 24px;
    aspect-ratio: 4 / 3;
  }
}

.locales-main-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: opacity 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.locales-main-image.is-fading {
  opacity: 0.35;
}

/* Thumbnails */
.locales-thumbnails {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 14px;
}

@media (min-width: 768px) {
  .locales-thumbnails {
    gap: 14px;
    margin-top: 16px;
  }
}

.locales-thumb-btn {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 2px;
  border: 2px solid transparent;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  overflow: hidden;
  transition: border-color var(--transition-fast), transform var(--transition-fast), opacity var(--transition-fast);
}

.locales-thumb-btn:hover:not(.is-active) {
  transform: translateY(-2px);
  opacity: 0.9;
}

.locales-thumb-btn:focus-visible {
  outline: 2px solid var(--color-ring);
  outline-offset: 2px;
}

.locales-thumb-btn.is-active {
  border-color: var(--color-foreground);
}

.locales-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 8px;
  display: block;
}