/* ============================================================
   Began Product Card v4.2.0
   ============================================================ */

.began-pc__list {
  width: 100%;
}

/* ── CARD LAYOUT ── */
.began-pc {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid #e8dfc9;
  font-family: 'Open Sans', sans-serif;
}

.began-pc:last-child {
  border-bottom: none;
}

.began-pc__image {
  width: 150px;
  min-width: 150px;
  min-height: 150px;
  flex-shrink: 0;
  flex-basis: 150px;
  aspect-ratio: 1 / 1;
  overflow: visible;
}

.began-pc__image img {
  width: 100%;
  height: auto;
  display: block;
}

.began-pc__content {
  flex: 1;
  min-width: 0;
}

.began-pc__top {
  margin-bottom: 12px;
}

.began-pc__code {
  display: block;
  font-size: 14px;
  font-weight: 400;
  color: #6b6045;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.began-pc__submarca {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: #AE943D;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 0;
  line-height: 1.2;
}

.began-pc__name {
  font-size: 32px;
  font-weight: 800;
  color: #3c341c;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 0;
  line-height: 1.15;
}

/* ── INFOBOX ── */
.began-pc__infobox {
  display: flex;
  align-items: stretch;
  background-color: #f5f0e8;
  border: 1px solid #e8dfc9;
  border-radius: 4px;
  overflow: hidden;
}

.began-pc__desc {
  flex: 1;
  padding: 14px 18px;
  border-right: 1px solid #e8dfc9;
  min-width: 0;
}

.began-pc__label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #AE943D;
  margin-bottom: 6px;
}

.began-pc__label i,
.began-pc__label svg {
  font-size: 13px !important;
  width: 13px !important;
  height: 13px !important;
  color: inherit !important;
  fill: currentColor !important;
  display: inline-block !important;
  line-height: 1 !important;
}

.began-pc__desc-text {
  font-size: 13px;
  font-weight: 700;
  color: #3c341c;
  text-transform: uppercase;
  line-height: 1.5;
  margin: 0;
  letter-spacing: 0.3px;
}

.began-pc__meta {
  display: flex;
  align-items: stretch;
}

.began-pc__package {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 14px 18px;
  border-right: 1px solid #e8dfc9;
  min-width: 110px;
}

.began-pc__package-value {
  font-size: 14px;
  font-weight: 700;
  color: #3c341c;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.began-pc__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  background-color: #e8dfc9;
  color: #3c341c;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.25s ease, color 0.25s ease;
  font-family: 'Open Sans', sans-serif;
}

.began-pc__btn:hover {
  background-color: #AE943D;
  color: #fdfcfa;
}

.began-pc__btn i {
  font-size: 10px;
}

/* ── MINERAL VARIANT ── */
.began-pc--mineral {
  gap: 0;
}

.began-pc__infobox--mineral {
  flex-wrap: nowrap;
}

.began-pc__infobox--mineral .began-pc__desc {
  flex: 1 1 55%;
}

.began-pc__sidebar {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  min-width: 220px;
}

.began-pc__sidebar .began-pc__package {
  border-right: none;
  border-bottom: 1px solid #e8dfc9;
}

.began-pc__sidebar .began-pc__btn {
  border-bottom: 1px solid #e8dfc9;
}

.began-pc__target {
  padding: 14px 18px;
}

.began-pc__target-value {
  font-size: 13px;
  font-weight: 700;
  color: #3c341c;
  text-transform: uppercase;
  line-height: 1.5;
  margin: 0;
  letter-spacing: 0.3px;
}

/* ============================================================
   FICHA VIEWER — Image-based
   ============================================================ */
.began-pdf-viewer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999999;
  align-items: center;
  justify-content: center;
}

.began-pdf-viewer.active {
  display: flex;
}

/* Overlay */
.began-pdf-viewer__overlay {
  position: fixed;
  inset: 0;
  background-color: var(--bpv-overlay, rgba(0,0,0,0.88));
  cursor: pointer;
}

/* Container — se ajusta al tamano de la imagen */
.began-pdf-viewer__container {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  max-width: 92vw;
  max-height: 92vh;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 16px 64px rgba(0,0,0,0.6);
  animation: beganPdfIn 0.25s ease;
  background: #3a3a3a;
}

/* ── Toolbar ── */
.began-pdf-viewer__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 16px;
  height: 48px;
  min-height: 48px;
  background: #2c2517;
  color: #f5f0e8;
  font-family: 'Open Sans', sans-serif;
  flex-shrink: 0;
  user-select: none;
}

.began-pdf-viewer__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.began-pdf-viewer__title > i {
  color: #AE943D;
  font-size: 16px;
  flex-shrink: 0;
}

.began-pdf-viewer__title > span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.began-pdf-viewer__controls {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.began-pdf-viewer__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  min-width: 34px;
  padding: 0 8px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: #f5f0e8;
  font-size: 13px;
  cursor: pointer;
  transition: background-color 0.15s ease;
  font-family: 'Open Sans', sans-serif;
  text-decoration: none;
}

.began-pdf-viewer__btn:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
  text-decoration: none;
}

.began-pdf-viewer__btn:disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

.began-pdf-viewer__btn-text {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.began-pdf-viewer__zoom-label {
  font-size: 12px;
  font-weight: 600;
  min-width: 40px;
  text-align: center;
  opacity: 0.8;
}

.began-pdf-viewer__page-info {
  font-size: 12px;
  font-weight: 600;
  min-width: 50px;
  text-align: center;
  opacity: 0.8;
}

.began-pdf-viewer__separator {
  width: 1px;
  height: 20px;
  background: rgba(255,255,255,0.15);
  margin: 0 4px;
}

.began-pdf-viewer__close:hover {
  background: rgba(220, 50, 50, 0.7) !important;
}

/* ── Body: scrollable canvas area ── */
.began-pdf-viewer__body {
  flex: 1;
  position: relative;
  overflow: auto;
  background: #525659;
  -webkit-overflow-scrolling: touch;
}

.began-pdf-viewer__pages {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.began-ficha-img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(816px, 92vw);
  max-height: calc(92vh - 48px);
  object-fit: contain;
  -webkit-user-select: none;
  user-select: none;
}

/* Loading spinner */
.began-pdf-viewer__loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #f5f0e8;
  font-family: 'Open Sans', sans-serif;
  font-size: 15px;
}

.began-pdf-viewer__loading > i {
  font-size: 28px;
  color: #AE943D;
}

.began-pdf-viewer__loading.hidden {
  display: none;
}

@keyframes beganPdfIn {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* ── TABLET (up to 1024px) ── */
@media (max-width: 1024px) {
  .began-pc__infobox {
    flex-direction: column;
  }

  .began-pc__infobox--mineral {
    flex-wrap: wrap;
  }

  .began-pc__desc {
    border-right: none;
    border-bottom: 1px solid #e8dfc9;
  }

  .began-pc__meta {
    flex-direction: column;
  }

  .began-pc__package {
    border-right: none;
    border-bottom: 1px solid #e8dfc9;
  }

  .began-pc__sidebar {
    min-width: 100%;
  }

  .began-pc__btn {
    width: 100%;
    justify-content: center;
    padding: 14px;
  }

  .began-pc__name {
    font-size: 26px;
  }

  /* Ficha viewer tablet */
  .began-pdf-viewer__container {
    max-width: 96vw;
    max-height: 94vh;
  }

  .began-pdf-viewer__title > span {
    max-width: 140px;
  }

  .began-ficha-img {
    max-width: min(816px, 96vw);
    max-height: calc(94vh - 48px);
  }
}

/* ── MOBILE (up to 768px) ── */
@media (max-width: 768px) {
  .began-pc--standard {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
  }

  .began-pc__image {
    width: 120px;
    min-width: 120px;
    min-height: 120px;
    flex-basis: 120px;
  }

  .began-pc__name {
    font-size: 24px;
  }

  .began-pc__package {
    align-items: center;
  }

  .began-pc__sidebar .began-pc__package {
    align-items: center;
  }

  .began-pc__label {
    justify-content: center;
  }

  /* Ficha viewer mobile — full screen */
  .began-pdf-viewer__container {
    max-width: 100vw;
    max-height: 100vh;
    max-height: 100dvh;
    border-radius: 0;
  }

  .began-pdf-viewer__toolbar {
    padding: 0 10px;
    height: 44px;
    min-height: 44px;
  }

  .began-pdf-viewer__title {
    font-size: 12px;
  }

  .began-pdf-viewer__title > span {
    max-width: 120px;
  }

  .began-pdf-viewer__btn-text {
    display: none;
  }

  .began-ficha-img {
    max-width: 100vw;
    max-height: calc(100dvh - 44px);
  }
}

/* ── SMALL PHONE (up to 480px) ── */
@media (max-width: 480px) {
  .began-pc__image {
    width: 100px;
    min-width: 100px;
    min-height: 100px;
    flex-basis: 100px;
  }

  .began-pc__name {
    font-size: 20px;
  }

  .began-pc__submarca {
    font-size: 14px;
  }

  .began-pc__code {
    font-size: 12px;
  }

  .began-pc__desc-text,
  .began-pc__target-value {
    font-size: 12px;
  }

  .began-pdf-viewer__title > span {
    max-width: 70px;
  }
}
