/**
 * Product Page (Sản Phẩm) Styles
 * Custom styles for the products page
 */

.question-form button:hover {
  background: linear-gradient(135deg, #e02b2b, #ff4444) !important;
  box-shadow: 0 6px 20px rgba(255, 51, 51, 0.5) !important;
  transform: translateY(-2px);
}

#sizeOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 10000;
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

#sizeOverlay.show {
  opacity: 1;
}

.size-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: white;
  padding: 0;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
  z-index: 10001;
  min-width: 480px;
  max-width: 90%;
  opacity: 0;
  transition: all 0.3s ease;
}

.size-modal.show {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

.modal-close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: #f5f5f5;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  z-index: 1;
}

.modal-close-btn:hover {
  background: #ff3333;
  color: white;
  transform: rotate(90deg);
}

.modal-header-section {
  padding: 30px 30px 20px 30px;
  text-align: center;
  border-bottom: 2px solid #f5f5f5;
}

.size-selection-section {
  padding: 25px 30px;
}

.size-label {
  display: block;
  margin-bottom: 15px;
  font-weight: 600;
  color: #333;
  font-size: 15px;
}

.size-label i {
  color: #ff3333;
  margin-right: 5px;
}

.size-options-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
  gap: 12px;
  margin-bottom: 15px;
}

.size-option {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 10px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  font-size: 16px;
  color: #555;
  background: white;
  text-align: center;
  min-height: 50px;
}

.size-option:hover {
  border-color: #ff3333;
  color: #ff3333;
  background: #fff5f5;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 51, 51, 0.15);
}

.size-option.selected {
  background: linear-gradient(135deg, #ff3333, #ff5555);
  color: white;
  border-color: #ff3333;
  box-shadow: 0 4px 15px rgba(255, 51, 51, 0.3);
  transform: scale(1.05);
}

.size-option.selected:hover {
  background: linear-gradient(135deg, #e02b2b, #ff4444);
}

.size-error-message {
  color: #ff3333;
  font-size: 13px;
  margin: 10px 0 0 0;
  padding: 10px;
  background: #fff5f5;
  border-radius: 6px;
  border-left: 3px solid #ff3333;
}

.modal-footer-section {
  padding: 20px 30px 30px 30px;
  display: flex;
  gap: 12px;
  border-top: 2px solid #f5f5f5;
}

.btn-cancel {
  flex: 1;
  padding: 14px 20px;
  border: 2px solid #ddd;
  border-radius: 10px;
  background: white;
  color: #666;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-cancel:hover {
  background: #f5f5f5;
  border-color: #999;
  color: #333;
}

.btn-add-cart {
  flex: 2;
  padding: 14px 20px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #ff3333, #ff5555);
  color: white;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(255, 51, 51, 0.3);
}

.btn-add-cart:hover {
  background: linear-gradient(135deg, #e02b2b, #ff4444);
  box-shadow: 0 6px 20px rgba(255, 51, 51, 0.4);
  transform: translateY(-1px);
}

.btn-add-cart:active {
  transform: translateY(0);
}

@keyframes shake {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translate(-52%, -50%) scale(1);
  }
  20%,
  40%,
  60%,
  80% {
    transform: translate(-48%, -50%) scale(1);
  }
}

@media (max-width: 576px) {
  .size-modal {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    transform: translateY(100%);
    min-width: 100%;
    max-width: 100%;
    width: 100%;
    border-radius: 20px 20px 0 0;
    max-height: 85vh;
    overflow-y: auto;
  }

  .size-modal.show {
    transform: translateY(0);
  }

  .modal-header-section {
    padding: 20px 20px 15px 20px;
  }

  .size-selection-section {
    padding: 15px 20px;
  }

  .modal-footer-section {
    padding: 15px 20px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 20px));
    flex-direction: column;
  }

  .size-options-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
  }

  .size-option {
    padding: 10px 18px;
    font-size: 14px;
    min-height: auto;
    min-width: 50px;
    flex: 0 0 auto;
  }

  .btn-cancel,
  .btn-add-cart {
    width: 100%;
  }

  .modal-close-btn {
    display: none;
  }

  /* Ẩn nút hotline khi modal mở */
  #sizeOverlay.show ~ .hotline-phone-ring-wrap,
  body:has(#sizeOverlay.show) .hotline-phone-ring-wrap {
    display: none !important;
  }
}
