:root {
  --pb-green: #006B5B;
  --pb-light-green: #D6E8E3;
  --pb-yellow: #D4E157;
  --pb-bg: #F9F7F2;
  --pb-border: #E0E0E0;
  --pb-text: #333333;
  --pb-text-light: #777777;
  --pb-alert: #F44336;
  --pb-alert-bg: #FFF9C4;
}

#pb-app {
  font-family: 'Inter', sans-serif;
  /* Asegúrate de tener la fuente cargada */
  background-color: var(--pb-bg);
  min-height: 100vh;
  color: var(--pb-text);
  padding-bottom: 100px;
}

/* Cabecera */
.pb-header {
  background: white;
  z-index: 100;
  padding: 15px 20px 5px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: all 0.2s;
}

.pb-header-spacer {
  display: none;
}

.pb-header.js-sticky {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.pb-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 10px;
  margin-bottom: 5px;
  border-bottom: 1px solid #E5E0D5;
}
.pb-help-btn{ visibility: hidden;}
.pb-back-btn{
  background: none;
  border: none;
  font-size: 18px;
  color: var(--pb-green);
  cursor: pointer;
}

.pb-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--pb-green);
  margin: 0;
  padding: 0;
}

.pb-pack-sizes {
  text-align: center;
  margin-bottom: 15px;
}

.pb-pack-sizes>span {
  display: block;
  font-size: 10px;
  color: var(--pb-text-light);
  text-transform: initial;
  margin-bottom: 8px;
}

.pb-size-options {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.pb-size-btn {
  background: white;
  border: 1px solid var(--pb-border);
  border-radius: 20px;
  padding: 5px 20px;
  font-weight: 600;
  font-size: 14px;
  color: var(--pb-text);
  cursor: pointer;
  position: relative;
}

.pb-size-btn.active {
  background: var(--pb-green);
  color: white;
  border-color: var(--pb-green);
}

.pb-size-badge {
  position: absolute;
  top: -17px;
  right: 14px;
  background: var(--pb-yellow);
  color: #333;
  font-size: 8px;
  padding: 0px 6px;
  border-radius: 10px;
  font-weight: bold;
}

.pb-progress-container {
  margin-bottom: 15px;
}

.pb-progress-info {
  display: flex;
  flex-direction: column;
  margin-bottom: 5px;
}

.pb-progress-text {
  font-size: 12px;
  color: var(--pb-green);
  font-weight: 700;
}

.pb-btn-ver-resumen-sticky {
  background: var(--pb-bg);
  color: var(--pb-green);
  border: 1px solid var(--pb-green);
  padding: 0 12px;
  border-radius: 16px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-transform: initial;
  transition: all 0.2s ease;
}

.pb-btn-ver-resumen-sticky:hover {
  background: var(--pb-light-green);
}

.pb-progress-status {
  display: flex;
  justify-content: space-between;
  width: 100%;
  font-size: 12px;
}

.pb-progress-status strong {
  color: var(--pb-green);
  font-weight: 700;
}

.pb-progress-bar {
  background: #EAEAEA;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
}

.pb-progress-fill {
  background: var(--pb-green);
  height: 100%;
  transition: width 0.3s ease;
}

.pb-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 15px;
}

.pb-filters::-webkit-scrollbar {
  display: none;
}

.pb-filter-btn {
  background: white;
  border: 1px solid var(--pb-border);
  padding: 6px 12px;
  border-radius: 15px;
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
}

.pb-filter-btn.active {
  background: var(--pb-green);
  color: white;
  border-color: var(--pb-green);
}

/* Grilla principal */
.pb-main {
  padding: 20px;
}

.pb-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--pb-green);
  margin-bottom: 15px;
}

.pb-section-title span {
  font-size: 11px;
  font-weight: 400;
  color: var(--pb-text-light);
}

.pb-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 30px;
}

/* Shimmer Loading Skeletons */
.pb-skeleton {
  background: #EAEAEA;
  background: linear-gradient(90deg, #EAEAEA 25%, #F5F5F5 50%, #EAEAEA 75%);
  background-size: 200% 100%;
  animation: pbShimmer 1.5s infinite;
  border-radius: 8px;
}

@keyframes pbShimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

.pb-card.skeleton {
  border: 1px solid var(--pb-border);
  display: flex;
  flex-direction: column;
  padding-bottom: 12px;
}

.pb-card.skeleton .pb-card-img-wrap {
  background: transparent;
  padding: 0;
}

.pb-skeleton-img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 12px 12px 0 0;
}

.pb-card.skeleton .pb-card-content {
  padding: 12px;
}

.pb-skeleton-text {
  height: 10px;
  margin-bottom: 8px;
  border-radius: 4px;
}

.pb-skeleton-text.short {
  width: 60%;
}

.pb-skeleton-text.long {
  width: 90%;
}

/* Tarjetas */
.pb-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  border-bottom: 1px solid var(--pb-border);
  border-left: 1px solid var(--pb-border);
  border-right: 1px solid var(--pb-border);
  border-top: 0;
  display: flex;
  flex-direction: column;
}

.pb-card.pb-card-selected-complete {
  border-bottom: 2px solid var(--pb-green) !important;
  border-left: 2px solid var(--pb-green) !important;
  border-right: 2px solid var(--pb-green) !important;
}

.pb-card.pb-card-selected-missing {
  border-bottom: 2px solid var(--pb-yellow) !important;
  border-left: 2px solid var(--pb-yellow) !important;
  border-right: 2px solid var(--pb-yellow) !important;
}

.pb-card.pb-card-selected-listo {
  border-bottom: 2px solid var(--pb-green) !important;
  border-left: 2px solid var(--pb-green) !important;
  border-right: 2px solid var(--pb-green) !important;
}

.pb-card-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  display: block;
}

.pb-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pb-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 8px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 8px;
  text-transform: initial;
  opacity: 0.9;
  line-height: 1.5;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.pb-tag-grs {
  position: absolute;
  bottom: 13px;
  left: 10px;
  font-size: 8px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 8px;
  text-transform: initial;
  background: rgba(255, 255, 255, 0.9);
  color: var(--pb-green);
  line-height: 1.5;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 5;
}

.pb-tag.mas-vendido {
  background: var(--pb-yellow);
  color: #333;
}

.pb-tag.nuevo {
  background: #E91E63;
  color: white;
}

.pb-tag.premium {
  background: #3F51B5;
  color: white;
}

.pb-qty-badge {
  position: absolute;
  top: 10px;
  right: 40px;
  background: var(--pb-green);
  color: white;
  font-size: 11px;
  font-weight: bold;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pb-info-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--pb-green);
  border: 1px solid var(--pb-border);
  font-size: 12px;
  font-weight: bold;
  font-style: italic;
  font-family: serif;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
}

.pb-card-content {
  padding: 10px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.pb-card-format {
  font-size: 10px;
  font-weight: 700;
  color: var(--pb-green);
  border: 1px solid var(--pb-green);
  background-color: #F4F9F6;
  padding: 0px 6px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  margin: 0;
  height: 16px;
  width: fit-content;
}

.pb-card-title {
  font-size: 13px;
  font-weight: 700;
  padding: 0;
  margin: 0;
  line-height: 1.2;
  color: #212529 !important;
  min-height: 31px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  cursor: pointer;
}

.pb-card-title.expanded {
  -webkit-line-clamp: unset;
  min-height: unset;
}

.pb-card-info {
  font-size: 10px;
  color: var(--pb-text-light);
  margin-top: auto;
  margin-bottom: 10px;
}

.pb-card-price {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 2px;
}

.pb-card-price-unit {
  font-size: 9px;
  color: var(--pb-text-light);
  margin-bottom: 10px;
}

/* Botones tarjeta */
.pb-btn-add {
  background: var(--pb-yellow);
  border: none;
  border-radius: 15px;
  font-size: 9px;
  font-weight: 700;
  padding: 0px 5px;
  height: 24px;
  cursor: pointer;
  white-space:nowrap;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 100%;
  margin-top: auto;
}

.pb-btn-add.combinable {
  background: var(--pb-yellow);
}

.pb-btn-add.completo {
  background: var(--pb-green);
  color: white;
}

.pb-qty-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--pb-green);
  border-radius: 20px;
  padding: 0px 10px;
  background: white;
  width: 100%;
  height: 26px;
  margin-top: auto;
}

.pb-qty-btn {
  background: transparent;
  border: none;
  color: var(--pb-green);
  width: 30px;
  height: 100%;
  font-weight: bold;
  font-size: 16px;
  cursor: pointer;
}

.pb-qty-input {
  text-align: center;
  font-size: 14px;
  font-weight: bold;
  color: #212529 !important;
}

/* Barra Flotante Inferior */
.pb-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 -2px 15px rgba(0, 0, 0, 0.05);
  z-index: 99;
}

.pb-bottom-info {
  display: flex;
  flex-direction: column;
}

.pb-bottom-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--pb-green);
}

.pb-bottom-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--pb-green);
  line-height: 1.1;
}

.pb-bottom-subtitle {
  font-size: 10px;
  color: var(--pb-text-light);
}

.pb-btn-ver-seleccion {
  background: var(--pb-bg);
  border: none;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--pb-text);
  cursor: pointer;
}

.pb-btn-ver-seleccion.ready {
  background: var(--pb-green);
  color: white;
}

/* Modal Bottom Sheet */
.pb-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.pb-overlay.active {
  display: block;
  opacity: 1;
}

.pb-bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-radius: 20px 20px 0 0;
  z-index: 1001;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}

.pb-bottom-sheet.active {
  transform: translateY(0);
}

.pb-sheet-handle {
  width: 40px;
  height: 4px;
  background: #E0E0E0;
  border-radius: 2px;
  margin: 10px auto;
  cursor: pointer;
}

.pb-sheet-header {
  padding: 0 20px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--pb-border);
}

.pb-sheet-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--pb-green);
  margin: 0 0 5px 0;
}

.pb-sheet-subtitle {
  font-size: 12px;
  color: var(--pb-text-light);
  margin: 0;
  line-height: 1.5;
}

.pb-sheet-progress {
  background: var(--pb-yellow);
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.pb-sheet-progress span {
  font-weight: 700;
}

.pb-sheet-content {
  padding: 10px 15px;
  overflow-y: auto;
  flex-grow: 1;
}

.pb-grid-acomp {
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.pb-acomp-card {
  border: 1px solid var(--pb-border);
  border-radius: 12px;
  overflow: hidden;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
}

.pb-acomp-card.selected {
  border: 2px solid var(--pb-green);
}

.pb-acomp-img {
  width: 100%;
  height: 120px;
  position: relative;
  background: #f5f5f5;
  padding: 0;
}

.pb-acomp-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pb-acomp-check {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--pb-green);
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: bold;
}

.pb-acomp-content {
  padding: 6px 10px 8px;
  text-align: left;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.pb-acomp-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--pb-text);
  margin: 0 0 2px 0;
  line-height: 1.15;
}

.pb-acomp-desc {
  font-size: 11px;
  color: var(--pb-text-light);
  margin: 0;
  line-height: 1.5;
}

.pb-acomp-qty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #e0e0e0;
  border-radius: 20px;
  padding: 0px 5px;
  background: #f9f9f9;
  width: 50%;
  height: 24px;
  margin-top: 0;
}

.pb-acomp-qty .pb-qty-btn {
  color: #666;
  font-size: 14px;
  background: transparent;
  border: none;
  width: 24px;
  height: 100%;
  font-weight: bold;
  cursor: pointer;
}

.pb-acomp-qty .pb-qty-input {
  font-size: 12px;
  color: #333;
  font-weight: bold;
}

.pb-sheet-footer {
  padding: 10px;
  background: white;
  border-top: 1px solid var(--pb-border);
  text-align: center;
}

.pb-btn-confirmar-acomp {
  background: #B2D1C9;
  color: white;
  border: none;
  width: 60%;
  padding: 5px;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 700;
  cursor: not-allowed;
  transition: all 0.2s;
}

.pb-btn-confirmar-acomp.ready {
  background: var(--pb-green);
  cursor: pointer;
}

.pb-floating-filter-btn {
      position: fixed;
    bottom: 80px;
    right: 20px;
    background: var(--pb-green);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 100 !important;
    border: none;
    transition: transform 0.2s;
}

.pb-floating-filter-btn:active {
  transform: scale(0.95);
}

.pb-sheet-hint {
  font-size: 11px;
  color: var(--pb-text-light);
  margin: 0;
}

/* Vista Tu Selección (Full Screen) */
.pb-tu-seleccion {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--pb-bg);
  z-index: 2000;
  display: flex;
  flex-direction: column;
}

.pb-ts-header {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  background: white;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.pb-ts-back {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--pb-green);
  margin-right: 15px;
  cursor: pointer;
}

.pb-ts-header h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--pb-green);
  margin: 0;
  padding: 0;
}

.pb-ts-content {
  padding: 20px;
  flex-grow: 1;
  overflow-y: auto;
}

.pb-ts-summary-header h3 {
  font-size: 12px;
  color: var(--pb-green);
  text-transform: initial;
  margin: 0 0 5px 0;
}

.pb-ts-title-llevas {
  font-size: 24px;
  font-weight: 800;
  color: var(--pb-green);
  margin: 0 0 15px 0;
}

.pb-ts-warning {
  background: var(--pb-alert-bg);
  border: 1px solid var(--pb-yellow);
  padding: 12px 15px;
  border-radius: 10px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 20px 0;
}

.pb-ts-warning i {
  background: var(--pb-yellow);
  color: #333;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  flex-shrink: 0;
}

.pb-ts-warning p {
  margin: 0;
  font-size: 12px;
  color: var(--pb-text);
}

.pb-ts-warning p strong {
  display: block;
  font-size: 13px;
  color: var(--pb-green);
  margin-bottom: 2px;
}

.pb-ts-list-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--pb-green);
  margin: 0 0 15px 0;
}

.pb-ts-item {
  background: white;
  border: 1px solid var(--pb-border);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.pb-ts-item.warning {
  border-color: var(--pb-yellow);
  background: #FDFAF0;
}

.pb-ts-item-img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #f5f5f5;
  flex-shrink: 0;
  overflow: hidden;
}

.pb-ts-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pb-ts-item-info {
  flex-grow: 1;
}

.pb-ts-item-title {
  font-size: 13px;
  font-weight: 700;
  color: #212529;
  margin: 0 0 2px 0;
}

.pb-ts-item-desc {
  font-size: 11px;
  color: var(--pb-green);
  margin: 0;
}

.pb-ts-item-desc.expandable {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  cursor: pointer;
}

.pb-ts-item-desc.expandable.expanded {
  -webkit-line-clamp: unset;
}

.pb-ts-item-desc.error {
  color: #e6a822;
  font-weight: bold;
}

.pb-ts-item-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pb-ts-item-qty {
  background: var(--pb-green);
  color: white;
  font-size: 11px;
  font-weight: 700;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.pb-ts-item-remove {
  background: #f5f5f5;
  color: #e53935;
  border: none;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}


.pb-ts-add-more {
  width: 100%;
  background: transparent;
  border: 2px dashed #CCC;
  border-radius: 12px;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 15px;
  cursor: pointer;
  margin-bottom: 25px;
  text-align: left;
}

.pb-ts-add-more i {
  font-size: 20px;
  color: var(--pb-green);
}

.pb-ts-add-more div {
  flex-grow: 1;
}

.pb-ts-add-more strong {
  display: block;
  color: var(--pb-green);
  font-size: 14px;
}

.pb-ts-add-more span {
  font-size: 12px;
  color: var(--pb-text-light);
}

.pb-ts-add-text {
  color: var(--pb-green);
  font-weight: 700;
  font-size: 13px;
}

.pb-ts-totals {
  border-top: 1px solid var(--pb-border);
  padding-top: 15px;
}

.pb-ts-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--pb-text);
}

.pb-ts-row strong {
  color: var(--pb-green);
}

.pb-ts-footer {
  background: white;
  padding: 10px 20px;
  border-top: 1px solid var(--pb-border);
}

.pb-ts-footer-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
  font-size: 13px;
}

.pb-ts-error-text {
  color: var(--pb-alert);
  font-weight: 600;
}

.pb-ts-subtotal {
  color: var(--pb-text-light);
}

.pb-btn-checkout {
  width: fit-content;
  background: #D0D0D0;
  color: white;
  border: none;
  padding: 15px;
  border-radius: 25px;
  font-weight: 700;
  font-size: 14px;
  cursor: not-allowed;
  transition: all 0.3s;
}

.pb-btn-checkout.ready {
  background: var(--pb-green);
  cursor: pointer;
}
/* ── Grilla responsive desktop (agregado 2026-06-13 por Claude/Álvaro) ──
   pack-builder.css no traía NINGUNA media query → .pb-grid quedaba en 2 columnas
   a cualquier ancho. Esto sube a 3 col en tablet y 4 en desktop, manteniendo
   2 col en mobile (base). .pb-grid-acomp (sheet de acompañamientos) se respeta. */
@media (min-width: 700px) and (max-width: 1024px) {
  .pb-grid:not(.pb-grid-acomp) { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1025px) {
  .pb-grid:not(.pb-grid-acomp) { grid-template-columns: repeat(4, 1fr); }
}

/* ── Cards más compactas en desktop (2026-06-13) — el builder nuevo era full-width
   (cards de ~340px). Topamos el ancho del contenido a ~960px y lo centramos para
   que 4 columnas queden ~220px, como el builder original. */
@media (min-width: 1025px) {
  .pb-main { max-width: 960px; margin-left: auto; margin-right: auto; }
}