/* ============================================
   ITEM DETAIL MODAL (PREMIUM HIGH-END)
   ============================================ */

.item-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

.item-modal-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.item-modal {
  background: linear-gradient(180deg, #1a1a1a 0%, #0a0a0a 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  width: 100%;
  max-width: 650px;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: scale(0.9) translateY(40px);
  opacity: 0;
  transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.6s ease;
  box-shadow: 0 40px 100px rgba(0,0,0,0.8), 0 0 0 1px rgba(255,107,0,0.15);
  position: relative;
}

.item-modal-overlay.active .item-modal {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.item-modal-header {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 100;
}

.item-modal-close {
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: #fff;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
}

.item-modal-close:hover {
  background: var(--color-orange);
  color: #000;
  border-color: var(--color-orange);
  transform: rotate(180deg) scale(1.1);
}

.item-modal-content {
  padding: 48px 48px 24px 48px;
  overflow-y: auto;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: var(--color-orange) transparent;
}

.item-modal-content::-webkit-scrollbar {
  width: 6px;
}

.item-modal-content::-webkit-scrollbar-thumb {
  background: var(--color-orange);
  border-radius: 10px;
}

.item-modal-title-row {
  margin-bottom: 32px;
  position: relative;
}

.item-modal-name {
  font-size: 2.75rem;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
  background: linear-gradient(to right, #fff 0%, #aaa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.item-modal-desc {
  color: var(--color-text-secondary);
  font-size: 1.125rem;
  line-height: 1.6;
  max-width: 90%;
  opacity: 0.8;
}

.item-modal-section {
  margin-bottom: 40px;
  animation: modalFadeIn 0.5s ease backwards;
}

.item-modal-section:nth-child(1) { animation-delay: 0.1s; }
.item-modal-section:nth-child(2) { animation-delay: 0.2s; }
.item-modal-section:nth-child(3) { animation-delay: 0.3s; }

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

.item-modal-section-title {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--color-orange);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.item-modal-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, rgba(255,107,0,0.3), transparent);
}

/* Choice Buttons */
.modal-choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 16px;
}

.choice-btn {
  padding: 20px 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  position: relative;
  overflow: hidden;
}

.choice-btn::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: radial-gradient(circle at center, rgba(255,107,0,0.1), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.choice-btn:hover {
  border-color: rgba(255, 107, 0, 0.4);
  background: rgba(255, 107, 0, 0.05);
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.choice-btn:hover::before {
  opacity: 1;
}

.choice-btn.active {
  background: var(--color-orange);
  color: #000;
  border-color: var(--color-orange);
  box-shadow: 0 12px 25px rgba(255, 107, 0, 0.4);
  transform: scale(1.03);
}

.choice-name {
  display: block;
  font-weight: 800;
  font-size: 0.95rem;
  z-index: 1;
}

.choice-price {
  font-size: 0.8rem;
  font-weight: 600;
  opacity: 0.7;
  z-index: 1;
}

/* Footer */
.item-modal-footer {
  padding: 32px 48px;
  background: rgba(20, 20, 20, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  gap: 24px;
  position: sticky;
  bottom: 0;
  z-index: 10;
}

.modal-qty-control {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 100px;
  padding: 6px;
}

.modal-qty-btn {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  cursor: pointer;
}

.modal-qty-btn:hover {
  background: var(--color-orange);
  color: #000;
  border-color: var(--color-orange);
  transform: scale(1.1);
}

.modal-qty-val {
  font-size: 1.4rem;
  font-weight: 900;
  min-width: 35px;
  text-align: center;
  color: #fff;
}

.modal-add-btn {
  flex: 1;
  background: linear-gradient(135deg, var(--color-orange) 0%, #ff8c00 100%);
  color: #000;
  border: none;
  border-radius: 16px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 2px;
  box-shadow: 0 15px 30px rgba(255, 107, 0, 0.3);
  font-size: 1.1rem;
  padding: 20px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
}

.modal-add-btn:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(255, 107, 0, 0.5);
  filter: brightness(1.1);
}

.modal-add-btn:active {
  transform: translateY(-2px) scale(0.98);
}

/* Notes Textarea */
.item-modal-notes {
  width: 100%;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  color: #fff;
  padding: 20px;
  font-family: inherit;
  font-size: 1rem;
  resize: none;
  transition: all 0.3s ease;
  margin-top: 12px;
}

.item-modal-notes:focus {
  outline: none;
  border-color: var(--color-orange);
  background: rgba(255, 107, 0, 0.05);
  box-shadow: 0 0 0 1px var(--color-orange);
}

.item-modal-notes::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

@media (max-width: 768px) {
  .item-modal-overlay {
    padding: 0;
  }
  .item-modal {
    height: 100%;
    max-height: 100vh;
    border-radius: 0;
    border: none;
  }
  .item-modal-content {
    padding: 100px 24px 140px 24px;
  }
  .item-modal-name {
    font-size: 2.25rem;
  }
  .item-modal-footer {
    padding: 20px 24px 30px 24px;
    flex-direction: column;
    gap: 16px;
    background: rgba(15, 15, 15, 0.95);
  }
  .modal-qty-control {
    width: 100%;
    justify-content: center;
  }
  .modal-add-btn {
    width: 100%;
  }
}
