/* ================== Promotion Popup CSS Ultra Responsive Móvil ================== */
.promo-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  display: flex;
  justify-content: center;
  align-items: flex-end;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.promo-modal.active {
  opacity: 1;
}

.promo-sheet {
  width: 100%;
  max-width: 500px;
  background-color: #111111;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideUpPromo 0.3s ease;
}

.promo-header {
    position: relative;
    background-color: #a80101;
    color: #FFFFFF;
    padding: 16px 55px 16px 16px; /* deja espacio para la X */
    text-align: center;
}

.promo-header .promo-drag {
  width: 50px;
  height: 5px;
  background: #FFFFFF;
  border-radius: 3px;
  margin: 0 auto 8px auto;
}

.promo-header h2 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: bold;
    text-align: center;
}

.promo-header p {
    margin: 6px 0 0 0;
    font-size: 1rem;
    color: #C8E6C9;
    text-align: center;
}

.promo-header .close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 35px;
    height: 35px;

    display:flex;
    align-items:center;
    justify-content:center;

    font-size: 1.5rem;
    cursor:pointer;
    color:#FFFFFF;
}

.promo-body {
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.promotion-grid {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 10px;
}

.promo-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 8px;
  background-color: #1C1C1C;
  color: #FFFFFF;
  transition: all 0.25s ease;
}

.promo-item-img-wrapper {
    width:100%;
    aspect-ratio:1 / 1;
    display:flex;
    justify-content:center;
    align-items:center;
    overflow:hidden;
}


.promo-item-img-wrapper img {
    width:90%;
    height:90%;
    object-fit:contain;
    border-radius:12px;
}

.promo-item-name {
  margin-top: 8px;
  font-size: 0.9rem;
  color: #FFFFFF;
}

.confirm-btn {
  margin: 12px auto 16px auto;
  padding: 12px 20px;
  font-size: 1rem;
  font-weight: bold;
  color: #FFFFFF;
  background-color: #D32F2F;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: block;
  transition: background-color 0.2s ease;
}

.confirm-btn:hover {
  background-color: #B71C1C;
}

.confirm-btn:disabled {
  background-color: #555 !important;
  cursor: not-allowed;
  opacity: 0.6;
}

.promo-item.selected {
  border: 2px solid #D32F2F !important;
  background-color: #3E1C1C !important;
  transform: scale(1.05);
  box-shadow: 0 0 6px rgba(211,47,47,0.5);
}

.promo-item:hover {
  border-color: #D32F2F;
}

.promo-item.disabled {
  opacity: 0.5;
  pointer-events: none;
  filter: grayscale(60%);
  transform: scale(1);
}

.promo-counter {
  font-size: 0.9rem;
  color: #FFDADA;
  text-align: center;
  margin-top: 4px;
}

/* Animación */
@keyframes slideUpPromo {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ================== Ultra Responsive Móvil ================== */
@media (max-width: 768px) {
  .promo-sheet {
    max-width: 100%;
    border-radius: 14px 14px 0 0;
    max-height: 95vh;
  }

 .promotion-grid {
    gap: 8px !important;
}

  .promo-item-img-wrapper {
    aspect-ratio: 1 / 1;
  }

  .promo-item-img-wrapper img {
    object-fit: contain; /* centrada y proporcional */
    width: 90%;
    height: 90%;
  }

  .promo-item-name {
    font-size: 0.8rem;
  }

  .promo-body {
    padding: 10px;
    max-height: 80vh;
    overflow-y: auto;
  }

  .confirm-btn {
    width: 100%;
    margin: 10px 0;
    padding: 10px;
    font-size: 0.9rem;
  }

  .promo-header h2 {
    font-size: 1.2rem;
  }

  .promo-header p {
    font-size: 0.9rem;
  }

  .promo-header .close {
    font-size: 1.3rem;
    top: 8px;
    right: 10px;
  }
}

/* Extra pequeño (<480px) */
@media (max-width: 480px) {

    .promotion-grid {
        gap: 6px !important;
    }

    .promo-item-img-wrapper {
        aspect-ratio: 1 / 1;
        display: flex;
        justify-content: center;
        align-items: center;
        overflow: hidden;
    }

    .promo-item-img-wrapper img {
        width: 90%;
        height: 90%;
        object-fit: contain;
        border-radius: 12px;
    }

    .promo-item-name {
        font-size: 0.75rem;
    }

    .promo-body {
        max-height: 75vh;
    }
}
/* ================== GRUPOS DE PROMOCION ================== */

.promo-group-title {
    width: 100%;
    grid-column: 1 / -1;
    margin: 15px 0 8px 0;
    padding: 8px 10px;
    background: #a80101;
    color: #ffffff;
    border-radius: 8px;
    font-size: 1rem;
    text-align: left;
    font-weight: bold;
}


/* Contenedor de cada grupo */
.promo-group-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    width: 100%;
}

/* FIX PROMOCIONES POR GRUPOS */
.promotion-grid {
    width: 100%;
}


.promo-group-container {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: 100%;
}


.promo-item {
    width: 100%;
    box-sizing: border-box;
}